1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2023-08-25 15:40:31 +02:00
parent 3d61e812be
commit e9057e9a37

View file

@ -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"