mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix shadowsocks password support
This commit is contained in:
parent
3d61e812be
commit
e9057e9a37
1 changed files with 5 additions and 2 deletions
|
@ -27,14 +27,17 @@ ss_mkjson_server_conf() {
|
|||
|
||||
ss_mkjson_server_conf_() {
|
||||
[ -n "$server_port" ] || return 1
|
||||
[ -z "$method" ] || json_add_string method "$method"
|
||||
[ -z "$server" ] || json_add_string server "$server"
|
||||
json_add_int server_port "$server_port"
|
||||
[ -z "$method" ] || json_add_string method "$method"
|
||||
[ -z "$key" ] || {
|
||||
key="$(echo $key | sed 's/+/-/g; s/\//_/g;')"
|
||||
json_add_string key "$key"
|
||||
}
|
||||
[ -z "$password" ] || json_add_string password "$password"
|
||||
[ -z "$password" ] || {
|
||||
password="$(echo $password | sed 's/+/-/g; s/\//_/g;')"
|
||||
json_add_string password "$password"
|
||||
}
|
||||
[ -z "$password" ] && [ -z "$key" ] && return 1
|
||||
[ -z "$plugin" ] || json_add_string plugin "$plugin"
|
||||
[ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue