What's new

FlexQoS FlexQoS 1.0 - Flexible QoS Enhancement Script for Adaptive QoS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Version 1.0.6 Released 20-Nov-2020
  • Removed support to migrate legacy FreshJR_QOS rules to new FlexQoS format. Separate script migrate_FreshJR.sh available on Github if needed.
  • Revert am_get_webui_page function to Merlin's version. Allows support for 20 addon webpages in 386.1.
  • Simplified service-event handler functions.
  • Removed ability to disable conntrack flushing (always enabled)
  • Combine update and install functions between CLI and webui.
  • Add startup check to ensure JFFS scripts are enabled.
  • Skip applying custom bandwidth settings if Adaptive QoS automatic bandwidth is enabled.
  • Detect WAN interface name internally instead of relying on firewall-start passing it as argument.
  • Trigger FlexQoS on service restart_qos as well as restart_firewall. This will allow easier integration with spdMerlin 4.0 with AutoBW in the future.
Update process was reworked significantly behind the scenes so if your update fails, you might need to just install again. Hopefully it works the first time. ;)

Nothing terribly visibly sexy in this release, but I'm starting to rework a lot of the code for the next major release to be leaner and better documented. More chance of things breaking in this release than looking different.
I assume game transferring is game downloads. They show up different from rules to the pie charts
 
I assume game transferring is game downloads. They show up different from rules to the pie charts
Yes, Transferring has always been changed to Downloads in the original FreshJR script. Probably due to the width of “Transferring” in the dropdown menus.
 
Yes, Transferring has always been changed to Downloads in the original FreshJR script. Probably due to the width of “Transferring” in the dropdown menus.
thanks, but weird, first time ive ever seen "transferring" shown. Im running 386 alpha3
 
Update went smooth for me. Nice job!
 
Update went smoothly for me! In fact, If you REALLY like version 1.0.6, I see that you can keep updating your version 1.0.6 to version 1.0.6! :D
 

Attachments

  • Screenshot_2020-11-20 FlexQoS.png
    Screenshot_2020-11-20 FlexQoS.png
    49.2 KB · Views: 104
Update went smoothly for me! In fact, If you REALLY like version 1.0.6, I see that you can keep updating your version 1.0.6 to version 1.0.6! :D
I imagine that can happen if it takes a couple seconds longer for the update process to start writing the version status back to the webui, and it actually finds the previous status update before it can get overwritten with the current status. Can you reproduce this more than once?

v1.0.6 - some is Good, more is Better, too much is Just Right!
 
Update went smoothly for me! In fact, If you REALLY like version 1.0.6, I see that you can keep updating your version 1.0.6 to version 1.0.6! :D
I imagine that can happen if it takes a couple seconds longer for the update process to start writing the version status back to the webui, and it actually finds the previous status update before it can get overwritten with the current status. Can you reproduce this more than once?

v1.0.6 - some is Good, more is Better, too much is Just Right!

I've tried this a few times..... First check for update, then you see the screen shot below, then update... it will begin the update process with that progress circle..... so I can achieve "too much is Just Right!"
 

Attachments

  • Screenshot_2020-11-20 FlexQoS(1).png
    Screenshot_2020-11-20 FlexQoS(1).png
    48.5 KB · Views: 97
I've tried this a few times..... First check for update, then you see the screen shot below, then update... it will begin the update process with that progress circle..... so I can achieve "too much is Just Right!"
Can you run these commands over ssh?
Bash:
cat /jffs/scripts/service-event-end
ls -l /jffs/scripts/service-event-end
cat /www/user/flexqos/detect_update.js
ls -l /www/user/flexqos/detect_update.js
date
 
Last edited:
Can you run these commands over ssh?
Bash:
cat /jffs/scripts/service-event-end
ls -l /jffs/scripts/service-event-end
cat /www/user/flexqos/detect_update.js
ls -l /www/user/flexqos/detect_update.js
date

xxxx@RT-AC68U-E870:/tmp/home/root# cat /jffs/scripts/service-event-en
d
#!/bin/sh

if [ "$1" = "restart" ] && [ "$2" = "wrs" ]; then { sh /jffs/addons/flexqos/flex qos.sh -check & } ; fi # FlexQoS Addition
if [ "$1" = "start" ] && [ "$2" = "sig_check" ]; then { sh /jffs/addons/flexqos/ flexqos.sh -check & } ; fi # FlexQoS Addition
if [ "$1" = "start" ] && $(echo "$2" | /bin/grep -q "flexqos"); then { sh /jffs/ addons/flexqos/flexqos.sh "$2" & } ; fi # FlexQoS Addition
xxxx@RT-AC68U-E870:/tmp/home/root#

