1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
This commit is contained in:
suyuan 2024-11-24 17:27:16 +08:00 committed by GitHub
commit 14c8f5acee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -146,7 +146,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || { [ "$OMR_TRACKER_INTERFACE" != "omrvp
fi
if [ -n "$OMR_TRACKER_INTERFACE" ]; then
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down'
env -i ACTION="disconnecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
env -i ACTION="disconnecting" INTERFACE="$OMR_TRACKER_INTERFACE" DEVICE="$OMR_TRACKER_DEVICE" /sbin/hotplug-call iface
fi
#if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then
# multipath "$OMR_TRACKER_DEVICE" off > /dev/null 2>&1

View file

@ -155,7 +155,7 @@ if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR
}
script_alert_up="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_up)"
[ -n "$script_alert_up" ] && eval $script_alert_up
env -i ACTION="connecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
env -i ACTION="connecting" INTERFACE="$OMR_TRACKER_INTERFACE" DEVICE="$OMR_TRACKER_DEVICE" /sbin/hotplug-call iface
fi
if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up'

View file

@ -88,6 +88,7 @@ ss_xxx() {
json_add_boolean mptcp "$mptcp"
#[ "$cfgtype" != "ss_local" ] && json_add_string protocol "${cfgtype/ss_/}"
if [ "$cfgtype" != "ss_tunnel" ]; then
[ "$cfgtype" != "ss_local" ] && json_add_string protocol "${cfgtype/ss_/}"
[ -z "$local_address" ] || json_add_string local_address "$local_address"
[ -z "$local_port" ] || json_add_int local_port "$local_port"
[ -z "$local_ipv4_address" ] || json_add_string local_ipv4_address "$local_ipv4_address"