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

Add keep alive support to Shadowsocks-Rust init and interface

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-10-09 11:08:54 +02:00
parent ef3eaf6ed1
commit 43107110a5
4 changed files with 19 additions and 2 deletions

View file

@ -4,13 +4,14 @@ config ss_redir hi1
option local_port '1100'
option mode 'tcp_and_udp'
option timeout '1000'
option keep_alive '15'
option fast_open 0
option verbose 0
option syslog 1
option reuse_port 0
option mptcp 1
option ipv6_first 1
option no_delay 0
option no_delay 1
config ss_redir hi2
option server 'sss1'
@ -18,13 +19,14 @@ config ss_redir hi2
option local_port '1101'
option mode 'tcp_and_udp'
option timeout '1000'
option keep_alive '15'
option fast_open 0
option verbose 0
option syslog 1
option reuse_port 0
option mptcp 1
option ipv6_first 1
option no_delay 0
option no_delay 1
config ss_rules 'ss_rules'
option disabled 0
@ -63,6 +65,7 @@ config ss_local 'tracker_sss0'
option local_port '1111'
option mode 'tcp_and_udp'
option timeout '600'
option keep_alive '15'
option fast_open '0'
option syslog '0'
option reuse_port '1'

View file

@ -87,6 +87,7 @@ ss_xxx() {
[ -z "$mode" ] || json_add_string mode "$mode"
[ -z "$mtu" ] || json_add_int mtu "$mtu"
[ -z "$timeout" ] || json_add_int timeout "$timeout"
[ -z "$keep_alive" ] || json_add_int keep_alive "$keep_alive"
[ -z "$user" ] || json_add_string user "$user"
[ -z "$acl" ] || json_add_string acl "$acl"
json_dump -i >"$confjson"
@ -369,6 +370,7 @@ validate_common_options_() {
'mode:or("tcp_only", "udp_only", "tcp_and_udp"):tcp_only' \
'mtu:uinteger' \
'timeout:uinteger' \
'keep_alive:uinteger' \
'user:string'
}