diff --git a/luci-app-openmptcprouter/root/bin/anonymous_config.sh b/luci-app-openmptcprouter/root/bin/anonymous_config.sh index b15183dae..4c5fa7986 100755 --- a/luci-app-openmptcprouter/root/bin/anonymous_config.sh +++ b/luci-app-openmptcprouter/root/bin/anonymous_config.sh @@ -20,4 +20,5 @@ uci show | \ -e "/vless_address=/s/......$/xxxxxx'/" \ -e "/vpn\.key=/s/......$/xxxxxx'/" \ -e "/vps\.key=/s/......$/xxxxxx'/" \ + -e "/wgkey=/s/......$/xxxxxx'/" \ -e "/token=/s/............$/xxxxxx'/" \ No newline at end of file diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 732b38647..99d9061e9 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -60,6 +60,7 @@ omr_set_settings() { config_get device "$1" device config_get proto "$1" proto config_get type "$1" type + config_get ip6addr "$1" ip6addr config_get ipv6 "$1" ipv6 config_get addlatency "$1" addlatency [ -z "$multipath" ] || [ "$multipath" = "off" ] && return @@ -79,11 +80,15 @@ omr_set_settings() { [ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') if [ -n "$ifname" ]; then - if [ "$proto" = "dhcpv6" ] || [ "$ipv6" = "1" ]; then + if [ "$proto" = "dhcpv6" ] || [ "$ipv6" = "1" ] || [ -n "$ip6addr" ]; then # Change interface name for sysctl in case of VLAN (eth0.2 => eth0/2) ifnamesys=$(echo $ifname | sed 's:\.:/:') sysctl -qw net.ipv6.conf.${ifnamesys}.disable_ipv6=0 - sysctl -qw net.ipv6.conf.${ifnamesys}.accept_ra=1 + [ -z "$ip6addr" ] && sysctl -qw net.ipv6.conf.${ifnamesys}.accept_ra=1 + else + ifnamesys=$(echo $ifname | sed 's:\.:/:') + sysctl -qw net.ipv6.conf.${ifnamesys}.disable_ipv6=1 + sysctl -qw net.ipv6.conf.${ifnamesys}.accept_ra=0 fi if [ "$addlatency" = "0" ] && [ "$(tc qdisc show dev $ifname | grep delay)" != "" ]; then @@ -97,7 +102,6 @@ omr_set_settings() { fi fi fi - } start_service() { diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index f86062fa2..b3fdca703 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -26,6 +26,8 @@ export OMR_TRACKER_DEVICE_GATEWAY export OMR_TRACKER_DEVICE_GATEWAY6 export OMR_TRACKER_IPV6 export OMR_TRACKER_PROTO +export OMR_TRACKER_INTERVAL_TRIES +export OMR_TRACKER_INTERVAL dscp=56 # set DSCP CS7 (56) in outgoing packets initial_hosts="$OMR_TRACKER_HOSTS" diff --git a/omr-tracker/files/bin/omr-tracker-v2ray b/omr-tracker/files/bin/omr-tracker-v2ray index e8e0dcffe..2530ca63f 100755 --- a/omr-tracker/files/bin/omr-tracker-v2ray +++ b/omr-tracker/files/bin/omr-tracker-v2ray @@ -75,7 +75,7 @@ while true; do uci -q set openmptcprouter.omr.v2ray="up" uci -q commit openmptcprouter.omr } - if [ -z "$(iptables -t nat -L -n | grep v2r)" ]; then + if [ -z "$(iptables -w -t nat -L -n | grep v2r)" ]; then _log "Reload V2Ray rules" /etc/init.d/v2ray rules_up 2> /dev/null _get_ip @@ -86,7 +86,7 @@ while true; do last=$((last + 1 )) [ -z "$nocontact" ] && nocontact="$host" || nocontact="$nocontact, $host" [ "${last}" -ge "${retry}" ] && { - if [ -n "$(iptables -t nat -L -n | grep v2r)" ]; then + if [ -n "$(iptables -w -t nat -L -n | grep v2r)" ]; then _log "V2Ray is down (can't contact via http ${nocontact})" uci -q set openmptcprouter.omr.v2ray="down" uci -q commit openmptcprouter.omr