mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-16 20:27:06 +03:00
Replace /svcpath with svcname to avoid confusion
This commit is contained in:
16
proxy-lgp.sh
16
proxy-lgp.sh
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user