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

Merge branch 'test' into develop

This commit is contained in:
suyuan 2021-01-08 00:59:44 +08:00
commit 077770e605
5 changed files with 18 additions and 11 deletions

View file

@ -40,7 +40,7 @@ function run_test(server,proto,mode,updown,omit,parallel,transmit,bitrate)
end
local port = t[ math.random( #t ) ]
if password ~= "" then
iperf = io.popen("omr-iperf -P %s -%s -O %s -t %s -J -Z %s" % {parallel,ipv,omit,transmit,options})
iperf = io.popen("omr-iperf %s -P %s -%s -O %s -t %s -J -Z %s" % {server,parallel,ipv,omit,transmit,options})
else
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -t %s -J -Z %s" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,options})
end

View file

@ -90,7 +90,8 @@ _bypass_mac() {
config_get intf $1 interface
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
local intfid="$(uci -q get omr-bypass.$intf.id)"
intfuci=$(echo $intf | sed 's/\./_/')
local intfid="$(uci -q get omr-bypass.$intfuci.id)"
[ -z "$intf" ] && intf="all"
[ -z "$mac" ] && return
@ -131,7 +132,8 @@ _bypass_lan_ip() {
config_get intf $1 interface
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
local intfid="$(uci -q get omr-bypass.$intf.id)"
intfuci=$(echo $intf | sed 's/\./_/')
local intfid="$(uci -q get omr-bypass.$intfuci.id)"
[ -z "$intf" ] && intf="all"
[ -z "$ip" ] && return
@ -188,7 +190,8 @@ _bypass_dest_port() {
config_get intf $1 interface
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
local intfid="$(uci -q get omr-bypass.$intf.id)"
intfuci=$(echo $intf | sed 's/\./_/')
local intfid="$(uci -q get omr-bypass.$intfuci.id)"
[ -z "$intf" ] && intf="all"
[ -z "$dport" ] && return
@ -243,7 +246,8 @@ _bypass_src_port() {
config_get intf $1 interface
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
local intfid="$(uci -q get omr-bypass.$intf.id)"
intfuci=$(echo $intf | sed 's/\./_/')
local intfid="$(uci -q get omr-bypass.$intfuci.id)"
[ -z "$intf" ] && intf="all"
[ -z "$sport" ] && return
@ -296,7 +300,8 @@ _bypass_proto() {
config_get intf $1 interface
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
local intfid="$(uci -q get omr-bypass.$intf.id)"
intfuci=$(echo $intf | sed 's/\./_/')
local intfid="$(uci -q get omr-bypass.$intfuci.id)"
[ -z "$intf" ] && intf="all"
[ -z "$proto" ] && return
@ -493,8 +498,9 @@ _intf_rule() {
config_foreach _intf_rule_ss_rules ss_rules
_intf_rule_v2ray_rules
uci -q set omr-bypass.$intf=interface
uci -q set omr-bypass.$intf.id=$count
intfuci=$(echo $intf | sed 's/\./_/')
uci -q set omr-bypass.$intfuci=interface
uci -q set omr-bypass.$intfuci.id=$count
}
_bypass_ip_set() {

View file

@ -179,6 +179,7 @@ function wizard_add()
luci.sys.call("uci -q commit firewall")
luci.sys.call("/etc/init.d/macvlan restart >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/vnstat restart >/dev/null 2>/dev/null")
gostatus = false
end

View file

@ -34,7 +34,7 @@ _set_intf_name() {
}
ip link set ${INTERFACE} name ${ifname} 2>&1 >/dev/null
ip link set ${ifname} up 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${$INTERFACE} 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${INTERFACE} 2>&1 >/dev/null
fi
fi
elif [ -f /dev/${DEVICE_NAME} ] && [ -n "$MODALIAS" ] && [ "$modalias" = "$MODALIAS" ]; then
@ -54,7 +54,7 @@ _set_intf_name() {
}
ip link set ${INTERFACE} name ${ifname} 2>&1 >/dev/null
ip link set ${ifname} up 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${$INTERFACE} 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${INTERFACE} 2>&1 >/dev/null
}
}

View file

@ -45,7 +45,7 @@ if [ "$(uci -q get dhcp.lan.dhcp_options)" = "" ]; then
EOF
fi
if [ "$(uci -q get https-dns-proxy.@https-dns-proxy[0].listen_port)" = "5053" ]; then
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ] && [ "$(uci -q get https-dns-proxy.@https-dns-proxy[0].listen_port)" = "5053" ]; then
# uci -q batch <<-EOF >/dev/null
# delete https-dns-proxy.@https-dns-proxy[-1]
# delete https-dns-proxy.@https-dns-proxy[-1]