From 9aa63b64c65edccabf67cd2436bf24a891143bab Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Tue, 11 Feb 2020 12:55:25 +0800 Subject: [PATCH 01/16] Update debian9-x86_64.sh Fix sed /etc/shadowsocks-libev/manager.json path --- debian9-x86_64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 8e23067..f51b251 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -358,7 +358,7 @@ if [ "$update" = "0" ] || [ ! -f /etc/shadowsocks-libev/manager.json ]; then SHADOWSOCKS_PASS_JSON=$(echo $SHADOWSOCKS_PASS | sed 's/+/-/g; s/\//_/g;') if [ $NBCPU -gt 1 ]; then for i in $NBCPU; do - sed -i '0,/65101/ s/ "65101.*/&\n&/' manager.json + sed -i '0,/65101/ s/ "65101.*/&\n&/' /etc/shadowsocks-libev/manager.json done fi #sed -i "s:MySecretKey:$SHADOWSOCKS_PASS_JSON:g" /etc/shadowsocks-libev/config.json From ea90de17fb4276673fc17cd493f0d20f51676e12 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 31 Oct 2020 11:52:02 +0000 Subject: [PATCH 02/16] Increase MLVPN reorder buffer size --- mlvpn0.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlvpn0.conf b/mlvpn0.conf index 711c84d..cc24e47 100644 --- a/mlvpn0.conf +++ b/mlvpn0.conf @@ -5,7 +5,7 @@ interface_name = "mlvpn0" timeout = 30 password = "MLVPN_PASS" reorder_buffer = yes -reorder_buffer_size = 64 +reorder_buffer_size = 128 loss_tolerence = 50 [wan1] From 06eedd2b92be8677e011867d3f458e143d7e3587 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 3 Nov 2020 16:47:24 +0000 Subject: [PATCH 03/16] Fix IPv6 ULA problem --- omr-6in4-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omr-6in4-run b/omr-6in4-run index faf15cb..ea5faad 100755 --- a/omr-6in4-run +++ b/omr-6in4-run @@ -16,7 +16,7 @@ if [ "$1" = "start" ]; then ip tunnel add ${DEV} mode sit remote ${REMOTEIP} local ${LOCALIP} ip -6 addr add ${LOCALIP6} dev ${DEV} 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 if [ "$1" = "stop" ]; then ip tunnel del ${DEV} From 5ce645812530120e57d60faae73265cacfe2c1de Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 3 Nov 2020 16:47:41 +0000 Subject: [PATCH 04/16] Fix on current-vpn file doesn't exist --- debian9-x86_64.sh | 1 + omr-service | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 8e83633..bd7a38c 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -389,6 +389,7 @@ if [ "$OMR_ADMIN" = "yes" ]; then pip3 -q install fastapi netjsonconfig python-multipart -U mkdir -p /etc/openmptcprouter-vps-admin/omr-6in4 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 if [ "$SOURCES" = "yes" ]; then wget -O /lib/systemd/system/omr-admin.service ${VPSURL}${VPSPATH}/omr-admin.service.in diff --git a/omr-service b/omr-service index 114c1b8..38002d3 100755 --- a/omr-service +++ b/omr-service @@ -27,7 +27,7 @@ _glorytun_tcp() { for intf in /etc/glorytun-tcp/tun*; do [ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf} 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 logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP" systemctl restart glorytun-tcp@tun0 From fddbd0edee181ff7abb265bbbe1946e89e3f40a1 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 3 Nov 2020 17:09:08 +0000 Subject: [PATCH 05/16] Use latest API --- debian9-x86_64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index bd7a38c..9aa5197 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -40,7 +40,7 @@ GLORYTUN_UDP_VERSION="97607fdf5c6c33df512ed85190a1fd93b5f45e77" MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7" UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078" OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" -OMR_ADMIN_VERSION="8d0706e8c234f9a0eaa88ace6d58c2d0f45156cf" +OMR_ADMIN_VERSION="774aceb357e989676ed9a06d411db41bdfa3bf03" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" #V2RAY_VERSION="v1.1.0" V2RAY_PLUGIN_VERSION="v1.4.3" From a444e8f45e52eebdbd8d871de0a36cf1acd77bcd Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 6 Nov 2020 16:29:47 +0000 Subject: [PATCH 06/16] Update server kernel --- debian9-x86_64.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 9aa5197..d0ac75c 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -32,8 +32,8 @@ NOINTERNET=${NOINTERNET:-no} SPEEDTEST=${SPEEDTEST:-no} LOCALFILES=${LOCALFILES:-no} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")} -KERNEL_VERSION="5.4.65" -KERNEL_PACKAGE_VERSION="1.13+9d3f35b" +KERNEL_VERSION="5.4.74" +KERNEL_PACKAGE_VERSION="1.14+9d3f35b" KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}" GLORYTUN_UDP_VERSION="97607fdf5c6c33df512ed85190a1fd93b5f45e77" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" @@ -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 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" - 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-image-${KERNEL_RELEASE}_amd64.deb fi # Check if mptcp kernel is grub default kernel From 6775c1aa6057ed1f10a24d402fc8c12374052a7f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 10 Nov 2020 07:53:07 +0000 Subject: [PATCH 07/16] Changes needed to work on AWS EC2 with Ubuntu --- debian9-x86_64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index d0ac75c..4b6b45b 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -207,8 +207,10 @@ if [ "$LOCALFILES" = "no" ]; then else cd ${DIR} fi +rm -f /etc/grub.d/30_os-prober bash update-grub.sh ${KERNEL_VERSION}-mptcp bash update-grub.sh ${KERNEL_RELEASE} +sed -i 's/default="1>0"/default="0"/' /boot/grub/grub.cfg 2>&1 >/dev/null echo "Install tracebox OpenMPTCProuter edition" apt-get -y -o Dpkg::Options::="--force-overwrite" install tracebox From 20ac590325fdc5dc188326bbd9ae341a7f3cd65c Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 24 Mar 2021 09:34:07 +0800 Subject: [PATCH 08/16] Update debian9-x86_64.sh --- debian9-x86_64.sh | 182 ++++++++++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 72 deletions(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index c052fbf..688dea5 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -1,11 +1,15 @@ #!/bin/sh -# # Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) for OpenMPTCProuter -# +# Copyright (C) 2018-2020 suyunfan (antrouter) https://55860.com for openmptcprouter # This is free software, licensed under the GNU General Public License v3 or later. # See /LICENSE for more information. # - +echo '====================================================================================' +echo '本脚本由蚂蚁聚合路由器出品。仅供DIY爱好者免费学习使用。请勿用于商业。' +echo '如果用于商业请选择蚂蚁聚合商业版,openmptcprouter合作伙伴请访问官网http://55860.com' +echo '5秒后自动开始安装' +echo '====================================================================================' +sleep 5 SHADOWSOCKS_PASS=${SHADOWSOCKS_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} GLORYTUN_PASS=${GLORYTUN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} DSVPN_PASS=${DSVPN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} @@ -28,39 +32,40 @@ UBOND_PASS=${UBOND_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} OPENVPN=${OPENVPN:-yes} DSVPN=${DSVPN:-yes} WIREGUARD=${WIREGUARD:-yes} -SOURCES=${SOURCES:-yes} +SOURCES=${SOURCES:-no} NOINTERNET=${NOINTERNET:-no} +REINSTALL=${REINSTALL:-yes} SPEEDTEST=${SPEEDTEST:-no} LOCALFILES=${LOCALFILES:-no} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")} KERNEL_VERSION="5.4.100" KERNEL_PACKAGE_VERSION="1.18+9d3f35b" KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}" -GLORYTUN_UDP_VERSION="32267e86a6da05b285bb3bf2b136c105dc0af4bb" +GLORYTUN_UDP_VERSION="master" GLORYTUN_UDP_BINARY_VERSION="0.3.4-4" GLORYTUN_TCP_BINARY_VERSION="0.0.35-3" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7" MLVPN_BINARY_VERSION="3.0.0+20201216.git.2263bab" UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078" -OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" +OBFS_VERSION="master" OBFS_BINARY_VERSION="0.0.5-1" -OMR_ADMIN_VERSION="2e752ad783ffb817f6d627a999d51ac6656411f9" -OMR_ADMIN_BINARY_VERSION="0.3+20210304" +OMR_ADMIN_VERSION="db77dc0508bf14089a185cbf3b2c1aee5333b2d7" +OMR_ADMIN_BINARY_VERSION="0.3+20210315" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_BINARY_VERSION="0.1.4-2" -V2RAY_VERSION="4.34.0" -V2RAY_PLUGIN_VERSION="v1.4.3" +V2RAY_VERSION="4.35.1" +V2RAY_PLUGIN_VERSION="4.35.1" EASYRSA_VERSION="3.0.6" -SHADOWSOCKS_VERSION="cadf278d476d0e5679c3e67390b271276a8dc54a" +SHADOWSOCKS_VERSION="master" SHADOWSOCKS_BINARY_VERSION="3.3.5-1" DEFAULT_USER="openmptcprouter" VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com)} VPSPATH="server-test" -VPSURL="https://www.openmptcprouter.com/" -REPO="repo.openmptcprouter.com" +VPSURL="https://omr.openmptcprouter.cn" +REPO="repo.55860.com" -OMR_VERSION="0.1025-test" +OMR_VERSION="0.1046free_bate" DIR=$( pwd ) #" @@ -133,6 +138,16 @@ if [ "$UPDATE" = "yes" ]; then echo "Update mode" fi +CURRENT_OMR="$(grep -s 'OpenMPTCProuter VPS' /etc/* | awk '{print $4}')" +if [ "$REINSTALL" = "no" ] && [ "$CURRENT_OMR" = "$OMR_VERSION" ]; then + exit 1 +fi + +[ -f /etc/apt/sources.list.d/openmptcprouter.list ] && { + echo "Update ${REPO} key" + wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add - +} + echo "Remove lock and update packages list..." rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend @@ -192,24 +207,33 @@ fi echo "Install mptcp kernel and shadowsocks..." apt-get update sleep 2 -apt-get -y install dirmngr patch +apt-get -y install dirmngr patch rename curl libcurl4 unzip -wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb -wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb -# Rename bzImage to vmlinuz, needed when custom kernel was used -cd /boot -apt-get -y install rename curl libcurl4 unzip git -rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 -#apt-get -y install linux-mptcp -#dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp -#dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp -if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then - 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" - dpkg --force-all -i -B /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb - dpkg --force-all -i -B /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb +if [ "$SOURCES" = "yes" ]; then + wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb + wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb + # Rename bzImage to vmlinuz, needed when custom kernel was used + cd /boot + apt-get -y install git + rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 + #apt-get -y install linux-mptcp + #dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp + #dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp + if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then + 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" + 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 +else + cd /boot + rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 + if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then + 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" + apt-get -y install linux-image-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} linux-headers-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} + fi fi - # Check if mptcp kernel is grub default kernel echo "Set MPTCP kernel as grub default..." if [ "$LOCALFILES" = "no" ]; then @@ -237,7 +261,7 @@ if [ "$SOURCES" = "yes" ]; then #wget -O /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz http://github.com/shadowsocks/shadowsocks-libev/releases/download/v${SHADOWSOCKS_VERSION}/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz cd /tmp rm -rf shadowsocks-libev - git clone https://github.com/Ysurac/shadowsocks-libev.git + git clone https://github.55860.com/suyuan168/shadowsocks-libev.git cd shadowsocks-libev git checkout ${SHADOWSOCKS_VERSION} git submodule update --init --recursive @@ -310,7 +334,7 @@ if [ "$SOURCES" = "yes" ]; then #rm -rf /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION} rm -rf /tmp/shadowsocks-libev else - apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} fi # Load OLIA Congestion module at boot time @@ -411,7 +435,7 @@ if [ "$OMR_ADMIN" = "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-ipv6.service ${VPSURL}${VPSPATH}/omr-admin-ipv6.service.in - wget -O /tmp/openmptcprouter-vps-admin.zip https://github.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip + wget -O /tmp/openmptcprouter-vps-admin.zip https://github.55860.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip cd /tmp unzip -q -o openmptcprouter-vps-admin.zip cp /tmp/openmptcprouter-vps-admin-${OMR_ADMIN_VERSION}/omr-admin.py /usr/local/bin/ @@ -436,11 +460,11 @@ if [ "$OMR_ADMIN" = "yes" ]; then if [ -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then OMR_ADMIN_PASS2=$(grep -Po '"'"pass"'"\s*:\s*"\K([^"]*)' /etc/openmptcprouter-vps-admin/omr-admin-config.json | tr -d "\n") [ -z "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].openmptcprouter.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 + [ -n "$OMR_ADMIN_PASS2" ] && [ "$OMR_ADMIN_PASS2" != "MySecretKey" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 OMR_ADMIN_PASS_ADMIN2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 + [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && [ "$OMR_ADMIN_PASS_ADMIN2" != "AdminMySecretKey" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 fi - apt-get -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} + apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} if [ ! -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then cp /usr/share/omr-admin/omr-admin-config.json /etc/openmptcprouter-vps-admin/ fi @@ -448,6 +472,7 @@ if [ "$OMR_ADMIN" = "yes" ]; then #OMR_ADMIN_PASS_ADMIN=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") fi if [ ! -f /etc/openmptcprouter-vps-admin/key.pem ]; then + cd /etc/openmptcprouter-vps-admin openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout key.pem -out cert.pem -subj "/C=US/ST=Oregon/L=Portland/O=OpenMPTCProuterVPS/OU=Org/CN=www.openmptcprouter.vps" fi sed -i "s:openmptcptouter:${DEFAULT_USER}:g" /etc/openmptcprouter-vps-admin/omr-admin-config.json @@ -540,7 +565,7 @@ if [ "$OBFS" = "yes" ]; then else apt-get install -y --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake git ca-certificates fi - git clone https://github.com/shadowsocks/simple-obfs.git /tmp/simple-obfs + git clone https://github.55860.com/suyuan168/simple-obfs.git /tmp/simple-obfs cd /tmp/simple-obfs git checkout ${OBFS_VERSION} git submodule update --init --recursive @@ -558,29 +583,33 @@ fi # Install v2ray-plugin if [ "$V2RAY_PLUGIN" = "yes" ]; then echo "Install v2ray plugin" - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/teddysun/v2ray-plugin/releases/download/v1.4.3/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - cd /tmp - tar xzvf v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin - cd /tmp - rm -rf /tmp/v2ray-plugin_linux_amd64 - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + if [ "$SOURCES" = "yes" ]; then + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://55860.com/bak/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + cd /tmp + tar xzvf v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin + cd /tmp + rm -rf /tmp/v2ray-plugin_linux_amd64 + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #rm -rf /tmp/v2ray-plugin - #cd /tmp - #rm -f /var/lib/dpkg/lock - #apt-get install -y --no-install-recommends git ca-certificates golang-go - #git clone https://github.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin - #cd /tmp/v2ray-plugin - #git checkout ${V2RAY_PLUGIN_VERSION} - #git submodule update --init --recursive - #CGO_ENABLED=0 go build -o v2ray-plugin - #cp v2ray-plugin /usr/local/bin/v2ray-plugin - #cd /tmp - #rm -rf /tmp/simple-obfs + #rm -rf /tmp/v2ray-plugin + #cd /tmp + #rm -f /var/lib/dpkg/lock + #apt-get install -y --no-install-recommends git ca-certificates golang-go + #git clone https://github.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin + #cd /tmp/v2ray-plugin + #git checkout ${V2RAY_PLUGIN_VERSION} + #git submodule update --init --recursive + #CGO_ENABLED=0 go build -o v2ray-plugin + #cp v2ray-plugin /usr/local/bin/v2ray-plugin + #cd /tmp + #rm -rf /tmp/simple-obfs + else + apt-get -y install v2ray-plugin=${V2RAY_PLUGIN_VERSION} + fi fi if [ "$OBFS" = "no" ] && [ "$V2RAY_PLUGIN" = "no" ]; then @@ -594,18 +623,23 @@ fi if [ "$V2RAY" = "yes" ]; then #apt-get -y -o Dpkg::Options::="--force-overwrite" install v2ray - wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb + if [ "$SOURCES" = "yes" ]; then + wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb + dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb + rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb + else + apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install v2ray=${V2RAY_VERSION} + fi if [ -f /etc/v2ray/v2ray-server.conf ] && [ ! -f /etc/systemd/system/v2ray.service ]; then wget -O /etc/systemd/system/v2ray.service ${VPSURL}${VPSPATH}/old-v2ray.service fi - dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb - rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb if [ ! -f /etc/v2ray/v2ray-server.json ]; then wget -O /etc/v2ray/v2ray-server.json ${VPSURL}${VPSPATH}/v2ray-server.json sed -i "s:V2RAY_UUID:$V2RAY_UUID:g" /etc/v2ray/v2ray-server.json rm /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json fi + ln -sf /etc/v2ray/v2ray-server.json /etc/v2ray/config.json sed -i 's:debug:warning:' /etc/v2ray/v2ray-server.json rm -f /tmp/v2rayError.log if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then @@ -627,6 +661,7 @@ if [ "$MLVPN" = "yes" ]; then if [ -f /etc/mlvpn/mlvpn0.conf ]; then mlvpnupdate="1" fi + mkdir -p /etc/mlvpn if [ "$SOURCES" = "yes" ]; then rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend @@ -634,7 +669,7 @@ if [ "$MLVPN" = "yes" ]; then rm -rf /tmp/mlvpn cd /tmp #git clone https://github.com/markfoodyburton/MLVPN.git /tmp/mlvpn - git clone https://github.com/flohoff/MLVPN.git /tmp/mlvpn + git clone https://github.55860.com/flohoff/MLVPN.git /tmp/mlvpn #git clone https://github.com/link4all/MLVPN.git /tmp/mlvpn cd /tmp/mlvpn git checkout ${MLVPN_VERSION} @@ -659,9 +694,8 @@ if [ "$MLVPN" = "yes" ]; then fi fi else - apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-mlvpn=${MLVPN_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" install omr-mlvpn=${MLVPN_BINARY_VERSION} fi - mkdir -p /etc/mlvpn if [ "$mlvpnupdate" = "0" ]; then sed -i "s:MLVPN_PASS:$MLVPN_PASS:" /etc/mlvpn/mlvpn0.conf fi @@ -692,7 +726,7 @@ if [ "$UBOND" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip git rm -rf /tmp/ubond cd /tmp - git clone https://github.com/markfoodyburton/ubond.git /tmp/ubond + git clone https://github.55860.com/markfoodyburton/ubond.git /tmp/ubond cd /tmp/ubond git checkout ${UBOND_VERSION} ./autogen.sh @@ -772,7 +806,7 @@ if [ "$OPENVPN" = "yes" ]; then # openvpn --genkey --secret static.key #fi if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ] && [ ! -d /etc/openvpn/ca ]; then - wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz + wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.55860.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp tar xzvf EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp/EasyRSA-v${EASYRSA_VERSION} @@ -875,7 +909,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates meson pkg-config rm -rf /tmp/glorytun-udp cd /tmp - git clone https://github.com/angt/glorytun.git /tmp/glorytun-udp + git clone https://github.55860.com/suyuan168/glorytun.git /tmp/glorytun-udp cd /tmp/glorytun-udp git checkout ${GLORYTUN_UDP_VERSION} git submodule update --init --recursive @@ -939,10 +973,10 @@ if [ "$DSVPN" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates rm -rf /tmp/dsvpn cd /tmp - git clone https://github.com/jedisct1/dsvpn.git /tmp/dsvpn + git clone https://github.55860.com/jedisct1/dsvpn.git /tmp/dsvpn cd /tmp/dsvpn git checkout ${DSVPN_VERSION} - wget https://github.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch + wget https://github.55860.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch patch -p1 < nofirewall.patch make CFLAGS='-DNO_DEFAULT_ROUTES -DNO_DEFAULT_FIREWALL' make install @@ -986,7 +1020,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake rm -rf /tmp/glorytun-0.0.35 cd /tmp - wget -O /tmp/glorytun-0.0.35.tar.gz http://github.com/angt/glorytun/releases/download/v0.0.35/glorytun-0.0.35.tar.gz + wget -O /tmp/glorytun-0.0.35.tar.gz http://55860.com/bak/glorytun-0.0.35.tar.gz tar xzf glorytun-0.0.35.tar.gz cd glorytun-0.0.35 ./autogen.sh @@ -1201,6 +1235,10 @@ else echo "< OpenMPTCProuter VPS $OMR_VERSION >" > /etc/motd fi +if [ "$SOURCES" != "yes" ]; then + apt-get -y install omr-server=${OMR_VERSION} 2>&1 >/dev/null || true +fi + if [ "$update" = "0" ]; then # Display important info echo '====================================================================================' @@ -1396,4 +1434,4 @@ else echo '====================================================================================' echo '\033[1m /!\ You need to reboot to use latest MPTCP kernel /!\ \033[0m' echo '====================================================================================' -fi +fi \ No newline at end of file From 8e41cd61cf7469e114827f31a72261a6501d346d Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 24 Mar 2021 09:35:42 +0800 Subject: [PATCH 09/16] Revert "Update debian9-x86_64.sh" This reverts commit 20ac590325fdc5dc188326bbd9ae341a7f3cd65c. --- debian9-x86_64.sh | 182 ++++++++++++++++++---------------------------- 1 file changed, 72 insertions(+), 110 deletions(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 688dea5..c052fbf 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -1,15 +1,11 @@ #!/bin/sh +# # Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) for OpenMPTCProuter -# Copyright (C) 2018-2020 suyunfan (antrouter) https://55860.com for openmptcprouter +# # This is free software, licensed under the GNU General Public License v3 or later. # See /LICENSE for more information. # -echo '====================================================================================' -echo '本脚本由蚂蚁聚合路由器出品。仅供DIY爱好者免费学习使用。请勿用于商业。' -echo '如果用于商业请选择蚂蚁聚合商业版,openmptcprouter合作伙伴请访问官网http://55860.com' -echo '5秒后自动开始安装' -echo '====================================================================================' -sleep 5 + SHADOWSOCKS_PASS=${SHADOWSOCKS_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} GLORYTUN_PASS=${GLORYTUN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} DSVPN_PASS=${DSVPN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} @@ -32,40 +28,39 @@ UBOND_PASS=${UBOND_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} OPENVPN=${OPENVPN:-yes} DSVPN=${DSVPN:-yes} WIREGUARD=${WIREGUARD:-yes} -SOURCES=${SOURCES:-no} +SOURCES=${SOURCES:-yes} NOINTERNET=${NOINTERNET:-no} -REINSTALL=${REINSTALL:-yes} SPEEDTEST=${SPEEDTEST:-no} LOCALFILES=${LOCALFILES:-no} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")} KERNEL_VERSION="5.4.100" KERNEL_PACKAGE_VERSION="1.18+9d3f35b" KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}" -GLORYTUN_UDP_VERSION="master" +GLORYTUN_UDP_VERSION="32267e86a6da05b285bb3bf2b136c105dc0af4bb" GLORYTUN_UDP_BINARY_VERSION="0.3.4-4" GLORYTUN_TCP_BINARY_VERSION="0.0.35-3" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7" MLVPN_BINARY_VERSION="3.0.0+20201216.git.2263bab" UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078" -OBFS_VERSION="master" +OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" OBFS_BINARY_VERSION="0.0.5-1" -OMR_ADMIN_VERSION="db77dc0508bf14089a185cbf3b2c1aee5333b2d7" -OMR_ADMIN_BINARY_VERSION="0.3+20210315" +OMR_ADMIN_VERSION="2e752ad783ffb817f6d627a999d51ac6656411f9" +OMR_ADMIN_BINARY_VERSION="0.3+20210304" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_BINARY_VERSION="0.1.4-2" -V2RAY_VERSION="4.35.1" -V2RAY_PLUGIN_VERSION="4.35.1" +V2RAY_VERSION="4.34.0" +V2RAY_PLUGIN_VERSION="v1.4.3" EASYRSA_VERSION="3.0.6" -SHADOWSOCKS_VERSION="master" +SHADOWSOCKS_VERSION="cadf278d476d0e5679c3e67390b271276a8dc54a" SHADOWSOCKS_BINARY_VERSION="3.3.5-1" DEFAULT_USER="openmptcprouter" VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com)} VPSPATH="server-test" -VPSURL="https://omr.openmptcprouter.cn" -REPO="repo.55860.com" +VPSURL="https://www.openmptcprouter.com/" +REPO="repo.openmptcprouter.com" -OMR_VERSION="0.1046free_bate" +OMR_VERSION="0.1025-test" DIR=$( pwd ) #" @@ -138,16 +133,6 @@ if [ "$UPDATE" = "yes" ]; then echo "Update mode" fi -CURRENT_OMR="$(grep -s 'OpenMPTCProuter VPS' /etc/* | awk '{print $4}')" -if [ "$REINSTALL" = "no" ] && [ "$CURRENT_OMR" = "$OMR_VERSION" ]; then - exit 1 -fi - -[ -f /etc/apt/sources.list.d/openmptcprouter.list ] && { - echo "Update ${REPO} key" - wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add - -} - echo "Remove lock and update packages list..." rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend @@ -207,33 +192,24 @@ fi echo "Install mptcp kernel and shadowsocks..." apt-get update sleep 2 -apt-get -y install dirmngr patch rename curl libcurl4 unzip +apt-get -y install dirmngr patch -if [ "$SOURCES" = "yes" ]; then - wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb - wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb - # Rename bzImage to vmlinuz, needed when custom kernel was used - cd /boot - apt-get -y install git - rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 - #apt-get -y install linux-mptcp - #dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp - #dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp - if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then - 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" - 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 -else - cd /boot - rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 - if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then - 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" - apt-get -y install linux-image-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} linux-headers-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} - fi +wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb +wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb +# Rename bzImage to vmlinuz, needed when custom kernel was used +cd /boot +apt-get -y install rename curl libcurl4 unzip git +rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 +#apt-get -y install linux-mptcp +#dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp +#dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp +if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then + 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" + 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 + # Check if mptcp kernel is grub default kernel echo "Set MPTCP kernel as grub default..." if [ "$LOCALFILES" = "no" ]; then @@ -261,7 +237,7 @@ if [ "$SOURCES" = "yes" ]; then #wget -O /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz http://github.com/shadowsocks/shadowsocks-libev/releases/download/v${SHADOWSOCKS_VERSION}/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz cd /tmp rm -rf shadowsocks-libev - git clone https://github.55860.com/suyuan168/shadowsocks-libev.git + git clone https://github.com/Ysurac/shadowsocks-libev.git cd shadowsocks-libev git checkout ${SHADOWSOCKS_VERSION} git submodule update --init --recursive @@ -334,7 +310,7 @@ if [ "$SOURCES" = "yes" ]; then #rm -rf /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION} rm -rf /tmp/shadowsocks-libev else - apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} fi # Load OLIA Congestion module at boot time @@ -435,7 +411,7 @@ if [ "$OMR_ADMIN" = "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-ipv6.service ${VPSURL}${VPSPATH}/omr-admin-ipv6.service.in - wget -O /tmp/openmptcprouter-vps-admin.zip https://github.55860.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip + wget -O /tmp/openmptcprouter-vps-admin.zip https://github.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip cd /tmp unzip -q -o openmptcprouter-vps-admin.zip cp /tmp/openmptcprouter-vps-admin-${OMR_ADMIN_VERSION}/omr-admin.py /usr/local/bin/ @@ -460,11 +436,11 @@ if [ "$OMR_ADMIN" = "yes" ]; then if [ -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then OMR_ADMIN_PASS2=$(grep -Po '"'"pass"'"\s*:\s*"\K([^"]*)' /etc/openmptcprouter-vps-admin/omr-admin-config.json | tr -d "\n") [ -z "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].openmptcprouter.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS2" ] && [ "$OMR_ADMIN_PASS2" != "MySecretKey" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 + [ -n "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 OMR_ADMIN_PASS_ADMIN2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && [ "$OMR_ADMIN_PASS_ADMIN2" != "AdminMySecretKey" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 + [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 fi - apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} + apt-get -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} if [ ! -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then cp /usr/share/omr-admin/omr-admin-config.json /etc/openmptcprouter-vps-admin/ fi @@ -472,7 +448,6 @@ if [ "$OMR_ADMIN" = "yes" ]; then #OMR_ADMIN_PASS_ADMIN=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") fi if [ ! -f /etc/openmptcprouter-vps-admin/key.pem ]; then - cd /etc/openmptcprouter-vps-admin openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout key.pem -out cert.pem -subj "/C=US/ST=Oregon/L=Portland/O=OpenMPTCProuterVPS/OU=Org/CN=www.openmptcprouter.vps" fi sed -i "s:openmptcptouter:${DEFAULT_USER}:g" /etc/openmptcprouter-vps-admin/omr-admin-config.json @@ -565,7 +540,7 @@ if [ "$OBFS" = "yes" ]; then else apt-get install -y --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake git ca-certificates fi - git clone https://github.55860.com/suyuan168/simple-obfs.git /tmp/simple-obfs + git clone https://github.com/shadowsocks/simple-obfs.git /tmp/simple-obfs cd /tmp/simple-obfs git checkout ${OBFS_VERSION} git submodule update --init --recursive @@ -583,33 +558,29 @@ fi # Install v2ray-plugin if [ "$V2RAY_PLUGIN" = "yes" ]; then echo "Install v2ray plugin" - if [ "$SOURCES" = "yes" ]; then - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz - wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://55860.com/bak/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz - cd /tmp - tar xzvf v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz - cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin - cd /tmp - rm -rf /tmp/v2ray-plugin_linux_amd64 - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/teddysun/v2ray-plugin/releases/download/v1.4.3/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + cd /tmp + tar xzvf v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin + cd /tmp + rm -rf /tmp/v2ray-plugin_linux_amd64 + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #rm -rf /tmp/v2ray-plugin - #cd /tmp - #rm -f /var/lib/dpkg/lock - #apt-get install -y --no-install-recommends git ca-certificates golang-go - #git clone https://github.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin - #cd /tmp/v2ray-plugin - #git checkout ${V2RAY_PLUGIN_VERSION} - #git submodule update --init --recursive - #CGO_ENABLED=0 go build -o v2ray-plugin - #cp v2ray-plugin /usr/local/bin/v2ray-plugin - #cd /tmp - #rm -rf /tmp/simple-obfs - else - apt-get -y install v2ray-plugin=${V2RAY_PLUGIN_VERSION} - fi + #rm -rf /tmp/v2ray-plugin + #cd /tmp + #rm -f /var/lib/dpkg/lock + #apt-get install -y --no-install-recommends git ca-certificates golang-go + #git clone https://github.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin + #cd /tmp/v2ray-plugin + #git checkout ${V2RAY_PLUGIN_VERSION} + #git submodule update --init --recursive + #CGO_ENABLED=0 go build -o v2ray-plugin + #cp v2ray-plugin /usr/local/bin/v2ray-plugin + #cd /tmp + #rm -rf /tmp/simple-obfs fi if [ "$OBFS" = "no" ] && [ "$V2RAY_PLUGIN" = "no" ]; then @@ -623,23 +594,18 @@ fi if [ "$V2RAY" = "yes" ]; then #apt-get -y -o Dpkg::Options::="--force-overwrite" install v2ray - if [ "$SOURCES" = "yes" ]; then - wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb - dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb - rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb - else - apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install v2ray=${V2RAY_VERSION} - fi + wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb if [ -f /etc/v2ray/v2ray-server.conf ] && [ ! -f /etc/systemd/system/v2ray.service ]; then wget -O /etc/systemd/system/v2ray.service ${VPSURL}${VPSPATH}/old-v2ray.service fi + dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb + rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb if [ ! -f /etc/v2ray/v2ray-server.json ]; then wget -O /etc/v2ray/v2ray-server.json ${VPSURL}${VPSPATH}/v2ray-server.json sed -i "s:V2RAY_UUID:$V2RAY_UUID:g" /etc/v2ray/v2ray-server.json rm /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json fi - ln -sf /etc/v2ray/v2ray-server.json /etc/v2ray/config.json sed -i 's:debug:warning:' /etc/v2ray/v2ray-server.json rm -f /tmp/v2rayError.log if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then @@ -661,7 +627,6 @@ if [ "$MLVPN" = "yes" ]; then if [ -f /etc/mlvpn/mlvpn0.conf ]; then mlvpnupdate="1" fi - mkdir -p /etc/mlvpn if [ "$SOURCES" = "yes" ]; then rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend @@ -669,7 +634,7 @@ if [ "$MLVPN" = "yes" ]; then rm -rf /tmp/mlvpn cd /tmp #git clone https://github.com/markfoodyburton/MLVPN.git /tmp/mlvpn - git clone https://github.55860.com/flohoff/MLVPN.git /tmp/mlvpn + git clone https://github.com/flohoff/MLVPN.git /tmp/mlvpn #git clone https://github.com/link4all/MLVPN.git /tmp/mlvpn cd /tmp/mlvpn git checkout ${MLVPN_VERSION} @@ -694,8 +659,9 @@ if [ "$MLVPN" = "yes" ]; then fi fi else - apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" install omr-mlvpn=${MLVPN_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-mlvpn=${MLVPN_BINARY_VERSION} fi + mkdir -p /etc/mlvpn if [ "$mlvpnupdate" = "0" ]; then sed -i "s:MLVPN_PASS:$MLVPN_PASS:" /etc/mlvpn/mlvpn0.conf fi @@ -726,7 +692,7 @@ if [ "$UBOND" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip git rm -rf /tmp/ubond cd /tmp - git clone https://github.55860.com/markfoodyburton/ubond.git /tmp/ubond + git clone https://github.com/markfoodyburton/ubond.git /tmp/ubond cd /tmp/ubond git checkout ${UBOND_VERSION} ./autogen.sh @@ -806,7 +772,7 @@ if [ "$OPENVPN" = "yes" ]; then # openvpn --genkey --secret static.key #fi if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ] && [ ! -d /etc/openvpn/ca ]; then - wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.55860.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz + wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp tar xzvf EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp/EasyRSA-v${EASYRSA_VERSION} @@ -909,7 +875,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates meson pkg-config rm -rf /tmp/glorytun-udp cd /tmp - git clone https://github.55860.com/suyuan168/glorytun.git /tmp/glorytun-udp + git clone https://github.com/angt/glorytun.git /tmp/glorytun-udp cd /tmp/glorytun-udp git checkout ${GLORYTUN_UDP_VERSION} git submodule update --init --recursive @@ -973,10 +939,10 @@ if [ "$DSVPN" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates rm -rf /tmp/dsvpn cd /tmp - git clone https://github.55860.com/jedisct1/dsvpn.git /tmp/dsvpn + git clone https://github.com/jedisct1/dsvpn.git /tmp/dsvpn cd /tmp/dsvpn git checkout ${DSVPN_VERSION} - wget https://github.55860.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch + wget https://github.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch patch -p1 < nofirewall.patch make CFLAGS='-DNO_DEFAULT_ROUTES -DNO_DEFAULT_FIREWALL' make install @@ -1020,7 +986,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake rm -rf /tmp/glorytun-0.0.35 cd /tmp - wget -O /tmp/glorytun-0.0.35.tar.gz http://55860.com/bak/glorytun-0.0.35.tar.gz + wget -O /tmp/glorytun-0.0.35.tar.gz http://github.com/angt/glorytun/releases/download/v0.0.35/glorytun-0.0.35.tar.gz tar xzf glorytun-0.0.35.tar.gz cd glorytun-0.0.35 ./autogen.sh @@ -1235,10 +1201,6 @@ else echo "< OpenMPTCProuter VPS $OMR_VERSION >" > /etc/motd fi -if [ "$SOURCES" != "yes" ]; then - apt-get -y install omr-server=${OMR_VERSION} 2>&1 >/dev/null || true -fi - if [ "$update" = "0" ]; then # Display important info echo '====================================================================================' @@ -1434,4 +1396,4 @@ else echo '====================================================================================' echo '\033[1m /!\ You need to reboot to use latest MPTCP kernel /!\ \033[0m' echo '====================================================================================' -fi \ No newline at end of file +fi From 6c6f045f835ad56bb57daf32fcf2e82d926f5fd3 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 24 Mar 2021 10:02:00 +0800 Subject: [PATCH 10/16] fix --- .DS_Store | Bin 0 -> 6148 bytes debian9-x86_64.sh | 46 +++++++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9aa77f6c1995c11f4ff25e55b2238fba06a65640 GIT binary patch literal 6148 zcmeHKK}!Nb6n>MNh+RAsblgte0zm}vvdVU;OCa6V6b-Z$Exa!DL+mH?7otDVACUYT zb?UvDXU@2;LWhWWPiDT^dGF2p_Jf^q06^6rIz@m20OYU{dU@#IS5f!a5 z=oK3`(QuTAlnGHl6!?n@(6{Ts8T8;5?w#+qHXqx*VHAe#LDa^%+;#V8+S`Avx&F>p z|EO>64HpYcg$%T@>YY=yI(uAs?3%&nyuvj(Zy2pACcRF*>J!z=LI=9KW^1h~WM}Js zyY}SdeOcRC!)A~cy>=dM_n=QHsX`paO%^ivps6t3bv)7U=vxPrv`WN%ABLhywpg0p*2_u#T_9XKUi+=&bdz sHL;OVTx?LMV8_R?9?(&Ij7=N*d>SAIjIlwSL6biMS_bJvfnQbN3nnh9h5!Hn literal 0 HcmV?d00001 diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index c052fbf..9ef26b6 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -1,11 +1,15 @@ #!/bin/sh -# # Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) for OpenMPTCProuter -# +# Copyright (C) 2018-2020 suyunfan (antrouter) https://55860.com for openmptcprouter # This is free software, licensed under the GNU General Public License v3 or later. # See /LICENSE for more information. # - +echo '====================================================================================' +echo '本脚本由蚂蚁聚合路由器出品。仅供DIY爱好者免费学习使用。请勿用于商业。' +echo '如果用于商业请选择蚂蚁聚合商业版,openmptcprouter合作伙伴请访问官网http://55860.com' +echo '5秒后自动开始安装' +echo '====================================================================================' +sleep 5 SHADOWSOCKS_PASS=${SHADOWSOCKS_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} GLORYTUN_PASS=${GLORYTUN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} DSVPN_PASS=${DSVPN_PASS:-$(od -vN "32" -An -tx1 /dev/urandom | tr '[:lower:]' '[:upper:]' | tr -d " \n")} @@ -36,31 +40,31 @@ INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev KERNEL_VERSION="5.4.100" KERNEL_PACKAGE_VERSION="1.18+9d3f35b" KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}" -GLORYTUN_UDP_VERSION="32267e86a6da05b285bb3bf2b136c105dc0af4bb" +GLORYTUN_UDP_VERSION="master" GLORYTUN_UDP_BINARY_VERSION="0.3.4-4" GLORYTUN_TCP_BINARY_VERSION="0.0.35-3" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" MLVPN_VERSION="f45cec350a6879b8b020143a78134a022b5df2a7" MLVPN_BINARY_VERSION="3.0.0+20201216.git.2263bab" UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078" -OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" +OBFS_VERSION="master" OBFS_BINARY_VERSION="0.0.5-1" OMR_ADMIN_VERSION="2e752ad783ffb817f6d627a999d51ac6656411f9" OMR_ADMIN_BINARY_VERSION="0.3+20210304" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_BINARY_VERSION="0.1.4-2" -V2RAY_VERSION="4.34.0" +V2RAY_VERSION="4.35.1" V2RAY_PLUGIN_VERSION="v1.4.3" EASYRSA_VERSION="3.0.6" -SHADOWSOCKS_VERSION="cadf278d476d0e5679c3e67390b271276a8dc54a" +SHADOWSOCKS_VERSION="master" SHADOWSOCKS_BINARY_VERSION="3.3.5-1" DEFAULT_USER="openmptcprouter" VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com)} VPSPATH="server-test" -VPSURL="https://www.openmptcprouter.com/" -REPO="repo.openmptcprouter.com" +VPSURL="https://omr.openmptcprouter.cn" +REPO="repo.55860.com" -OMR_VERSION="0.1025-test" +OMR_VERSION="0.1046free_bate" DIR=$( pwd ) #" @@ -237,7 +241,7 @@ if [ "$SOURCES" = "yes" ]; then #wget -O /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz http://github.com/shadowsocks/shadowsocks-libev/releases/download/v${SHADOWSOCKS_VERSION}/shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz cd /tmp rm -rf shadowsocks-libev - git clone https://github.com/Ysurac/shadowsocks-libev.git + git clone https://github.55860.com/suyuan168/shadowsocks-libev.git cd shadowsocks-libev git checkout ${SHADOWSOCKS_VERSION} git submodule update --init --recursive @@ -411,7 +415,7 @@ if [ "$OMR_ADMIN" = "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-ipv6.service ${VPSURL}${VPSPATH}/omr-admin-ipv6.service.in - wget -O /tmp/openmptcprouter-vps-admin.zip https://github.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip + wget -O /tmp/openmptcprouter-vps-admin.zip https://github.55860.com/Ysurac/openmptcprouter-vps-admin/archive/${OMR_ADMIN_VERSION}.zip cd /tmp unzip -q -o openmptcprouter-vps-admin.zip cp /tmp/openmptcprouter-vps-admin-${OMR_ADMIN_VERSION}/omr-admin.py /usr/local/bin/ @@ -540,7 +544,7 @@ if [ "$OBFS" = "yes" ]; then else apt-get install -y --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake git ca-certificates fi - git clone https://github.com/shadowsocks/simple-obfs.git /tmp/simple-obfs + git clone https://github.55860.com/suyuan168/simple-obfs.git /tmp/simple-obfs cd /tmp/simple-obfs git checkout ${OBFS_VERSION} git submodule update --init --recursive @@ -634,7 +638,7 @@ if [ "$MLVPN" = "yes" ]; then rm -rf /tmp/mlvpn cd /tmp #git clone https://github.com/markfoodyburton/MLVPN.git /tmp/mlvpn - git clone https://github.com/flohoff/MLVPN.git /tmp/mlvpn + git clone https://github.55860.com/flohoff/MLVPN.git /tmp/mlvpn #git clone https://github.com/link4all/MLVPN.git /tmp/mlvpn cd /tmp/mlvpn git checkout ${MLVPN_VERSION} @@ -692,7 +696,7 @@ if [ "$UBOND" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip git rm -rf /tmp/ubond cd /tmp - git clone https://github.com/markfoodyburton/ubond.git /tmp/ubond + git clone https://github.55860.com/markfoodyburton/ubond.git /tmp/ubond cd /tmp/ubond git checkout ${UBOND_VERSION} ./autogen.sh @@ -772,7 +776,7 @@ if [ "$OPENVPN" = "yes" ]; then # openvpn --genkey --secret static.key #fi if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ] && [ ! -d /etc/openvpn/ca ]; then - wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz + wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.55860.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp tar xzvf EasyRSA-unix-v${EASYRSA_VERSION}.tgz cd /tmp/EasyRSA-v${EASYRSA_VERSION} @@ -875,7 +879,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates meson pkg-config rm -rf /tmp/glorytun-udp cd /tmp - git clone https://github.com/angt/glorytun.git /tmp/glorytun-udp + git clone https://github.55860.com/suyuan168/glorytun.git /tmp/glorytun-udp cd /tmp/glorytun-udp git checkout ${GLORYTUN_UDP_VERSION} git submodule update --init --recursive @@ -939,10 +943,10 @@ if [ "$DSVPN" = "yes" ]; then apt-get install -y --no-install-recommends build-essential git ca-certificates rm -rf /tmp/dsvpn cd /tmp - git clone https://github.com/jedisct1/dsvpn.git /tmp/dsvpn + git clone https://github.55860.com/jedisct1/dsvpn.git /tmp/dsvpn cd /tmp/dsvpn git checkout ${DSVPN_VERSION} - wget https://github.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch + wget https://github.55860.com/Ysurac/openmptcprouter-feeds/raw/develop/dsvpn/patches/nofirewall.patch patch -p1 < nofirewall.patch make CFLAGS='-DNO_DEFAULT_ROUTES -DNO_DEFAULT_FIREWALL' make install @@ -986,7 +990,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake rm -rf /tmp/glorytun-0.0.35 cd /tmp - wget -O /tmp/glorytun-0.0.35.tar.gz http://github.com/angt/glorytun/releases/download/v0.0.35/glorytun-0.0.35.tar.gz + wget -O /tmp/glorytun-0.0.35.tar.gz http://55860.com/bak/glorytun-0.0.35.tar.gz tar xzf glorytun-0.0.35.tar.gz cd glorytun-0.0.35 ./autogen.sh @@ -1396,4 +1400,4 @@ else echo '====================================================================================' echo '\033[1m /!\ You need to reboot to use latest MPTCP kernel /!\ \033[0m' echo '====================================================================================' -fi +fi \ No newline at end of file From b1d801eab4d27c713d13cb673c4ec5ec2923a0c5 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 24 Mar 2021 10:55:35 +0800 Subject: [PATCH 11/16] fix --- .DS_Store | Bin 6148 -> 6148 bytes debian9-x86_64.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 9aa77f6c1995c11f4ff25e55b2238fba06a65640..cd24e7b7e1165f9522b466bd65ef0c07c3cf90d5 100644 GIT binary patch delta 107 zcmZoMXffEJ$`a?KoXEhyz`~%%kj{|FP?DSP;*yk;p9B=+sNNadlf`=25mi0~uY5s< VVQ_MOZUIma1A}+K=4O^gVE~gN8j=72 delta 107 zcmZoMXffEJ$`a>zw}^p(frUYjA)O(Up(Hoo#U&{xKM5$t5t=Gmp3ZvM5mi0~uY5s< VVQ_MOZUIma1B2It&CM*0!T^T58aDs{ diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 9ef26b6..ae1d347 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -61,7 +61,7 @@ SHADOWSOCKS_BINARY_VERSION="3.3.5-1" DEFAULT_USER="openmptcprouter" VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com)} VPSPATH="server-test" -VPSURL="https://omr.openmptcprouter.cn" +VPSURL="https://omr.openmptcprouter.cn/" REPO="repo.55860.com" OMR_VERSION="0.1046free_bate" From d09e1bfe3d9a893e460149428b57bbad3447ab0b Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 24 Mar 2021 13:03:15 +0800 Subject: [PATCH 12/16] fix --- debian9-x86_64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index ae1d347..c852427 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -565,7 +565,7 @@ if [ "$V2RAY_PLUGIN" = "yes" ]; then rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/teddysun/v2ray-plugin/releases/download/v1.4.3/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://55860.com/bak/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz cd /tmp tar xzvf v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin From 64ac3a90c940ab4490e8814ef1ce3ab777067cab Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Thu, 25 Mar 2021 13:12:14 +0800 Subject: [PATCH 13/16] fix --- .DS_Store | Bin 6148 -> 6148 bytes debian9-x86_64.sh | 205 +++++++++++++++++++++++++++++++--------------- 2 files changed, 137 insertions(+), 68 deletions(-) diff --git a/.DS_Store b/.DS_Store index cd24e7b7e1165f9522b466bd65ef0c07c3cf90d5..cf5717ee51a1727e0872701b5233bba5739ce50e 100644 GIT binary patch delta 107 zcmZoMXffEJ$`a>%P?UjzfrUYjA)O(Up(Hoo#U&{xKM5$t!K?G)WIgL)M^yO~yz&JZ VhQZ1CxdlKy3=HlKo10l0g#n}S8r1** delta 107 zcmZoMXffEJ$`a?KoXEhyz`~%%kj{|FP?DSP;*yk;p9B=+sNNadlf`=25mi0~uY5s< VVQ_MOZUIma1A}+K=4O^gVE~gN8j=72 diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index c852427..a9fe1d6 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -32,8 +32,9 @@ UBOND_PASS=${UBOND_PASS:-$(head -c 32 /dev/urandom | base64 -w0)} OPENVPN=${OPENVPN:-yes} DSVPN=${DSVPN:-yes} WIREGUARD=${WIREGUARD:-yes} -SOURCES=${SOURCES:-yes} +SOURCES=${SOURCES:-no} NOINTERNET=${NOINTERNET:-no} +REINSTALL=${REINSTALL:-yes} SPEEDTEST=${SPEEDTEST:-no} LOCALFILES=${LOCALFILES:-no} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")} @@ -49,22 +50,23 @@ MLVPN_BINARY_VERSION="3.0.0+20201216.git.2263bab" UBOND_VERSION="672100fb57913ffd29caad63517e145a5974b078" OBFS_VERSION="master" OBFS_BINARY_VERSION="0.0.5-1" -OMR_ADMIN_VERSION="2e752ad783ffb817f6d627a999d51ac6656411f9" -OMR_ADMIN_BINARY_VERSION="0.3+20210304" +OMR_ADMIN_VERSION="db77dc0508bf14089a185cbf3b2c1aee5333b2d7" +OMR_ADMIN_BINARY_VERSION="0.3+20210315" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_BINARY_VERSION="0.1.4-2" V2RAY_VERSION="4.35.1" -V2RAY_PLUGIN_VERSION="v1.4.3" +V2RAY_PLUGIN_VERSION="4.35.1" EASYRSA_VERSION="3.0.6" SHADOWSOCKS_VERSION="master" SHADOWSOCKS_BINARY_VERSION="3.3.5-1" -DEFAULT_USER="openmptcprouter" +DEFAULT_USER="antrouter" VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com)} VPSPATH="server-test" VPSURL="https://omr.openmptcprouter.cn/" REPO="repo.55860.com" +CHINA=${CHINA:-no} -OMR_VERSION="0.1046free_bate" +OMR_VERSION="0.1047-test" DIR=$( pwd ) #" @@ -137,6 +139,20 @@ if [ "$UPDATE" = "yes" ]; then echo "Update mode" fi +CURRENT_OMR="$(grep -s 'OpenMPTCProuter VPS' /etc/* | awk '{print $4}')" +if [ "$REINSTALL" = "no" ] && [ "$CURRENT_OMR" = "$OMR_VERSION" ]; then + exit 1 +fi + +[ -f /etc/apt/sources.list.d/openmptcprouter.list ] && { + echo "Update ${REPO} key" + if [ "$CHINA" = "yes" ]; then + wget -O - https://gitee.com/ysurac/openmptcprouter-vps-debian/raw/main/openmptcprouter.gpg.key | apt-key add - + else + wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add - + fi +} + echo "Remove lock and update packages list..." rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend @@ -169,16 +185,46 @@ if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ] && [ "$UPDATE_OS" = "yes" apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" dist-upgrade VERSION_ID="20.04" fi + # Add OpenMPTCProuter repo echo "Add OpenMPTCProuter repo..." -echo "deb [arch=amd64] https://${REPO} buster main" > /etc/apt/sources.list.d/openmptcprouter.list -cat < /etc/apt/sources.list.d/openmptcprouter.list + cat /var/lib/openmptcprouter-vps-debian/openmptcprouter.gpg.key | apt-key add - + if [ ! -d /usr/share/omr-server-git ]; then + git clone https://gitee.com/ysurac/openmptcprouter-vps.git /usr/share/omr-server-git + fi + cd /usr/share/omr-server-git + git pull + if [ "$VPSPATH" = "server-test" ]; then + git checkout develop + else + git checkout master + fi + LOCALFILES="yes" + DIR="/usr/share/omr-server-git" +else + echo "deb [arch=amd64] https://${REPO} buster main" > /etc/apt/sources.list.d/openmptcprouter.list + cat <<-EOF | tee /etc/apt/preferences.d/openmptcprouter.pref + Explanation: Prefer OpenMPTCProuter provided packages over the Debian native ones + Package: * + Pin: origin ${REPO} + Pin-Priority: 1001 + EOF + wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add - +fi #apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 379CE192D401AB61 if [ "$ID" = "debian" ]; then @@ -196,24 +242,33 @@ fi echo "Install mptcp kernel and shadowsocks..." apt-get update sleep 2 -apt-get -y install dirmngr patch +apt-get -y install dirmngr patch rename curl libcurl4 unzip -wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb -wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb -# Rename bzImage to vmlinuz, needed when custom kernel was used -cd /boot -apt-get -y install rename curl libcurl4 unzip git -rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 -#apt-get -y install linux-mptcp -#dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp -#dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp -if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then - 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" - dpkg --force-all -i -B /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb - dpkg --force-all -i -B /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb +if [ "$SOURCES" = "yes" ]; then + wget -O /tmp/linux-image-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-image-${KERNEL_RELEASE}_amd64.deb + wget -O /tmp/linux-headers-${KERNEL_RELEASE}_amd64.deb ${VPSURL}kernel/linux-headers-${KERNEL_RELEASE}_amd64.deb + # Rename bzImage to vmlinuz, needed when custom kernel was used + cd /boot + apt-get -y install git + rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 + #apt-get -y install linux-mptcp + #dpkg --remove --force-remove-reinstreq linux-image-${KERNEL_VERSION}-mptcp + #dpkg --remove --force-remove-reinstreq linux-headers-${KERNEL_VERSION}-mptcp + if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then + 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" + 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 +else + cd /boot + rename 's/^bzImage/vmlinuz/s' * >/dev/null 2>&1 + if [ "$(dpkg -l | grep linux-image-${KERNEL_VERSION} | grep ${KERNEL_PACKAGE_VERSION})" = "" ]; then + 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" + apt-get -y install linux-image-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} linux-headers-${KERNEL_VERSION}-mptcp=${KERNEL_PACKAGE_VERSION} + fi fi - # Check if mptcp kernel is grub default kernel echo "Set MPTCP kernel as grub default..." if [ "$LOCALFILES" = "no" ]; then @@ -249,11 +304,11 @@ if [ "$SOURCES" = "yes" ]; then #cd shadowsocks-libev-${SHADOWSOCKS_VERSION} #wget https://raw.githubusercontent.com/Ysurac/openmptcprouter-feeds/master/shadowsocks-libev/patches/020-NOCRYPTO.patch #patch -p1 < 020-NOCRYPTO.patch - #wget https://github.com/Ysurac/shadowsocks-libev/commit/31b93ac2b054bc3f68ea01569649e6882d72218e.patch + #wget https://github.55860.com/Ysurac/shadowsocks-libev/commit/31b93ac2b054bc3f68ea01569649e6882d72218e.patch #patch -p1 < 31b93ac2b054bc3f68ea01569649e6882d72218e.patch - #wget https://github.com/Ysurac/shadowsocks-libev/commit/2e52734b3bf176966e78e77cf080a1e8c6b2b570.patch + #wget https://github.55860.com/Ysurac/shadowsocks-libev/commit/2e52734b3bf176966e78e77cf080a1e8c6b2b570.patch #patch -p1 < 2e52734b3bf176966e78e77cf080a1e8c6b2b570.patch - #wget https://github.com/Ysurac/shadowsocks-libev/commit/dd1baa91e975a69508f9ad67d75d72624c773d24.patch + #wget https://github.55860.com/Ysurac/shadowsocks-libev/commit/dd1baa91e975a69508f9ad67d75d72624c773d24.patch #patch -p1 < dd1baa91e975a69508f9ad67d75d72624c773d24.patch # Shadowsocks eBPF support #wget https://raw.githubusercontent.com/Ysurac/openmptcprouter-feeds/master/shadowsocks-libev/patches/030-eBPF.patch @@ -262,7 +317,7 @@ if [ "$SOURCES" = "yes" ]; then #apt-get install -y --no-install-recommends build-essential git ca-certificates libcap-dev libelf-dev libpcap-dev #cd /tmp #rm -rf libbpf - #git clone https://github.com/libbpf/libbpf.git + #git clone https://github.55860.com/libbpf/libbpf.git #cd libbpf #if [ "$ID" = "debian" ]; then # rm -f /var/lib/dpkg/lock @@ -314,7 +369,7 @@ if [ "$SOURCES" = "yes" ]; then #rm -rf /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION} rm -rf /tmp/shadowsocks-libev else - apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION} fi # Load OLIA Congestion module at boot time @@ -440,11 +495,11 @@ if [ "$OMR_ADMIN" = "yes" ]; then if [ -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then OMR_ADMIN_PASS2=$(grep -Po '"'"pass"'"\s*:\s*"\K([^"]*)' /etc/openmptcprouter-vps-admin/omr-admin-config.json | tr -d "\n") [ -z "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].openmptcprouter.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS2" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 + [ -n "$OMR_ADMIN_PASS2" ] && [ "$OMR_ADMIN_PASS2" != "MySecretKey" ] && OMR_ADMIN_PASS=$OMR_ADMIN_PASS2 OMR_ADMIN_PASS_ADMIN2=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") - [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 + [ -n "$OMR_ADMIN_PASS_ADMIN2" ] && [ "$OMR_ADMIN_PASS_ADMIN2" != "AdminMySecretKey" ] && OMR_ADMIN_PASS_ADMIN=$OMR_ADMIN_PASS_ADMIN2 fi - apt-get -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} + apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install omr-vps-admin=${OMR_ADMIN_BINARY_VERSION} if [ ! -f /etc/openmptcprouter-vps-admin/omr-admin-config.json ]; then cp /usr/share/omr-admin/omr-admin-config.json /etc/openmptcprouter-vps-admin/ fi @@ -452,6 +507,7 @@ if [ "$OMR_ADMIN" = "yes" ]; then #OMR_ADMIN_PASS_ADMIN=$(cat /etc/openmptcprouter-vps-admin/omr-admin-config.json | jq -r .users[0].admin.user_password | tr -d "\n") fi if [ ! -f /etc/openmptcprouter-vps-admin/key.pem ]; then + cd /etc/openmptcprouter-vps-admin openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout key.pem -out cert.pem -subj "/C=US/ST=Oregon/L=Portland/O=OpenMPTCProuterVPS/OU=Org/CN=www.openmptcprouter.vps" fi sed -i "s:openmptcptouter:${DEFAULT_USER}:g" /etc/openmptcprouter-vps-admin/omr-admin-config.json @@ -562,29 +618,33 @@ fi # Install v2ray-plugin if [ "$V2RAY_PLUGIN" = "yes" ]; then echo "Install v2ray plugin" - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - wget -O /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz https://55860.com/bak/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - cd /tmp - tar xzvf v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin - cd /tmp - rm -rf /tmp/v2ray-plugin_linux_amd64 - rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + if [ "$SOURCES" = "yes" ]; then + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://github.55860.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + #wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz ${VPSURL}${VPSPATH}/bin/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + wget -O /tmp/v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz https://55860.com/bak/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz + cd /tmp + tar xzvf v2ray-plugin-linux-amd64-v${V2RAY_PLUGIN_VERSION}.tar.gz + cp -f v2ray-plugin_linux_amd64 /usr/local/bin/v2ray-plugin + cd /tmp + rm -rf /tmp/v2ray-plugin_linux_amd64 + rm -rf /tmp/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz - #rm -rf /tmp/v2ray-plugin - #cd /tmp - #rm -f /var/lib/dpkg/lock - #apt-get install -y --no-install-recommends git ca-certificates golang-go - #git clone https://github.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin - #cd /tmp/v2ray-plugin - #git checkout ${V2RAY_PLUGIN_VERSION} - #git submodule update --init --recursive - #CGO_ENABLED=0 go build -o v2ray-plugin - #cp v2ray-plugin /usr/local/bin/v2ray-plugin - #cd /tmp - #rm -rf /tmp/simple-obfs + #rm -rf /tmp/v2ray-plugin + #cd /tmp + #rm -f /var/lib/dpkg/lock + #apt-get install -y --no-install-recommends git ca-certificates golang-go + #git clone https://github.55860.com/shadowsocks/v2ray-plugin.git /tmp/v2ray-plugin + #cd /tmp/v2ray-plugin + #git checkout ${V2RAY_PLUGIN_VERSION} + #git submodule update --init --recursive + #CGO_ENABLED=0 go build -o v2ray-plugin + #cp v2ray-plugin /usr/local/bin/v2ray-plugin + #cd /tmp + #rm -rf /tmp/simple-obfs + else + apt-get -y install v2ray-plugin=${V2RAY_PLUGIN_VERSION} + fi fi if [ "$OBFS" = "no" ] && [ "$V2RAY_PLUGIN" = "no" ]; then @@ -598,18 +658,23 @@ fi if [ "$V2RAY" = "yes" ]; then #apt-get -y -o Dpkg::Options::="--force-overwrite" install v2ray - wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb + if [ "$SOURCES" = "yes" ]; then + wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb + dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb + rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb + else + apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install v2ray=${V2RAY_VERSION} + fi if [ -f /etc/v2ray/v2ray-server.conf ] && [ ! -f /etc/systemd/system/v2ray.service ]; then wget -O /etc/systemd/system/v2ray.service ${VPSURL}${VPSPATH}/old-v2ray.service fi - dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb - rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb if [ ! -f /etc/v2ray/v2ray-server.json ]; then wget -O /etc/v2ray/v2ray-server.json ${VPSURL}${VPSPATH}/v2ray-server.json sed -i "s:V2RAY_UUID:$V2RAY_UUID:g" /etc/v2ray/v2ray-server.json rm /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json fi + ln -sf /etc/v2ray/v2ray-server.json /etc/v2ray/config.json sed -i 's:debug:warning:' /etc/v2ray/v2ray-server.json rm -f /tmp/v2rayError.log if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then @@ -631,15 +696,16 @@ if [ "$MLVPN" = "yes" ]; then if [ -f /etc/mlvpn/mlvpn0.conf ]; then mlvpnupdate="1" fi + mkdir -p /etc/mlvpn if [ "$SOURCES" = "yes" ]; then rm -f /var/lib/dpkg/lock rm -f /var/lib/dpkg/lock-frontend apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip git rm -rf /tmp/mlvpn cd /tmp - #git clone https://github.com/markfoodyburton/MLVPN.git /tmp/mlvpn + #git clone https://github.55860.com/markfoodyburton/MLVPN.git /tmp/mlvpn git clone https://github.55860.com/flohoff/MLVPN.git /tmp/mlvpn - #git clone https://github.com/link4all/MLVPN.git /tmp/mlvpn + #git clone https://github.55860.com/link4all/MLVPN.git /tmp/mlvpn cd /tmp/mlvpn git checkout ${MLVPN_VERSION} ./autogen.sh @@ -663,9 +729,8 @@ if [ "$MLVPN" = "yes" ]; then fi fi else - apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-mlvpn=${MLVPN_BINARY_VERSION} + apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" install omr-mlvpn=${MLVPN_BINARY_VERSION} fi - mkdir -p /etc/mlvpn if [ "$mlvpnupdate" = "0" ]; then sed -i "s:MLVPN_PASS:$MLVPN_PASS:" /etc/mlvpn/mlvpn0.conf fi @@ -990,7 +1055,7 @@ if [ "$SOURCES" = "yes" ]; then apt-get -y install build-essential pkg-config autoconf automake rm -rf /tmp/glorytun-0.0.35 cd /tmp - wget -O /tmp/glorytun-0.0.35.tar.gz http://55860.com/bak/glorytun-0.0.35.tar.gz + wget -O /tmp/glorytun-0.0.35.tar.gz http://github.com/angt/glorytun/releases/download/v0.0.35/glorytun-0.0.35.tar.gz tar xzf glorytun-0.0.35.tar.gz cd glorytun-0.0.35 ./autogen.sh @@ -1205,6 +1270,10 @@ else echo "< OpenMPTCProuter VPS $OMR_VERSION >" > /etc/motd fi +if [ "$SOURCES" != "yes" ]; then + apt-get -y install omr-server=${OMR_VERSION} 2>&1 >/dev/null || true +fi + if [ "$update" = "0" ]; then # Display important info echo '====================================================================================' From 32e0c035f27589b9debdaad478a1d7576920252c Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Thu, 25 Mar 2021 14:25:03 +0800 Subject: [PATCH 14/16] fix --- .DS_Store | Bin 6148 -> 6148 bytes debian9-x86_64.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index cf5717ee51a1727e0872701b5233bba5739ce50e..9cc166bcbb710fc0cdb7f04da3955497f139409d 100644 GIT binary patch delta 118 zcmZoMXffEJ$`a=~J%WLOfrUYjA)O(Up(Hoo#U&{xKM5$tp>Rj%iy_-#M^yO~yz&JZ ghQZ1CxdlKy3=BROCO5OJWm8U<1DdnhjP;xl0Omy=uK)l5 delta 115 zcmZoMXffEJ$`a>%P?UjzfrUYjA)O(Up(Hoo#U&{xKM5$t!K?G)WIgL)M^yO~yz&JZ ehQZ1CxdlKy3=HlKlbc!AP7Yy}*zCc&M+g9j%N?Kq diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index a9fe1d6..3376156 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -64,7 +64,7 @@ VPS_DOMAIN=${VPS_DOMAIN:-$(wget -4 -qO- -T 2 http://hostname.openmptcprouter.com VPSPATH="server-test" VPSURL="https://omr.openmptcprouter.cn/" REPO="repo.55860.com" -CHINA=${CHINA:-no} +CHINA=${CHINA:-yes} OMR_VERSION="0.1047-test" From fd95ac6825a035898d7d57993825472786b025f1 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Thu, 25 Mar 2021 14:33:37 +0800 Subject: [PATCH 15/16] Update .DS_Store --- .DS_Store | Bin 6148 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index 9cc166bcbb710fc0cdb7f04da3955497f139409d..e7c135a02708fdc742d39acbc4844d065d5bcab8 100644 GIT binary patch delta 147 zcmZoMXffEJ$`a?sI-P-mfrUYjA)O(Up(Hoo#U&{xKM5$tab^ArS!1@tj;Qh}c;yQ+ y41<&Na|?ia7#MsXOm1fBS7v_-WV11(Fr+dh0qsa+$V0Zp_lYBm@n%!j^FjcHdL-Wf delta 147 zcmZoMXffEJ$`a=~J%WLOfrUYjA)O(Up(Hoo#U&{xKM5$tp>Rj%iy_-#M^yO~yz&JZ yhQZ1CxdlKy3=BROCO5P6E3?f9ve_6?7*ZLMfOaG@ Date: Thu, 25 Mar 2021 14:34:18 +0800 Subject: [PATCH 16/16] fix --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .gitignore diff --git a/.DS_Store b/.DS_Store index e7c135a02708fdc742d39acbc4844d065d5bcab8..5cbcb9382cd6103f188c23b6bea771f424d0d5f7 100644 GIT binary patch delta 106 zcmZoMXffEJ#u6*c%)r3F!l1{H&XCDalAG`1l9ZF51Qg?V^J0&JG23BBRQVLV@&y@& U!O8i#1wcIv41Nlmn^_u#0e3+fZvX%Q delta 106 zcmZoMXffEJ#uCdqoq>UYg+Y%YogtH