1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add omrvpn interface

This commit is contained in:
Ycarus 2018-06-06 17:55:33 +02:00
parent cd3f3ef08c
commit d0add9b708
2 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mptcp
PKG_VERSION:=5.0
PKG_VERSION:=6.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>

View file

@ -74,7 +74,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
config_load network
config_foreach set_route interface $OMR_TRACKER_INTERFACE
fi
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ]; then
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
if [ "$(uci -q show shadowsocks-libev.ss_rules.redir_udp)" = "" ] && [ "$(uci -q show shadowsocks-libev.hi2.mode)" = "tcp_and_udp" ]; then
uci -q set shadowsocks-libev.ss_rules.redir_udp='hi2'
/etc/init.d/shadowsocks-libev rules_down
@ -84,11 +84,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
exit 0
fi
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ]; then
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
if [ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]; then
_log "Tunnel up : Replace default route by $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE"
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ]; then
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
if [ "$(uci -q show shadowsocks-libev.ss_rules.redir_udp)" = "hi2" ]; then
uci -q delete shadowsocks-libev.ss_rules.redir_udp
/etc/init.d/shadowsocks-libev rules_down