mirror of
https://github.com/XTLS/Xray-examples.git
synced 2025-09-21 22:54:28 +08:00
Compare commits
51 Commits
5ae00c5bb2
...
Del-`path`
Author | SHA1 | Date | |
---|---|---|---|
|
2a3aa86e4a | ||
|
ef8962658d | ||
|
f092fd7ae3 | ||
|
fb19ed3ed6 | ||
|
f7e1a4e5b4 | ||
|
100e729cc7 | ||
|
061321ad1c | ||
|
c6ec3122f5 | ||
|
bebf51e5f7 | ||
|
2fe711231a | ||
|
301c7c0193 | ||
|
ca705fbd0b | ||
|
129be747c3 | ||
|
34d78cc926 | ||
|
8c9e1c5f4f | ||
|
2988294bdc | ||
|
4c64126604 | ||
|
d9d8f77541 | ||
|
9d40021c5b | ||
|
f605cda6a0 | ||
|
2a8fe45acd | ||
|
0ba800fd7c | ||
|
ecefc32120 | ||
|
f42d177c46 | ||
|
cb619022bb | ||
|
059bdf1a97 | ||
|
e0548899bb | ||
|
1732809e5f | ||
|
a47a984a08 | ||
|
7f4e176d9b | ||
|
7486946d72 | ||
|
4ea3d4e023 | ||
|
a736984061 | ||
|
5ee22a1aa4 | ||
|
33595f9c0d | ||
|
152dd028c6 | ||
|
08978ee233 | ||
|
97210cfd0e | ||
|
9a6a9ab54a | ||
|
31a1c6cbf5 | ||
|
13d0158470 | ||
|
0e8377e3c2 | ||
|
9910881d58 | ||
|
2aea6cb507 | ||
|
2dc42bc0df | ||
|
004c490c7b | ||
|
d35c6f5aaa | ||
|
28052d756d | ||
|
11609f587f | ||
|
3bdf2a23ff | ||
|
cebb145398 |
@@ -76,14 +76,27 @@ VMESS-gRPC Request ------> Xray Vless-TCP-XTLS(443) ----**alpn=h2**----> fallbac
|
|||||||
| Combination | Link |
|
| Combination | Link |
|
||||||
| ----------- | ---- |
|
| ----------- | ---- |
|
||||||
| Trojan-TCP | `trojan://desdemona99@example.com:443?security=tls&type=tcp#Trojan-TCP` |
|
| Trojan-TCP | `trojan://desdemona99@example.com:443?security=tls&type=tcp#Trojan-TCP` |
|
||||||
| Trojan-WS | `trojan://desdemona99@example.com:443?security=tls&type=ws&path=/trojanws?ed=2048#Trojna-WS` |
|
| Trojan-WS | `trojan://desdemona99@example.com:443?security=tls&type=ws&path=/trojanws#Trojna-WS` |
|
||||||
| Trojan-gRPC | `trojan://desdemona99@example.com:443?security=tls&type=grpc&serviceName=trgrpc#Trojan-gRPC` |
|
| Trojan-gRPC | `trojan://desdemona99@example.com:443?security=tls&type=grpc&serviceName=trgrpc#Trojan-gRPC` |
|
||||||
| Trojan-H2 | `trojan://desdemona99@example.com:443?sni=trh2o.example.com&security=tls&type=http&path=/trh2#Trojan-H2` |
|
| Trojan-H2 | `trojan://desdemona99@example.com:443?sni=trh2o.example.com&security=tls&type=http&path=/trh2#Trojan-H2` |
|
||||||
| Vless-TCP | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=tcp#Vless-TCP` |
|
| Vless-TCP | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=tcp#Vless-TCP` |
|
||||||
| Vless-WS | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=ws?ed=2048&path=/vlws#Vless-WS` |
|
| Vless-WS | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=ws&path=/vlws#Vless-WS` |
|
||||||
| Vless-gRPC | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=grpc&serviceName=vlgrpc#Vless-gRPC` |
|
| Vless-gRPC | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?security=tls&type=grpc&serviceName=vlgrpc#Vless-gRPC` |
|
||||||
| Vless-H2 | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?sni=vlh2o.example.com&security=tls&type=http&path=/vlh2#Vless-H2` |
|
| Vless-H2 | `vless://90e4903e-66a4-45f7-abda-fd5d5ed7f797@example.com:443?sni=vlh2o.example.com&security=tls&type=http&path=/vlh2#Vless-H2` |
|
||||||
| VMESS-TCP | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJ0Y3AiLAogICAgInBhdGgiOiAiL3ZtdGMiLAogICAgInBvcnQiOiAiNDQzIiwKICAgICJwcyI6ICJWTUVTUy1UQ1AiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAiIiwKICAgICJ0bHMiOiAidGxzIiwKICAgICJ0eXBlIjogImh0dHAiLAogICAgInYiOiAiMiIKfQo=` |
|
| VMESS-TCP | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJ0Y3AiLAogICAgInBhdGgiOiAiL3ZtdGMiLAogICAgInBvcnQiOiAiNDQzIiwKICAgICJwcyI6ICJWTUVTUy1UQ1AiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAiIiwKICAgICJ0bHMiOiAidGxzIiwKICAgICJ0eXBlIjogImh0dHAiLAogICAgInYiOiAiMiIKfQo=` |
|
||||||
| VMESS-WS | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJ3cyIsCiAgICAicGF0aCI6ICIvdm13cyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLVdTIiwKICAgICJzY3kiOiAibm9uZSIsCiAgICAic25pIjogIiIsCiAgICAidGxzIjogInRscyIsCiAgICAidHlwZSI6ICIiLAogICAgInYiOiAiMiIKfQo=` |
|
| VMESS-WS | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJ3cyIsCiAgICAicGF0aCI6ICIvdm13cyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLVdTIiwKICAgICJzY3kiOiAibm9uZSIsCiAgICAic25pIjogIiIsCiAgICAidGxzIjogInRscyIsCiAgICAidHlwZSI6ICIiLAogICAgInYiOiAiMiIKfQo=` |
|
||||||
| VMESS-gRPC | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJncnBjIiwKICAgICJwYXRoIjogInZtZ3JwYyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLWdSUEMiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAiIiwKICAgICJ0bHMiOiAidGxzIiwKICAgICJ0eXBlIjogImh0dHAiLAogICAgInYiOiAiMiIKfQo=` |
|
| VMESS-gRPC | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJncnBjIiwKICAgICJwYXRoIjogInZtZ3JwYyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLWdSUEMiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAiIiwKICAgICJ0bHMiOiAidGxzIiwKICAgICJ0eXBlIjogImh0dHAiLAogICAgInYiOiAiMiIKfQo=` |
|
||||||
| VMESS-H2 | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJodHRwIiwKICAgICJwYXRoIjogIi92bWgyIiwKICAgICJwb3J0IjogIjQ0MyIsCiAgICAicHMiOiAiVk1FU1MtSDIiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAidm1oMm8uZXhhbXBsZS5jb20iLAogICAgInRscyI6ICJ0bHMiLAogICAgInR5cGUiOiAiaHR0cCIsCiAgICAidiI6ICIyIgp9Cg==` |
|
| VMESS-H2 | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJodHRwIiwKICAgICJwYXRoIjogIi92bWgyIiwKICAgICJwb3J0IjogIjQ0MyIsCiAgICAicHMiOiAiVk1FU1MtSDIiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAidm1oMm8uZXhhbXBsZS5jb20iLAogICAgInRscyI6ICJ0bHMiLAogICAgInR5cGUiOiAiaHR0cCIsCiAgICAidiI6ICIyIgp9Cg==` |
|
||||||
|
|
||||||
|
## Config generation script
|
||||||
|
To make all the necessary changes to all the files in this folder a simple script is provided.
|
||||||
|
### Steps
|
||||||
|
* Open `generate.sh` and change the top lines to your correct values.
|
||||||
|
* Run `bash generate.sh -m` inside this folder.
|
||||||
|
* All the files are changed and your config links are stored in `result.txt`
|
||||||
|
* Run `bash generate.sh -b` to get one base64 string for all of your configs.
|
||||||
|
* Run `bash generate.sh -q` to get separate qr codes for all your configs.
|
||||||
|
* Run `bash generate.sh -r` to revert all the changes. This is necessary for generating configs with new values.
|
||||||
|
|
||||||
|
### Important note
|
||||||
|
Run `-b` and `-q` only after running `-m`. The script should run inside this folder.
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
"streamSettings": {
|
"streamSettings": {
|
||||||
"network": "ws",
|
"network": "ws",
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
"path": "/ssws?ed=2048"
|
"path": "/ssws?ed=2560"
|
||||||
},
|
},
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
@@ -27,7 +27,7 @@
|
|||||||
"streamSettings": {
|
"streamSettings": {
|
||||||
"network": "ws",
|
"network": "ws",
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
"path": "/trojanws?ed=2048"
|
"path": "/trojanws?ed=2560"
|
||||||
},
|
},
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
@@ -33,7 +33,7 @@
|
|||||||
"streamSettings": {
|
"streamSettings": {
|
||||||
"network": "ws",
|
"network": "ws",
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
"path": "/vmws?ed=2048"
|
"path": "/vmws?ed=2560"
|
||||||
},
|
},
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
@@ -32,7 +32,7 @@
|
|||||||
"streamSettings": {
|
"streamSettings": {
|
||||||
"network": "ws",
|
"network": "ws",
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
"path": "/vlws?ed=2048"
|
"path": "/vlws?ed=2560"
|
||||||
},
|
},
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
160
All-in-One-fallbacks-Nginx/generate.sh
Normal file
160
All-in-One-fallbacks-Nginx/generate.sh
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#################################
|
||||||
|
# main domain #
|
||||||
|
#################################
|
||||||
|
export main_domain="your.domain.com" # Change this to the correct value
|
||||||
|
export main_domain_crt="\/path\/to\/main\/domain\/fullchain.pem" # Change this to the correct value
|
||||||
|
export main_domain_key="\/path\/to\/main\/domain\/privkey.pem" # Change this to the correct value
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# behind cdn domain #
|
||||||
|
#################################
|
||||||
|
export cdn_domain="" # Change this to the correct value
|
||||||
|
export cdn_domain_crt="\/path\/to\/cdn\/domain\/fullchain.pem" # Change this to the correct value
|
||||||
|
export cdn_domain_key="\/path\/to\/cdn\/domain\/privkey.pem" # Change this to the correct value
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# uuid/pass #
|
||||||
|
#################################
|
||||||
|
export myid=`xray uuid` # (optional) Let xray pick a random uuid or change it
|
||||||
|
export mypass=`date | md5sum | cut -c -15` # (optional) Set a password or let script pick one at random
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################################
|
||||||
|
#######################################################################################
|
||||||
|
###### Do not change anything below this line unless you know what you're doing. ######
|
||||||
|
#######################################################################################
|
||||||
|
#######################################################################################
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# fake data #
|
||||||
|
#################################
|
||||||
|
export fake_domain="example.com"
|
||||||
|
export fake_cdn_domain="behindcdn.com"
|
||||||
|
export fakepass="desdemona99"
|
||||||
|
export fakeid="90e4903e-66a4-45f7-abda-fd5d5ed7f797"
|
||||||
|
export fake_domain_crt_path="\/etc\/ssl\/example.com\/domain.pem"
|
||||||
|
export fake_domain_key_path="\/etc\/ssl\/example.com\/domain-key.pem"
|
||||||
|
export fake_cdn_domain_crt_path="\/etc\/ssl\/behindcdn.com\/domain.pem"
|
||||||
|
export fake_cdn_domain_key_path="\/etc\/ssl\/behindcdn.com\/domain-key.pem"
|
||||||
|
|
||||||
|
Help()
|
||||||
|
{
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo "Please read the contents of this file and change all the required fields."
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Commands"
|
||||||
|
echo
|
||||||
|
echo "m Make and store the configs in result.txt."
|
||||||
|
echo "r Revert all the changes."
|
||||||
|
echo "q Print the qr codes of configs in terminal. Run this after running with -m."
|
||||||
|
echo "b Print one base64 link for all configs in terminal. Run this after running with -m."
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Usage: "
|
||||||
|
echo
|
||||||
|
echo " bash setup.sh <-command> "
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
Revert()
|
||||||
|
{
|
||||||
|
git restore client.configs/* server.json nginx.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
Make()
|
||||||
|
{
|
||||||
|
#################################
|
||||||
|
# main domain #
|
||||||
|
#################################
|
||||||
|
sed -i "s/$fake_domain_crt_path/$main_domain_crt/g" server.json client.configs/* nginx.conf
|
||||||
|
sed -i "s/$fake_domain_key_path/$main_domain_key/g" server.json client.configs/* nginx.conf
|
||||||
|
sed -i "s/$fake_domain/$main_domain/g" server.json client.configs/* nginx.conf
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# behind cdn domain #
|
||||||
|
#################################
|
||||||
|
if [ "$cdn_domain" == "" ]; then
|
||||||
|
echo "No domain behind cdn set. Removing related fields."
|
||||||
|
sed -i "146 s/.$//" server.json
|
||||||
|
sed -i "147,152d" server.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "s/$fake_cdn_domain_crt_path/$cdn_domain_crt/g" server.json client.configs/* nginx.conf
|
||||||
|
sed -i "s/$fake_cdn_domain_key_path/$cdn_domain_key/g" server.json client.configs/* nginx.conf
|
||||||
|
sed -i "s/$fake_cdn_domain/$cdn_domain/g" server.json client.configs/* nginx.conf
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# uuid/pass #
|
||||||
|
#################################
|
||||||
|
sed -i "s/$fakeid/$myid/g" server.json client.configs/* nginx.conf
|
||||||
|
sed -i "s/$fakepass/$mypass/g" server.json client.configs/* nginx.conf
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# configs #
|
||||||
|
#################################
|
||||||
|
rm result.txt
|
||||||
|
touch result.txt
|
||||||
|
#grep "| Trojan-TCP |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakepass/$mypass/g" >> result.txt
|
||||||
|
grep "| Trojan-WS |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakepass/$mypass/g" >> result.txt
|
||||||
|
grep "| Trojan-gRPC |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakepass/$mypass/g" >> result.txt
|
||||||
|
#grep "| Trojan-H2 |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakepass/$mypass/g" >> result.txt
|
||||||
|
#grep "| Vless-TCP |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" >> result.txt
|
||||||
|
grep "| Vless-WS |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" >> result.txt
|
||||||
|
grep "| Vless-gRPC |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" >> result.txt
|
||||||
|
#grep "| Vless-H2 |" README.md | cut -f2 -d"\`" | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" >> result.txt
|
||||||
|
#grep "| VMESS-TCP |" README.md | cut -f2 -d"\`" | cut -c 9- | base64 -d | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" | base64 -w 0 | sed "s/^/vmess:\/\//" >> result.txt
|
||||||
|
grep "| VMESS-WS |" README.md | cut -f2 -d"\`" | cut -c 9- | base64 -d | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" | base64 -w 0 | sed "s/^/\nvmess:\/\//" >> result.txt
|
||||||
|
grep "| VMESS-gRPC |" README.md | cut -f2 -d"\`" | cut -c 9- | base64 -d | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" | base64 -w 0 | sed "s/^/\nvmess:\/\//" >> result.txt
|
||||||
|
#grep "| VMESS-H2 |" README.md | cut -f2 -d"\`" | cut -c 9- | base64 -d | sed "s/$fake_domain/$main_domain/g" | sed "s/$fakeid/$myid/g" | base64 -w 0 | sed "s/^/\nvmess:\/\//" >> result.txt
|
||||||
|
echo >> result.txt
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Print64()
|
||||||
|
{
|
||||||
|
cat result.txt | base64 -w 0
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
Printqr()
|
||||||
|
{
|
||||||
|
while read line; do
|
||||||
|
export t=`echo $line | cut -c -2`
|
||||||
|
if [ "$t" == "vm" ]; then
|
||||||
|
echo $line | cut -c 9- | base64 -d | grep "\"ps\":" | sed -n -e 's/"ps": "//p' | sed -n -e 's/",//p' | sed -n -e 's/ *//p'
|
||||||
|
curl qrcode.show -d $line
|
||||||
|
else
|
||||||
|
echo $line | sed -n -e 's/^.*#//p'
|
||||||
|
curl qrcode.show -d $line
|
||||||
|
fi
|
||||||
|
done < result.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts "mrqb" option; do
|
||||||
|
case $option in
|
||||||
|
r)
|
||||||
|
Revert
|
||||||
|
exit;;
|
||||||
|
m)
|
||||||
|
Make
|
||||||
|
exit;;
|
||||||
|
b)
|
||||||
|
Print64
|
||||||
|
exit;;
|
||||||
|
q)
|
||||||
|
Printqr
|
||||||
|
exit;;
|
||||||
|
|
||||||
|
\?)
|
||||||
|
Help
|
||||||
|
exit;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
Help
|
||||||
|
|
21
ReverseProxy/README.ENG.md
Normal file
21
ReverseProxy/README.ENG.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# reverse proxy
|
||||||
|
# principle
|
||||||
|
Xray Client <--- VMESS/SS ---> Xray Portal (requires public IP) <--- VMESS/SS ---> Xray Bridge
|
||||||
|
# illustrate
|
||||||
|
In the configuration, the internal network device uses `bridge.json`, the device with public network ip uses `portal.json`, and the device connected to the intranet through `portal` uses `client.json`.
|
||||||
|
|
||||||
|
In practical applications, `VMESS-TCP, Shadowsocks-2022`, etc. can be used as the transmission protocols from Xray Client to Xray Portal, and from Xray Bridge to Xray Portal.
|
||||||
|
|
||||||
|
## psk
|
||||||
|
|
||||||
|
Shadowsocks 2022 uses a pre-shared key similar to WireGuard for the password.
|
||||||
|
|
||||||
|
Use `openssl rand -base64 <length>` to generate a shadowsocks-rust compatible key, the length depends on the encryption method used.
|
||||||
|
|
||||||
|
| encryption method | key length |
|
||||||
|
|--------------------------------|-----:|
|
||||||
|
| 2022-blake3-aes-128-gcm | 16 |
|
||||||
|
| 2022-blake3-aes-256-gcm | 32 |
|
||||||
|
| 2022-blake3-chacha20-poly1305 | 32 |
|
||||||
|
|
||||||
|
In the Go implementation, 32-bit keys always work.
|
@@ -1,5 +1,8 @@
|
|||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
# 反向代理
|
# 反向代理
|
||||||
# 原理
|
# 原理
|
||||||
|
|
||||||
Xray Client <--- VMESS/SS ---> Xray Portal(需要公网 IP) <--- VMESS/SS ---> Xray Bridge
|
Xray Client <--- VMESS/SS ---> Xray Portal(需要公网 IP) <--- VMESS/SS ---> Xray Bridge
|
||||||
# 说明
|
# 说明
|
||||||
配置中,内网设备使用的配置为 `bridge.json`,有公网 ip 的设备使用 `portal.json`,通过`portal`连接到内网的设备使用`client.json`。
|
配置中,内网设备使用的配置为 `bridge.json`,有公网 ip 的设备使用 `portal.json`,通过`portal`连接到内网的设备使用`client.json`。
|
||||||
@@ -18,4 +21,4 @@ Shadowsocks 2022 使用与 WireGuard 类似的预共享密钥作为密码。
|
|||||||
| 2022-blake3-aes-256-gcm | 32 |
|
| 2022-blake3-aes-256-gcm | 32 |
|
||||||
| 2022-blake3-chacha20-poly1305 | 32 |
|
| 2022-blake3-chacha20-poly1305 | 32 |
|
||||||
|
|
||||||
在 Go 实现中,32 位密钥始终工作。
|
在 Go 实现中,32 位密钥始终工作。
|
||||||
|
20
ReverseProxy/VLESS-TCP-XTLS-WS/README.ENG.md
Normal file
20
ReverseProxy/VLESS-TCP-XTLS-WS/README.ENG.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# VLESS over TCP with XTLS + fallback & split
|
||||||
|
|
||||||
|
Cooperate with fallback, use port 443 + XTLS + WS and route diversion to realize reverse proxy and enhance concealment.
|
||||||
|
|
||||||
|
There are two client connection methods: VLESS over WS with TLS / VLESS over TCP with XTLS
|
||||||
|
|
||||||
|
The portal setting defaults to the web server on port 80 (it can also be replaced with a database, FTP, etc.), refer to [VLESS-TCP-XTLS-WHATEVER](https://github.com/XTLS/Xray-examples/blob/main/VLESS-TCP-XTLS-WHATEVER/README.md)
|
||||||
|
|
||||||
|
# additional configuration
|
||||||
|
If your portal is outside the country, you can use routing splitting to achieve scientific Internet access + access to intranet devices at the same time.
|
||||||
|
|
||||||
|
## Routing split
|
||||||
|
According to the prompt in the configuration, in the `Portal` configuration, uncomment the first route:
|
||||||
|
```
|
||||||
|
// "ip": [
|
||||||
|
// "geoip:private"
|
||||||
|
// ],
|
||||||
|
```
|
||||||
|
|
||||||
|
At this time, when the traffic matches the `"external"` or `"externalws"` label, and the target ip of the access is a `private ip address`, the traffic will be forwarded to the bridge, and the rest of the traffic will go direct.
|
@@ -1,5 +1,7 @@
|
|||||||
# VLESS over TCP with XTLS + 回落 & 分流
|
# VLESS over TCP with XTLS + 回落 & 分流
|
||||||
|
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
配合回落,使用 443 端口 + XTLS + WS 和路由分流,实现反向代理,增强隐蔽性。
|
配合回落,使用 443 端口 + XTLS + WS 和路由分流,实现反向代理,增强隐蔽性。
|
||||||
|
|
||||||
客户端连接方式有 VLESS over WS with TLS / VLESS over TCP with XTLS 两种
|
客户端连接方式有 VLESS over WS with TLS / VLESS over TCP with XTLS 两种
|
||||||
|
239
Shadowsocks-2022/README.ENG.md
Normal file
239
Shadowsocks-2022/README.ENG.md
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
#Shadowsocks2022
|
||||||
|
|
||||||
|
Server-side JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 1234,
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ psk }}",
|
||||||
|
"network": "tcp,udp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Server-side JSON (multi-user)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 1234,
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ server psk }}",
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"password": "{{ user psk }}",
|
||||||
|
"email": "my user"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"network": "tcp,udp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Server-side JSON (transit)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 1234,
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ relay psk }}",
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"address": "server",
|
||||||
|
"port": 1234,
|
||||||
|
"password": "{{ server/user psk }}",
|
||||||
|
"email": "my server"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"network": "tcp,udp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Client JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 10801,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 10802,
|
||||||
|
"protocol": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"address": "{{ host }}",
|
||||||
|
"port": 1234,
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ psk }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Client JSON (UDP over TCP)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 10801,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 10802,
|
||||||
|
"protocol": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"address": "{{ host }}",
|
||||||
|
"port": 1234,
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ psk }}",
|
||||||
|
"uot": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Client JSON (multi-user)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 10801,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 10802,
|
||||||
|
"protocol": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"address": "{{ host }}",
|
||||||
|
"port": 1234,
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ server psk }}:{{ user psk }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Client JSON (transit)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 10801,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 10802,
|
||||||
|
"protocol": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"address": "{{ host }}",
|
||||||
|
"port": 1234,
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "{{ relay psk }}:{{ user psk }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Password
|
||||||
|
|
||||||
|
Shadowsocks 2022 uses a pre-shared key similar to WireGuard for the password.
|
||||||
|
|
||||||
|
Use `openssl rand -base64 <length>` to generate a shadowsocks-rust compatible key, the length depends on the encryption method used.
|
||||||
|
|
||||||
|
| encryption method | key length |
|
||||||
|
|--------------------------------|-----:|
|
||||||
|
| 2022-blake3-aes-128-gcm | 16 |
|
||||||
|
| 2022-blake3-aes-256-gcm | 32 |
|
||||||
|
| 2022-blake3-chacha20-poly1305 | 32 |
|
||||||
|
|
||||||
|
In the Go implementation, 32-bit keys always work.
|
@@ -1,5 +1,7 @@
|
|||||||
# Shadowsocks 2022
|
# Shadowsocks 2022
|
||||||
|
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
服务端 JSON
|
服务端 JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -236,4 +238,4 @@ Shadowsocks 2022 使用与 WireGuard 类似的预共享密钥作为密码。
|
|||||||
| 2022-blake3-aes-256-gcm | 32 |
|
| 2022-blake3-aes-256-gcm | 32 |
|
||||||
| 2022-blake3-chacha20-poly1305 | 32 |
|
| 2022-blake3-chacha20-poly1305 | 32 |
|
||||||
|
|
||||||
在 Go 实现中,32 位密钥始终工作。
|
在 Go 实现中,32 位密钥始终工作。
|
||||||
|
81
Shadowsocks-AEAD/README.ENG.md
Normal file
81
Shadowsocks-AEAD/README.ENG.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#Shadowsocks AEAD Quick Start
|
||||||
|
|
||||||
|
Server-side JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 12345,
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"password": "example_user_1",
|
||||||
|
"method": "aes-128-gcm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"password": "example_user_2",
|
||||||
|
"method": "aes-256-gcm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"password": "example_user_3",
|
||||||
|
"method": "chacha20-poly1305"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"network": "tcp,udp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Client JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 10801,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 10802,
|
||||||
|
"protocol": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "shadowsocks",
|
||||||
|
"settings": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"address": "",
|
||||||
|
"port": 12345,
|
||||||
|
"password": "example_user_1",
|
||||||
|
"method": "aes-128-gcm"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## What's happening
|
||||||
|
|
||||||
|
No need for a graphical interface, just [**Xray-core**](https://github.com/XTLS/Xray-core) can quickly establish Shadowsocks AEAD encryption that supports Socks, HTTP proxy and **UDP FullCone** tunnel.
|
||||||
|
|
||||||
|
Xray-core has perfect support for UDP, thanks to the refactoring of each inbound and outbound code. The inbound UDP of Socks can accept requests from any network port.
|
||||||
|
|
||||||
|
As you can see, Xray-core also fully unleashes the potential of AEAD, **the server supports multiple users on a single port**, which is not implemented in any official version of Shadowsocks.
|
||||||
|
|
||||||
|
So when you need Shadowsocks, you only need Xray-core to solve the problem: high performance, cross-platform, easy to compile, and more powerful functions out of the box.
|
@@ -1,5 +1,7 @@
|
|||||||
# Shadowsocks AEAD 快速上手
|
# Shadowsocks AEAD 快速上手
|
||||||
|
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
服务端 JSON
|
服务端 JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@@ -29,10 +29,10 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
"address": "example.com", // 你的域名或服务器 IP
|
"address": "example.com", // your domain name or server IP
|
||||||
"flow": "xtls-rprx-direct", // Linux 或安卓可改为 "xtls-rprx-splice"
|
"flow": "xtls-rprx-direct", // Linux or android can be changed to "xtls-rprx-splice"
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"password": "your_password" // 你的密码
|
"password": "your_password" // your password
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"security": "xtls",
|
"security": "xtls",
|
||||||
"xtlsSettings": {
|
"xtlsSettings": {
|
||||||
"serverName": "example.com" // 你的域名
|
"serverName": "example.com" // your domain name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -9,7 +9,7 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"clients": [
|
"clients": [
|
||||||
{
|
{
|
||||||
"password":"your_password", // 密码
|
"password":"your_password", // password
|
||||||
"flow": "xtls-rprx-direct"
|
"flow": "xtls-rprx-direct"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -35,12 +35,12 @@
|
|||||||
],
|
],
|
||||||
"certificates": [
|
"certificates": [
|
||||||
{
|
{
|
||||||
"certificateFile": "/path/to/cert", // 证书文件绝对目录
|
"certificateFile": "/path/to/cert", // Certificate file absolute directory
|
||||||
"keyFile": "/path/to/key", // 密钥文件绝对目录
|
"keyFile": "/path/to/key", // Key file absolute directory
|
||||||
"ocspStapling": 3600 // 验证周期 3600 秒
|
"ocspStapling": 3600 // Verification cycle 3600 Second
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"minVersion": "1.2" // 如果是ecc证书则最低使用 TLSv1.2 ,如果你不清楚证书类型或者不是 ecc 证书,删掉这行
|
"minVersion": "1.2" // If it is an ecc certificate, use TLSv1.2 at least. If you don't know the certificate type or it is not an ecc certificate, delete this line
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
36
Trojan-gRPC-Caddy2/Nginx/README.ENG.md
Normal file
36
Trojan-gRPC-Caddy2/Nginx/README.ENG.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Trojan-gRPC-Caddy2/Nginx
|
||||||
|
## Schematic (Caddy):
|
||||||
|
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||||
|
## Nginx:
|
||||||
|
At the same time, you can also choose to use Nginx. A sample configuration snippet is as follows (partially from [@xqzr](https://github.com/xqzr)):
|
||||||
|
```conf
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
server_name example.com;
|
||||||
|
|
||||||
|
index index.html;
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
ssl_certificate /path/to/example.cer;
|
||||||
|
ssl_certificate_key /path/to/example.key;
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE -RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||||
|
|
||||||
|
client_header_timeout 1w;
|
||||||
|
keepalive_timeout 30m;
|
||||||
|
# Fill in /your ServiceName after location
|
||||||
|
location /your ServiceName {
|
||||||
|
if ($content_type !~ "application/grpc") {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
client_max_body_size 0;
|
||||||
|
client_body_buffer_size 512k;
|
||||||
|
grpc_set_header X-Real-IP $remote_addr;
|
||||||
|
client_body_timeout 1w;
|
||||||
|
grpc_read_timeout 1w;
|
||||||
|
grpc_send_timeout 1w;
|
||||||
|
grpc_pass unix:/dev/shm/Xray-Trojan-gRPC.socket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
@@ -1,12 +1,14 @@
|
|||||||
# Trojan-gRPC-Caddy2/Nginx
|
# Trojan-gRPC-Caddy2/Nginx
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
## 原理图 (Caddy) :
|
## 原理图 (Caddy) :
|
||||||
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||||
## Nginx:
|
## Nginx:
|
||||||
同时,您也可以选择使用 Nginx。示例配置片段如下(部分来自 [@xqzr](https://github.com/xqzr)):
|
同时,您也可以选择使用 Nginx。示例配置片段如下(部分来自 [@xqzr](https://github.com/xqzr)):
|
||||||
```conf
|
```conf
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2 so_keepalive=on;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2 so_keepalive=on;
|
listen [::]:443 ssl http2;
|
||||||
server_name example.com;
|
server_name example.com;
|
||||||
|
|
||||||
index index.html;
|
index index.html;
|
||||||
@@ -17,18 +19,19 @@ server {
|
|||||||
ssl_protocols TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||||
|
|
||||||
client_header_timeout 52w;
|
client_header_timeout 1w;
|
||||||
keepalive_timeout 52w;
|
keepalive_timeout 30m;
|
||||||
# 在 location 后填写 /你的 ServiceName
|
# 在 location 后填写 /你的 ServiceName
|
||||||
location /你的 ServiceName {
|
location /你的 ServiceName {
|
||||||
if ($content_type !~ "application/grpc") {
|
if ($content_type !~ "^application/grpc") {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
client_body_buffer_size 512k;
|
client_body_buffer_size 512k;
|
||||||
grpc_set_header X-Real-IP $remote_addr;
|
grpc_set_header X-Real-IP $remote_addr;
|
||||||
client_body_timeout 52w;
|
client_body_timeout 1w;
|
||||||
grpc_read_timeout 52w;
|
grpc_read_timeout 1w;
|
||||||
|
grpc_send_timeout 1w;
|
||||||
grpc_pass unix:/dev/shm/Xray-Trojan-gRPC.socket;
|
grpc_pass unix:/dev/shm/Xray-Trojan-gRPC.socket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ xx.com {
|
|||||||
path /ServiceName/* # 修改为你自己的 ServiceName,且仅能存在两个斜杠。(如:/MyService/ServiceName/*会导致错误)
|
path /ServiceName/* # 修改为你自己的 ServiceName,且仅能存在两个斜杠。(如:/MyService/ServiceName/*会导致错误)
|
||||||
}
|
}
|
||||||
reverse_proxy @grpc unix//dev/shm/Xray-VLESS-gRPC.socket {
|
reverse_proxy @grpc unix//dev/shm/Xray-VLESS-gRPC.socket {
|
||||||
|
flush_interval -1
|
||||||
transport http {
|
transport http {
|
||||||
versions h2c
|
versions h2c
|
||||||
}
|
}
|
||||||
|
36
VLESS-GRPC/README.ENG.md
Normal file
36
VLESS-GRPC/README.ENG.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# VLESS-GRPC
|
||||||
|
|
||||||
|
## Schematic (Caddy):
|
||||||
|
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||||
|
## Nginx:
|
||||||
|
At the same time, you can also choose to use Nginx. A sample configuration snippet is as follows (partially from [@xqzr](https://github.com/xqzr)):
|
||||||
|
```conf
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2 so_keepalive=on;
|
||||||
|
listen [::]:443 ssl http2 so_keepalive=on;
|
||||||
|
server_name example.com;
|
||||||
|
|
||||||
|
index index.html;
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
ssl_certificate /path/to/example.cer;
|
||||||
|
ssl_certificate_key /path/to/example.key;
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE -RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||||
|
|
||||||
|
client_header_timeout 52w;
|
||||||
|
keepalive_timeout 52w;
|
||||||
|
# Fill in /your ServiceName after location
|
||||||
|
location /your ServiceName {
|
||||||
|
if ($content_type !~ "application/grpc") {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
client_max_body_size 0;
|
||||||
|
client_body_buffer_size 512k;
|
||||||
|
grpc_set_header X-Real-IP $remote_addr;
|
||||||
|
client_body_timeout 52w;
|
||||||
|
grpc_read_timeout 52w;
|
||||||
|
grpc_pass unix:/dev/shm/Xray-VLESS-gRPC.socket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
@@ -1,11 +1,14 @@
|
|||||||
# VLESS-GRPC
|
# VLESS-GRPC
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
## 原理图 (Caddy) :
|
## 原理图 (Caddy) :
|
||||||
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||||
## Nginx:
|
## Nginx:
|
||||||
同时,您也可以选择使用 Nginx。示例配置片段如下(部分来自 [@xqzr](https://github.com/xqzr)):
|
同时,您也可以选择使用 Nginx。示例配置片段如下(部分来自 [@xqzr](https://github.com/xqzr)):
|
||||||
```conf
|
```conf
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2 so_keepalive=on;
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
server_name example.com;
|
server_name example.com;
|
||||||
|
|
||||||
index index.html;
|
index index.html;
|
||||||
@@ -16,18 +19,19 @@ server {
|
|||||||
ssl_protocols TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||||
|
|
||||||
client_header_timeout 52w;
|
client_header_timeout 1w;
|
||||||
keepalive_timeout 52w;
|
keepalive_timeout 30m;
|
||||||
# 在 location 后填写 /你的 ServiceName
|
# 在 location 后填写 /你的 ServiceName
|
||||||
location /你的 ServiceName {
|
location /你的 ServiceName {
|
||||||
if ($content_type !~ "application/grpc") {
|
if ($content_type !~ "^application/grpc") {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
client_body_buffer_size 512k;
|
client_body_buffer_size 512k;
|
||||||
grpc_set_header X-Real-IP $remote_addr;
|
grpc_set_header X-Real-IP $remote_addr;
|
||||||
client_body_timeout 52w;
|
client_body_timeout 1w;
|
||||||
grpc_read_timeout 52w;
|
grpc_read_timeout 1w;
|
||||||
|
grpc_send_timeout 1w;
|
||||||
grpc_pass unix:/dev/shm/Xray-VLESS-gRPC.socket;
|
grpc_pass unix:/dev/shm/Xray-VLESS-gRPC.socket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,8 @@
|
|||||||
"serviceName": "", //填写你的 ServiceName,不带任何斜杠
|
"serviceName": "", //填写你的 ServiceName,不带任何斜杠
|
||||||
"multiMode": false,
|
"multiMode": false,
|
||||||
//"idle_timeout": 60, //当这段时间内没有数据传输时,将会进行健康检查。可能会解决一些“断流”问题。
|
//"idle_timeout": 60, //当这段时间内没有数据传输时,将会进行健康检查。可能会解决一些“断流”问题。
|
||||||
//"initial_windows_size": 35536 //通过 Cloudflare CDN 时,防止 Cloudflare CDN 发送意外的 h2 GOAWAY 帧以关闭现有连接。
|
//"initial_windows_size": 35536, //通过 Cloudflare CDN 时,防止 Cloudflare CDN 发送意外的 h2 GOAWAY 帧以关闭现有连接。
|
||||||
|
//"permit_without_stream": true //通过 Cloudflare CDN 且空闲(没有子连接)时,防止 Cloudflare CDN 关闭连接。
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
9
VLESS-HTTP-Caddy/README.md
Normal file
9
VLESS-HTTP-Caddy/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Xray 基于 HTTP/2 或 HTTP/3 的传输方式完整按照 HTTP 标准实现,可以通过其它的 HTTP 服务器(如 Caddy)进行中转。
|
||||||
|
|
||||||
|
Caddy 使用 reverse_proxy 模块,一般使用 path 分流,主路径伪装为网站,中间人无法探测到 Xray-core(请使用复杂 path)。
|
||||||
|
|
||||||
|
Caddy 默认开启 UDP 同端口的 HTTP/3 服务器,目前支持三种中转方式
|
||||||
|
|
||||||
|
- HTTP/2
|
||||||
|
- HTTP/3 解密后重新加密
|
||||||
|
- HTTP/3 转 H2C
|
@@ -1,6 +1,10 @@
|
|||||||
xx.com {
|
xx.com {
|
||||||
|
log {
|
||||||
|
level DEBUG
|
||||||
|
}
|
||||||
root * /var/www
|
root * /var/www
|
||||||
file_server
|
file_server
|
||||||
|
tls CA.crt priv.key # 换成你的证书和私钥,绝对路径
|
||||||
|
|
||||||
reverse_proxy /path 127.0.0.1:2001 {
|
reverse_proxy /path 127.0.0.1:2001 {
|
||||||
transport http {
|
transport http {
|
17
VLESS-HTTP-Caddy/VLESS-H3-Caddy/Caddyfile
Normal file
17
VLESS-HTTP-Caddy/VLESS-H3-Caddy/Caddyfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
xx.com {
|
||||||
|
log {
|
||||||
|
level DEBUG
|
||||||
|
}
|
||||||
|
root * /var/www
|
||||||
|
file_server
|
||||||
|
tls CA.crt priv.key # 换成你的证书和私钥,绝对路径
|
||||||
|
|
||||||
|
reverse_proxy /path 127.0.0.1:2001 {
|
||||||
|
transport http {
|
||||||
|
tls
|
||||||
|
tls_client_auth CA.crt priv.key # 换成你的证书和私钥,绝对路径
|
||||||
|
tls_server_name xx.com
|
||||||
|
versions 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
VLESS-HTTP-Caddy/VLESS-H3-Caddy/README.md
Normal file
7
VLESS-HTTP-Caddy/VLESS-H3-Caddy/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 原理图:
|
||||||
|
Xray client <--- H3 ---> Caddy2 <--- H3 ---> Xray server
|
||||||
|
|
||||||
|
注意:
|
||||||
|
由于 H3 没有解密的明文传输标准 这种模式 Caddy 解密流量之后 会重新加密 会增加少许延迟和负载
|
||||||
|
|
||||||
|
目前仅 Caddy2 的 v2.9.0-beta.2 版及以后完美支持 Xray 的 H3 入站。
|
73
VLESS-HTTP-Caddy/VLESS-H3-Caddy/client.jsonc
Normal file
73
VLESS-HTTP-Caddy/VLESS-H3-Caddy/client.jsonc
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"log":{},
|
||||||
|
"inbounds":[
|
||||||
|
{
|
||||||
|
"port":"1080",
|
||||||
|
"protocol":"socks",
|
||||||
|
"settings":{
|
||||||
|
"auth":"noauth",
|
||||||
|
"udp":true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":"1081",
|
||||||
|
"protocol":"http",
|
||||||
|
"settings":{}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"protocol":"vless",
|
||||||
|
"settings":{
|
||||||
|
"vnext":[
|
||||||
|
{
|
||||||
|
"address":"xx.com",
|
||||||
|
"port":443,
|
||||||
|
"users":[
|
||||||
|
{
|
||||||
|
"id":"",
|
||||||
|
"encryption":"none"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"streamSettings":{
|
||||||
|
"network":"http",
|
||||||
|
"security":"tls",
|
||||||
|
"httpSettings":{
|
||||||
|
"host":[
|
||||||
|
"xx.com"
|
||||||
|
],
|
||||||
|
"path":"/path"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tlsSettings":{
|
||||||
|
"alpn":["h3"],
|
||||||
|
"serverName":"xx.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag":"direct",
|
||||||
|
"protocol":"freedom",
|
||||||
|
"settings":{}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag":"blocked",
|
||||||
|
"protocol":"blackhole",
|
||||||
|
"settings":{}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routing":{
|
||||||
|
"domainStrategy":"IPOnDemand",
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"type":"field",
|
||||||
|
"ip":[
|
||||||
|
"geoip:private"
|
||||||
|
],
|
||||||
|
"outboundTag":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
66
VLESS-HTTP-Caddy/VLESS-H3-Caddy/server.jsonc
Normal file
66
VLESS-HTTP-Caddy/VLESS-H3-Caddy/server.jsonc
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "warning"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 2001,
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "",
|
||||||
|
"email": "love@example.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"decryption": "none"
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"security": "tls",
|
||||||
|
"network": "http",
|
||||||
|
"httpSettings": {
|
||||||
|
"path": "/path",
|
||||||
|
"host": [
|
||||||
|
"xx.com"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"tlsSettings": {
|
||||||
|
// "rejectUnknownSni": true,
|
||||||
|
"minVersion": "1.3",
|
||||||
|
"alpn": ["h3"],
|
||||||
|
"certificates": [
|
||||||
|
{
|
||||||
|
"certificateFile": "CA.crt", // 换成你的证书,绝对路径
|
||||||
|
"keyFile": "priv.key" // 换成你的私钥,绝对路径
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"tag": "direct",
|
||||||
|
"protocol": "freedom",
|
||||||
|
"settings": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "blocked",
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"settings": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routing": {
|
||||||
|
"domainStrategy": "AsIs",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"ip": [
|
||||||
|
"geoip:private"
|
||||||
|
],
|
||||||
|
"outboundTag": "blocked"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
11
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/Caddyfile
Normal file
11
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/Caddyfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
xx.com {
|
||||||
|
log {
|
||||||
|
level DEBUG
|
||||||
|
}
|
||||||
|
root * /var/www
|
||||||
|
file_server
|
||||||
|
tls CA.crt priv.key # 换成你的证书和私钥,绝对路径
|
||||||
|
|
||||||
|
reverse_proxy /path h2c://127.0.0.1:2001 {
|
||||||
|
}
|
||||||
|
}
|
5
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/README.md
Normal file
5
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 原理图:
|
||||||
|
Xray client <--- H3 ---> Caddy2 <--- H2C ---> Xray server
|
||||||
|
|
||||||
|
注意:
|
||||||
|
目前仅 Caddy2 的 v2.9.0-beta.2 版及以后完美支持 H3 转换 H2C 对接 Xray 的 H2C 入站。
|
73
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/client.jsonc
Normal file
73
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/client.jsonc
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"log":{},
|
||||||
|
"inbounds":[
|
||||||
|
{
|
||||||
|
"port":"1080",
|
||||||
|
"protocol":"socks",
|
||||||
|
"settings":{
|
||||||
|
"auth":"noauth",
|
||||||
|
"udp":true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":"1081",
|
||||||
|
"protocol":"http",
|
||||||
|
"settings":{}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"protocol":"vless",
|
||||||
|
"settings":{
|
||||||
|
"vnext":[
|
||||||
|
{
|
||||||
|
"address":"xx.com",
|
||||||
|
"port":443,
|
||||||
|
"users":[
|
||||||
|
{
|
||||||
|
"id":"",
|
||||||
|
"encryption":"none"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"streamSettings":{
|
||||||
|
"network":"http",
|
||||||
|
"security":"tls",
|
||||||
|
"httpSettings":{
|
||||||
|
"host":[
|
||||||
|
"xx.com"
|
||||||
|
],
|
||||||
|
"path":"/path"
|
||||||
|
},
|
||||||
|
"tlsSettings":{
|
||||||
|
"alpn":["h3"],
|
||||||
|
"serverName":"xx.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag":"direct",
|
||||||
|
"protocol":"freedom",
|
||||||
|
"settings":{}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag":"blocked",
|
||||||
|
"protocol":"blackhole",
|
||||||
|
"settings":{}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routing":{
|
||||||
|
"domainStrategy":"IPOnDemand",
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"type":"field",
|
||||||
|
"ip":[
|
||||||
|
"geoip:private"
|
||||||
|
],
|
||||||
|
"outboundTag":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
55
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/server.jsonc
Normal file
55
VLESS-HTTP-Caddy/VLESS-H3-To-H2C-Caddy/server.jsonc
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "warning"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 2001,
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "",
|
||||||
|
"email": "love@example.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"decryption": "none"
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"security": "none",
|
||||||
|
"network": "http",
|
||||||
|
"httpSettings": {
|
||||||
|
"path": "/path",
|
||||||
|
"host": [
|
||||||
|
"xx.com"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"tag": "direct",
|
||||||
|
"protocol": "freedom",
|
||||||
|
"settings": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "blocked",
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"settings": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routing": {
|
||||||
|
"domainStrategy": "AsIs",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"ip": [
|
||||||
|
"geoip:private"
|
||||||
|
],
|
||||||
|
"outboundTag": "blocked"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
5
VLESS-TCP-REALITY(Without being stolen)/README.md
Normal file
5
VLESS-TCP-REALITY(Without being stolen)/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 不会被偷跑流量的 REALITY
|
||||||
|
|
||||||
|
一个老生常谈的问题,对于非法请求, reality都会无脑转发流量去dest,如果reality的dest指向一个cloudflare网站,那么相当于服务端变成了CF的端口转发,任何人扫过来都可以拿来嫖。
|
||||||
|
|
||||||
|
目前的解决办法是不要使用这类的网站作为 dest, 懂一点的会告诉你用 nginx 的 stream 滤一遍 SNI 并丢掉非法请求,但是其实 Xray 本身就支持这种操作,这也是这个模板的原理
|
56
VLESS-TCP-REALITY(Without being stolen)/config_client.jsonc
Normal file
56
VLESS-TCP-REALITY(Without being stolen)/config_client.jsonc
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
// 直接从其他示例里 copy 过来的,客户端不需要任何特殊修改,要填的东西也一致
|
||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "debug"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"port": 10808,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
},
|
||||||
|
"sniffing": {
|
||||||
|
"enabled": true,
|
||||||
|
"destOverride": [
|
||||||
|
"http",
|
||||||
|
"tls",
|
||||||
|
"quic"
|
||||||
|
],
|
||||||
|
"routeOnly": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"vnext": [
|
||||||
|
{
|
||||||
|
"address": "127.0.0.1",
|
||||||
|
"port": 443,
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"id": "", // Needs to match server side
|
||||||
|
"encryption": "none"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
"fingerprint": "chrome",
|
||||||
|
"serverName": "speed.cloudflare.com",
|
||||||
|
"publicKey": "",
|
||||||
|
"spiderX": "",
|
||||||
|
"shortId": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tag": "proxy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
93
VLESS-TCP-REALITY(Without being stolen)/config_server.jsonc
Normal file
93
VLESS-TCP-REALITY(Without being stolen)/config_server.jsonc
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "debug"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"tag": "dokodemo-in",
|
||||||
|
"port": 443,
|
||||||
|
"protocol": "dokodemo-door",
|
||||||
|
"settings": {
|
||||||
|
"address": "127.0.0.1",
|
||||||
|
"port": 4431, // 指向内网中的 reality 端口,示例是这个端口,如果要自己修改了记得这里和下面的 reality 入站都要修改
|
||||||
|
"network": "tcp"
|
||||||
|
},
|
||||||
|
"sniffing": { // 这里的 sniffing 不是多余的,别乱动
|
||||||
|
"enabled": true,
|
||||||
|
"destOverride": [
|
||||||
|
"tls"
|
||||||
|
],
|
||||||
|
"routeOnly": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"port": 4431, // 见上 如果和其他服务冲突了可以换
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "" // uuid
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"decryption": "none"
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
// 下方要求和普通 reality 一致,这里演示 dest 设置为 cloudflare 不被偷跑流量所以设置为 speed.cloudflare.com 了
|
||||||
|
// 你可以设置为其他 CF 网站,如果你的 dest 不是这种网站你也不用点了进来不是吗
|
||||||
|
"dest": "speed.cloudflare.com:443",
|
||||||
|
"serverNames": [
|
||||||
|
"speed.cloudflare.com"
|
||||||
|
],
|
||||||
|
"privateKey": "", // 运行 `xray x25519` 生成
|
||||||
|
"shortIds": [
|
||||||
|
"",
|
||||||
|
"0123456789abcdef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sniffing": {
|
||||||
|
"enabled": true,
|
||||||
|
"destOverride": [
|
||||||
|
"http",
|
||||||
|
"tls",
|
||||||
|
"quic"
|
||||||
|
],
|
||||||
|
"routeOnly": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom",
|
||||||
|
"tag": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"tag": "blcok"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routing": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"inboundTag": [
|
||||||
|
"dokodemo-in"
|
||||||
|
],
|
||||||
|
// 重要,这个域名列表需要和 realitySettings 的 serverNames 保持一致
|
||||||
|
"domain": [
|
||||||
|
"speed.cloudflare.com"
|
||||||
|
],
|
||||||
|
"outboundTag": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inboundTag": [
|
||||||
|
"dokodemo-in"
|
||||||
|
],
|
||||||
|
"outboundTag": "blcok"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
18
VLESS-TCP-TLS (minimal by rprx)/README.ENG.md
Normal file
18
VLESS-TCP-TLS (minimal by rprx)/README.ENG.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# VLESS over TCP with TLS + fallback (simplest configuration)
|
||||||
|
|
||||||
|
|
||||||
|
You need to have a domain name resolved to the server IP, and apply for a certificate, such as let's encrypt
|
||||||
|
|
||||||
|
You also need an Nginx: (or any web server like Caddy)
|
||||||
|
|
||||||
|
1. Use the package manager that comes with the system to install nginx. For details, please Google
|
||||||
|
2. The default configuration of nginx is to listen to port 80, no need to modify
|
||||||
|
3. Optional: Find and replace the index.html and other files that come with nginx
|
||||||
|
4. Execute `systemctl enable nginx` to set up autostart
|
||||||
|
5. Execute `systemctl start nginx` to start nginx
|
||||||
|
|
||||||
|
If the server has a firewall enabled or the VPS has a security group, remember to allow ports TCP/80 and 443
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Next, you can learn about [site building configuration](<../VLESS-TCP-TLS%20(maximal%20by%20rprx)>) (fall back to advanced usage), try [advanced configuration](<../VLESS- TCP-TLS-WS%20(recommended)>) (distribution to WebSocket)
|
@@ -1,4 +1,5 @@
|
|||||||
# VLESS over TCP with TLS + 回落(最简配置)
|
# VLESS over TCP with TLS + 回落(最简配置)
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
你需要有一个解析到服务器 IP 的域名,并且申请了证书,比如 let's encrypt
|
你需要有一个解析到服务器 IP 的域名,并且申请了证书,比如 let's encrypt
|
||||||
|
|
||||||
|
13
VLESS-TCP-TLS-WS (recommended)/README.ENG.md
Normal file
13
VLESS-TCP-TLS-WS (recommended)/README.ENG.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# VLESS over TCP with TLS + fallback & split to WebSocket (advanced configuration)
|
||||||
|
|
||||||
|
This is a superset of [Minimal Configuration](<../VLESS-TCP-TLS%20(minimal%20by%20rprx)>), using the powerful fallback and distribution features of VLESS, it realizes port 443 VLESS over TCP with TLS and Perfect coexistence of any WSS
|
||||||
|
|
||||||
|
This configuration is for reference. You can replace VLESS on WS with any other protocol such as VMess, and set more PATHs and protocol coexistence.
|
||||||
|
|
||||||
|
After deployment, you can connect to the server through VLESS over TCP with TLS and any WebSocket with TLS at the same time, the latter of which can be through CDN
|
||||||
|
|
||||||
|
According to the actual measurement, the performance of VLESS fallback shunt WS is stronger than that of Nginx reverse generation WS. The traditional VMess + WSS solution can be completely migrated without loss of compatibility.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Next, you can try [Ultimate Configuration](../VLESS-TCP-XTLS-WHATEVER): switch to XTLS to achieve ultimate performance, and offload to VMess over TCP, and more fallback and offload suggestions, not only Xray
|
@@ -1,4 +1,5 @@
|
|||||||
# VLESS over TCP with TLS + 回落 & 分流 to WebSocket(进阶配置)
|
# VLESS over TCP with TLS + 回落 & 分流 to WebSocket(进阶配置)
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
这里是 [最简配置](<../VLESS-TCP-TLS%20(minimal%20by%20rprx)>) 的超集,利用 VLESS 强大的回落分流特性,实现了 443 端口 VLESS over TCP with TLS 和任意 WSS 的完美共存
|
这里是 [最简配置](<../VLESS-TCP-TLS%20(minimal%20by%20rprx)>) 的超集,利用 VLESS 强大的回落分流特性,实现了 443 端口 VLESS over TCP with TLS 和任意 WSS 的完美共存
|
||||||
|
|
||||||
|
7
VLESS-TCP-XTLS-Vision-REALITY/README.md
Normal file
7
VLESS-TCP-XTLS-Vision-REALITY/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# This is a minimal configuration file.
|
||||||
|
**About dest**
|
||||||
|
If you use `1.1.1.1:443` as dest, an IP certificate is used. You can also leave `serverNames` empty, it is a possible way to bypass [Iran's speed restrictions.](https://t.me/hysteria_github/78830/149362).
|
||||||
|
|
||||||
|
**About REALITY**
|
||||||
|
See [XTLS/REALITY](https://github.com/XTLS/REALITY).
|
||||||
|
In English See [REALITY.ENG](REALITY.ENG.md)
|
102
VLESS-TCP-XTLS-Vision-REALITY/REALITY.ENG.md
Normal file
102
VLESS-TCP-XTLS-Vision-REALITY/REALITY.ENG.md
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
# REALITY
|
||||||
|
### THE NEXT FUTURE
|
||||||
|
Server side implementation of REALITY protocol, a fork of package tls in Go 1.19.5.
|
||||||
|
For client side, please follow https://github.com/XTLS/Xray-core/blob/main/transport/internet/reality/reality.go.
|
||||||
|
|
||||||
|
TODO List: TODO
|
||||||
|
|
||||||
|
## VLESS-XTLS-uTLS-REALITY example for [Xray-core](https://github.com/XTLS/Xray-core) [ENG]
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
"inbounds": [ // Server-side inbound configuration
|
||||||
|
{
|
||||||
|
"listen": "0.0.0.0",
|
||||||
|
"port": 443,
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "", // Required, generated with ./xray uuid or a 1-30 character string
|
||||||
|
"flow": "xtls-rprx-vision" // Optional, if specified, clients must enable XTLS
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"decryption": "none"
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
"show": false, // Optional, if true, outputs debug information
|
||||||
|
"dest": "example.com:443", // Required, format similar to VLESS fallbacks' dest
|
||||||
|
"xver": 0, // Optional, format similar to VLESS fallbacks' xver
|
||||||
|
"serverNames": [ // Required, list of serverNames available to clients, * wildcard is not supported yet
|
||||||
|
"example.com",
|
||||||
|
"www.example.com"
|
||||||
|
],
|
||||||
|
"privateKey": "", // Required, generated with ./xray x25519
|
||||||
|
"minClientVer": "", // Optional, minimum client Xray version, format x.y.z
|
||||||
|
"maxClientVer": "", // Optional, maximum client Xray version, format x.y.z
|
||||||
|
"maxTimeDiff": 0, // Optional, maximum allowed time difference in milliseconds
|
||||||
|
"shortIds": [ // Required, list of shortIds available to clients, can be used to distinguish different clients
|
||||||
|
"", // If this item exists, client shortId can be empty
|
||||||
|
"0123456789abcdef" // 0 to f, length is a multiple of 2, maximum length is 16
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
By replacing TLS with REALITY, **you can eliminate server-side TLS fingerprint characteristics**, maintain forward secrecy, **and render certificate chain attacks ineffective**. **This allows for pointing to another website** without the need to purchase a domain or configure a TLS server, **making it more convenient to present a specified SNI throughout the entire TLS handshake**.
|
||||||
|
|
||||||
|
Typical use cases for proxying involve minimum requirements for target websites: **foreign websites, support for TLSv1.3 and H2, with non-redirected domains** (the primary domain may be used for redirection to www). Bonus features include proximity in IP (more similar with low latency), encrypted handshake messages after the Server Hello (e.g., dl.google.com), and OCSP Stapling. **Configuration bonuses include blocking traffic back to your country, forwarding TCP/80, and UDP/443** (REALITY externally appears as port forwarding, so it might be better for less commonly used destination IPs).
|
||||||
|
|
||||||
|
**REALITY can also be used in conjunction with proxy protocols other than XTLS**, but it is not recommended as they exhibit clear TLS-in-TLS characteristics that have already been targeted. REALITY's next major goal is the "**prebuilt mode**," which involves collecting target website features in advance, while XTLS's next major goal is **0-RTT**.
|
||||||
|
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
"outbounds": [ // Client-side outbound configuration
|
||||||
|
{
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"vnext": [
|
||||||
|
{
|
||||||
|
"address": "", // Server's domain or IP
|
||||||
|
"port": 443,
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"id": "", // Matching the server-side
|
||||||
|
"flow": "xtls-rprx-vision", // Matching the server-side
|
||||||
|
"encryption": "none"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
"show": false, // Optional, outputs debug information if true
|
||||||
|
"fingerprint": "chrome", // Required, simulates the client TLS fingerprint using the uTLS library
|
||||||
|
"serverName": "", // One of the server's serverNames
|
||||||
|
"publicKey": "", // The public key corresponding to the server's private key
|
||||||
|
"shortId": "", // One of the server's shortIds
|
||||||
|
"spiderX": "" // Initial path and parameters for web crawlers, recommended to be different for each client
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
REALITY clients should receive a "**temporary trusted certificate**" signed by the "**temporary authentication key.**" However, three scenarios can lead to receiving the target website's genuine certificate:
|
||||||
|
|
||||||
|
1. The REALITY server rejects the client's Client Hello, and traffic is redirected to the target website.
|
||||||
|
2. The client's Client Hello is redirected to the target website by a man-in-the-middle.
|
||||||
|
3. A man-in-the-middle attack occurs, which could be assisted by the target website or be a certificate chain attack.
|
||||||
|
|
||||||
|
REALITY clients can perfectly distinguish between temporary trusted certificates, genuine certificates, and invalid certificates, and decide the next steps:
|
||||||
|
|
||||||
|
1. When a temporary trusted certificate is received, the connection is usable, and everything proceeds as usual.
|
||||||
|
2. When a genuine certificate is received, the client enters spider mode.
|
||||||
|
3. When an invalid certificate is received, a TLS alert is triggered, and the connection is terminated.
|
56
VLESS-TCP-XTLS-Vision-REALITY/config_client.jsonc
Normal file
56
VLESS-TCP-XTLS-Vision-REALITY/config_client.jsonc
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "debug"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"port": 10808,
|
||||||
|
"protocol": "socks",
|
||||||
|
"settings": {
|
||||||
|
"udp": true
|
||||||
|
},
|
||||||
|
"sniffing": {
|
||||||
|
"enabled": true,
|
||||||
|
"destOverride": [
|
||||||
|
"http",
|
||||||
|
"tls",
|
||||||
|
"quic"
|
||||||
|
],
|
||||||
|
"routeOnly": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"vnext": [
|
||||||
|
{
|
||||||
|
"address": "",
|
||||||
|
"port": 443,
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"id": "", // Needs to match server side
|
||||||
|
"encryption": "none",
|
||||||
|
"flow": "xtls-rprx-vision"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
"fingerprint": "chrome",
|
||||||
|
"serverName": "", // A website that support TLS1.3 and h2. If your dest is `1.1.1.1:443`, then leave it empty
|
||||||
|
"publicKey": "", // run `xray x25519` to generate. Public and private keys need to be corresponding.
|
||||||
|
"spiderX": "", // If your dest is `1.1.1.1:443`, then you can fill it with `/dns-query/` or just leave it empty
|
||||||
|
"shortId": "" // Required
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tag": "proxy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
50
VLESS-TCP-XTLS-Vision-REALITY/config_server.jsonc
Normal file
50
VLESS-TCP-XTLS-Vision-REALITY/config_server.jsonc
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"loglevel": "debug"
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"port": 443,
|
||||||
|
"protocol": "vless",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "", // run `xray uuid` to generate
|
||||||
|
"flow": "xtls-rprx-vision"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"decryption": "none"
|
||||||
|
},
|
||||||
|
"streamSettings": {
|
||||||
|
"network": "tcp",
|
||||||
|
"security": "reality",
|
||||||
|
"realitySettings": {
|
||||||
|
"dest": "", // A website that support TLS1.3 and h2. You can also use `1.1.1.1:443` as dest
|
||||||
|
"serverNames": [
|
||||||
|
"" // A server name in the cert of dest site. If you use `1.1.1.1:443` as dest, then you can leave `serverNames` empty, it is a possible ways to bypass Iran's internet speed restrictions.
|
||||||
|
],
|
||||||
|
"privateKey": "", // run `xray x25519` to generate. Public and private keys need to be corresponding.
|
||||||
|
"shortIds": [// Required, list of shortIds available to clients, can be used to distinguish different clients
|
||||||
|
"", // If this item exists, client shortId can be empty
|
||||||
|
"0123456789abcdef" // 0 to f, length is a multiple of 2, maximum length is 16
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sniffing": {
|
||||||
|
"enabled": true,
|
||||||
|
"destOverride": [
|
||||||
|
"http",
|
||||||
|
"tls",
|
||||||
|
"quic"
|
||||||
|
],
|
||||||
|
"routeOnly": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"protocol": "freedom",
|
||||||
|
"tag": "direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
16
VLESS-TCP-XTLS-Vision/README.ENG.md
Normal file
16
VLESS-TCP-XTLS-Vision/README.ENG.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
:+1:**XTLS Vision [Introduction](https://github.com/XTLS/Xray-core/discussions/1295)**
|
||||||
|
|
||||||
|
**Usage Reminder:**
|
||||||
|
|
||||||
|
:exclamation: Compared with the usage base of XTLS Vision, there are almost no reports of Vision being blocked with **correct configuration**. **Correct configuration** refers to:
|
||||||
|
|
||||||
|
1. The server uses a reasonable port and prohibits traffic returning to China
|
||||||
|
2. Only configure XTLS Vision, not compatible with ordinary TLS proxy
|
||||||
|
3. Fall back to the web page, do not fall back/distribute to other proxy agreements
|
||||||
|
4. Client enables uTLS (fingerprint) [#1](https://github.com/XTLS/Xray-core/issues/1544#issuecomment-1399194727)
|
||||||
|
|
||||||
|
First of all, if you really don't want to be blocked, **please choose a clean IP** first, and build and use XTLS Vision according to **correct configuration**.
|
||||||
|
|
||||||
|
**However, even if you do this, there is no guarantee that you will not be blocked** 100%. Since the end of last year, many people's unknown traffic has been blocked in seconds, and TLS in TLS traffic has been blocked every other day. XTLS Vision is not unknown traffic, and fully handles TLS in TLS features, so far it seems to be effective. **But this does not mean that XTLS Vision can be 100% unblocked. It is very, very important to realize this, and don't make a fuss if you are accidentally blocked**.
|
||||||
|
|
||||||
|
**Because besides the agreement itself, there are many angles that can block you**. Taking IP as an example, you can't guarantee that the IP is really clean, you can't avoid being affected by neighbors, and you can't avoid the entire IP segment being pulled out of the list. It is also possible that GFWs in certain regions have unique standards. For example, if a certain IP has only a few people accessing it, but it can run so much traffic, it will be blocked. **If your XTLS Vision is blocked, but there is no large-scale blocked report like TLS at the end of last year, I sincerely suggest that you change the port, change the IP, and change the service provider to try again**. [#2](https://github.com/XTLS/Xray-core/issues/1544#issuecomment-1402118517)
|
@@ -1,5 +1,7 @@
|
|||||||
:+1:**XTLS Vision [简介](https://github.com/XTLS/Xray-core/discussions/1295)**
|
:+1:**XTLS Vision [简介](https://github.com/XTLS/Xray-core/discussions/1295)**
|
||||||
|
|
||||||
|
[ENGLISH](README.ENG.md)
|
||||||
|
|
||||||
**使用提醒:**
|
**使用提醒:**
|
||||||
|
|
||||||
:exclamation:相对于 XTLS Vision 的使用基数,目前几乎没有收到 **配置正确** 的 Vision 被封端口的报告,**配置正确** 指的是:
|
:exclamation:相对于 XTLS Vision 的使用基数,目前几乎没有收到 **配置正确** 的 Vision 被封端口的报告,**配置正确** 指的是:
|
||||||
|
@@ -25,8 +25,8 @@
|
|||||||
},
|
},
|
||||||
"inbounds": [
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"listen": "127.0.0.1", // 填 0.0.0.0 表示允许来自局域网的连接
|
"listen": "127.0.0.1", // Fill in 0.0.0.0 to allow connections from LAN
|
||||||
"port": 10808, // v2rayN 本地socks监听端口
|
"port": 10808, // local socks listening port
|
||||||
"protocol": "socks",
|
"protocol": "socks",
|
||||||
"settings": {
|
"settings": {
|
||||||
"udp": true
|
"udp": true
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"listen": "127.0.0.1", // 填 "0.0.0.0" 表示允许来自局域网的连接
|
"listen": "127.0.0.1", // Fill in "0.0.0.0" to allow connections from LAN
|
||||||
"port": 10809, // v2rayN 本地http监听端口
|
"port": 10809, // Local http listening port
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"sniffing": {
|
"sniffing": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
@@ -58,11 +58,11 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"vnext": [
|
"vnext": [
|
||||||
{
|
{
|
||||||
"address": "", // 地址,服务端的域名或IP
|
"address": "", // Address, domain name or IP of the server
|
||||||
"port": 443, // 端口,与服务端一致
|
"port": 443, // Port, consistent with the server
|
||||||
"users": [
|
"users": [
|
||||||
{
|
{
|
||||||
"id": "", // 用户ID,与服务端一致
|
"id": "", // User ID, consistent with the server
|
||||||
"encryption": "none",
|
"encryption": "none",
|
||||||
"flow": "xtls-rprx-vision"
|
"flow": "xtls-rprx-vision"
|
||||||
}
|
}
|
||||||
@@ -74,9 +74,9 @@
|
|||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
||||||
"serverName": "", // SNI,如果"address"填的是服务端的域名,可留空,如果"address"填的是服务端的IP,此处填服务端的证书中包含的域名
|
"serverName": "", // SNI, if "address" is filled with the domain name of the server, it can be left blank. If "address" is filled with the IP of the server, fill in the domain name contained in the certificate of the server here
|
||||||
"allowInsecure": false,
|
"allowInsecure": false,
|
||||||
"fingerprint": "chrome" // 用于配置指定 TLS Client Hello 的指纹,Xray 将通过 uTLS 库 模拟 TLS 指纹,或随机生成
|
"fingerprint": "chrome" // Used to configure the fingerprint of the specified TLS Client Hello, Xray will simulate the TLS fingerprint through the uTLS library, or generate it randomly
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tag": "proxy"
|
"tag": "proxy"
|
@@ -16,13 +16,13 @@
|
|||||||
},
|
},
|
||||||
"inbounds": [
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"listen": "0.0.0.0", // "0.0.0.0" 表示同时监听IPv4和IPv6
|
"listen": "0.0.0.0", // "0.0.0.0" Indicates listening to both IPv4 and IPv6
|
||||||
"port": 443, // 服务端监听的端口
|
"port": 443, // The port on which the server listens
|
||||||
"protocol": "vless",
|
"protocol": "vless",
|
||||||
"settings": {
|
"settings": {
|
||||||
"clients": [
|
"clients": [
|
||||||
{
|
{
|
||||||
"id": "", // 用户ID,执行 xray uuid 生成,或 1-30 字节的字符串
|
"id": "", // User ID, perform xray uuid generation, or a string of 1-30 bytes
|
||||||
"flow": "xtls-rprx-vision"
|
"flow": "xtls-rprx-vision"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
"certificates": [
|
"certificates": [
|
||||||
{
|
{
|
||||||
"ocspStapling": 3600,
|
"ocspStapling": 3600,
|
||||||
"certificateFile": "/etc/ssl/private/fullchain.cer", // 证书文件,建议用fullchain(全SSL证书链),若只有网站证书,会出现v2rayN能使用,v2rayNG不能使用的情况,通常不区分扩展名
|
"certificateFile": "/etc/ssl/private/fullchain.cer", // For the certificate file, it is recommended to use fullchain (full SSL certificate chain). If there is only a website certificate, v2rayN can be used but v2rayNG cannot be used. Usually, the extension is not distinguished
|
||||||
"keyFile": "/etc/ssl/private/private.key" // 私钥文件
|
"keyFile": "/etc/ssl/private/private.key" // private key file
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
"policy": {
|
"policy": {
|
||||||
"levels": {
|
"levels": {
|
||||||
"0": {
|
"0": {
|
||||||
"handshake": 2, // 连接建立时的握手时间限制,单位为秒,默认值为 4,建议与默认值不同
|
"handshake": 2, // The handshake time limit when the connection is established, in seconds, the default value is 4, it is recommended to be different from the default value
|
||||||
"connIdle": 120 // 连接空闲的时间限制,单位为秒,默认值为 300,建议与默认值不同
|
"connIdle": 120 // Connection idle time limit in seconds, the default value is 300, it is recommended to be different from the default value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,18 +0,0 @@
|
|||||||
# VLESS over TCP with XTLS + 回落 & 分流 to WHATEVER(终极配置)
|
|
||||||
|
|
||||||
这里是 [进阶配置](<../VLESS-TCP-TLS-WS%20(recommended)>) 的超集,利用 VLESS 强大的回落分流特性,实现了 443 端口尽可能多的协议、配置的完美共存,包括 [XTLS Direct Mode](https://github.com/rprx/v2fly-github-io/blob/master/docs/config/protocols/vless.md#xtls-%E9%BB%91%E7%A7%91%E6%8A%80)
|
|
||||||
|
|
||||||
客户端可以同时通过下列方式连接到服务器,其中 WS 都可以通过 CDN
|
|
||||||
|
|
||||||
1. VLESS over TCP with XTLS,数倍性能,首选方式
|
|
||||||
2. VLESS over TCP with TLS
|
|
||||||
3. VLESS over WS with TLS
|
|
||||||
4. VMess over TCP with TLS,不推荐
|
|
||||||
5. VMess over WS with TLS
|
|
||||||
6. Trojan over TCP with TLS
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
这里设置默认回落到 Xray 的 Trojan 协议,再继续回落到 80 端口的 Web 服务器(也可以换成数据库、FTP 等)
|
|
||||||
|
|
||||||
你还可以配置回落到 Caddy 的 forwardproxy 等其它也防探测的代理,以及分流到任何支持 WebSocket 的代理,都没有问题
|
|
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [
|
|
||||||
{
|
|
||||||
"port": 10800,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"udp": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds": [
|
|
||||||
{
|
|
||||||
"protocol": "trojan",
|
|
||||||
"settings": {
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了)
|
|
||||||
"port": 443,
|
|
||||||
"password": "", // 填写你的密码
|
|
||||||
"level": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"streamSettings": {
|
|
||||||
"network": "tcp",
|
|
||||||
"security": "tls",
|
|
||||||
"tlsSettings": {
|
|
||||||
"serverName": "example.com" // 换成你的域名
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [
|
|
||||||
{
|
|
||||||
"port": 10800,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"udp": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds": [
|
|
||||||
{
|
|
||||||
"protocol": "vless",
|
|
||||||
"settings": {
|
|
||||||
"vnext": [
|
|
||||||
{
|
|
||||||
"address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了)
|
|
||||||
"port": 443,
|
|
||||||
"users": [
|
|
||||||
{
|
|
||||||
"id": "", // 填写你的 UUID
|
|
||||||
"encryption": "none",
|
|
||||||
"level": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"streamSettings": {
|
|
||||||
"network": "tcp",
|
|
||||||
"security": "tls",
|
|
||||||
"tlsSettings": {
|
|
||||||
"serverName": "example.com" // 换成你的域名
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [
|
|
||||||
{
|
|
||||||
"port": 10800,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"udp": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds": [
|
|
||||||
{
|
|
||||||
"protocol": "vless",
|
|
||||||
"settings": {
|
|
||||||
"vnext": [
|
|
||||||
{
|
|
||||||
"address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了)
|
|
||||||
"port": 443,
|
|
||||||
"users": [
|
|
||||||
{
|
|
||||||
"id": "", // 填写你的 UUID
|
|
||||||
"flow": "xtls-rprx-direct",
|
|
||||||
"encryption": "none",
|
|
||||||
"level": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"streamSettings": {
|
|
||||||
"network": "tcp",
|
|
||||||
"security": "xtls", // 需要使用 XTLS
|
|
||||||
"xtlsSettings": {
|
|
||||||
"serverName": "example.com" // 换成你的域名
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [
|
|
||||||
{
|
|
||||||
"port": 10800,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"udp": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds": [
|
|
||||||
{
|
|
||||||
"protocol": "vless",
|
|
||||||
"settings": {
|
|
||||||
"vnext": [
|
|
||||||
{
|
|
||||||
"address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了)
|
|
||||||
"port": 443,
|
|
||||||
"users": [
|
|
||||||
{
|
|
||||||
"id": "", // 填写你的 UUID
|
|
||||||
"encryption": "none",
|
|
||||||
"level": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"streamSettings": {
|
|
||||||
"network": "ws",
|
|
||||||
"security": "tls",
|
|
||||||
"tlsSettings": {
|
|
||||||
"serverName": "example.com" // 换成你的域名
|
|
||||||
},
|
|
||||||
"wsSettings": {
|
|
||||||
"path": "/websocket" // 必须换成自定义的 PATH,需要和服务端的一致
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [
|
|
||||||
{
|
|
||||||
"port": 10800,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"udp": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds": [
|
|
||||||
{
|
|
||||||
"protocol": "vmess",
|
|
||||||
"settings": {
|
|
||||||
"vnext": [
|
|
||||||
{
|
|
||||||
"address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了)
|
|
||||||
"port": 443,
|
|
||||||
"users": [
|
|
||||||
{
|
|
||||||
"id": "", // 填写你的 UUID
|
|
||||||
"security": "none",
|
|
||||||
"level": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"streamSettings": {
|
|
||||||
"network": "tcp",
|
|
||||||
"security": "tls",
|
|
||||||
"tlsSettings": {
|
|
||||||
"serverName": "example.com" // 换成你的域名
|
|
||||||
},
|
|
||||||
"tcpSettings": {
|
|
||||||
"header": {
|
|
||||||
"type": "http",
|
|
||||||
"request": {
|
|
||||||
"path": [
|
|
||||||
"/vmesstcp" // 必须换成自定义的 PATH,需要和服务端的一致
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user