mirror of
https://github.com/samuelhbne/proxy-xray.git
synced 2025-12-17 04:34:37 +03:00
Add --lst h3 support
This commit is contained in:
25
README.md
25
README.md
@@ -16,10 +16,10 @@ $ docker run --name proxy-xray -p 1080:1080 -d samuelhbne/proxy-xray --lttx myid
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
The following command will create a VLESS-SplitHTTP-TLS-HTTP3 client connecting to mydomain.com port 443 with given uid. Expose Socks-proxy port 1080 as a local service.
|
The following command will create a VLESS-SplitHTTP-TLS-HTTP3 client connecting to mydomain.com port 443 with given uid and webpath. Expose Socks-proxy port 1080 as a local service.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ docker run --name proxy-xray -p 1080:1080 -d samuelhbne/proxy-xray --lst myid@mydomain.com:443:/split0,alpn=h3
|
$ docker run --name proxy-xray -p 1080:1080 -d samuelhbne/proxy-xray --lsts myid@mydomain.com:443:/split0
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -80,22 +80,23 @@ Xray-URL: vless://myid@mydomain.duckdns.org:443?security=xtls&type=tcp&flow=xtls
|
|||||||
$ docker run --rm samuelhbne/proxy-xray
|
$ docker run --rm samuelhbne/proxy-xray
|
||||||
proxy-xray <connection-options>
|
proxy-xray <connection-options>
|
||||||
--lgp <VLESS-GRPC-PLN option> id@host:port:svcname
|
--lgp <VLESS-GRPC-PLN option> id@host:port:svcname
|
||||||
--lgr <VLESS-GRPC-RLTY option> id@host:port:svcname,d=dest.com,pub=xxxx[,shortId=abcd]
|
--lgr <VLESS-GRPC-RLTY option> id@host:port:svcname,d=fakedest.com,pub=xxxx[,shortId=abcd]
|
||||||
--lgt <VLESS-GRPC-TLS option> id@host:port:svcname[,s=sni.com]
|
--lgt <VLESS-GRPC-TLS option> id@host:port:svcname
|
||||||
--lsp <VLESS-SPLT-PLN option> id@host:port:/webpath
|
--lsp <VLESS-SPLT-PLN option> id@host:port:/webpath
|
||||||
--lst <VLESS-SPLT-TLS option> id@host:port:/webpath[,s=sni.com]
|
--lst <VLESS-SPLT-TLS option> id@host:port:/webpath[,alpn=h3]
|
||||||
|
--lst3 <VLESS-SPLT-TLS-HTTP3 option> id@host:port:/webpath
|
||||||
--ltr <VLESS-TCP-RLTY option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd][,xtls]
|
--ltr <VLESS-TCP-RLTY option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd][,xtls]
|
||||||
--ltrx <VLESS-TCP-RLTY-XTLS option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd]
|
--ltrx <VLESS-TCP-RLTY-XTLS option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd]
|
||||||
--ltt <VLESS-TCP-TLS option> id@host:port[,s=sni.com][,xtls]
|
--ltt <VLESS-TCP-TLS option> id@host:port[,xtls]
|
||||||
--lttx <VLESS-TCP-TLS-XTLS option> id@host:port[,s=sni.com]
|
--lttx <VLESS-TCP-TLS-XTLS option> id@host:port
|
||||||
--lwp <VLESS-WS-PLN option> id@host:port:/wspath
|
--lwp <VLESS-WS-PLN option> id@host:port:/wspath
|
||||||
--lwt <VLESS-WS-TLS option> id@host:port:/wspath[,s=sni.com]
|
--lwt <VLESS-WS-TLS option> id@host:port:/wspath
|
||||||
--mtt <VMESS-TCP-TLS option> id@host:port[,s=sni.com]
|
--mtt <VMESS-TCP-TLS option> id@host:port
|
||||||
--mwp <VMESS-WS-PLN option> id@host:port:/wspath
|
--mwp <VMESS-WS-PLN option> id@host:port:/wspath
|
||||||
--mwt <VMESS-WS-TLS option> id@host:port:/wspath[,s=sni.com]
|
--mwt <VMESS-WS-TLS option> id@host:port:/wspath
|
||||||
--ttt <TROJAN-TCP-TLS option> password@host:port[,s=sni.com]
|
--ttt <TROJAN-TCP-TLS option> password@host:port
|
||||||
--twp <TROJAN-WS-PLN option> password@host:port:/wspath
|
--twp <TROJAN-WS-PLN option> password@host:port:/wspath
|
||||||
--twt <TROJAN-WS-TLS option> password@host:port:/wspath[,s=sni.com]
|
--twt <TROJAN-WS-TLS option> password@host:port:/wspath
|
||||||
-d|--debug Start in debug mode with verbose output
|
-d|--debug Start in debug mode with verbose output
|
||||||
-i|--stdin Read config from stdin instead of auto generation
|
-i|--stdin Read config from stdin instead of auto generation
|
||||||
-j|--json Json snippet to merge into the config. Say '{log:{loglevel:info}'
|
-j|--json Json snippet to merge into the config. Say '{log:{loglevel:info}'
|
||||||
|
|||||||
39
run.sh
39
run.sh
@@ -7,22 +7,23 @@ XCONF=/tmp/proxy-xray.json
|
|||||||
usage() {
|
usage() {
|
||||||
echo "proxy-xray <connection-options>"
|
echo "proxy-xray <connection-options>"
|
||||||
echo " --lgp <VLESS-GRPC-PLN option> id@host:port:svcname"
|
echo " --lgp <VLESS-GRPC-PLN option> id@host:port:svcname"
|
||||||
echo " --lgr <VLESS-GRPC-RLTY option> id@host:port:svcname,d=dest.com,pub=xxxx[,shortId=abcd]"
|
echo " --lgr <VLESS-GRPC-RLTY option> id@host:port:svcname,d=fakedest.com,pub=xxxx[,shortId=abcd]"
|
||||||
echo " --lgt <VLESS-GRPC-TLS option> id@host:port:svcname[,s=sni.com]"
|
echo " --lgt <VLESS-GRPC-TLS option> id@host:port:svcname"
|
||||||
echo " --lsp <VLESS-SPLT-PLN option> id@host:port:/webpath"
|
echo " --lsp <VLESS-SPLT-PLN option> id@host:port:/webpath"
|
||||||
echo " --lst <VLESS-SPLT-TLS option> id@host:port:/webpath[,s=sni.com][,alpn=h3]"
|
echo " --lst <VLESS-SPLT-TLS option> id@host:port:/webpath[,alpn=h3]"
|
||||||
|
echo " --lst3 <VLESS-SPLT-TLS-HTTP3 option> id@host:port:/webpath"
|
||||||
echo " --ltr <VLESS-TCP-RLTY option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd][,xtls]"
|
echo " --ltr <VLESS-TCP-RLTY option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd][,xtls]"
|
||||||
echo " --ltrx <VLESS-TCP-RLTY-XTLS option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd]"
|
echo " --ltrx <VLESS-TCP-RLTY-XTLS option> id@host:port,d=dest.com,pub=xxxx[,shortId=abcd]"
|
||||||
echo " --ltt <VLESS-TCP-TLS option> id@host:port[,s=sni.com][,xtls]"
|
echo " --ltt <VLESS-TCP-TLS option> id@host:port[,xtls]"
|
||||||
echo " --lttx <VLESS-TCP-TLS-XTLS option> id@host:port[,s=sni.com]"
|
echo " --lttx <VLESS-TCP-TLS-XTLS option> id@host:port"
|
||||||
echo " --lwp <VLESS-WS-PLN option> id@host:port:/wspath"
|
echo " --lwp <VLESS-WS-PLN option> id@host:port:/wspath"
|
||||||
echo " --lwt <VLESS-WS-TLS option> id@host:port:/wspath[,s=sni.com]"
|
echo " --lwt <VLESS-WS-TLS option> id@host:port:/wspath"
|
||||||
echo " --mtt <VMESS-TCP-TLS option> id@host:port[,s=sni.com]"
|
echo " --mtt <VMESS-TCP-TLS option> id@host:port"
|
||||||
echo " --mwp <VMESS-WS-PLN option> id@host:port:/wspath"
|
echo " --mwp <VMESS-WS-PLN option> id@host:port:/wspath"
|
||||||
echo " --mwt <VMESS-WS-TLS option> id@host:port:/wspath[,s=sni.com]"
|
echo " --mwt <VMESS-WS-TLS option> id@host:port:/wspath"
|
||||||
echo " --ttt <TROJAN-TCP-TLS option> password@host:port[,s=sni.com]"
|
echo " --ttt <TROJAN-TCP-TLS option> password@host:port"
|
||||||
echo " --twp <TROJAN-WS-PLN option> password@host:port:/wspath"
|
echo " --twp <TROJAN-WS-PLN option> password@host:port:/wspath"
|
||||||
echo " --twt <TROJAN-WS-TLS option> password@host:port:/wspath[,s=sni.com]"
|
echo " --twt <TROJAN-WS-TLS option> password@host:port:/wspath"
|
||||||
echo " -d|--debug Start in debug mode with verbose output"
|
echo " -d|--debug Start in debug mode with verbose output"
|
||||||
echo " -i|--stdin Read config from stdin instead of auto generation"
|
echo " -i|--stdin Read config from stdin instead of auto generation"
|
||||||
echo " -j|--json Json snippet to merge into the config. Say '{"log":{"loglevel":"info"}'"
|
echo " -j|--json Json snippet to merge into the config. Say '{"log":{"loglevel":"info"}'"
|
||||||
@@ -42,7 +43,7 @@ usage() {
|
|||||||
|
|
||||||
Jrules='{"rules":[]}'
|
Jrules='{"rules":[]}'
|
||||||
|
|
||||||
TEMP=`getopt -o j:di --long lgp:,lgr:,lgt:,lsp:,lst:,ltr:,ltrx:,ltt:,lttx:,lwp:,lwt:,mtt:,mwp:,mwt:,ttt:,twp:,twt:,stdin,debug,dns:,dns-local:,dns-local-cn,domain-direct:,domain-proxy:,domain-block:,ip-direct:,ip-proxy:,ip-block:,cn-direct,rules-path:json: -n "$0" -- $@`
|
TEMP=`getopt -o j:di --long lgp:,lgr:,lgt:,lsp:,lst:,lst3:,ltr:,ltrx:,ltt:,lttx:,lwp:,lwt:,mtt:,mwp:,mwt:,ttt:,twp:,twt:,stdin,debug,dns:,dns-local:,dns-local-cn,domain-direct:,domain-proxy:,domain-block:,ip-direct:,ip-proxy:,ip-block:,cn-direct,rules-path:json: -n "$0" -- $@`
|
||||||
if [ $? != 0 ] ; then usage; exit 1 ; fi
|
if [ $? != 0 ] ; then usage; exit 1 ; fi
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
while true ; do
|
while true ; do
|
||||||
@@ -59,7 +60,7 @@ while true ; do
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--ltrx|--lttx)
|
--ltrx|--lttx)
|
||||||
# Alias options
|
# Alias of --ltr|ltt options
|
||||||
subcmd=`echo $1|tr -d '\-\-'|tr -d x`
|
subcmd=`echo $1|tr -d '\-\-'|tr -d x`
|
||||||
$DIR/proxy-${subcmd}.sh $2,xtls >$XCONF
|
$DIR/proxy-${subcmd}.sh $2,xtls >$XCONF
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
@@ -70,6 +71,20 @@ while true ; do
|
|||||||
fi
|
fi
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--lst3)
|
||||||
|
# Alias of --lst options
|
||||||
|
# splitHTTP is the only option for H3 support from Xray-Core so far.
|
||||||
|
subcmd=`echo $1|tr -d '\-\-'|tr -d 3`
|
||||||
|
echo $subcmd
|
||||||
|
$DIR/proxy-${subcmd}.sh $2,alpn=h3 >$XCONF
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "${subcmd} Config failed: $DIR/proxy-${subcmd}.sh $2"
|
||||||
|
exit 2
|
||||||
|
else
|
||||||
|
XRAYCFG=1
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--dns)
|
--dns)
|
||||||
DNS=$2
|
DNS=$2
|
||||||
shift 2
|
shift 2
|
||||||
|
|||||||
Reference in New Issue
Block a user