mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-16 20:07:06 +03:00
Port number issue fix, streamSettings position fix
This commit is contained in:
@@ -58,7 +58,7 @@ fi
|
||||
if ! [ "${port}" -eq "${port}" ] 2>/dev/null; then >&2 echo -e "Error: Port number must be numeric.\n"; exit 1; fi
|
||||
|
||||
# inbound frame
|
||||
inbound=`jq -nc --arg port "${port}" '{"port":$port,"protocol":"vless","settings":{"decryption":"none"}}'`
|
||||
inbound=`jq -nc --arg port "${port}" '{"port":($port|tonumber),"protocol":"vless","settings":{"decryption":"none"}}'`
|
||||
|
||||
# User settings
|
||||
for user in "${xuser[@]}"
|
||||
@@ -75,14 +75,14 @@ done
|
||||
|
||||
# StreamSettings
|
||||
if [ -n "${acceptProxyProtocol}" ]; then
|
||||
inbound=`echo $inbound| jq -c '.settings.streamSettings.sockopt += {"acceptProxyProtocol":true}'`
|
||||
inbound=`echo $inbound| jq -c '.streamSettings.sockopt += {"acceptProxyProtocol":true}'`
|
||||
fi
|
||||
|
||||
# Network settings
|
||||
inbound=`echo $inbound| jq -c --arg wspath "${wspath}" '.settings.streamSettings += {"network":"ws","wsSettings":{"path":$wspath}}'`
|
||||
inbound=`echo $inbound| jq -c --arg wspath "${wspath}" '.streamSettings += {"network":"ws","wsSettings":{"path":$wspath}}'`
|
||||
|
||||
# Security settings
|
||||
inbound=`echo $inbound| jq -c '.settings.streamSettings += {"security":"none"}'`
|
||||
inbound=`echo $inbound| jq -c '.streamSettings += {"security":"none"}'`
|
||||
|
||||
# Fallback settings
|
||||
for fb in "${fallback[@]}"
|
||||
|
||||
Reference in New Issue
Block a user