From f714b425d7b0cd036bb1e4d581c0bc6a4200b440 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Mon, 23 Aug 2021 10:55:17 +1000 Subject: [PATCH] README.md --- README.md | 28 ++++++++++++++-------------- run.sh | 5 ++--- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f030946..0f5c8d2 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,12 @@ $ docker build -t samuelhbne/server-xray -f Dockerfile.amd64 . ```shell $ docker run --rm -it samuelhbne/server-xray - ] +server-xray -- [-r|--request-domain ] [-c|--cert-path ] [-k|--hook ] -k|--hook [Optional] DDNS update or notifing URL to be hit. Multiple allowed -r|--request-domain [Optional] Domain name to request for letsencrypt cert. Multiple allowed -c|--cert-path [Optional] Reading TLS certs from folder //. Multiple allowed + -i|--stdin [Optional] Read config from stdin instead of auto generation + -d|--debug [Optional] Start in debug mode with verbose output --ltx [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]] --ltt [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]] --lttw [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath @@ -33,8 +35,6 @@ $ docker run --rm -it samuelhbne/server-xray --mttw [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath --ttt [p=443,]d=domain.com,u=passwd[:email][,f=[fallback-host]:fb-port:[fb-path]] --tttw [p=443,]d=domain.com,u=passwd[:email][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath - -i|--stdin Read XRay config from stdin instead of auto generation - -d|--debug Start Xray in debug mode with verbose output $ docker run --name server-xray -p 80:80 -p 443:2443 -d samuelhbne/server-xray \ --ltx p=2443,d=mydomain.duckdns.org,u=myid,f=:8080 -r mydomain.duckdns.org @@ -57,17 +57,17 @@ Try to connect the server from Xray compatible mobile app like [v2rayNG](https:/ ```shell $ docker run --rm -it samuelhbne/proxy-xray -proxy-xray -- [options] - --ltx id@host:port - --ltt id@host:port - --lttw id@host:port:/webpath - --lttg id@host:port:/svcpath - --mtt id@host:port - --mttw id@host:port:/webpath - --ttt password@host:port - --tttw password@host:port:/webpath - -i|--stdin Read XRay config from stdin instead of auto generation - -d|--debug Start Xray in debug mode with verbose output +proxy-xray -- [connect options] [-i|--stdin] [-d|--debug] + -i|--stdin [Optional] Read config from stdin instead of auto generation + -d|--debug [Optional] Start in debug mode with verbose output + --ltx id@host:port + --ltt id@host:port + --lttw id@host:port:/webpath + --lttg id@host:port:/svcpath + --mtt id@host:port + --mttw id@host:port:/webpath + --ttt password@host:port + --tttw password@host:port:/webpath $ docker run --name proxy-xray -p 1080:1080 -d samuelhbne/proxy-xray \ --ltx myid@mydomain.duckdns.org:443 diff --git a/run.sh b/run.sh index 68695ec..7ffda57 100755 --- a/run.sh +++ b/run.sh @@ -9,6 +9,8 @@ usage() { echo " -k|--hook [Optional] DDNS update or notifing URL to be hit. Multiple allowed" echo " -r|--request-domain [Optional] Domain name to request for letsencrypt cert. Multiple allowed" echo " -c|--cert-path [Optional] Reading TLS certs from folder //. Multiple allowed" + echo " -i|--stdin [Optional] Read config from stdin instead of auto generation" + echo " -d|--debug [Optional] Start in debug mode with verbose output" echo " --ltx [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]]" echo " --ltt [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]]" echo " --lttw [p=443,]d=domain.com,u=id[:level[:email]][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath" @@ -19,8 +21,6 @@ usage() { echo " --tttw [p=443,]d=domain.com,u=passwd[:email][,f=[fallback-host]:fb-port:[fb-path]],w=/webpath" # echo " --ssa [port=443,]user=password1:method1[,user=password2:method2]" # echo " --sst [port=443,]user=passwd,method=xxxx" - 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:di --long hook:,request-domain:,cert-path:,ltx:,ltt:,lttw:,mtt:,mttw:,ttt:,tttw:,lttg:,ssa:,sst:stdin,debug -n "$0" -- $@` @@ -129,7 +129,6 @@ else if [ "${STDINCONF}" = "1" ]; then exec /usr/local/bin/xray else - echo "Mode selection option missing." usage exit 1 fi