FlexQoS FlexQoS - Flexible QoS Enhancement Script for Adaptive QoS

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

dave14305

Part of the Furniture
This is FlexQoS, a fork of the original, groundbreaking FreshJR_QOS script written by @FreshJR.

FlexQoS provides a fully customizable Adaptive QoS experience.

Version 1.0.6 - 20-Nov-2020

Enhancements:

  • Support for at least 24 user iptables rules
  • Support for at least 32 user appdb rules
  • Support for IPv6 iptables rules that are port-based rules only
  • Experimental support for IPv6 device filter
  • Edit or delete previously hard-coded rules
  • Customize Untracked category (Mask 000000) destination using custom AppDB rule (default class is Others)
  • Support for new Asus classes Work-From-Home and Learn-From-Home
  • Learn-From-Home is repurposed to handle Game Downloads traffic and the priority can be adjusted unlike the former Defaults class
  • Experimental changes to the connection list to prefer client names over IPs, including IPv6
  • Implemented new table API for iptables rules to validate input and allow in-cell editing
  • Auto-populate Application name when entering Mark in AppDB rules
  • Search application names in WebUI to find the Mark (mimic CLI appdb feature)
  • Removed hard-coded 5 minute startup delay. Startup only sleeps in 10 sec increments if all tc rules not yet created
  • Rewritten for Merlin Addon API
  • Converts existing FreshJR_QOS rules to new format and creates backup file of old rules via separate migrate_FreshJR.sh script on Github
  • Trigger persistence check immediately after TrendMicro signature check/update (restart_wrs)
  • Add DoT port 853 to router traffic exclusion hard-coded rule
  • Flush conntrack table to ensure iptables rules affect pre-existing connections
Changes:
  • Simplified interactive menu environment and eliminated interactive rules and rates options (use GUI)
  • Leaves original Merlin Classification tab intact
  • Eliminated support for legacy user rules hardcoded in script
  • Gaming rule is now like any other rule (Local IP/CIDR + Proto Both + RPort !80,443 + Mask 000000 = Class Gaming)
Fixes since FreshJR_QOS v8.8:
  • AppDB rule detection logic
  • Fixed wildcard marks not being applied in tc rules
  • Fixed port 443 typo in Gaming rule
Known Issues:
  • IPv6 support is experimental
  • IPv6 upload traffic may not be limited by QoS
  • The name FlexQoS isn't exciting and Flex might be overused in the world. I felt it was non-personal enough to outlast dave14305. By keeping the F in the name, I felt this pays a small tribute to the original script and author.
Requirements:
  • ASUSWRT-Merlin 384.15 or higher
  • SSH, JFFS scripts enabled
  • Adaptive QoS enabled
Installation:
Warning: Installing FlexQoS will uninstall FreshJR_QOS! If you have legacy rules hard-coded in the script, please backup JFFS or copy /jffs/scripts/FreshJR_QOS to a safe location. The installation will migrate existing FreshJR GUI rules before uninstalling. FreshJR_QOS can be reinstalled via amtm if you choose to uninstall FlexQoS.

The simplest method for installation is to use amtm, option i, option 3.

Paste the following command into your SSH terminal session for manual installation:
Code:
/usr/sbin/curl "https://raw.githubusercontent.com/dave14305/FlexQoS/master/flexqos.sh" -o /jffs/addons/flexqos/flexqos.sh --create-dirs && chmod +x /jffs/addons/flexqos/flexqos.sh && sh /jffs/addons/flexqos/flexqos.sh -install
Source: https://github.com/dave14305/FlexQoS

Updates:
Code:
flexqos -update
# or
sh /jffs/addons/flexqos/flexqos.sh -update
Screenshots
Traffic Pie Chart


Customization Tables


Create New Rule

Donations
Donations are graciously accepted via Paypal.
 
Last edited:

dave14305

Part of the Furniture
To-do List:
  • Backport Merlin's filters on the connection table
  • Add a "reset to defaults" for the UI rules in case someone messes up badly
  • Document the script logic so others can more easily contribute to the project
Wish List:
  • Figure out how to use 2 separate tableApi tables with in-cell editing on the same page. Editing the second table modifies the first table, so had to use 2 different table types.
  • Figure out how to support rule naming without using up valuable custom_settings space
  • Figure out if there's an easier way to customize the tableApi validation functions instead of cloning table.js and tableValidator.js
 
Last edited:

dave14305

Part of the Furniture
FAQ

How should I set my QoS priorities?

There is 1 requirement to ensure the script works properly:
  1. Learn-From-Home is lower priority than Video and Audio Streaming (I recommend the bottom of the priority list).
  2. There is no longer a #2.
