mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Use glorytun udp git and add variable for all versions
This commit is contained in:
parent
6161468488
commit
8f3d071b2a
1 changed files with 27 additions and 24 deletions
|
@ -11,11 +11,17 @@ MLVPN_PASS=${MLVPN_PASS:-$(head -c 32 /dev/urandom | base64 -w0)}
|
||||||
OPENVPN=${OPENVPN:-no}
|
OPENVPN=${OPENVPN:-no}
|
||||||
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -Po '(?<=dev )(\S+)' | tr -d "\n")}
|
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -Po '(?<=dev )(\S+)' | tr -d "\n")}
|
||||||
KERNEL_VERSION="4.14.79-mptcp-6ece8f4"
|
KERNEL_VERSION="4.14.79-mptcp-6ece8f4"
|
||||||
OMR_VERSION="0.67"
|
GLORYTUN_UDP_VERSION="8ff9d3d7a1481bd82578d98798360cf219f3b73a"
|
||||||
|
MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
||||||
|
OBFS_VERSION="7659eeccf473aa41eb294e92c32f8f60a8747325"
|
||||||
|
SHADOWSOCKS_VERSION="3.2.3"
|
||||||
|
OMR_VERSION="0.70"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
|
rm -rf /var/lib/dpkg/lock
|
||||||
|
|
||||||
# Check Linux version
|
# Check Linux version
|
||||||
if test -f /etc/os-release ; then
|
if test -f /etc/os-release ; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
@ -78,11 +84,11 @@ bash update-grub.sh ${KERNEL_VERSION}
|
||||||
|
|
||||||
#apt -t stretch-backports -y install shadowsocks-libev
|
#apt -t stretch-backports -y install shadowsocks-libev
|
||||||
## Compile Shadowsocks
|
## Compile Shadowsocks
|
||||||
rm -rf /tmp/shadowsocks-libev-3.2.3
|
rm -rf /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION}
|
||||||
wget -O /tmp/shadowsocks-libev-3.2.3.tar.gz http://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.2.3/shadowsocks-libev-3.2.3.tar.gz
|
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
|
cd /tmp
|
||||||
tar xzf shadowsocks-libev-3.2.3.tar.gz
|
tar xzf shadowsocks-libev-${SHADOWSOCKS_VERSION}.tar.gz
|
||||||
cd shadowsocks-libev-3.2.3
|
cd shadowsocks-libev-${SHADOWSOCKS_VERSION}
|
||||||
wget https://raw.githubusercontent.com/Ysurac/openmptcprouter-feeds/master/shadowsocks-libev/patches/020-NOCRYPTO.patch
|
wget https://raw.githubusercontent.com/Ysurac/openmptcprouter-feeds/master/shadowsocks-libev/patches/020-NOCRYPTO.patch
|
||||||
patch -p1 < 020-NOCRYPTO.patch
|
patch -p1 < 020-NOCRYPTO.patch
|
||||||
apt-get -y install --no-install-recommends devscripts equivs apg libcap2-bin libpam-cap
|
apt-get -y install --no-install-recommends devscripts equivs apg libcap2-bin libpam-cap
|
||||||
|
@ -100,8 +106,8 @@ fi
|
||||||
mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
|
mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
|
||||||
dpkg-buildpackage -b -us -uc
|
dpkg-buildpackage -b -us -uc
|
||||||
cd ..
|
cd ..
|
||||||
dpkg -i shadowsocks-libev_3.2.3-1_amd64.deb
|
dpkg -i shadowsocks-libev_${SHADOWSOCKS_VERSION}-1_amd64.deb
|
||||||
rm -rf /tmp/shadowsocks-libev-3.2.3
|
rm -rf /tmp/shadowsocks-libev-${SHADOWSOCKS_VERSION}
|
||||||
|
|
||||||
# Load OLIA Congestion module at boot time
|
# Load OLIA Congestion module at boot time
|
||||||
if ! grep -q olia /etc/modules ; then
|
if ! grep -q olia /etc/modules ; then
|
||||||
|
@ -178,6 +184,7 @@ if [ "$OBFS" = "yes" ]; then
|
||||||
sudo apt-get install -y --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake git ca-certificates
|
sudo apt-get install -y --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake git ca-certificates
|
||||||
git clone https://github.com/shadowsocks/simple-obfs.git /tmp/simple-obfs
|
git clone https://github.com/shadowsocks/simple-obfs.git /tmp/simple-obfs
|
||||||
cd /tmp/simple-obfs
|
cd /tmp/simple-obfs
|
||||||
|
git checkout ${OBFS_VERSION}
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure && make
|
./configure && make
|
||||||
|
@ -201,16 +208,12 @@ if [ "$MLVPN" = "yes" ]; then
|
||||||
if [ -f /etc/mlvpn/mlvpn0.conf ]; then
|
if [ -f /etc/mlvpn/mlvpn0.conf ]; then
|
||||||
mlvpnupdate="1"
|
mlvpnupdate="1"
|
||||||
fi
|
fi
|
||||||
apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip
|
apt-get -y install build-essential pkg-config autoconf automake libpcap-dev unzip git
|
||||||
rm -rf /tmp/MLVPN-new-reorder
|
rm -rf /tmp/mlvpn
|
||||||
cd /tmp
|
cd /tmp
|
||||||
#wget -O /tmp/mlvpn-2.3.2.tar.gz https://github.com/zehome/MLVPN/archive/2.3.2.tar.gz
|
git clone https://github.com/markfoodyburton/MLVPN.git /tmp/mlvpn
|
||||||
wget -O /tmp/new-reorder.zip https://github.com/markfoodyburton/MLVPN/archive/new-reorder.zip
|
cd /tmp/mlvpn
|
||||||
cd /tmp
|
git checkout ${MLVPN_VERSION}
|
||||||
#tar xzf mlvpn-2.3.2.tar.gz
|
|
||||||
#cd MLVPN-2.3.2
|
|
||||||
unzip new-reorder.zip
|
|
||||||
cd MLVPN-new-reorder
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure --sysconfdir=/etc
|
./configure --sysconfdir=/etc
|
||||||
make
|
make
|
||||||
|
@ -229,8 +232,7 @@ if [ "$MLVPN" = "yes" ]; then
|
||||||
systemctl enable mlvpn@mlvpn0.service
|
systemctl enable mlvpn@mlvpn0.service
|
||||||
systemctl enable systemd-networkd.service
|
systemctl enable systemd-networkd.service
|
||||||
cd /tmp
|
cd /tmp
|
||||||
#rm -rf /tmp/MLVPN-2.3.2
|
rm -rf /tmp/mlvpn
|
||||||
rm -rf /tmp/MLVPN-new-reorder
|
|
||||||
fi
|
fi
|
||||||
echo "install mlvpn done"
|
echo "install mlvpn done"
|
||||||
if systemctl -q is-active openvpn-server@tun0.service; then
|
if systemctl -q is-active openvpn-server@tun0.service; then
|
||||||
|
@ -254,12 +256,13 @@ echo 'Glorytun UDP'
|
||||||
if systemctl -q is-active glorytun-udp@tun0.service; then
|
if systemctl -q is-active glorytun-udp@tun0.service; then
|
||||||
systemctl -q stop glorytun-udp@tun0 > /dev/null 2>&1
|
systemctl -q stop glorytun-udp@tun0 > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
apt-get -y install meson pkg-config ca-certificates
|
apt-get install -y --no-install-recommends build-essential git ca-certificates meson pkg-config
|
||||||
rm -rf /tmp/glorytun-0.0.99-mud
|
rm -rf /tmp/glorytun-udp
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -O /tmp/glorytun-0.0.99-mud.tar.gz https://github.com/angt/glorytun/releases/download/v0.0.99-mud/glorytun-0.0.99-mud.tar.gz
|
git clone https://github.com/angt/glorytun.git /tmp/glorytun-udp
|
||||||
tar xzf glorytun-0.0.99-mud.tar.gz
|
cd /tmp/glorytun-udp
|
||||||
cd glorytun-0.0.99-mud
|
git checkout ${GLORYTUN_UDP_VERSION}
|
||||||
|
git submodule update --init --recursive
|
||||||
meson build
|
meson build
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
sed -i 's:EmitDNS=yes:EmitDNS=no:g' /lib/systemd/network/glorytun.network
|
sed -i 's:EmitDNS=yes:EmitDNS=no:g' /lib/systemd/network/glorytun.network
|
||||||
|
@ -279,7 +282,7 @@ fi
|
||||||
systemctl enable glorytun-udp@tun0.service
|
systemctl enable glorytun-udp@tun0.service
|
||||||
systemctl enable systemd-networkd.service
|
systemctl enable systemd-networkd.service
|
||||||
cd /tmp
|
cd /tmp
|
||||||
rm -rf /tmp/glorytun-0.0.99-mud
|
rm -rf /tmp/glorytun-udp
|
||||||
|
|
||||||
# Install Glorytun TCP
|
# Install Glorytun TCP
|
||||||
if systemctl -q is-active glorytun-tcp@tun0.service; then
|
if systemctl -q is-active glorytun-tcp@tun0.service; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue