mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-18 12:54:39 +03:00
Initial REALITY support
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.22-alpine3.20 AS builder
|
FROM golang:1.23-alpine3.20 AS builder
|
||||||
|
|
||||||
ARG XRAYVER='v1.8.24'
|
ARG XRAYVER='v1.8.24'
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ psw="${uopt[0]}"
|
|||||||
level="${uopt[1]}"
|
level="${uopt[1]}"
|
||||||
email="${uopt[2]}"
|
email="${uopt[2]}"
|
||||||
|
|
||||||
if [ -z "${uid}" ]; then
|
if [ -z "${psw}" ]; then
|
||||||
echo "Error: Undefined UID \"$user\"" >&2
|
echo "Error: Undefined UID \"$user\"" >&2
|
||||||
echo "Correct user format: user=<password>[:level:email]" >&2
|
echo "Correct user format: user=<password>[:level:email]" >&2
|
||||||
echo "Like: user=mypw:0:me@g.cn" >&2
|
echo "Like: user=mypw:0:me@g.cn" >&2
|
||||||
|
|||||||
2
run.sh
2
run.sh
@@ -181,7 +181,7 @@ if [ -n "${SVCMD}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${NGOPT}" ]; then
|
if [ -n "${NGOPT}" ]; then
|
||||||
ngcmd="${DIR}server-nginx.sh"
|
ngcmd="${DIR}/server-nginx.sh"
|
||||||
for ngopt in "${NGOPT[@]}"
|
for ngopt in "${NGOPT[@]}"
|
||||||
do
|
do
|
||||||
ngcmd="${ngcmd} --ng-opt ${ngopt},$xopt"
|
ngcmd="${ngcmd} --ng-opt ${ngopt},$xopt"
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Network settings
|
# Network settings
|
||||||
cat $XCONF |jq --arg port "${port}" \
|
cat $XCONF |jq --arg port "${port}" --arg webpath "${webpath}" \
|
||||||
'( .inbounds[] | select(.port == ($port|tonumber)) | .streamSettings ) += {"network":"splithttp","splithttpSettings":{"path":$webpath}} ' \
|
'( .inbounds[] | select(.port == ($port|tonumber)) | .streamSettings ) += {"network":"splithttp","splithttpSettings":{"path":$webpath}} ' \
|
||||||
|sponge $XCONF
|
|sponge $XCONF
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Network settings
|
# Network settings
|
||||||
cat $XCONF |jq --arg port "${port}" \
|
cat $XCONF |jq --arg port "${port}" --arg webpath "${webpath}" \
|
||||||
'( .inbounds[] | select(.port == ($port|tonumber)) | .streamSettings ) += {"network":"splithttp","splithttpSettings":{"path":$webpath}} ' \
|
'( .inbounds[] | select(.port == ($port|tonumber)) | .streamSettings ) += {"network":"splithttp","splithttpSettings":{"path":$webpath}} ' \
|
||||||
|sponge $XCONF
|
|sponge $XCONF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user