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:
parent
f79f9204d0
commit
a0c21d570e
5 changed files with 13 additions and 5 deletions
|
@ -188,8 +188,10 @@ function wizard_add()
|
||||||
end
|
end
|
||||||
|
|
||||||
luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
|
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/shadowsocks 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/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
|
if gostatus == true then
|
||||||
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status"))
|
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status"))
|
||||||
else
|
else
|
||||||
|
|
|
@ -27,6 +27,7 @@ start_service() {
|
||||||
}
|
}
|
||||||
# remove sysctl already defined in /etc/sysctl.d/
|
# 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.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() {
|
reload_service() {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
net.ipv4.tcp_keepalive_time=1200
|
net.ipv4.tcp_keepalive_time=2400
|
||||||
net.ipv6.conf.all.disable_ipv6=0
|
net.ipv6.conf.all.disable_ipv6=0
|
|
@ -317,6 +317,11 @@ stop_service() {
|
||||||
rm -rf "$ss_confdir"
|
rm -rf "$ss_confdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
_rules_status() {
|
_rules_status() {
|
||||||
[ -n "$(iptables -t nat -L | grep ss_rules_forward)" ] && return 1
|
[ -n "$(iptables -t nat -L | grep ss_rules_forward)" ] && return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -23,7 +23,7 @@ net.ipv4.tcp_tw_recycle = 0
|
||||||
# short FIN timeout
|
# short FIN timeout
|
||||||
net.ipv4.tcp_fin_timeout = 30
|
net.ipv4.tcp_fin_timeout = 30
|
||||||
# short keepalive time
|
# short keepalive time
|
||||||
net.ipv4.tcp_keepalive_time = 2400
|
#net.ipv4.tcp_keepalive_time = 2400
|
||||||
# outbound port range
|
# outbound port range
|
||||||
net.ipv4.ip_local_port_range = 10000 65000
|
net.ipv4.ip_local_port_range = 10000 65000
|
||||||
# max SYN backlog
|
# max SYN backlog
|
||||||
|
@ -37,7 +37,7 @@ net.ipv4.tcp_rmem = 4096 87380 134217728
|
||||||
# TCP write buffer
|
# TCP write buffer
|
||||||
net.ipv4.tcp_wmem = 4096 65536 134217728
|
net.ipv4.tcp_wmem = 4096 65536 134217728
|
||||||
# turn on path MTU discovery
|
# turn on path MTU discovery
|
||||||
net.ipv4.tcp_mtu_probing = 0
|
net.ipv4.tcp_mtu_probing = 1
|
||||||
|
|
||||||
# for low-latency network, use cubic instead
|
# for low-latency network, use cubic instead
|
||||||
# net.ipv4.tcp_congestion_control = balia
|
# net.ipv4.tcp_congestion_control = balia
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue