Skip to content

Restructure config file and make functionality easier to understand in the readme #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

jeverley
Copy link
Owner

@jeverley jeverley commented Mar 31, 2025

What's changed

  • Overhaul the readme to make functionality more discoverable to new users
  • Global config section renamed to service and options amended
    • Option wmm renamed to wmm_mark_lan to make its function clearer
    • class_low_effort sets the default Low Effort DSCP mark, default is le
      • On kernel versions < 5.13 the default falls back to cs1 because le is not implemented in layer-cake
    • class_high_throughput sets the default High Throughput DSCP mark, default is af13
  • Created separate config sections for automatic detection methods
    • client_class_adoption for applying non-wan client DSCP marks to response packets
      • option: enabled
      • list: exclude_class ignores DSCP client class, defaults to CS6 and CS7
      • list: src_addr used to specify client IPs to include/exclude in adoption
    • bulk_client_detection for P2P type clients
      • option: enabled
      • option: min_bytes
      • option: min_connections
      • option: class, overrides the service default (class_low_effort)
    • high_throughput_service_detection for high throughput downloads like Windows Update & Steam
      • option: enabled
      • option: min_bytes
      • option: min_connections
      • option: class, overrides the service default (class_high_throughput)
  • Improve readability and maintainability of code in the main service init file.
  • To-do: auto migrate old config structure

@jeverley jeverley changed the title Restructure config file to make options clearer to understand Overhaul config and service readme to make functionality clearer to understand Mar 31, 2025
@jeverley jeverley changed the title Overhaul config and service readme to make functionality clearer to understand Overhaul config and service readme to make functionality easier to understand Mar 31, 2025
@jeverley jeverley force-pushed the config-restructure branch from 59e48f4 to 2ecca2e Compare March 31, 2025 17:21
@jeverley jeverley changed the title Overhaul config and service readme to make functionality easier to understand Restructure config file and make functionality easier to understand in the readme Mar 31, 2025
@jeverley jeverley force-pushed the config-restructure branch 2 times, most recently from 69f3f96 to dba804e Compare March 31, 2025 18:28
Kernels prior to 5.13 do not have mappings for LE in the layer-cake diffserv tins
@jeverley jeverley force-pushed the config-restructure branch from dba804e to 4d780d0 Compare March 31, 2025 18:30
@jeverley jeverley requested a review from ldir-EDB0 April 1, 2025 12:49
@jeverley
Copy link
Owner Author

jeverley commented Apr 1, 2025

Hi @ldir-EDB0 I've made some pretty heavy changes in support of making functionality clearer and adding more control to the automatic classification methods, considering making this a v2 release.

I have tested and compared the table created in my local OpenWrt 24.10 VM, but would appreciate a once over on your end.

I still need to finish the function for migrating config to the new structure.

@jeverley jeverley marked this pull request as draft April 1, 2025 12:53
@jumpsmm7
Copy link

jumpsmm7 commented Apr 3, 2025

@jeverley I know I am not a contributor here, but I have tested your changes here on a live setup using your new config and new changes. Here is my specs:
image

I do get an error message when reloading dscpclassify.
image

@jeverley
Copy link
Owner Author

jeverley commented Apr 3, 2025

I do get an error message when reloading dscpclassify. image

Hi @jumpsmm7, please could you share a copy of your config file?

@jumpsmm7
Copy link

jumpsmm7 commented Apr 4, 2025

I do get an error message when reloading dscpclassify. image

Hi @jumpsmm7, please could you share a copy of your config file?

config service
option wmm_mark_lan '1'

config client_class_adoption
option enabled '1'
list exclude_class 'cs6'
list exclude_class 'cs7'

config bulk_client_detection
option enabled '1'
option min_bytes '10000'
option min_connections '10'

config high_throughput_service_detection
option enabled '1'
option min_bytes '1000000'
option min_connections '3'

config ipset
option name 'xcloud'
option interval '1'
list entry '13.104.0.0/14' # Western Europe

config ipset
option name 'xcloud6'
option family 'ipv6'
option interval '1'
list entry '2603:1000::/24' # Western Europe

config rule
option name 'DNS'
list proto 'tcp'
list proto 'udp'
list dest_port '53'
list dest_port '853'
list dest_port '5353'
option class 'cs5'

