mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
commit
ae94e998f6
3 changed files with 10 additions and 9 deletions
|
@ -1011,7 +1011,7 @@ function settings_add()
|
|||
ucic:set("openmptcprouter","settings","tracebox",tracebox)
|
||||
|
||||
-- Enable/disable ModemManager
|
||||
local modemamanger = luci.http.formvalue("disablemodemmanager") or "1"
|
||||
local modemmanager = luci.http.formvalue("disablemodemmanager") or "1"
|
||||
ucic:set("openmptcprouter","settings","modemmanager",modemmanager)
|
||||
|
||||
-- Enable/disable server ping
|
||||
|
|
|
@ -746,13 +746,6 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
|
|||
fi
|
||||
|
||||
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
|
||||
if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ]; then
|
||||
_log "Tunnel up : Replace default route by $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE"
|
||||
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE 2>&1 >/dev/null
|
||||
if [ "$(pgrep openmptcprouter-vps)" = "" ]; then
|
||||
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi1" ]; then
|
||||
_log "Tunnel up disable use of ShadowSocks for UDP"
|
||||
uci -q delete shadowsocks-libev.ss_rules.redir_udp
|
||||
|
@ -761,6 +754,14 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
|
|||
/etc/init.d/shadowsocks-libev rules_up >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ]; then
|
||||
_log "Tunnel up : Replace default route by $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE"
|
||||
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE 2>&1 >/dev/null
|
||||
if [ "$(pgrep openmptcprouter-vps)" = "" ]; then
|
||||
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
||||
fi
|
||||
[ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && conntrack -D -p udp
|
||||
fi
|
||||
|
||||
# Set VPN MTU
|
||||
if [ -n "$OMR_TRACKER_LATENCY" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ]); then
|
||||
|
|
|
@ -30,7 +30,7 @@ MY_DEPENDS := \
|
|||
bind-dig \
|
||||
libnetfilter-conntrack ebtables ebtables-utils ip-full \
|
||||
iptables-mod-iface iptables-mod-ipmark iptables-mod-hashlimit iptables-mod-condition iptables-mod-trace iptables-mod-conntrack-extra iptables-mod-account \
|
||||
kmod-nf-nat kmod-nf-nathelper kmod-nf-nathelper-extra iptables-mod-extra \
|
||||
kmod-nf-nat kmod-nf-nathelper kmod-nf-nathelper-extra iptables-mod-extra conntrack \
|
||||
iptables-mod-ipsec kmod-crypto-authenc kmod-ipsec kmod-ipsec4 kmod-ipsec6 kmod-ipt-ipsec \
|
||||
wireless-tools \
|
||||
libiwinfo-lua \
|
||||
|
|
Loading…
Reference in a new issue