fix: relocate fallback configuration block to root level of inbound object
Main / build (push) Waiting to run
Main / build (push) Waiting to run
This commit is contained in:
+2
-2
@@ -1160,7 +1160,7 @@ get() {
|
||||
get file $2
|
||||
if [[ $is_config_file ]]; then
|
||||
is_json_str=$(cat $is_conf_dir/"$is_config_file" | sed s#//.*##)
|
||||
is_json_data=$(jq '(.inbounds[0]|.type,.listen_port,(.users[0]|.uuid,.password,.username),.method,.password,.override_port,.override_address,(.transport|.type,.path,.headers.host),(.tls|.server_name,.reality.private_key,.fallback.server_port)),(.outbounds[1].tag)' <<<$is_json_str)
|
||||
is_json_data=$(jq '(.inbounds[0]|.type,.listen_port,(.users[0]|.uuid,.password,.username),.method,.password,.override_port,.override_address,(.transport|.type,.path,.headers.host),(.tls|.server_name,.reality.private_key),.fallback.server_port),(.outbounds[1].tag)' <<<$is_json_str)
|
||||
[[ $? != 0 ]] && err "无法读取此文件: $is_config_file"
|
||||
is_up_var_set=(null is_protocol port uuid password username ss_method ss_password door_port door_addr net_type path host is_servername is_private_key is_reality_fallback_port is_public_key)
|
||||
[[ $is_debug ]] && msg "\n------------- debug: $is_config_file -------------"
|
||||
@@ -1305,7 +1305,7 @@ get() {
|
||||
[[ $is_reality_fallback ]] && {
|
||||
fallback_json=",fallback:{server:\"127.0.0.1\",server_port:4443}"
|
||||
}
|
||||
is_json_add="tls:{enabled:true,server_name:\"$is_servername\",reality:{enabled:true,handshake:{server:\"$handshake_server\",server_port:$handshake_port},private_key:\"$is_private_key\",short_id:[\"\"]}$fallback_json}"
|
||||
is_json_add="tls:{enabled:true,server_name:\"$is_servername\",reality:{enabled:true,handshake:{server:\"$handshake_server\",server_port:$handshake_port},private_key:\"$is_private_key\",short_id:[\"\"]}}$fallback_json"
|
||||
[[ $is_lower =~ "http" ]] && {
|
||||
is_json_add="$is_json_add,transport:{type:\"http\"}"
|
||||
} || {
|
||||
|
||||
Reference in New Issue
Block a user