From 683763e694c1a5ee55bd8b27c43d16e9dee874ec Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 19 Oct 2018 07:31:13 +0000 Subject: [PATCH] Update to latest VPS script with latest kernel and tuning --- debian9-x86_64.sh | 20 +++++++++++++++----- glorytun-udp.network | 2 +- shadowsocks.conf | 6 +++--- tun0.glorytun | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 6466736..47b177d 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -8,7 +8,8 @@ MLVPN=${MLVPN:-no} OPENVPN=${OPENVPN:-no} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | awk '{print $5}' | tr -d "\n")} DEBIAN_VERSION=$(sed 's/\..*//' /etc/debian_version) -KERNEL_VERSION="4.14.64-mptcp-16e8846" +KERNEL_VERSION="4.14.73-mptcp-312723f" +OMR_VERSION="0.56" set -e umask 0022 @@ -57,6 +58,7 @@ cd shadowsocks-libev-3.2.0 wget https://raw.githubusercontent.com/Ysurac/openmptcprouter-feeds/master/shadowsocks-libev/patches/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 libc-ares2 libc-ares-dev libev4 apt -y -t stretch-backports install libsodium-dev mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" dpkg-buildpackage -b -us -uc @@ -257,10 +259,18 @@ else fi # Add OpenMPTCProuter VPS script version to /etc/motd -if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then - sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.48 >:' /etc/motd -else - echo '< OpenMPTCProuter VPS 0.48 >' >> /etc/motd +if [ -f /etc/motd ]; then + if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then + sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:' /etc/motd + else + echo '< OpenMPTCProuter VPS $OMR_VERSION >' >> /etc/motd + fi +elif [ -f /etc/motd.head ]; then + if grep --quiet 'OpenMPTCProuter VPS' /etc/motd.head; then + sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:' /etc/motd.head + else + echo '< OpenMPTCProuter VPS $OMR_VERSION >' >> /etc/motd.head + fi fi if [ "$update" = "0" ]; then diff --git a/glorytun-udp.network b/glorytun-udp.network index e4e27ed..fb719c3 100644 --- a/glorytun-udp.network +++ b/glorytun-udp.network @@ -1,5 +1,5 @@ [Match] -Name=gt-udp-* +Name=gt-udp-tun* [Network] Description=Glorytun server device diff --git a/shadowsocks.conf b/shadowsocks.conf index 9d7b468..47f1a0a 100644 --- a/shadowsocks.conf +++ b/shadowsocks.conf @@ -6,9 +6,9 @@ net.core.rmem_max = 134217728 # max write buffer net.core.wmem_max = 134217728 # default read buffer -net.core.rmem_default = 65536 +net.core.rmem_default = 32768 # default write buffer -net.core.wmem_default = 65536 +net.core.wmem_default = 32768 # max processor input queue net.core.netdev_max_backlog = 4096 # max backlog @@ -45,7 +45,7 @@ net.ipv4.tcp_mtu_probing = 0 # for low-latency network, use cubic instead net.ipv4.tcp_congestion_control = bbr - +net.core.default_qdisc = fq # Default conntrack is too small net.netfilter.nf_conntrack_max = 131072 diff --git a/tun0.glorytun b/tun0.glorytun index f950e13..09d6500 100644 --- a/tun0.glorytun +++ b/tun0.glorytun @@ -3,4 +3,4 @@ DEV=tun0 SERVER=true MPTCP=true IPV6=true -OPTIONS="chacha20 retry count -1 const 50000 timeout 40000 keepalive count 5 idle 60 interval 2 buffer-size 65500 multiqueue" \ No newline at end of file +OPTIONS="chacha20 retry count -1 const 5000000 timeout 40000 keepalive count 5 idle 10 interval 2 buffer-size 32768 multiqueue" \ No newline at end of file