mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Merge branch 'develop'
This commit is contained in:
commit
2bc21c8828
3 changed files with 7 additions and 6 deletions
|
@ -32,15 +32,15 @@ NOINTERNET=${NOINTERNET:-no}
|
||||||
SPEEDTEST=${SPEEDTEST:-no}
|
SPEEDTEST=${SPEEDTEST:-no}
|
||||||
LOCALFILES=${LOCALFILES:-no}
|
LOCALFILES=${LOCALFILES:-no}
|
||||||
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")}
|
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")}
|
||||||
KERNEL_VERSION="5.4.65"
|
KERNEL_VERSION="5.4.74"
|
||||||
KERNEL_PACKAGE_VERSION="1.13+9d3f35b"
|
KERNEL_PACKAGE_VERSION="1.14+9d3f35b"
|
||||||
KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}"
|
KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}"
|
||||||
GLORYTUN_UDP_VERSION="97607fdf5c6c33df512ed85190a1fd93b5f45e77"
|
GLORYTUN_UDP_VERSION="97607fdf5c6c33df512ed85190a1fd93b5f45e77"
|
||||||
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
||||||
MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7"
|
MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7"
|
||||||
UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078"
|
UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078"
|
||||||
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
||||||
OMR_ADMIN_VERSION="8d0706e8c234f9a0eaa88ace6d58c2d0f45156cf"
|
OMR_ADMIN_VERSION="774aceb357e989676ed9a06d411db41bdfa3bf03"
|
||||||
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
||||||
#V2RAY_VERSION="v1.1.0"
|
#V2RAY_VERSION="v1.1.0"
|
||||||
V2RAY_PLUGIN_VERSION="v1.4.3"
|
V2RAY_PLUGIN_VERSION="v1.4.3"
|
||||||
|
@ -195,8 +195,8 @@ rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1
|
||||||
if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then
|
if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then
|
||||||
echo "Install kernel linux-image-${KERNEL_RELEASE}"
|
echo "Install kernel linux-image-${KERNEL_RELEASE}"
|
||||||
echo "\033[1m !!! if kernel install fail run: dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp !!! \033[0m"
|
echo "\033[1m !!! if kernel install fail run: dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp !!! \033[0m"
|
||||||
dpkg --force-all -i -B /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb
|
|
||||||
dpkg --force-all -i -B /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb
|
dpkg --force-all -i -B /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb
|
||||||
|
dpkg --force-all -i -B /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if mptcp kernel is grub default kernel
|
# Check if mptcp kernel is grub default kernel
|
||||||
|
@ -389,6 +389,7 @@ if [ "$OMR_ADMIN" = "yes" ]; then
|
||||||
pip3 -q install fastapi netjsonconfig python-multipart -U
|
pip3 -q install fastapi netjsonconfig python-multipart -U
|
||||||
mkdir -p /etc/openmptcprouter-vps-admin/omr-6in4
|
mkdir -p /etc/openmptcprouter-vps-admin/omr-6in4
|
||||||
mkdir -p /etc/openmptcprouter-vps-admin/intf
|
mkdir -p /etc/openmptcprouter-vps-admin/intf
|
||||||
|
[ ! -f "/etc/openmptcprouter-vps-admin/current-vpn" ] && echo "glorytun_tcp" > /etc/openmptcprouter-vps-admin/current-vpn
|
||||||
mkdir -p /var/opt/openmptcprouter
|
mkdir -p /var/opt/openmptcprouter
|
||||||
if [ "$SOURCES" = "yes" ]; then
|
if [ "$SOURCES" = "yes" ]; then
|
||||||
wget -O /lib/systemd/system/omr-admin.service ${VPSURL}${VPSPATH}/omr-admin.service.in
|
wget -O /lib/systemd/system/omr-admin.service ${VPSURL}${VPSPATH}/omr-admin.service.in
|
||||||
|
|
|
@ -16,7 +16,7 @@ if [ "$1" = "start" ]; then
|
||||||
ip tunnel add ${DEV} mode sit remote ${REMOTEIP} local ${LOCALIP}
|
ip tunnel add ${DEV} mode sit remote ${REMOTEIP} local ${LOCALIP}
|
||||||
ip -6 addr add ${LOCALIP6} dev ${DEV}
|
ip -6 addr add ${LOCALIP6} dev ${DEV}
|
||||||
ip link set ${DEV} up
|
ip link set ${DEV} up
|
||||||
[ -n "$ULA" ] && ip route replace ${ULA} via $(echo ${REMOTEIP6} | cut -d/ -f1) dev ${DEV}
|
[ -n "$ULA" ] && [ "$ULA" != "auto" ] && ip route replace ${ULA} via $(echo ${REMOTEIP6} | cut -d/ -f1) dev ${DEV}
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "stop" ]; then
|
if [ "$1" = "stop" ]; then
|
||||||
ip tunnel del ${DEV}
|
ip tunnel del ${DEV}
|
||||||
|
|
|
@ -27,7 +27,7 @@ _glorytun_tcp() {
|
||||||
for intf in /etc/glorytun-tcp/tun*; do
|
for intf in /etc/glorytun-tcp/tun*; do
|
||||||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
||||||
done
|
done
|
||||||
if [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
if [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
||||||
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
|
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
|
||||||
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
|
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
|
||||||
systemctl restart glorytun-tcp@tun0
|
systemctl restart glorytun-tcp@tun0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue