1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2020-08-15 09:01:13 +02:00
parent 45d754d454
commit b6b74fc75c

View file

@ -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