mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix Shadowsocks-libev nftables
This commit is contained in:
parent
612607ec1e
commit
c5bacfc244
1 changed files with 14 additions and 0 deletions
|
@ -145,6 +145,20 @@ ss_rules_cb() {
|
|||
fi
|
||||
}
|
||||
|
||||
ss_redir_ports() {
|
||||
port=$(uci -q get shadowsocks-libev.$1.local_port)
|
||||
server=$(uci -q get shadowsocks-libev.$1.server)
|
||||
disabled=$(uci -q get shadowsocks-libev.$1.disabled)
|
||||
if [ "$disabled" != "1" ] && ([ "$server" = "$2" ] || [ "$2" = "" ]); then
|
||||
if [ "$port" -lt "$min_ss_redir_ports" ]; then
|
||||
min_ss_redir_ports=$port
|
||||
fi
|
||||
if [ "$port" -gt "$max_ss_redir_ports" ]; then
|
||||
max_ss_redir_ports=$port
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ss_rules_nft_gen() {
|
||||
local cfg="ss_rules"
|
||||
local cfgtype
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue