Last active
October 13, 2024 18:35
-
-
Save megrxu/1ad492eac2d343b4dbd4bb964ca37670 to your computer and use it in GitHub Desktop.
v2ray | WebSocket + VMess/VLess + TLS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inbounds": [ | |
{ | |
"port": 1080, | |
"listen": "127.0.0.1", | |
"protocol": "socks", | |
"settings": { | |
"udp": false | |
} | |
} | |
], | |
"outbounds": [ | |
{ | |
"protocol": "vmess", | |
"settings": { | |
"vnext": [ | |
{ | |
"address": "your-ip-address-or-server-name", | |
"port": 443, | |
"users": [ | |
{ | |
"id": "your-uuid" | |
} | |
] | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"security": "tls", | |
"wsSettings": { | |
"headers": { | |
"Host": "your-host" | |
}, | |
"path": "/vmess" | |
}, | |
"tlsSettings": { | |
"serverName": "your-host", | |
"allowInsecure": false | |
} | |
} | |
}, | |
{ | |
"protocol": "vless", | |
"settings": { | |
"vnext": [ | |
{ | |
"address": "your-ip-address-or-server-name", | |
"port": 443, | |
"users": [ | |
{ | |
"id": "your-uuid", | |
"encryption": "none", | |
"level": 0 | |
} | |
] | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"security": "tls", | |
"wsSettings": { | |
"headers": { | |
"Host": "your-host" | |
}, | |
"path": "/vless" | |
}, | |
"tlsSettings": { | |
"serverName": "your-host", | |
"allowInsecure": false | |
} | |
} | |
}, | |
{ | |
"protocol": "dns", | |
"settings": { | |
"network": "tcp", | |
"address": "1.1.1.1", | |
"port": 53 | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl; | |
ssl_certificate /etc/v2ray/v2ray.crt; | |
ssl_certificate_key /etc/v2ray/v2ray.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
server_name your-host; | |
location /vless { | |
proxy_redirect off; | |
proxy_pass http://127.0.0.1:12346/vless; | |
proxy_http_version 1.1; | |
proxy_set_header Host "your-host"; | |
proxy_set_header Connection "Upgrade"; | |
proxy_set_header Upgrade "WebSocket"; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_intercept_errors on; | |
} | |
location /vmess { | |
proxy_redirect off; | |
proxy_pass http://127.0.0.1:12345/vmess; | |
proxy_http_version 1.1; | |
proxy_set_header Host "your-host"; | |
proxy_set_header Connection "Upgrade"; | |
proxy_set_header Upgrade "WebSocket"; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_intercept_errors on; | |
} | |
location / { | |
return 204; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inbounds": [ | |
{ | |
"port": 12345, | |
"listen": "127.0.0.1", | |
"protocol": "vmess", | |
"settings": { | |
"clients": [ | |
{ | |
"id": "your-uuid" | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"wsSettings": { | |
"path": "/vmess" | |
} | |
} | |
}, | |
{ | |
"port": 12346, | |
"listen": "127.0.0.1", | |
"protocol": "vless", | |
"settings": { | |
"decryption": "none", | |
"clients": [ | |
{ | |
"id": "your-uuid", | |
"level": 0 | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"wsSettings": { | |
"path": "/vless" | |
} | |
} | |
} | |
], | |
"outbounds": [ | |
{ | |
"protocol": "freedom", | |
"settings": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Top