2 # shellcheck disable=SC1091,SC3043
3 # This code is based on idea of https://github.com/egc112
9 local proto listen_port
10 config_get proto
"$1" proto
11 config_get listen_port
"$1" listen_port
12 if [ "$proto" = 'wireguard' ] && [ -n "$listen_port" ]; then
13 ip rule del sport
"$listen_port" table
"pbr_${WAN_INTERFACE}" >/dev
/null
2>&1
14 ip rule add sport
"$listen_port" table
"pbr_${WAN_INTERFACE}" >/dev
/null
2>&1 && _ret
=0
20 config_foreach insert_ip_rule
'interface'