xxxx@RT-AC68U-E870:/tmp/home/root# ls -l /jffs/scripts/service-event-end
-rwxr-xr-x 1 JAKDsCzp root 398 Nov 2 11:28 /jffs/scripts/service-event-end
xxxx@RT-AC68U-E870:/tmp/home/root#

xxxx@RT-AC68U-E870:/tmp/home/root# cat /www/user/flexqos/detect_update.js
var verUpdateStatus = "v1.0.6"

xxxx@RT-AC68U-E870:/tmp/home/root# ls -l /www/user/flexqos/detect_update.js
-rw-rw-rw- 1 JAKDsCzp root 31 Nov 20 16:18 /www/user/flexqos/detect_update.js

xxxx@RT-AC68U-E870:/tmp/home/root# date
Fri Nov 20 17:44:36 PST 2020
xxxx@RT-AC68U-E870:/tmp/home/root#
 
xxxx@RT-AC68U-E870:/tmp/home/root# cat /jffs/scripts/service-event-en
d
#!/bin/sh

if [ "$1" = "restart" ] && [ "$2" = "wrs" ]; then { sh /jffs/addons/flexqos/flex qos.sh -check & } ; fi # FlexQoS Addition
if [ "$1" = "start" ] && [ "$2" = "sig_check" ]; then { sh /jffs/addons/flexqos/ flexqos.sh -check & } ; fi # FlexQoS Addition
if [ "$1" = "start" ] && $(echo "$2" | /bin/grep -q "flexqos"); then { sh /jffs/ addons/flexqos/flexqos.sh "$2" & } ; fi # FlexQoS Addition
xxxx@RT-AC68U-E870:/tmp/home/root#

xxxx@RT-AC68U-E870:/tmp/home/root# ls -l /jffs/scripts/service-event-end
-rwxr-xr-x 1 JAKDsCzp root 398 Nov 2 11:28 /jffs/scripts/service-event-end
xxxx@RT-AC68U-E870:/tmp/home/root#

xxxx@RT-AC68U-E870:/tmp/home/root# cat /www/user/flexqos/detect_update.js
var verUpdateStatus = "v1.0.6"

xxxx@RT-AC68U-E870:/tmp/home/root# ls -l /www/user/flexqos/detect_update.js
-rw-rw-rw- 1 JAKDsCzp root 31 Nov 20 16:18 /www/user/flexqos/detect_update.js

xxxx@RT-AC68U-E870:/tmp/home/root# date
Fri Nov 20 17:44:36 PST 2020
xxxx@RT-AC68U-E870:/tmp/home/root#
OK, your /jffs/scripts/service-event-end script is still from the previous version. How about the main script? grep ^release /jffs/addons/flexqos/flexqos.sh
 
OK, your /jffs/scripts/service-event-end script is still from the previous version. How about the main script? grep ^release /jffs/addons/flexqos/flexqos.sh
xxxx@RT-AC68U-E870:/tmp/home/root# grep ^release /jffs/addons/flexqos/flexqos.sh
release=2020-11-20
xxxx@RT-AC68U-E870:/tmp/home/root#
 
xxxx@RT-AC68U-E870:/tmp/home/root# grep ^release /jffs/addons/flexqos/flexqos.sh
release=2020-11-20
xxxx@RT-AC68U-E870:/tmp/home/root#
OK, run flexqos update and if necessary force it to overwrite when prompted. Then run the cat /jffs/scripts/service-event-end again to see if it has changed.
 
OK, run flexqos update and if necessary force it to overwrite when prompted. Then run the cat /jffs/scripts/service-event-end again to see if it has changed.
xxxx@RT-AC68U-E870:/tmp/home/root# flexqos update

FlexQoS v1.0.6 released 2020-11-20

Checking for updates
FlexQoS hotfix is available.
Would you like to update now? [1=Yes 2=No] : 1

Installing: FlexQoS...

FlexQoS v1.0.6 released 2020-11-20

Installing FlexQoS...
Checking firmware support...
Downloading WebUI files...
Adding FlexQoS entries to Merlin user scripts...
Adding nightly cron job...
Adding flexqos link in Entware /opt/bin...
FlexQoS installation complete!

FlexQoS v1.0.6 released 2020-11-20

Advanced configuration available via:
http://192.168.44.1/user1.asp

Would you like to restart QoS for modifications to take effect? [1=Yes 2=No]: 1
Restarting QoS...

Done.
xxxx@RT-AC68U-E870:/tmp/home/root# cat /jffs/scripts/service-event-end
#!/bin/sh