User-Contributed Rules

NameLocal IP/CIDRRemote IP/CIDRProtoLocal PortRemote PortMarkClass
FreshJR Gaming RuleIP/CIDR of your
gaming devices
BOTH!80,443000000Gaming
Zoom Calls (works by
default in latest sigs)
UDP8801:8810000000Work-From-Home
Skype for Business/
Microsoft Teams
UDP3478:3481000000Work-From-Home
 
Last edited:

QuikSilver

Very Senior Member
I may have to tape a $20 bill to my forehead to get the attention of the Cake users... :p
Been waiting on this! Thought you were waiting until the final 384.18 release. And I will admit I've been watching the CakeQOS thread pretty closely but the trend micro stuff doesn't concern me as much as others it seems. I understand the set it and forget it mentality but I can't wrap my brain around not seeing a graph or chart to go with it. o_O
 
Last edited:

QuikSilver

Very Senior Member
So installation seemed to go without a hitch...most of my rules were done in the gui so I didn't back up anything. Do I need to wait for data to populate though?

Code:
Installing FlexQoS...
Checking firmware version...
Removing old FreshJR_QOS files. Reinstall with amtm if necessary.
Removing profile aliases...Done.
Removing cron job...Done.
Removing firewall-start entry...Done.
Removing FreshJR_QOS script...Done.
Removing FreshJR_QOS webpage...Done.
FreshJR_QOS settings backed up to /jffs/addons/flexqos/restore_freshjr_nvram.sh
Downloading WebUI files...
Mounting WebUI page...
Adding FlexQoS entries to Merlin user scripts...
Adding nightly cron job...
Adding flexqos link in Entware /opt/bin...
FlexQoS installation complete!

FlexQoS v0.3 released 06/24/2020

Advanced configuration available via:
http://RT-AC86U-AEA8.:80/user9.asp

Would you like to restart QoS for modifications to take effect? [Y=Yes N=No]: y
Restarting QoS and Firewall...

Done.
 

QuikSilver

Very Senior Member
upload_2020-6-24_21-11-33.png
 

QuikSilver

Very Senior Member

dave14305

Part of the Furniture
That is funky. Do you have an adblocker trying to interfere with the page? Can you post or PM the contents of /jffs/addons/flexqos/restore_freshjr_nvram.sh so I can see if your rules are unexpected in some way?

Code:
grep ^flexqos /jffs/addons/custom_settings.txt
cat /jffs/addons/flexqos/restore_freshjr_nvram.sh
 

QuikSilver

Very Senior Member
That is funky. Do you have an adblocker trying to interfere with the page? Can you post or PM the contents of /jffs/addons/flexqos/restore_freshjr_nvram.sh so I can see if your rules are unexpected in some way?
I use Brave but the shields are off for the router page. Incoming PM with rules....
 

QuikSilver

Very Senior Member
Bug squashed with v0.4. Use flexqos -update to update.
Done and Done....Feel free to clean up my first couple posts as they aren't needed anymore and just take up space. Also how long before we get inclusion to AMTM now. Paging Dr @thelonelycoder :cool:
 

dave14305

Part of the Furniture
Done and Done....Feel free to clean up my first couple posts as they aren't needed anymore and just take up space. Also how long before we get inclusion to AMTM now. Paging Dr @thelonelycoder :cool:
I have no power over anything but my own posts. As my first customer, you will be enshrined forever in this thread, similar to framing the first $1 bill in a newly opened store.

I don't want to rush this out to the masses until I'm sure it works. So much was changed under the hood to break the 4-rule barrier that it needs to cook a little more as a beta.

Also, I hobbled the menu system so much that it's probably not ready for clean integration/navigation with amtm yet.
 
Last edited:

QuikSilver

Very Senior Member
I have no power over anything but my own posts. As my first customer, you will be enshrined forever in this thread, similar to framing the first $1 bill in a newly opened store.
In that case then...:D:D:D
 

QuikSilver

Very Senior Member
Happy to report second/remote unit updated without a hitch. Data already showing with correct rules and no reboot was needed to remove freshjr customization portion from classification tab.
 

Vexira

Part of the Furniture
Well I hope that atlest I'll be in second place because this looks amazing it's like a breath of fresh air to the script, please keep up the great work.
 

Jack Yaz

Part of the Furniture
How much space does a typical iptables rule use in custom_settings.txt? It looks like that's where you're saving the rules now, is that right? I'm just conscious that that file has an 8kb limit
 

Jack Yaz

Part of the Furniture
I'll be installing this after work tonight :D

First I need to figure out what I modified in my copy of FreshJR to see if I need to add it as a new rule in your script
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top