1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #141 from Ysurac/develop

sync
This commit is contained in:
suyuan 2021-05-23 13:31:07 +08:00 committed by GitHub
commit 844c5b3e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View file

@ -282,7 +282,7 @@ return view.extend({
fwtool.addLimitBurstOption(s);
o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray'),
_('Forwards ports from server using V2Ray proxy (if enabled) instead of VPN'));
_('Forward a port (not a range) from server using V2Ray proxy (if enabled) instead of VPN'));
o.modalonly = true;
o.editable = true;
o.depends({ src: 'vpn', '!contains': true });

View file

@ -1,8 +1,9 @@
#!/bin/sh
VPS=$1
LANIP=$2
INTF=$3
if [ -n "$(traceroute -q 1 -i eth1 -w 1 -n -m 5 ${VPS} | grep ${LANIP})" ]; then
if [ -n "$(traceroute -q 1 -i ${INTF} -w 1 -n -m 5 ${VPS} | grep ${LANIP})" ]; then
echo "detected"
else
echo "no loop"

View file

@ -799,7 +799,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
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
[ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && conntrack -D -p udp 2>&1 >/dev/null
fi
# Set VPN MTU
@ -1138,7 +1138,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
if [ -n "$lanip" ] && [ -n "$masterip" ] && [ -n "$ipaddr" ] && [ "$ipaddr" = "$masterip" ] && [ "$(uci -q get openmptcprouter.settings.disableloopdetection)" != "1" ]; then
loop=0
routingloop() {
if [ "$(omr-routing-loop $1 $lanip)" = "detected" ]; then
vpsip="$(uci -q get openmptcprouter.$1.ip)"
if [ -n "$vpsip" ] && [ "$(omr-routing-loop $vpsip $lanip $OMR_TRACKER_DEVICE)" = "detected" ]; then
loop=1
fi
}

View file

@ -2081,7 +2081,7 @@ start_instance() {
}
rules_exist() {
[ -n "$(iptables -t nat -L -n | grep v2r_)" ] && return 0
[ -n "$(iptables -w -t nat -L -n | grep v2r_)" ] && return 0
return 1
}