if [ "$2" = "qos" ] || [ "$2" = "wrs" ] || [ "$2" = "sig_check" ]; then { sh /jffs/addons/flexqos/flexqos.sh -start & } ; fi # FlexQoS Addition
if echo "$2" | /bin/grep -q "^flexqos"; then { sh /jffs/addons/flexqos/flexqos.sh "${2#flexqos}" & } ; fi # FlexQoS Addition
xxxx@RT-AC68U-E870:/tmp/home/root#

Sorry for the long turnaround with this issue. Got a long Distance call and the wife needed me. This worked! Thanks for your help, time and great script!
 

Attachments

  • Screenshot_2020-11-20 FlexQoS(2).png
    Screenshot_2020-11-20 FlexQoS(2).png
    51 KB · Views: 72
Last edited:
I realized that Roblox Game appears in the Tracked connections as a Game Downloads (Transferring) because of the default Game Downloads rule in the IP Table

Game DownloadsTCP80,44308****Game Downloads

and the default Mark for Roblox Game in the AppDB Redirection Rules is 0800FD which is subset of the 08**** but despite having that , Roblox is still Classified as Game Downloads not Gaming. Is this intentional?

Roblox Game0800FDGaming
 
I realized that Roblox Game appears in the Tracked connections as a Game Downloads (Transferring) because of the default Game Downloads rule in the IP Table

Game DownloadsTCP80,44308****Game Downloads

and the default Mark for Roblox Game in the AppDB Redirection Rules is 0800FD which is subset of the 08**** but despite having that , Roblox is still Classified as Game Downloads not Gaming. Is this intentional?

Roblox Game0800FDGaming
Yes, the iptables rules will supercede the AppDB rules every time. So if Gaming traffic is using ports 80 or 443, it will be considered Game Downloads. You don't have to keep the Game Downloads rule if it's not useful for your environment. I don't do any gaming, so I have no real experience with the ins and outs of how well they work in the real world.
 
Yes, the iptables rules will supercede the AppDB rules every time. So if Gaming traffic is using ports 80 or 443, it will be considered Game Downloads. You don't have to keep the Game Downloads rule if it's not useful for your environment. I don't do any gaming, so I have no real experience with the ins and outs of how well they work in the real world.

Many thanks for the prompt response and clarification @dave14305
 
Last edited:
First I just wanted to say thanks for all the great work @dave14305 - really much appreciated :) .

I have a question regarding iptables rules and device priority (in the main bandwidth monitor tab): if I set my devices to various priorities (i.e. gaming devices to highest, file servers to lowest, etc.) via "color coding" them in the gui - do I still need to have for example a "gaming rule" (where any packet of that device is catagorized to the relevant priority) to ensure that it will "actually" be highest priority - or would setting it in the bandwidth monitor be enough and the rule would be reduntant?

Thanks in advance!
 
Last edited:
First I just wanted to say thanks for all the great work @dave14305 - really much appreciated :) .

I have a question regarding iptables rules and device priority (in the main bandwidth monitor tab): if I set my devices to various priorities (i.e. gaming devices to highest, file servers to lowest, etc.) via "color coding" them in the gui - do I still need to have for example a "gaming rule" (where any packet of that device is catagorized to the relevant priority) to ensure that it will "actually" be highest priority - or would setting it in the bandwidth monitor be enough and the rule would be reduntant?

Thanks in advance!
On my router, I’ve never seen any evidence that setting device priorities on that page actually changes anything in iptables or tc, so my opinion is that it is broken or not intended to work with Adaptive QoS, or I’m not using it right.
 
First I just wanted to say thanks for all the great work @dave14305 - really much appreciated :) .

I have a question regarding iptables rules and device priority (in the main bandwidth monitor tab): if I set my devices to various priorities (i.e. gaming devices to highest, file servers to lowest, etc.) via "color coding" them in the gui - do I still need to have for example a "gaming rule" (where any packet of that device is catagorized to the relevant priority) to ensure that it will "actually" be highest priority - or would setting it in the bandwidth monitor be enough and the rule would be reduntant?

Thanks in advance!

From my experience these priorities update only the User-defined QoS rules in the Traditional QoS but not in Adaptive QoS so they should make no difference in FlexQoS.
 
Hi Dave,
I'm running FlexQOS 1.06 on an AC3200 FW 384.13_10. I setup streaming as the priority, but when Flex QOS is enabled, it kills media streaming, iPlayer, Netflix, Amazon, just hang.

I did a speed test with QOS on and off:
QOS ON:
DL 43.34 Mb/s
UL 10.05 Mb/s

QOS OFF:
DL 60.39 Mb/s
UL 9.53 Mb/s


