From a012497ad4ba0146206fbe0ecf7e88f60b959ed1 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Mon, 23 Aug 2021 10:38:56 +1000 Subject: [PATCH] Add -i|--stdin -d|--debug support --- README.md | 4 ++-- run.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3262901..d525490 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ proxy-xray -- [options] --mttw id@host:port:/webpath --ttt password@host:port --tttw 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 diff --git a/run.sh b/run.sh index 2212eae..957b9f3 100755 --- a/run.sh +++ b/run.sh @@ -16,11 +16,11 @@ usage() { echo " --tttw password@host:port:/webpath" # echo " --ssa password:method@host:port" # echo " --sst 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 ;;