mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix https://github.com/Ysurac/openmptcprouter/issues/3646 Shadowsocks-Rust ss_tunnel
This commit is contained in:
parent
2e1d9b7207
commit
4df5fb7360
5 changed files with 23 additions and 7 deletions
|
@ -57,7 +57,8 @@ config ss_tunnel 'dns'
|
|||
option mode 'tcp_and_udp'
|
||||
option server 'sss0'
|
||||
option local_port '5353'
|
||||
option tunnel_address '8.8.8.8:53'
|
||||
option forward_address '8.8.8.8'
|
||||
option forward_port '53'
|
||||
|
||||
config ss_local 'tracker_sss0'
|
||||
option server 'sss0'
|
||||
|
|
|
@ -55,8 +55,10 @@ ss_mkjson_ss_server_conf() {
|
|||
|
||||
ss_mkjson_ss_tunnel_conf() {
|
||||
ss_mkjson_server_conf || return 1
|
||||
[ -n "$tunnel_address" ] || return 1
|
||||
json_add_string tunnel_address "$tunnel_address"
|
||||
[ -n "$forward_address" ] || return 1
|
||||
[ -n "$forward_port" ] || return 1
|
||||
json_add_string forward_address "$forward_address"
|
||||
json_add_int forward_port "$forward_port"
|
||||
}
|
||||
|
||||
ss_xxx() {
|
||||
|
@ -421,5 +423,6 @@ validate_ss_server_section() {
|
|||
validate_ss_tunnel_section() {
|
||||
validate_common_client_options_ ss_tunnel "$1" \
|
||||
"$2" \
|
||||
'tunnel_address:regex(".+\:[0-9]+")'
|
||||
'forward_address:host'
|
||||
'forward_port:uinteger'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue