Add -i|--stdin -d|--debug support

This commit is contained in:
Samuel Huang
2021-08-23 10:38:56 +10:00
parent cb080af7ff
commit a012497ad4
2 changed files with 6 additions and 6 deletions

View File

@@ -30,8 +30,8 @@ proxy-xray --<ltx|ltt|lttw|mtt|mttw|ttt|tttw|ssa|sst|stdin> [options]
--mttw <VMESS-TCP-TLS-WS option> id@host:port:/webpath
--ttt <TROJAN-TCP-TLS option> password@host:port
--tttw <TROJAN-TCP-TLS-WS option> password@host:port:/webpath
-d|--debug Start in debug mode with DNS server disabled
--stdin Read XRay config from stdin instead of auto generation
-i|--stdin Read XRay config from stdin instead of auto generation
-d|--debug Start Xray in debug mode with verbose output
$ docker run --name proxy-xray -p 1080:2080 -p 65353:53/udp -p 8123:8223 -d samuelhbne/proxy-xray \
--ltx myid@mydomain.duckdns.org:443

8
run.sh
View File

@@ -16,11 +16,11 @@ usage() {
echo " --tttw <TROJAN-TCP-TLS-WS option> password@host:port:/webpath"
# echo " --ssa <Shadowsocks-AEAD option> password:method@host:port"
# echo " --sst <Shadowsocks-TCP option> password:method@host:port"
echo " -d|--debug Start in debug mode with DNS server disabled"
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 d --long ltx:,ltt:,lttw:,lttg:,mtt:,mttw:,ttt:,tttw:,ssa:,sst:stdin,debug -n "$0" -- $@`
TEMP=`getopt -o di --long ltx:,ltt:,lttw:,lttg:,mtt:,mttw:,ttt:,tttw:,ssa:,sst:stdin,debug -n "$0" -- $@`
if [ $? != 0 ] ; then usage; exit 1 ; fi
eval set -- "$TEMP"
@@ -37,7 +37,7 @@ while true ; do
fi
shift 2
;;
--stdin)
-i|--stdin)
STDINCONF=1
shift 1
;;