mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
No more ping log and fix firewall for all proto
This commit is contained in:
parent
45d754d454
commit
b6b74fc75c
1 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,7 @@ _login() {
|
|||
_ping_server() {
|
||||
server="$(uci -q get openmptcprouter.${servername}.ip)"
|
||||
[ -z "$server" ] && server="$(uci -q get shadowsocks-libev.sss0.server)"
|
||||
ret=$(ping -c 3 -w 3 -Q 184 $server) && echo "$ret" | grep -sq "bytes from" && return
|
||||
ret=$(ping -c 3 -w 3 -Q 184 $server 2>&1) && echo "$ret" | grep -sq "bytes from" && return
|
||||
false
|
||||
}
|
||||
|
||||
|
@ -687,11 +687,12 @@ _vps_firewall_redirect_port() {
|
|||
config_get src_ip $1 src_ip
|
||||
[ "$(echo $src_dport | cut -d'-' -f2)" -ge "65000" ] && {
|
||||
logger -t "OMR-VPS" "You can't redirect ports >= 65000, they are needed by OpenMPTCProuter Server part"
|
||||
uci -q delete firewall.$1
|
||||
return
|
||||
#uci -q delete firewall.$1
|
||||
#return
|
||||
enabled="0"
|
||||
}
|
||||
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && [ "$enabled" != "0" ] && {
|
||||
if [ "$proto" = "tcp udp" ]; then
|
||||
if [ "$proto" = "tcp udp" ] || [ "$proto" = "all" ]; then
|
||||
checkfw=""
|
||||
if [ "$family" = "ipv4" ]; then
|
||||
if [ "$src_dip" = "" ]; then
|
||||
|
|
Loading…
Reference in a new issue