mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Send ULA to VPS if not already done
This commit is contained in:
parent
a4a0ca68d8
commit
34f21576ce
1 changed files with 2 additions and 1 deletions
|
@ -522,7 +522,8 @@ _set_vpn_ip() {
|
|||
[ -z "$vpnip_remote" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep kernel | awk '{print $1}' | tr -d "\n")
|
||||
[ -z "$vpnip_remote" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep "proto static src" | awk '{print $3}' | tr -d "\n")
|
||||
ula="$(uci -q get network.globals.ula_prefix)"
|
||||
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && ([ "$vpnip_remote" != "$vpnip_remote_current" ] || [ "$vpnip_local" != "$vpnip_local_current" ]); then
|
||||
ula_current="$(echo "$vps_config" | jsonfilter -q -e '@.6in4.ula')"
|
||||
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && ([ "$vpnip_remote" != "$vpnip_remote_current" ] || [ "$vpnip_local" != "$vpnip_local_current" ] || [ "$ula" != "$ula_current" ]); then
|
||||
settings='{"remoteip" : "'$vpnip_local'","localip" : "'$vpnip_remote'","ula" : "'$ula'"}'
|
||||
result=$(_set_json "vpnips" "$settings")
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue