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

Merge pull request #346 from Ysurac/develop

sync
This commit is contained in:
suyuan 2023-08-26 18:13:57 +08:00 committed by GitHub
commit 896c29c4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 392 additions and 59 deletions

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"