mirror of
https://github.com/XTLS/Xray-examples.git
synced 2025-09-20 22:24:28 +08:00
Compare commits
39 Commits
31a1c6cbf5
...
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 |
@@ -28,7 +28,7 @@
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/ssws?ed=2048"
|
||||
"path": "/ssws?ed=2560"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
@@ -27,7 +27,7 @@
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/trojanws?ed=2048"
|
||||
"path": "/trojanws?ed=2560"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
@@ -33,7 +33,7 @@
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/vmws?ed=2048"
|
||||
"path": "/vmws?ed=2560"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
@@ -32,7 +32,7 @@
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/vlws?ed=2048"
|
||||
"path": "/vlws?ed=2560"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
@@ -132,7 +132,7 @@ Printqr()
|
||||
echo $line | sed -n -e 's/^.*#//p'
|
||||
curl qrcode.show -d $line
|
||||
fi
|
||||
done < result
|
||||
done < result.txt
|
||||
}
|
||||
|
||||
while getopts "mrqb" option; do
|
||||
|
@@ -5,8 +5,8 @@ Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||
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;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name example.com;
|
||||
|
||||
index index.html;
|
||||
@@ -17,8 +17,8 @@ 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;
|
||||
client_header_timeout 1w;
|
||||
keepalive_timeout 30m;
|
||||
# Fill in /your ServiceName after location
|
||||
location /your ServiceName {
|
||||
if ($content_type !~ "application/grpc") {
|
||||
@@ -27,8 +27,9 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,8 @@ Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||
同时,您也可以选择使用 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;
|
||||
@@ -19,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;
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@ At the same time, you can also choose to use Nginx. A sample configuration snipp
|
||||
```conf
|
||||
server {
|
||||
listen 443 ssl http2 so_keepalive=on;
|
||||
listen [::]:443 ssl http2 so_keepalive=on;
|
||||
server_name example.com;
|
||||
|
||||
index index.html;
|
||||
|
@@ -7,7 +7,8 @@ Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||
同时,您也可以选择使用 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;
|
||||
@@ -18,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;
|
||||
}
|
||||
}
|
||||
|
@@ -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 关闭连接。
|
||||
}
|
||||
}
|
||||
},
|
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 {
|
||||
log {
|
||||
level DEBUG
|
||||
}
|
||||
root * /var/www
|
||||
file_server
|
||||
tls CA.crt priv.key # 换成你的证书和私钥,绝对路径
|
||||
|
||||
reverse_proxy /path 127.0.0.1:2001 {
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -44,7 +44,7 @@
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"fingerprint": "chrome",
|
||||
"serverName": "bluearchive.jp", // If your dest is `1.1.1.1:443`, then leave it empty
|
||||
"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
|
||||
|
@@ -19,9 +19,9 @@
|
||||
"network": "tcp",
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"dest": "bluearchive.jp:443", // You can also use `1.1.1.1:443` as dest
|
||||
"dest": "", // A website that support TLS1.3 and h2. You can also use `1.1.1.1:443` as dest
|
||||
"serverNames": [
|
||||
"bluearchive.jp" // 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.
|
||||
"" // 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
|
||||
|
@@ -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
|
@@ -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 的代理,都没有问题
|
@@ -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,需要和服务端的一致
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@@ -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,需要和服务端的一致
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@@ -1,163 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"port": 443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // fill in your UUID
|
||||
"flow": "xtls-rprx-direct",
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 1310, // Fall back to Xray's Trojan protocol by default
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/websocket", // Must be replaced with a custom PATH
|
||||
"dest": 1234,
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/vmesstcp", // Must be replaced with a custom PATH
|
||||
"dest": 2345,
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/vmessws", // Must be replaced with a custom PATH
|
||||
"dest": 3456,
|
||||
"xver": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"alpn": [
|
||||
"http/1.1"
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/path/to/fullchain.crt", // Replace with your certificate, absolute path
|
||||
"keyFile": "/path/to/private.key" // Replace it with your private key, absolute path
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"port": 1310,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "trojan",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"password": "", // fill in your password
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80 // or fall back to other proxies that are also probing-proof
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "none",
|
||||
"tcpSettings": {
|
||||
"acceptProxyProtocol": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"port": 1234,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // fill in your UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "none",
|
||||
"wsSettings": {
|
||||
"acceptProxyProtocol": true, // Reminder: If you use Nginx/Caddy to reverse generation WS, you need to delete this line
|
||||
"path": "/websocket" // It must be replaced with a custom PATH, which needs to be consistent with the shunt
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"port": 2345,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // fill in your UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "none",
|
||||
"tcpSettings": {
|
||||
"acceptProxyProtocol": true,
|
||||
"header": {
|
||||
"type": "http",
|
||||
"request": {
|
||||
"path": [
|
||||
"/vmesstcp" // It must be replaced with a custom PATH, which needs to be consistent with the shunt
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"port": 3456,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // fill in your UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "none",
|
||||
"wsSettings": {
|
||||
"acceptProxyProtocol": true, // Reminder: If you use Nginx/Caddy to reverse generation WS, you need to delete this line
|
||||
"path": "/vmessws" // It must be replaced with a custom PATH, which needs to be consistent with the shunt
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom"
|
||||
}
|
||||
]
|
||||
}
|
5
VLESS-TLS-SplitHTTP-CaddyNginx/Caddyfile
Normal file
5
VLESS-TLS-SplitHTTP-CaddyNginx/Caddyfile
Normal file
@@ -0,0 +1,5 @@
|
||||
localhost:443 {
|
||||
handle_path /split/* {
|
||||
reverse_proxy http://127.0.0.1:1234
|
||||
}
|
||||
}
|
46
VLESS-TLS-SplitHTTP-CaddyNginx/client.jsonc
Normal file
46
VLESS-TLS-SplitHTTP-CaddyNginx/client.jsonc
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"udp": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "",
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "",
|
||||
"encryption": "none"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "splithttp",
|
||||
"splithttpSettings": {
|
||||
"path": "/split"
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"serverName": ""
|
||||
}
|
||||
},
|
||||
"tag": "proxy"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
23
VLESS-TLS-SplitHTTP-CaddyNginx/nginx.conf
Normal file
23
VLESS-TLS-SplitHTTP-CaddyNginx/nginx.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 443 http2 ssl;
|
||||
listen [::]:443 http2 ssl;
|
||||
|
||||
index index.html;
|
||||
root /var/www/html;
|
||||
ssl_certificate /path/to/example.cer;
|
||||
ssl_certificate_key /path/to/example.cer;
|
||||
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;
|
||||
|
||||
# splithttp produces very noisy access logs, as it sends many HTTP
|
||||
# requests and uses querystrings for padding. It is recommended to turn
|
||||
# them off after setup, or use custom log formats to limit the amount
|
||||
# of information.
|
||||
# access_log off;
|
||||
|
||||
location /split/ {
|
||||
proxy_pass http://127.0.0.1:1234/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
38
VLESS-TLS-SplitHTTP-CaddyNginx/server.jsonc
Normal file
38
VLESS-TLS-SplitHTTP-CaddyNginx/server.jsonc
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": ""
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "splithttp"
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls",
|
||||
"quic"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
12
VLESS-TLS-SplitHTTP-H3/README.md
Normal file
12
VLESS-TLS-SplitHTTP-H3/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# VLESS-TLS-SplitHTTP-H3
|
||||
|
||||
## 原理图:
|
||||
|
||||
直连:Xray client <--- HTTP3 ---> Xray server
|
||||
|
||||
配合 CDN 使用:Xray client <--- HTTP3 ---> CDN <--- HTTP2 or HTTP/1.1 ---> Xray server
|
||||
|
||||
## 注意:
|
||||
|
||||
默认配置仅支持客户端通过 HTTP3 直连服务端,如需和 CDN 一同使用,请参照注释修改服务端的 alpn。
|
||||
|
54
VLESS-TLS-SplitHTTP-H3/client.jsonc
Normal file
54
VLESS-TLS-SplitHTTP-H3/client.jsonc
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls",
|
||||
"quic"
|
||||
]
|
||||
},
|
||||
"port": 10808,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"udp": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "example.com", // Change to your domain.
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "UUID", // Change to your UUID.
|
||||
"encryption": "none"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "splithttp",
|
||||
"security": "tls",
|
||||
"splithttpSettings": {
|
||||
"path": "/splithttp",
|
||||
"host": "example.com" // Change to your domain.
|
||||
},
|
||||
"tlsSettings": {
|
||||
"serverName": "example.com", // Change to your domain.
|
||||
"alpn": [
|
||||
"h3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
54
VLESS-TLS-SplitHTTP-H3/server.jsonc
Normal file
54
VLESS-TLS-SplitHTTP-H3/server.jsonc
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls",
|
||||
"quic"
|
||||
]
|
||||
},
|
||||
"port": 443,
|
||||
"listen": "0.0.0.0",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "UUID" // Change to your UUID.
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "splithttp",
|
||||
"security": "tls",
|
||||
"splithttpSettings": {
|
||||
"path": "/splithttp",
|
||||
"host": "example.com" // Change to your domain.
|
||||
},
|
||||
"tlsSettings": {
|
||||
"rejectUnknownSni": true,
|
||||
"minVersion": "1.3",
|
||||
"alpn": [
|
||||
"h3" // If you want to use with CDN, you need to change alpn to ["h2", "http/1.1"].
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"ocspStapling": 3600,
|
||||
"certificateFile": "/path/to/fullchain.pem", // Change to your fullchain file path.
|
||||
"keyFile": "/path/to/privkey.pem" // Change to your private key file path.
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -36,14 +36,15 @@
|
||||
"network": "ws",
|
||||
"security": "tls",
|
||||
"wsSettings": {
|
||||
"path": "/Path2WS?ed=2048" //?ed=2048 前面填写你的 path
|
||||
"path": "/Path2WS?ed=2560" //?ed=2560 前面填写你的 path
|
||||
},
|
||||
"tlsSettings": {
|
||||
"allowInsecure": false,
|
||||
"serverName": "xx.com", //Equal to "SNI"
|
||||
"serverName": "xx.com", //Equal to "SNI"
|
||||
"fingerprint": "chrome" //"chrome" or "firefox"
|
||||
}
|
||||
}
|
||||
}},
|
||||
},
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom",
|
||||
@@ -60,9 +61,7 @@
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:private"
|
||||
],
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "direct"
|
||||
}
|
||||
]
|
@@ -1,5 +1,6 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name example.com;
|
||||
|
||||
index index.html;
|
||||
@@ -10,12 +11,12 @@ 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;
|
||||
|
||||
# 在 location 后填写 /你的 path
|
||||
location /你的 path {
|
||||
# 在 location 后填写 /你的 path/
|
||||
location /你的 path/ {
|
||||
if ($http_upgrade != "websocket") {
|
||||
return 404;
|
||||
}
|
||||
proxy_pass http://127.0.0.1:1234;
|
||||
proxy_pass http://127.0.0.1:1234/;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
@@ -23,6 +24,6 @@ server {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 52w;
|
||||
proxy_read_timeout 5d;
|
||||
}
|
||||
}
|
||||
|
@@ -16,10 +16,7 @@
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/Path2WS" // 填写你的 path
|
||||
}
|
||||
"network": "ws"
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user