Compare commits

...

48 Commits

Author SHA1 Message Date
xqzr
2a3aa86e4a Update Caddyfile 2024-10-26 03:10:34 +08:00
xqzr
ef8962658d Update nginx.conf 2024-10-26 02:55:19 +08:00
xqzr
f092fd7ae3 Update server.jsonc 2024-10-26 02:54:54 +08:00
xqzr
fb19ed3ed6 Update Caddyfile 2024-10-26 02:48:55 +08:00
xqzr
f7e1a4e5b4 Update server.jsonc 2024-10-26 02:38:33 +08:00
xqzr
100e729cc7 Update nginx.conf 2024-10-26 02:37:34 +08:00
yuhan6665
061321ad1c Update all json file to jsonc (#199) 2024-10-21 11:49:47 -04:00
风扇滑翔翼
c6ec3122f5 Add VLESS-TCP-REALITY(Without being stolen) 2024-10-20 12:05:33 +00:00
yuhan6665
bebf51e5f7 Add VLESS-H3-Caddy two modes 2024-10-17 04:54:23 -04:00
yuhan6665
2fe711231a Refactor VLESS-HTTP-Caddy folder 2024-10-17 03:58:05 -04:00
yuhan6665
301c7c0193 Delete Quic 2024-10-17 03:40:05 -04:00
mmmray
ca705fbd0b SplitHTTP: Add suggestion to disable nginx access logs 2024-08-31 11:58:34 +02:00
xor
129be747c3 Fix caddy reverse proxy latency (#195) 2024-08-26 10:22:31 -04:00
xqzr
34d78cc926 Starting with "application/grpc" 2024-08-02 22:33:20 +08:00
xqzr
8c9e1c5f4f Starting with "application/grpc" 2024-08-02 22:32:28 +08:00
IRN-Kawakaze
2988294bdc Fix incorrect formatting. (#192) 2024-07-22 23:28:03 +02:00
IRN-Kawakaze
4c64126604 Add SplitHTTP-HTTP3 config (#191) 2024-07-22 21:42:06 +02:00
chshouyu
d9d8f77541 Update websocket path ed from 2048 to 2560 2024-06-23 03:23:55 +08:00
mmmray
9d40021c5b Simplify SplitHTTP further, and add Caddyfile (#188)
* Simplify SplitHTTP further, and add Caddyfile

* raise log level

* enable udp

---------

Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
2024-06-22 04:36:22 +08:00
iamtrazy
f605cda6a0 fixes for splitHttp nginx conf (#187)
* Update nginx.conf

removed unnecessary components from nginx conf

* fix: minor changes
2024-06-21 23:39:00 +08:00
iamtrazy
2a8fe45acd feat: added splitHttp nginx reverse proxy exmaple 2024-06-21 10:59:39 -04:00
zonescape
0ba800fd7c fix port datatype 2024-05-02 19:43:46 +08:00
风扇滑翔翼
ecefc32120 Remove deprecated config 2024-03-22 05:22:18 +00:00
风扇滑翔翼
f42d177c46 #172 2024-03-22 04:56:11 +00:00
xqzr
cb619022bb keepalive_timeout 30m; 2024-01-29 20:53:39 +08:00
xqzr
059bdf1a97 Update README.md 2024-01-29 20:51:27 +08:00
xqzr
e0548899bb Update README.md 2024-01-29 20:50:34 +08:00
xqzr
1732809e5f Update README.ENG.md 2024-01-29 20:46:45 +08:00
チセ
a47a984a08 Update config_server.json 2024-01-20 16:39:14 -05:00
kiriknik
7f4e176d9b Update generate.sh
A little patch to generate qr code)
2023-12-29 10:46:15 -05:00
xqzr
7486946d72 Add IPv6 Listen 2023-12-04 17:51:17 +08:00
xqzr
4ea3d4e023 Change all timeout 2023-12-04 17:47:05 +08:00
xqzr
a736984061 Update nginx.conf 2023-12-04 17:42:52 +08:00
xqzr
5ee22a1aa4 Update README.md 2023-12-04 17:42:25 +08:00
xqzr
33595f9c0d Update README.ENG.md 2023-12-04 17:40:36 +08:00
xqzr
152dd028c6 Update README.md 2023-12-04 17:38:28 +08:00
xqzr
08978ee233 Add IPv6 Listen 2023-11-02 21:51:51 +08:00
xqzr
97210cfd0e Add IPv6 Listen 2023-11-02 21:51:12 +08:00
xqzr
9a6a9ab54a add permit_without_stream 2023-11-02 21:34:39 +08:00
woodlyer
31a1c6cbf5 Update config_client.jsonc
add shortId
2023-09-07 12:26:51 -04:00
woodlyer
13d0158470 Update config_server.jsonc 2023-09-07 12:26:19 -04:00
yuhan6665
0e8377e3c2 Update README.md 2023-09-04 17:32:42 -04:00
yuhan6665
9910881d58 Update README.md 2023-09-04 10:36:12 -04:00
KoinuDayo
2aea6cb507 Add VLESS-TCP-XTLS-Vision-REALITY 2023-09-04 10:16:41 -04:00
Mohammad Reza Gharabaghi
2dc42bc0df Add gRPC over REALITY 2023-05-21 22:31:23 -04:00
bghandchi
004c490c7b Auto generate script for all in one configs (#145)
* fixes default template value for password at server.json:237

* Auto config generation script

* Readme fix

* remove ?ed=2048

* remove h2 tcp
2023-04-13 13:04:12 -04:00
yuhan6665
d35c6f5aaa Update README.ENG.md url fix
Update vmess_ws_tls.json comment translate

Update vmess_tcp_tls.json comment translate

Update vless_ws_tls.json comment trnslate

Update vless_tcp_xtls.json comment translate

Update vless_tcp_tls.json comment translate

Update trojan_tcp_tls.json comment translate

Create README.ENG.md

Update README.md add link README.ENG.md

Update README.md add link README.ENG.md

Create README.ENG.md

Update README.md add link README.ENG.md

Create README.ENG.md

Update client.json comment transalate

Update server.json comment translate

Update README.md add english translate

Update README.md add english link

Create README.ENG.md

Update Caddyfile comment translate

Update client.json comment translate

Update server.json comment translate

Update README.md add link README.ENG.md

Create RREADME.ENG.md

Update config_client_tcp_tls.json translate comment

Update config_client_ws_tls.json translate comment

Update config_server.json comment translate

Update README.md add link README.ENG.md

Create README.ENG.md

Update config_client.json comment translate

Update config_server.json comment translate

Update client.json translate comment

Update server.json translate comment

Update README.md add link README.ENG.md

Create README.ENG.md

Update server.json translate comment

Update README.md add link README.ENG.md

Update README.md

Create README.ENG.md

Co-authored-by: lk29 <12291632+lk29@users.noreply.github.com>
2023-04-05 21:08:31 -04:00
stupidloud
28052d756d Update client.json 2023-03-31 10:24:46 -04:00
136 changed files with 1855 additions and 584 deletions

View File

@@ -76,14 +76,27 @@ VMESS-gRPC Request ------> Xray Vless-TCP-XTLS(443) ----**alpn=h2**----> fallbac
| Combination | Link |
| ----------- | ---- |
| 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-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-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-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-WS | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJ3cyIsCiAgICAicGF0aCI6ICIvdm13cyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLVdTIiwKICAgICJzY3kiOiAibm9uZSIsCiAgICAic25pIjogIiIsCiAgICAidGxzIjogInRscyIsCiAgICAidHlwZSI6ICIiLAogICAgInYiOiAiMiIKfQo=` |
| VMESS-gRPC | `vmess://ewogICAgImFkZCI6ICJleGFtcGxlLmNvbSIsCiAgICAiYWlkIjogIjAiLAogICAgImhvc3QiOiAiIiwKICAgICJpZCI6ICI5MGU0OTAzZS02NmE0LTQ1ZjctYWJkYS1mZDVkNWVkN2Y3OTciLAogICAgIm5ldCI6ICJncnBjIiwKICAgICJwYXRoIjogInZtZ3JwYyIsCiAgICAicG9ydCI6ICI0NDMiLAogICAgInBzIjogIlZNRVNTLWdSUEMiLAogICAgInNjeSI6ICJub25lIiwKICAgICJzbmkiOiAiIiwKICAgICJ0bHMiOiAidGxzIiwKICAgICJ0eXBlIjogImh0dHAiLAogICAgInYiOiAiMiIKfQo=` |
| 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.

View File

@@ -28,7 +28,7 @@
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/ssws?ed=2048"
"path": "/ssws?ed=2560"
},
"security": "tls",
"tlsSettings": {

View File

@@ -27,7 +27,7 @@
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/trojanws?ed=2048"
"path": "/trojanws?ed=2560"
},
"security": "tls",
"tlsSettings": {

View File

@@ -33,7 +33,7 @@
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/vmws?ed=2048"
"path": "/vmws?ed=2560"
},
"security": "tls",
"tlsSettings": {

View File

@@ -32,7 +32,7 @@
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/vlws?ed=2048"
"path": "/vlws?ed=2560"
},
"security": "tls",
"tlsSettings": {

View 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

View 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.

View File

@@ -1,5 +1,8 @@
[ENGLISH](README.ENG.md)
# 反向代理
# 原理
Xray Client <--- VMESS/SS ---> Xray Portal(需要公网 IP) <--- VMESS/SS ---> Xray Bridge
# 说明
配置中,内网设备使用的配置为 `bridge.json`,有公网 ip 的设备使用 `portal.json`,通过`portal`连接到内网的设备使用`client.json`
@@ -18,4 +21,4 @@ Shadowsocks 2022 使用与 WireGuard 类似的预共享密钥作为密码。
| 2022-blake3-aes-256-gcm | 32 |
| 2022-blake3-chacha20-poly1305 | 32 |
在 Go 实现中32 位密钥始终工作。
在 Go 实现中32 位密钥始终工作。

View 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.

View File

@@ -1,5 +1,7 @@
# VLESS over TCP with XTLS + 回落 & 分流
[ENGLISH](README.ENG.md)
配合回落,使用 443 端口 + XTLS + WS 和路由分流,实现反向代理,增强隐蔽性。
客户端连接方式有 VLESS over WS with TLS / VLESS over TCP with XTLS 两种

View 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.

View File

@@ -1,5 +1,7 @@
# Shadowsocks 2022
[ENGLISH](README.ENG.md)
服务端 JSON
```json
@@ -236,4 +238,4 @@ Shadowsocks 2022 使用与 WireGuard 类似的预共享密钥作为密码。
| 2022-blake3-aes-256-gcm | 32 |
| 2022-blake3-chacha20-poly1305 | 32 |
在 Go 实现中32 位密钥始终工作。
在 Go 实现中32 位密钥始终工作。

View 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.

View File

@@ -1,5 +1,7 @@
# Shadowsocks AEAD 快速上手
[ENGLISH](README.ENG.md)
服务端 JSON
```json

View 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;
}
}
```

View File

@@ -1,12 +1,14 @@
# Trojan-gRPC-Caddy2Nginx
[ENGLISH](README.ENG.md)
## 原理图 (Caddy)
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
## Nginx
同时,您也可以选择使用 Nginx。示例配置片段如下部分来自 [@xqzr](https://github.com/xqzr)
```conf
server {
listen 443 ssl http2 so_keepalive=on;
listen [::]:443 ssl http2 so_keepalive=on;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
index index.html;
@@ -17,18 +19,19 @@ server {
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;
client_header_timeout 1w;
keepalive_timeout 30m;
# 在 location 后填写 /你的 ServiceName
location /你的 ServiceName {
if ($content_type !~ "application/grpc") {
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;
client_body_timeout 1w;
grpc_read_timeout 1w;
grpc_send_timeout 1w;
grpc_pass unix:/dev/shm/Xray-Trojan-gRPC.socket;
}
}

View File

@@ -4,6 +4,7 @@ xx.com {
path /ServiceName/* # 修改为你自己的 ServiceName且仅能存在两个斜杠。/MyService/ServiceName/*会导致错误)
}
reverse_proxy @grpc unix//dev/shm/Xray-VLESS-gRPC.socket {
flush_interval -1
transport http {
versions h2c
}

36
VLESS-GRPC/README.ENG.md Normal file
View 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;
}
}
```

View File

@@ -1,11 +1,14 @@
# VLESS-GRPC
[ENGLISH](README.ENG.md)
## 原理图 (Caddy)
Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
## Nginx
同时,您也可以选择使用 Nginx。示例配置片段如下部分来自 [@xqzr](https://github.com/xqzr)
```conf
server {
listen 443 ssl http2 so_keepalive=on;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
index index.html;
@@ -16,18 +19,19 @@ server {
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;
client_header_timeout 1w;
keepalive_timeout 30m;
# 在 location 后填写 /你的 ServiceName
location /你的 ServiceName {
if ($content_type !~ "application/grpc") {
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;
client_body_timeout 1w;
grpc_read_timeout 1w;
grpc_send_timeout 1w;
grpc_pass unix:/dev/shm/Xray-VLESS-gRPC.socket;
}
}

View File

@@ -39,7 +39,8 @@
"serviceName": "", // ServiceName
"multiMode": false,
//"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
}
}
},

View 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

View File

@@ -1,6 +1,10 @@
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 {

View 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
}
}
}

View File

@@ -0,0 +1,7 @@
# 原理图:
Xray client <--- H3 ---> Caddy2 <--- H3 ---> Xray server
注意:
由于 H3 没有解密的明文传输标准 这种模式 Caddy 解密流量之后 会重新加密 会增加少许延迟和负载
目前仅 Caddy2 的 v2.9.0-beta.2 版及以后完美支持 Xray 的 H3 入站。

View 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"
}
]
}
}

View 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"
}
]
}
}

View 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 {
}
}

View File

@@ -0,0 +1,5 @@
# 原理图:
Xray client <--- H3 ---> Caddy2 <--- H2C ---> Xray server
注意:
目前仅 Caddy2 的 v2.9.0-beta.2 版及以后完美支持 H3 转换 H2C 对接 Xray 的 H2C 入站。

View 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"
}
]
}
}

View 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"
}
]
}
}

View File

@@ -0,0 +1,5 @@
# 不会被偷跑流量的 REALITY
一个老生常谈的问题,对于非法请求, reality都会无脑转发流量去dest如果reality的dest指向一个cloudflare网站那么相当于服务端变成了CF的端口转发任何人扫过来都可以拿来嫖。
目前的解决办法是不要使用这类的网站作为 dest, 懂一点的会告诉你用 nginx 的 stream 滤一遍 SNI 并丢掉非法请求,但是其实 Xray 本身就支持这种操作,这也是这个模板的原理

View 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"
}
]
}

View 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"
}
]
}
}

View 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)

View File

@@ -1,4 +1,5 @@
# VLESS over TCP with TLS + 回落(最简配置)
[ENGLISH](README.ENG.md)
你需要有一个解析到服务器 IP 的域名,并且申请了证书,比如 let's encrypt

View 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

View File

@@ -1,4 +1,5 @@
# 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 的完美共存

View 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)

View 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.

View 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"
}
]
}

View 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"
}
]
}

View File

@@ -1,18 +0,0 @@
# VLESS over TCP with XTLS + fallback & split to WHATEVER (ultimate configuration)
This is a superset of [Advanced Configuration](<../VLESS-TCP-TLS-WS%20(recommended)>), using the powerful fallback and shunt features of VLESS, it realizes as many protocols and configurations as possible on port 443. Perfect coexistence, including [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)
The client can connect to the server through the following methods at the same time, and WS can pass through the CDN
1. VLESS over TCP with XTLS, several times the performance, the preferred method
2. VLESS over TCP with TLS
3. VLESS over WS with TLS
4. VMess over TCP with TLS, not recommended
5. VMess over WS with TLS
6. Trojan over TCP with TLS
---
Here it is set to fall back to the Trojan protocol of Xray by default, and then continue to fall back to the web server on port 80 (it can also be replaced with a database, FTP, etc.)
You can also configure fallback to Caddy's forwardproxy and other proxies that are also anti-detection, and shunt to any proxy that supports WebSocket, no problem

View File

@@ -1,20 +0,0 @@
# VLESS over TCP with XTLS + 回落 & 分流 to WHATEVER终极配置
[ENGLISH](README.ENG.md)
这里是 [进阶配置](<../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 的代理,都没有问题

View File

@@ -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" // 换成你的域名
}
}
}
]
}

View File

@@ -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" // 换成你的域名
}
}
}
]
}

View File

@@ -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" // 换成你的域名
}
}
}
]
}

View File

@@ -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需要和服务端的一致
}
}
}
]
}

View File

@@ -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需要和服务端的一致
]
}
}
}
}
}
]
}

View File

@@ -1,45 +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": "ws",
"security": "tls",
"tlsSettings": {
"serverName": "example.com" // 换成你的域名
},
"wsSettings": {
"path": "/vmessws" // 必须换成自定义的 PATH需要和服务端的一致
}
}
}
]
}

Some files were not shown because too many files have changed in this diff Show More