mirror of
https://github.com/XTLS/Xray-examples.git
synced 2024-11-08 18:13:13 +00:00
Add SplitHTTP-HTTP3 config (#191)
This commit is contained in:
parent
d9d8f77541
commit
4c64126604
8
VLESS-TLS-SplitHTTP-H3/README.md
Normal file
8
VLESS-TLS-SplitHTTP-H3/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# 原理图:
|
||||
直连: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.json
Normal file
54
VLESS-TLS-SplitHTTP-H3/client.json
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.json
Normal file
54
VLESS-TLS-SplitHTTP-H3/server.json
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in a new issue