mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix when VPS contact is a DNS
This commit is contained in:
parent
170ef44489
commit
5b32c33c05
2 changed files with 14 additions and 1 deletions
|
@ -66,7 +66,7 @@ _check_master() {
|
|||
set_ip() {
|
||||
local ip=$1
|
||||
ipresolve="$(resolveip -4 $ip | head -n 1)"
|
||||
[ -z "$ipresolve" ] && ip="$ipresolve"
|
||||
[ -n "$ipresolve" ] && ip="$ipresolve"
|
||||
#_ping_server $ip
|
||||
_check_server $ip $port
|
||||
if [ "$server_ping" = true ]; then
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
START=90
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
EXTRA_COMMAND="start_interface"
|
||||
}
|
||||
|
||||
. /usr/lib/unbound/iptools.sh
|
||||
|
@ -331,9 +332,16 @@ _launch_xray_tracker() {
|
|||
sleep 1
|
||||
}
|
||||
|
||||
_dns_server() {
|
||||
local ip=$1
|
||||
resolv=$(resolveip -4 ${ip} | head -n 1)
|
||||
[ -n "${resolv}" ] && [ "${resolv}" != "${ip}" ] && multiserver=true
|
||||
}
|
||||
|
||||
_multi_server() {
|
||||
config_get backup $1 backup
|
||||
[ "$backup" = "1" ] && multiserver=true
|
||||
config_list_foreach $1 ip _dns_server
|
||||
}
|
||||
|
||||
_gre_tunnel() {
|
||||
|
@ -341,6 +349,11 @@ _gre_tunnel() {
|
|||
[ "$proto" = "gre" ] && gretunnel=true
|
||||
}
|
||||
|
||||
start_interface() {
|
||||
[ -z "$1" ] && return
|
||||
_launch_tracker $1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local ss_enable=0
|
||||
local ss_rust_enable=0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue