mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-17 04:14:40 +03:00
Add -i|--stdin -d|--debug support
This commit is contained in:
13
run.sh
13
run.sh
@@ -19,10 +19,11 @@ usage() {
|
||||
echo " --tttw <TROJAN-TCP-TLS-WS option> [p=443,]d=domain.com,u=passwd[:email][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath"
|
||||
# echo " --ssa <Shadowsocks-AEAD option> [port=443,]user=password1:method1[,user=password2:method2]"
|
||||
# echo " --sst <Shadowsocks-TCP option> [port=443,]user=passwd,method=xxxx"
|
||||
echo " --stdin Read XRay config from stdin instead of auto generation"
|
||||
echo " -i|--stdin Read XRay config from stdin instead of auto generation"
|
||||
echo " -d|--debug Start Xray in debug mode with verbose output"
|
||||
}
|
||||
|
||||
TEMP=`getopt -o k:r:c:d --long hook:,request-domain:,cert-path:,ltx:,ltt:,lttw:,mtt:,mttw:,ttt:,tttw:,lttg:,ssa:,sst:stdin,debug -n "$0" -- $@`
|
||||
TEMP=`getopt -o k:r:c:di --long hook:,request-domain:,cert-path:,ltx:,ltt:,lttw:,mtt:,mttw:,ttt:,tttw:,lttg:,ssa:,sst:stdin,debug -n "$0" -- $@`
|
||||
if [ $? != 0 ] ; then usage; exit 1 ; fi
|
||||
|
||||
eval set -- "$TEMP"
|
||||
@@ -40,6 +41,10 @@ while true ; do
|
||||
CERTPATH+="$2"
|
||||
shift 2
|
||||
;;
|
||||
-i|--stdin)
|
||||
STDINCONF=1
|
||||
shift 1
|
||||
;;
|
||||
-d|--debug)
|
||||
DEBUG=1
|
||||
shift 1
|
||||
@@ -49,10 +54,6 @@ while true ; do
|
||||
SVC=`echo $1|tr -d '\-\-'`
|
||||
SVCMD+=("${DIR}server-${SVC}.sh $2")
|
||||
shift 2
|
||||
;;
|
||||
--stdin)
|
||||
STDINCONF=1
|
||||
shift 2
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user