1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00

Update to latest VPS script with latest kernel and tuning

This commit is contained in:
Ycarus (Yannick Chabanois) 2018-10-19 07:31:13 +00:00
parent 26a5ac29e4
commit 683763e694
4 changed files with 20 additions and 10 deletions

View file

@ -8,7 +8,8 @@ MLVPN=${MLVPN:-no}
OPENVPN=${OPENVPN:-no} OPENVPN=${OPENVPN:-no}
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | awk '{print $5}' | tr -d "\n")} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | awk '{print $5}' | tr -d "\n")}
DEBIAN_VERSION=$(sed 's/\..*//' /etc/debian_version) 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 set -e
umask 0022 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 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
apt-get -y install libc-ares2 libc-ares-dev libev4
apt -y -t stretch-backports install libsodium-dev apt -y -t stretch-backports install libsodium-dev
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
@ -257,10 +259,18 @@ else
fi fi
# Add OpenMPTCProuter VPS script version to /etc/motd # Add OpenMPTCProuter VPS script version to /etc/motd
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then if [ -f /etc/motd ]; then
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.48 >:' /etc/motd if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then
else sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:' /etc/motd
echo '< OpenMPTCProuter VPS 0.48 >' >> /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 fi
if [ "$update" = "0" ]; then if [ "$update" = "0" ]; then

View file

@ -1,5 +1,5 @@
[Match] [Match]
Name=gt-udp-* Name=gt-udp-tun*
[Network] [Network]
Description=Glorytun server device Description=Glorytun server device

View file

@ -6,9 +6,9 @@ net.core.rmem_max = 134217728
# max write buffer # max write buffer
net.core.wmem_max = 134217728 net.core.wmem_max = 134217728
# default read buffer # default read buffer
net.core.rmem_default = 65536 net.core.rmem_default = 32768
# default write buffer # default write buffer
net.core.wmem_default = 65536 net.core.wmem_default = 32768
# max processor input queue # max processor input queue
net.core.netdev_max_backlog = 4096 net.core.netdev_max_backlog = 4096
# max backlog # max backlog
@ -45,7 +45,7 @@ net.ipv4.tcp_mtu_probing = 0
# for low-latency network, use cubic instead # for low-latency network, use cubic instead
net.ipv4.tcp_congestion_control = bbr net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
# Default conntrack is too small # Default conntrack is too small
net.netfilter.nf_conntrack_max = 131072 net.netfilter.nf_conntrack_max = 131072

View file

@ -3,4 +3,4 @@ DEV=tun0
SERVER=true SERVER=true
MPTCP=true MPTCP=true
IPV6=true IPV6=true
OPTIONS="chacha20 retry count -1 const 50000 timeout 40000 keepalive count 5 idle 60 interval 2 buffer-size 65500 multiqueue" OPTIONS="chacha20 retry count -1 const 5000000 timeout 40000 keepalive count 5 idle 10 interval 2 buffer-size 32768 multiqueue"