mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Disable restrict to LAN on ShadowSocks* when VLAN is used
This commit is contained in:
parent
9fb8a10be5
commit
4d80070251
1 changed files with 3 additions and 0 deletions
|
@ -151,8 +151,11 @@ set_lan_ips() {
|
|||
config_get ip4table "$1" ip4table
|
||||
config_get device "$1" device
|
||||
config_get proto "$1" proto
|
||||
# No restrict for interfaces with strong name
|
||||
[ -n "$(echo $device | grep -)" ] && uci -q set openmptcprouter.settings.restrict_to_lan="0" && uci commit openmptcprouter
|
||||
if [ "$ip4table" != "wan" ] && [ "$ip4table" != "vpn" ] && [ -n "$ip4table" ] && [ -n "$device" ] && ([ "$proto" = "dhcp" ] || [ "$proto" = "static" ]); then
|
||||
# No restrict when vlan
|
||||
[ -n "$(echo $device | grep '\.')" ] && uci -q set openmptcprouter.settings.restrict_to_lan="0" && uci commit openmptcprouter
|
||||
[ -z "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ] && [ -z "$(uci -q get shadowsocks-rust.ss_rules.ifnames | grep $device)" ] && {
|
||||
uci -q add_list shadowsocks-libev.ss_rules.ifnames="$device"
|
||||
uci -q add_list shadowsocks-rust.ss_rules.ifnames="$device"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue