Add VLESS-XHTTP3-Nginx

#203
This commit is contained in:
xqzr 2024-12-15 19:30:12 +08:00 committed by GitHub
commit 5f96ba40bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1,71 @@
{
"log": {},
"inbounds": [
{
"port": "1080",
"listen": "::1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "example.com",
"port": 443,
"users": [
{
"id": "" // UUID
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "", // path
"mode": "stream-one",
"xmux": {
"maxConcurrency": 128, //Nginx 128https://nginx.org/en/docs/http/ngx_http_v3_module.html#http3_max_concurrent_streams
"cMaxReuseTimes": 1000, //Nginx 1000https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
"cMaxLifetimeMs": 3600000 //Nginx 3600000ms(1h)https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time
}
}
"security": "tls",
"tlsSettings": {
"alpn": [
"h3"
]
}
}
},
{
"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,26 @@
server {
listen [::]:443 ssl ipv6only=off reuseport;
listen [::]:443 quic reuseport ipv6only=off;
server_name example.com;
index index.html;
root /var/www/html;
http2 on;
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 5m;
keepalive_timeout 5m;
# location 后填写 /你的 path/
location /你的 path/ {
client_max_body_size 0;
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_body_timeout 5m;
grpc_read_timeout 315;
grpc_send_timeout 5m;
grpc_pass unix:/dev/shm/xrxh.socket;
}
}

View File

@ -0,0 +1,50 @@
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "/dev/shm/xrxh.socket,0666",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "" // UUID
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"mode": "stream-one",
"path": "" // path
}
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "blocked",
"protocol": "blackhole",
"settings": {}
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}