mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Change some default MPTCP parameters, reload network if VPN seems to be down
This commit is contained in:
parent
49481ceaa9
commit
650638da69
3 changed files with 12 additions and 6 deletions
|
@ -106,7 +106,7 @@ fi
|
|||
|
||||
if [ "$MLVPN" = "yes" ]; then
|
||||
cd /tmp
|
||||
wget -O /tmp/debian9-x86_64-mlvpn.sh http://www.openmptcprouter.com/server/debian-x86_64-mlvpn.sh
|
||||
wget -O /tmp/debian9-x86_64-mlvpn.sh http://www.openmptcprouter.com/server/debian9-x86_64-mlvpn.sh
|
||||
sh debian9-x86_64-mlvpn.sh
|
||||
fi
|
||||
|
||||
|
@ -236,9 +236,9 @@ 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.25 >:' /etc/motd
|
||||
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.26 >:' /etc/motd
|
||||
else
|
||||
echo '< OpenMPTCProuter VPS 0.25 >' >> /etc/motd
|
||||
echo '< OpenMPTCProuter VPS 0.26 >' >> /etc/motd
|
||||
fi
|
||||
|
||||
if [ "$update" = "0" ]; then
|
||||
|
|
|
@ -31,6 +31,7 @@ _ping() {
|
|||
|
||||
while true; do
|
||||
source /etc/shorewall/params.vpn
|
||||
local iface
|
||||
currentaddr=$(ip addr show omr-6in4 | grep link/sit | awk '{print $2}' | tr -d "\n")
|
||||
currentpeer=$(ip addr show omr-6in4 | grep link/sit | awk '{print $4}' | tr -d "\n")
|
||||
if [ -n "$currentpeer" ]; then
|
||||
|
@ -60,6 +61,7 @@ $allip_mlvpn"
|
|||
break
|
||||
fi
|
||||
done < <(printf '%s\n' "$allip")
|
||||
[ -z "$iface" ] && systemctl -q restart systemd-networkd
|
||||
fi
|
||||
fi
|
||||
sleep 5
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# local sysctl settings can be stored in this directory
|
||||
# max open files
|
||||
fs.file-max = 51200
|
||||
fs.file-max = 512000
|
||||
# max read buffer
|
||||
net.core.rmem_max = 134217728
|
||||
# max write buffer
|
||||
|
@ -37,10 +37,14 @@ net.ipv4.tcp_rmem = 4096 87380 134217728
|
|||
# TCP write buffer
|
||||
net.ipv4.tcp_wmem = 4096 65536 134217728
|
||||
# turn on path MTU discovery
|
||||
net.ipv4.tcp_mtu_probing = 0
|
||||
net.ipv4.tcp_mtu_probing = 1
|
||||
|
||||
# for low-latency network, use cubic instead
|
||||
net.ipv4.tcp_congestion_control = olia
|
||||
|
||||
# Default conntrack is too small
|
||||
net.netfilter.nf_conntrack_max=131072
|
||||
net.netfilter.nf_conntrack_max = 131072
|
||||
|
||||
# MPTCP settings
|
||||
net.mptcp.mptcp_checksum = 0
|
||||
net.mptcp.mptcp_syn_retries = 30
|
Loading…
Add table
Add a link
Reference in a new issue