🍓 Sync 2026-07-27 23:23:03

This commit is contained in:
github-actions[bot] committed 2026-07-27 23:23:03 +08:00
1 parent b050c51064
commit ee98d2bf9c
16 files changed
+1047 -31

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=qosmate
PKG_VERSION:=0.5.48
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_MAINTAINER:=Markus Hütter <mh@hudra.net>
PKG_LICENSE:=GPL-3.0-or-later
+20 -4
View File
@@ -409,7 +409,7 @@ QoSmate allows you to define custom DSCP (Differentiated Services Code Point) ma
| ------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| name | A unique name for the rule. Used for identification and logging. | string | |
| proto | The protocol to match. Determines which type of traffic the rule applies to. | enum (tcp, udp, icmp) | |
| src_ip | Source IP address or range to match. Can use CIDR notation for networks. | string | |
| src_ip | Source IP to match. Single address, CIDR notation, or a range like '192.168.1.1-192.168.1.200'. | string | |
| src_port | Source port or range to match. Can use individual ports or ranges like '1000-2000'. | string | |
| dest_ip | Destination IP address or range to match. Similar to src_ip in format. | string | |
| dest_port | Destination port or range to match. Similar to src_port in format. | string | |
@@ -544,8 +544,8 @@ QoSmate features an integrated IP Sets UI which allows you to manage both static
| name | Name of the IP set. Used to reference the set in QoS rules with the @ prefix (e.g., @gaming_devices). Must contain only letters, numbers, and underscores. | string | |
| mode | Defines how the set is populated. 'static' for manually specified IP lists, 'dynamic' for automatically populated sets (e.g., via DNS resolution). | enum (static, dynamic) | static |
| family | Specifies the IP version for addresses in this set. | enum (ipv4, ipv6) | ipv4 |
| ip4 | List of IPv4 addresses or networks to include in the set. Only applicable when mode is 'static'. | list(string) | |
| ip6 | List of IPv6 addresses or networks to include in the set. Only applicable when mode is 'static'. | list(string) | |
| ip4 | List of IPv4 addresses, networks or ranges (e.g. 192.168.1.1-192.168.1.200) to include in the set. Only applicable when mode is 'static'. | list(string) | |
| ip6 | List of IPv6 addresses, networks or ranges (e.g. 2001:db8::1-2001:db8::ff) to include in the set. Only applicable when mode is 'static'. | list(string) | |
| timeout | Duration after which entries are removed from the set if not refreshed. Format: number + unit (s/m/h). Only applicable when mode is 'dynamic'. | string | 1h |
| enabled | Enables or disables the IP set. | boolean | 1 |
@@ -563,6 +563,22 @@ config ipset
list ip4 '192.168.1.52'
list ip4 '192.168.1.53'
```
Instead of listing every address individually, you can use CIDR notation or an address range:
```bash
config ipset
option name 'guest_devices'
option mode 'static'
option family 'ipv4'
list ip4 '192.168.1.100-192.168.1.150'
list ip4 '192.168.2.0/24'
```
Overlapping entries are merged automatically. If a range covers an address that is also listed
separately, nftables collapses both into a single interval, so `nft list set inet dscptag <name>`
may show fewer entries than the configuration contains.
This set can then be referenced in your QoS rules:
```bash
config rule
@@ -628,7 +644,7 @@ Rate limits are configured via the LuCI interface under **Network → QoSmate
|--------|-------------|------|---------|
| name | Descriptive name for the rate limit rule | string | |
| enabled | Enables or disables this rate limit rule | boolean | 1 |
| target | List of IP/IPv6 addresses or subnets to limit. Supports negation (!=) and set references (@setname) | list(string) | |
| target | List of IP/IPv6 addresses, subnets or ranges to limit. Supports negation (!=) and set references (@setname) | list(string) | |
| download_limit | Maximum download speed in Kbit/s (0 = unlimited) | integer | 10000 |
| upload_limit | Maximum upload speed in Kbit/s (0 = unlimited) | integer | 10000 |
| burst_factor | Burst allowance multiplier. 0 = strict limiting, 1.0 = rate as burst, higher = more burst | float | 1.0 |
+1
View File
@@ -117,6 +117,7 @@ config autorate 'autorate'
# list ip4 '192.168.37.50'
# list ip4 '192.168.37.51'
# list ip4 '192.168.37.52'
# list ip4 '192.168.37.100-192.168.37.150'
# option enabled '1'
#config ipset
+8 -19
View File
@@ -190,7 +190,7 @@ create_nft_sets() {
# shellcheck disable=SC2329
create_set() {
local section="$1" name ip_list mode timeout set_flags
local section="$1" name ip_list mode timeout set_flags family nft_type elements=""
config_get name "$section" name
# Only process if enabled (default: enabled)
@@ -222,24 +222,13 @@ create_nft_sets() {
echo "set $name { type ipv4_addr; flags $set_flags; timeout $timeout; }"
fi
else
set_flags="interval"
if [ -n "$ip_list" ]; then
if [ "$family" = "ipv6" ]; then
debug_log "Creating static IPv6 set: $name"
echo "set $name { type ipv6_addr; flags $set_flags; elements = { $(echo "$ip_list" | tr ' ' ',') }; }"
else
debug_log "Creating static IPv4 set: $name"
echo "set $name { type ipv4_addr; flags $set_flags; elements = { $(echo "$ip_list" | tr ' ' ',') }; }"
fi
else
if [ "$family" = "ipv6" ]; then
debug_log "Creating empty static IPv6 set: $name"
echo "set $name { type ipv6_addr; flags $set_flags; }"
else
debug_log "Creating empty static IPv4 set: $name"
echo "set $name { type ipv4_addr; flags $set_flags; }"
fi
fi
nft_type="ipv4_addr"
[ "$family" = "ipv6" ] && nft_type="ipv6_addr"
# auto-merge collapses overlapping entries (e.g. a range covering an
# already listed single IP), which nftables would otherwise reject
[ -n "$ip_list" ] && elements=" elements = { $(echo "$ip_list" | tr ' ' ',') };"
debug_log "Creating static $family set: $name"
echo "set $name { type $nft_type; flags interval; auto-merge;$elements }"
fi
sets_created="$sets_created $name"
}