Code:
FlexQoS v1.0.6 released 2020-11-20

Debug date: 2020-11-22 13:18:11-0500
Router Model: RT-AC3200
Firmware Ver: 384.13_10
WAN iface: eth0
tc WAN iface: eth0
Undf Prio: 2
Down Band: 8294
Up Band  : 52562
***********
Net Control: 1:10
Work-From-Home: 1:12
Gaming: 1:13
Others: 1:16
Web Surfing: 1:14
Streaming: 1:11
File Downloads: 1:15
Game Downloads: 1:17
***********
Downrates: 414, 414, 1658, 1244, 829, 414, 829, 414
Downceils: 8294, 8294, 8294, 8294, 8294, 8294, 8294, 8294
Downbursts: 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200
DownCbursts: 9600, 9600, 9600, 9600, 9600, 9600, 9600, 9600
DownQuantums: 5175, 5175, 20725, 15550, 10362, 5175, 10362, 5175
***********
Uprates: 2628, 2628, 10512, 7884, 5256, 2628, 15768, 2628
Upceils: 52562, 52562, 52562, 52562, 52562, 52562, 52562, 52562
Upbursts: 3200, 3200, 12800, 9600, 6400, 3200, 19200, 3200
UpCbursts: 65600, 65600, 65600, 65600, 65600, 65600, 65600, 65600
UpQuantums: 32850, 32850, 131400, 98550, 65700, 32850, 197100, 32850
***********
iptables settings: <>>udp>>500,4500>>3<>>udp>16384:16415>>>3<>>tcp>>119,563>>5<>>tcp>>80,443>08****>7
-o br0 -p udp -m multiport --sports 500,4500 -j MARK --set-mark 0x8006ffff/0x3fffff
-o eth0 -p udp -m multiport --dports 500,4500 -j MARK --set-mark 0x4006ffff/0x3fffff
-o br0 -p udp --dport 16384:16415 -j MARK --set-mark 0x8006ffff/0x3fffff
-o eth0 -p udp --sport 16384:16415 -j MARK --set-mark 0x4006ffff/0x3fffff
-o br0 -p tcp -m multiport --sports 119,563 -j MARK --set-mark 0x8003ffff/0x3fffff
-o eth0 -p tcp -m multiport --dports 119,563 -j MARK --set-mark 0x4003ffff/0x3fffff
-o br0 -p tcp -m multiport --sports 80,443 -m mark --mark 0x80080000/0xc03f0000 -j MARK --set-mark 0x803fffff/0x3fffff
-o eth0 -p tcp -m multiport --dports 80,443 -m mark --mark 0x40080000/0xc03f0000 -j MARK --set-mark 0x403fffff/0x3fffff
***********
appdb rules: <000000>6<00006B>6<0D0007>5<0D0086>5<0D00A0>5<12003F>4<13****>4<14****>4<1A****>5
filter change dev br0 prio 2 protocol all handle 827::800 u32 flowid 1:16
filter change dev eth0 prio 2 protocol all handle 827::800 u32 flowid 1:16
filter add dev br0 protocol all prio 2 u32 match mark 0x8000006B 0xc03fffff flowid 1:16
filter add dev eth0 protocol all prio 2 u32 match mark 0x4000006B 0xc03fffff flowid 1:16
filter add dev br0 protocol all prio 15 u32 match mark 0x800D0007 0xc03fffff flowid 1:15
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0007 0xc03fffff flowid 1:15
filter add dev br0 protocol all prio 15 u32 match mark 0x800D0086 0xc03fffff flowid 1:15
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0086 0xc03fffff flowid 1:15
filter add dev br0 protocol all prio 15 u32 match mark 0x800D00A0 0xc03fffff flowid 1:15
filter add dev eth0 protocol all prio 15 u32 match mark 0x400D00A0 0xc03fffff flowid 1:15
filter add dev br0 protocol all prio 20 u32 match mark 0x8012003F 0xc03fffff flowid 1:14
filter add dev eth0 protocol all prio 20 u32 match mark 0x4012003F 0xc03fffff flowid 1:14
filter change dev br0 prio 22 protocol all handle 802::800 u32 flowid 1:14
filter change dev eth0 prio 22 protocol all handle 802::800 u32 flowid 1:14
filter change dev br0 prio 23 protocol all handle 804::800 u32 flowid 1:14
filter change dev eth0 prio 23 protocol all handle 804::800 u32 flowid 1:14
filter change dev br0 prio 2 protocol all handle 827::802 u32 flowid 1:15
filter change dev eth0 prio 2 protocol all handle 827::802 u32 flowid 1:15

What am I missing?
 
Last edited:

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