mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-17 04:14:40 +03:00
README.md
This commit is contained in:
21
README.md
21
README.md
@@ -70,8 +70,8 @@ server-xray <server-options>
|
|||||||
--ttt <TROJAN-TCP-TLS option> [p=443,]d=domain.com,u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]]
|
--ttt <TROJAN-TCP-TLS option> [p=443,]d=domain.com,u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]]
|
||||||
--tttw <TROJAN-TCP-TLS-WS option> [p=443,]d=domain.com,u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath
|
--tttw <TROJAN-TCP-TLS-WS option> [p=443,]d=domain.com,u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath
|
||||||
--ttpw <TROJAN-TCP-PLAIN-WS option> [p=443,]u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath
|
--ttpw <TROJAN-TCP-PLAIN-WS option> [p=443,]u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath
|
||||||
--ng-opt <nginx-options> [p=443,]d=domain.com
|
--ng-opt <nginx-options> [p=443,]d=domain0.com[,d=domain1.com]
|
||||||
--ng-proxy <nginx-proxy-options> [d=domain.com,][h=127.0.0.1,]p=8443,l=location,n=ws|grpc
|
--ng-proxy <nginx-proxy-options> [d=domain0.com,][d=domain1.com][h=127.0.0.1,]p=port-backend,l=location,n=ws|grpc
|
||||||
-k|--hook <hook-url> [Optional] DDNS update or notifing URL to be hit
|
-k|--hook <hook-url> [Optional] DDNS update or notifing URL to be hit
|
||||||
-r|--request-domain <domain-name> [Optional] Domain name to request for letsencrypt cert
|
-r|--request-domain <domain-name> [Optional] Domain name to request for letsencrypt cert
|
||||||
-c|--cert-path <cert-path-root> [Optional] Reading TLS certs from folder <cert-path-root>/<domain-name>/
|
-c|--cert-path <cert-path-root> [Optional] Reading TLS certs from folder <cert-path-root>/<domain-name>/
|
||||||
@@ -215,16 +215,16 @@ Xray-URL: vless://myid@mydomain.duckdns.org:443?security=tls&type=grpc&serviceNa
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Serve multiple services on a single port with Nginx TLS front
|
### 4. Serve multiple services on single port, multiple domains with Nginx TLS front
|
||||||
|
|
||||||
The following command will:
|
The following command will:
|
||||||
|
|
||||||
1. Assume to read TLS cert from /home/ubuntu/cert/mydomain.duckdns.org/fullchain.cer
|
1. Assume to read TLS cert from /home/ubuntu/cert/domain*.duckdns.org/fullchain.cer
|
||||||
2. Assume to read private key from /home/ubuntu/cert/mydomain.duckdns.org/mydomain.duckdns.org.key
|
2. Assume to read private key from /home/ubuntu/cert/domain*.duckdns.org/domain*.duckdns.org.key
|
||||||
3. Assume domain0.duckdns.org and domain1.duckdns.org has been resolved to the current server
|
3. Assume domain0.duckdns.org and domain1.duckdns.org has been resolved to the current server
|
||||||
4. Run Vless+TCP+PLAN+gRPC service on port 55443, location /svc0
|
4. Run Vless+TCP+PLAN+gRPC service on port 55443, location /svc0, serve on all domains
|
||||||
5. Run Vless+TCP+PLAN+WebSocket service on port 53443, location /ws1
|
5. Run Vless+TCP+PLAN+WebSocket service on port 53443, location /ws1, serve on all domains
|
||||||
6. Run Trojan+TCP+PLAN+WebSocket service on port 51443, location /ws2
|
6. Run Trojan+TCP+PLAN+WebSocket service on port 51443, location /ws2, serve only on domain1.duckdns.org
|
||||||
7. Run nginx on port 443 as a TLS front with the given certs for 2 domains, proxy 3 services with 3 locations
|
7. Run nginx on port 443 as a TLS front with the given certs for 2 domains, proxy 3 services with 3 locations
|
||||||
8. Only port 443 will be available for access from internet
|
8. Only port 443 will be available for access from internet
|
||||||
|
|
||||||
@@ -233,11 +233,10 @@ $ docker run --name server-xray -p 443:443 -v /home/ubuntu/cert:/opt/cert -d sam
|
|||||||
--ltpg p=55443,u=myid0,s=svc0 \
|
--ltpg p=55443,u=myid0,s=svc0 \
|
||||||
--ltpw p=53443,u=myid1,w=/ws1 \
|
--ltpw p=53443,u=myid1,w=/ws1 \
|
||||||
--ttpw p=51443,u=myid2,w=/ws2 \
|
--ttpw p=51443,u=myid2,w=/ws2 \
|
||||||
--ng-opt p=443,d=domain0.duckdns.org \
|
--ng-opt p=443,d=domain0.duckdns.org,d=domain1.duckdns.org \
|
||||||
--ng-opt p=443,d=domain1.duckdns.org \
|
|
||||||
--ng-proxy p=55443,l=/svc0,n=grpc \
|
--ng-proxy p=55443,l=/svc0,n=grpc \
|
||||||
--ng-proxy p=53443,l=/ws1,n=ws \
|
--ng-proxy p=53443,l=/ws1,n=ws \
|
||||||
--ng-proxy p=51443,l=/ws2,n=ws
|
--ng-proxy d=domain1.duckdns.org,p=51443,l=/ws2,n=ws
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
4
run.sh
4
run.sh
@@ -20,8 +20,8 @@ usage() {
|
|||||||
echo " --ttpw <TROJAN-TCP-PLAIN-WS option> [p=443,]u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath"
|
echo " --ttpw <TROJAN-TCP-PLAIN-WS option> [p=443,]u=psw[:level[:email]][,f=[fb-host]:fb-port:[fb-path]],w=/webpath"
|
||||||
# echo " --ssa <Shadowsocks-AEAD option> [port=443,]user=password1:method1[,user=password2:method2]"
|
# 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 " --sst <Shadowsocks-TCP option> [port=443,]user=passwd,method=xxxx"
|
||||||
echo " --ng-opt <nginx-options> [p=443,]d=domain.com"
|
echo " --ng-opt <nginx-options> [p=443,]d=domain0.com[,d=domain1.com]"
|
||||||
echo " --ng-proxy <nginx-proxy-options> [d=domain.com,][h=127.0.0.1,]p=8443,l=location,n=ws|grpc"
|
echo " --ng-proxy <nginx-proxy-options> [d=domain0.com,][d=domain1.com][h=127.0.0.1,]p=port-backend,l=location,n=ws|grpc"
|
||||||
echo " -k|--hook <hook-url> [Optional] DDNS update or notifing URL to be hit"
|
echo " -k|--hook <hook-url> [Optional] DDNS update or notifing URL to be hit"
|
||||||
echo " -r|--request-domain <domain-name> [Optional] Domain name to request for letsencrypt cert"
|
echo " -r|--request-domain <domain-name> [Optional] Domain name to request for letsencrypt cert"
|
||||||
echo " -c|--cert-path <cert-path-root> [Optional] Reading TLS certs from folder <cert-path-root>/<domain-name>/"
|
echo " -c|--cert-path <cert-path-root> [Optional] Reading TLS certs from folder <cert-path-root>/<domain-name>/"
|
||||||
|
|||||||
Reference in New Issue
Block a user