mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
commit
d81da787a0
2 changed files with 14 additions and 7 deletions
|
@ -248,9 +248,14 @@ start_service()
|
||||||
commit glorytun-udp
|
commit glorytun-udp
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
elif ([ "$(uci -q get glorytun.vpn.host)" = "10.255.250.1" ] || [ "$(uci -q get glorytun.vpn.host)" = "10.255.247.1" ]) && [ "$nbintf" != "$nbintfvpn" ]; then
|
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete shadowsocks-libev.sss0.disabled
|
set shadowsocks-libev.ss_rules.server='mptcpovervpn'
|
||||||
|
set shadowsocks-libev.ss_rules.redir_tcp='all'
|
||||||
|
EOF
|
||||||
|
elif ([ "$(uci -q get glorytun.vpn.host)" = "10.255.250.1" ] || [ "$(uci -q get glorytun.vpn.host)" = "10.255.247.1" ] || [ "$(uci -q get shadowsocks-libev.ss_rules.server)" != "sss0" ]) && [ "$nbintf" != "$nbintfvpn" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.sss0.disabled='0'
|
||||||
|
set shadowsocks-libev.ss_rules.server='sss0'
|
||||||
set glorytun.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
set glorytun.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
||||||
set glorytun-udp.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
set glorytun-udp.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
||||||
commit glorytun
|
commit glorytun
|
||||||
|
@ -266,7 +271,7 @@ start_service()
|
||||||
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
|
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
|
||||||
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
|
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
|
||||||
set shadowsocks-libev.mptcpovervpn.server="10.255.250.1"
|
set shadowsocks-libev.mptcpovervpn.server="10.255.250.1"
|
||||||
delete shadowsocks-libev.mptcpovervpn.disabled
|
set shadowsocks-libev.mptcpovervpn.disabled='0'
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
@ -275,7 +280,7 @@ start_service()
|
||||||
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
|
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
|
||||||
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
|
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
|
||||||
set shadowsocks-libev.mptcpovervpn.server="10.255.247.1"
|
set shadowsocks-libev.mptcpovervpn.server="10.255.247.1"
|
||||||
delete shadowsocks-libev.mptcpovervpn.disabled
|
set shadowsocks-libev.mptcpovervpn.disabled='0'
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
for c in $(seq 1 $NBCPU); do
|
for c in $(seq 1 $NBCPU); do
|
||||||
|
@ -298,7 +303,7 @@ start_service()
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
commit shadowsocks-libev
|
commit shadowsocks-libev
|
||||||
EOF
|
EOF
|
||||||
/etc/init.d/shadowsocks restart
|
/etc/init.d/shadowsocks-libev restart
|
||||||
/etc/init.d/openvpn restart
|
/etc/init.d/openvpn restart
|
||||||
elif [ "$(uci -q get shadowsocks-libev.hivpn1)" != "" ]; then
|
elif [ "$(uci -q get shadowsocks-libev.hivpn1)" != "" ]; then
|
||||||
for c in $(seq 1 $NBCPU); do
|
for c in $(seq 1 $NBCPU); do
|
||||||
|
@ -307,9 +312,10 @@ start_service()
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete shadowsocks-libev.sss0.disabled
|
set shadowsocks-libev.sss0.disabled='0'
|
||||||
EOF
|
EOF
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.ss_rules.server='sss0'
|
||||||
delete shadowsocks-libev.mptcpovervpn
|
delete shadowsocks-libev.mptcpovervpn
|
||||||
commit shadowsocks-libev
|
commit shadowsocks-libev
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -186,7 +186,8 @@ ss_rules() {
|
||||||
|
|
||||||
eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
|
eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
|
||||||
validate_ss_rules_section "$cfg" || return 1
|
validate_ss_rules_section "$cfg" || return 1
|
||||||
[ "$disabled" = 0 ] || return 0
|
[ "$disabled" != "1" ] || return 0
|
||||||
|
[ "$(uci -q get shadowsocks-libev.${cfgrulesserver}.disabled)" != "1" ] || return 0
|
||||||
if [ "$ss_rules_redir_tcp_$redir_tcp" = "all" ]; then
|
if [ "$ss_rules_redir_tcp_$redir_tcp" = "all" ]; then
|
||||||
min_ss_redir_ports="65535"
|
min_ss_redir_ports="65535"
|
||||||
max_ss_redir_ports="0"
|
max_ss_redir_ports="0"
|
||||||
|
|
Loading…
Reference in a new issue