mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Update API and fix omr-service script
This commit is contained in:
parent
129e6a9ae4
commit
c11d4737e5
2 changed files with 11 additions and 9 deletions
|
@ -26,7 +26,7 @@ GLORYTUN_UDP_VERSION="3622f928caf03709c4031a34feec85c623bc5281"
|
||||||
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
||||||
MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7"
|
MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7"
|
||||||
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
||||||
OMR_ADMIN_VERSION="af3b0d55aed7341c2e9e8f5012fc07300e48a8d0"
|
OMR_ADMIN_VERSION="c64b8e332407b0c8c413330c36409955d9249512"
|
||||||
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
||||||
#V2RAY_VERSION="v1.1.0"
|
#V2RAY_VERSION="v1.1.0"
|
||||||
V2RAY_VERSION="v1.2.0-8-g59b8f4f"
|
V2RAY_VERSION="v1.2.0-8-g59b8f4f"
|
||||||
|
|
18
omr-service
18
omr-service
|
@ -53,14 +53,16 @@ _lan_route() {
|
||||||
_gre_tunnels() {
|
_gre_tunnels() {
|
||||||
. "$(readlink -f "/etc/shorewall/params.vpn")"
|
. "$(readlink -f "/etc/shorewall/params.vpn")"
|
||||||
for intf in /etc/openmptcprouter-vps-admin/intf/*; do
|
for intf in /etc/openmptcprouter-vps-admin/intf/*; do
|
||||||
. "$(readlink -f "$intf")"
|
if [ -f "$intf" ]; then
|
||||||
iface="$(basename $intf)"
|
. "$(readlink -f "$intf")"
|
||||||
if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then
|
iface="$(basename $intf)"
|
||||||
ip tunnel del $iface 2>&1 >/dev/null
|
if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then
|
||||||
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR
|
ip tunnel del $iface 2>&1 >/dev/null
|
||||||
ip link set $iface up
|
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR
|
||||||
ip addr add $LOCALIP dev $iface
|
ip link set $iface up
|
||||||
ip route add $NETWORK dev $iface 2>&1 >/dev/null
|
ip addr add $LOCALIP dev $iface
|
||||||
|
ip route add $NETWORK dev $iface 2>&1 >/dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue