diff --git a/glorytun-udp/init b/glorytun-udp/init index 5bb5a9a5d..5e50d59df 100755 --- a/glorytun-udp/init +++ b/glorytun-udp/init @@ -20,14 +20,13 @@ _err() { validate_section() { uci_validate_section glorytun-udp glorytun-udp "${1}" \ - 'enable:bool:0' \ - 'mode:string' \ - 'key:string' \ - 'host:host' \ - 'port:port' \ - 'proto:string' \ - 'mtuauto:bool:0' \ - 'chacha:bool:0' \ + 'enable:bool:0' \ + 'mode:string' \ + 'key:string' \ + 'host:host' \ + 'port:port' \ + 'mtuauto:bool:0' \ + 'chacha:bool:0' \ 'dev:string' } diff --git a/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp b/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp index a1ac50669..1ccf10b8c 100644 --- a/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp +++ b/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp @@ -25,8 +25,9 @@ set_default() { config_get keepalive "$config" keepalive "25s" [ "$remoteip" != "" ] && [ "$localip" != "" ] && ifconfig $DEVICE $localip pointopoint $remoteip up while [ -z "$(glorytun-udp list | grep $iface)" ]; do - glorytun-udp set dev $iface kxtimeout $kxtimeout timetolerance $timetolerance keepalive $keepalive + sleep 1 done + glorytun-udp set dev $iface kxtimeout $kxtimeout timetolerance $timetolerance keepalive $keepalive } } diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index bdedd275a..b3ce9fa8e 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -592,9 +592,9 @@ if [ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]; then fi fi fi - if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp set | grep 'kxtimeout 7d')" = "" ]; then - glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1 - fi +# if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp set | grep 'kxtimeout 7d')" = "" ]; then +# glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1 +# fi [ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set pref 500 > /dev/null 2>&1 fi [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" != "1" ] && { diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 4806ea137..05ef1c2de 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -756,7 +756,8 @@ _set_client2client() { } _vps_firewall_redirect_port() { - local src proto src_dport + local src proto src_dport section + section=$1 config_get src $1 src config_get proto $1 proto "tcp udp" config_get src_dport $1 src_dport @@ -767,6 +768,14 @@ _vps_firewall_redirect_port() { config_get dest_port $1 dest_port config_get src_ip $1 src_ip config_get v2ray $1 v2ray "0" + config_get dmz $1 dmz "0" + if [ "$dmz" = "1" ] && [ "$src_dport" != "2-64999" ]; then + uci -q batch <<-EOF >/dev/null + set firewall.${section}.src_dport='2-64999' + commit firewall + EOF + src_dport='2-64999' + fi if [ -n "$src_dport" ] && [ "$(echo $src_dport | cut -d'-' -f2)" -ge "65000" ]; then logger -t "OMR-VPS" "You can't redirect ports >= 65000, they are needed by OpenMPTCProuter Server part" enabled="0"