Replace /svcpath with svcname to avoid confusion

This commit is contained in:
Samuel Huang
2024-09-23 12:17:37 +10:00
parent 7c863b5a29
commit 21370db3d3
3 changed files with 10 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
usage() {
>&2 echo "VLESS-GRPC-PLAIN proxy builder"
>&2 echo "Usage: proxy-lgp <id@domain.com:80:/svcpath>"
>&2 echo "Usage: proxy-lgp <id@domain.com:80:svcname>"
}
if [ -z "$1" ]; then
@@ -38,23 +38,23 @@ fi
if ! [ "${port}" -eq "${port}" ] 2>/dev/null; then >&2 echo "Port number must be numeric"; exit 1; fi
# User settings
Jusers=`jq -nc --arg uuid "${id}" '. += {"id":$uuid, "encryption":"none", "level":0}'`
Jusers=`jq -nc --arg uuid "${id}" '. += {"id":$uuid,"encryption":"none","level":0}'`
# Vnext settings
Jvnext=`jq -nc --arg host "${host}" --arg port "${port}" --argjson juser "${Jusers}" \
'. += {"address":$host, "port":($port | tonumber), "users":[$juser]}' `
'. += {"address":$host,"port":($port | tonumber),"users":[$juser]}' `
# Stream Settings
JstreamSettings=`jq -nc --arg path "${path}" \
'. += {"network":"grpc", "security":"none", "grpcSettings":{"serviceName":$path}}' `
'. += {"network":"grpc","security":"none","grpcSettings":{"serviceName":$path}}' `
Jproxy=`jq -nc --arg host "${host}" --argjson jvnext "${Jvnext}" --argjson jstreamSettings "${JstreamSettings}" \
'. += { "tag": "proxy", "protocol":"vless", "settings":{"vnext":[$jvnext]}, "streamSettings":$jstreamSettings }' `
Jdirect='{"tag": "direct", "protocol": "freedom", "settings": {}}'
Jblocked='{"tag": "blocked", "protocol": "blackhole", "settings": {}}'
'. += { "tag":"proxy","protocol":"vless","settings":{"vnext":[$jvnext]},"streamSettings":$jstreamSettings}' `
Jdirect='{"tag":"direct","protocol":"freedom","settings":{}}'
Jblocked='{"tag": "blocked","protocol":"blackhole","settings":{}}'
jroot=`jq -n --argjson jproxy "${Jproxy}" --argjson jdirect "${Jdirect}" --argjson jblocked "${Jblocked}" \
'. += {"log":{"loglevel":"warning"}, "outbounds":[$jproxy, $jdirect, $jblocked]}' `
'. += {"log":{"loglevel":"warning"},"outbounds":[$jproxy,$jdirect,$jblocked]}' `
echo "$jroot"
exit 0

View File

@@ -2,7 +2,7 @@
usage() {
>&2 echo "VLESS-GRPC-TLS proxy builder"
>&2 echo "Usage: proxy-lgr <id@domain.com:443:/svcpath><d=yahoo.com>,pub=xxxx[,shortId=abcd][,fingerprint=safari]"
>&2 echo "Usage: proxy-lgr <id@domain.com:443:svcname><d=yahoo.com>,pub=xxxx[,shortId=abcd][,fingerprint=safari]"
}
if [ -z "$1" ]; then

View File

@@ -2,7 +2,7 @@
usage() {
>&2 echo "VLESS-GRPC-TLS proxy builder"
>&2 echo "Usage: proxy-lgt <id@domain.com:443:/svcpath>[,serverName=x.org][,fingerprint=safari][,alpn=h3]"
>&2 echo "Usage: proxy-lgt <id@domain.com:443:svcname>[,fingerprint=safari][,alpn=h3]"
}
if [ -z "$1" ]; then