mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-17 20:54:37 +03:00
Json compact
This commit is contained in:
@@ -49,7 +49,7 @@ JstreamSettings=`jq -nc --arg path "${path}" \
|
||||
'. += {"network":"ws","security":"none","wsSettings":{"path":$path}}' `
|
||||
|
||||
Jproxy=`jq -nc --arg host "${host}" --argjson jvnext "${Jvnext}" --argjson jstreamSettings "${JstreamSettings}" \
|
||||
'. += { "tag": "proxy", "protocol":"vmess", "settings":{"vnext":[$jvnext]}, "streamSettings":$jstreamSettings }' `
|
||||
'. += { "tag": proxy","protocol":"vmess","settings":{"vnext":[$jvnext]},"streamSettings":$jstreamSettings}' `
|
||||
Jdirect='{"tag":"direct","protocol":"freedom","settings":{}}'
|
||||
Jblocked='{"tag":"blocked","protocol":"blackhole","settings":{}}'
|
||||
|
||||
|
||||
6
run.sh
6
run.sh
@@ -191,10 +191,10 @@ if [ -z "${DNS}" ]; then
|
||||
fi
|
||||
|
||||
# Add inbounds config
|
||||
JibDKDEMO=`echo '{}' | jq --arg dns "${DNS}" \
|
||||
JibDKDEMO=`jq -nc --arg dns "${DNS}" \
|
||||
'. +={"tag":"dns-in","port":5353,"listen":"0.0.0.0","protocol":"dokodemo-door","settings":{"address":$dns,"port":53,"network":"tcp,udp"}}' `
|
||||
JibSOCKS=`echo '{}' | jq '. +={"tag": "socks", "port":1080, "listen":"0.0.0.0", "protocol":"socks", "settings":{"udp":true}}' `
|
||||
JibHTTP=`echo '{}' | jq '. +={"tag": "http", "port":8123, "listen":"0.0.0.0", "protocol":"http"}' `
|
||||
JibSOCKS=`jq -nc '. +={"tag":"socks","port":1080,"listen":"0.0.0.0","protocol":"socks","settings":{"udp":true}}' `
|
||||
JibHTTP=`jq -nc '. +={"tag":"http","port":8123,"listen":"0.0.0.0","protocol":"http"}' `
|
||||
cat $XCONF| jq --argjson jibdkdemo "${JibDKDEMO}" --argjson jibsocks "${JibSOCKS}" --argjson jibhttp "${JibHTTP}" \
|
||||
'. += {"inbounds":[$jibdkdemo, $jibsocks, $jibhttp]}' | sponge $XCONF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user