config rule
option name 'DoH'
list proto 'tcp'
list proto 'udp'
list dest_ip '8.8.8.8' # Google
list dest_ip '8.8.4.4' # Google
list dest_ip '1.1.1.1' # Cloudflare
list dest_ip '1.0.0.1' # Cloudflare
list dest_ip '9.9.9.9' # Quad9 Secured
list dest_ip '149.112.112.112' # Quad9 Secured
list dest_ip '9.9.9.11' # Quad9 Secured w/ECS
list dest_ip '149.112.112.11' # Quad9 Secured w/ECS
list dest_ip '94.140.14.0/24' # AdGuard
list dest_ip '2001:4860:4860::8888' # Google
list dest_ip '2001:4860:4860::8844' # Google
list dest_ip '2606:4700:4700::1111' # Cloudflare
list dest_ip '2606:4700:4700::1001' # Cloudflare
list dest_ip '2620:fe::fe' # Quad9 Secured
list dest_ip '2620:fe::9' # Quad9 Secured
list dest_ip '2620:fe::11' # Quad9 Secured w/ECS
list dest_ip '2620:fe::fe:11' # Quad9 Secured w/ECS
list dest_ip '2a10:50c0::ad1:ff' # AdGuard
list dest_ip '2a10:50c0::ad2:ff' # AdGuard
list dest_ip '2a10:50c0::ded:ff' # AdGuard Dedicated
list dest_port '443'
option class 'cs5'

config rule
option name 'BOOTP/DHCP'
option family 'ipv4'
option proto 'udp'
list dest_port '67'
list dest_port '68'
option class 'cs5'

config rule
option name 'BOOTP/DHCPv6'
option family 'ipv6'
option proto 'udp'
list dest_port '546'
list dest_port '547'
option class 'cs5'

config rule
option name 'NTP'
option proto 'udp'
option dest_port '123'
option class 'cs5'

config rule
option name 'SSH'
option proto 'tcp'
option dest_port '22'
option class 'cs2'

config rule
option name 'Xbox Cloud Gaming'
option proto 'udp'
option family 'ipv4'
list dest_ip '@xcloud'
list dest_port '1000-1150'
list dest_port '9002'
option class 'af41'

config rule
option name 'Xbox Cloud Gaming IPv6'
option proto 'udp'
option family 'ipv6'
list dest_ip '@xcloud6'
list dest_port '1000-1150'
list dest_port '9002'
option class 'af41'

config rule
option name 'Microsoft Teams voice'
option proto 'udp'
option src_port '50000-50019'
option dest_port '3478-3481'
list dest_ip '13.107.64.0/18'
list dest_ip '52.112.0.0/14'
list dest_ip '52.122.0.0/15'
list dest_ip '2603:1063::/39'
option class 'ef'

config rule
option name 'Microsoft Teams video'
option proto 'udp'
option src_port '50020-50039'
option dest_port '3478-3481'
list dest_ip '13.107.64.0/18'
list dest_ip '52.112.0.0/14'
list dest_ip '52.122.0.0/15'
list dest_ip '2603:1063::/39'
option class 'af41'

config rule
option name 'Microsoft Teams sharing'
option proto 'udp'
option src_port '50040-50059'
option dest_port '3478-3481'
list dest_ip '13.107.64.0/18'
list dest_ip '52.112.0.0/14'
list dest_ip '52.122.0.0/15'
list dest_ip '2603:1063::/39'
option class 'af21'

config rule
option name 'ICMP'
list proto 'icmp'
list proto 'icmpv6'
option class 'cs5'
option enabled '1'

config rule # A rule which marks all non-HTTP UDP connections from a specific IP as cs4 and count new connection matches
option name 'Game Console non-HTTP'
option proto 'udp'
list src_ip '192.168.1.100'
list dest_port '!80'
list dest_port '!443'
option class 'cs4'
option counter '1'
option enabled '0'
@jeverley

@jumpsmm7
Copy link

jumpsmm7 commented Apr 7, 2025

@jeverley it is the ICMP rule.

@jeverley
Copy link
Owner Author

jeverley commented Apr 7, 2025

@jeverley it is the ICMP rule.

Thanks for troubleshooting this @jumpsmm7, will aim to get a commit pushed to address this today.

Edit: should be fixed with 6792a30

@jumpsmm7
Copy link

jumpsmm7 commented Apr 8, 2025

@jeverley it is the ICMP rule.

Thanks for troubleshooting this @jumpsmm7, will aim to get a commit pushed to address this today.

Edit: should be fixed with 6792a30

@jeverley I can confirm, that resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants