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

Fix tcp keepalive change

This commit is contained in:
Ycarus 2018-06-14 22:39:42 +02:00
parent f79f9204d0
commit a0c21d570e
5 changed files with 13 additions and 5 deletions

View file

@ -188,8 +188,10 @@ function wizard_add()
end
luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/glorytun restart >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null")
--luci.sys.call("/etc/init.d/shadowsocks restart >/dev/null 2>/dev/null")
--luci.sys.call("/etc/init.d/glorytun restart >/dev/null 2>/dev/null")
--luci.sys.call("/etc/init.d/glorytun-udp restart >/dev/null 2>/dev/null")
--luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null")
if gostatus == true then
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status"))
else

View file

@ -27,6 +27,7 @@ start_service() {
}
# remove sysctl already defined in /etc/sysctl.d/
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.conf
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.d/10-default.conf
}
reload_service() {

View file

@ -1,2 +1,2 @@
net.ipv4.tcp_keepalive_time=1200
net.ipv4.tcp_keepalive_time=2400
net.ipv6.conf.all.disable_ipv6=0

View file

@ -317,6 +317,11 @@ stop_service() {
rm -rf "$ss_confdir"
}
reload_service() {
stop
start
}
_rules_status() {
[ -n "$(iptables -t nat -L | grep ss_rules_forward)" ] && return 1
return 0

View file

@ -23,7 +23,7 @@ net.ipv4.tcp_tw_recycle = 0
# short FIN timeout
net.ipv4.tcp_fin_timeout = 30
# short keepalive time
net.ipv4.tcp_keepalive_time = 2400
#net.ipv4.tcp_keepalive_time = 2400
# outbound port range
net.ipv4.ip_local_port_range = 10000 65000
# max SYN backlog
@ -37,7 +37,7 @@ 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 = balia