Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
- Caddyfile
- config.json
- docker-compose.yml
Client side contents:
- client-settings-config.json
Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
Client side contents:
| mydomain.me { | |
| log ./caddy.log | |
| # generated by uuid tools for WebSocket path | |
| proxy /REPLACE-YOUR-V2RAY-UUID-HERE v2ray:8002 { | |
| websocket | |
| header_upstream -Origin | |
| } | |
| } |
| { | |
| "inbounds": [ | |
| { | |
| "port": 1080, | |
| "listen": "127.0.0.1", | |
| "protocol": "socks", | |
| "domainOverride": ["tls","http"], | |
| "settings": { | |
| "auth": "noauth", | |
| "udp": false | |
| } | |
| } | |
| ], | |
| "outbounds": [ | |
| { | |
| "protocol": "vmess", | |
| "settings": { | |
| "vnext": [ | |
| { | |
| "address": "mydomain.me", | |
| "port": 443, | |
| "users": [ | |
| { | |
| "id": "YOUR CLIENT UUID generated by uuid tools", | |
| "alterId": 1 | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "streamSettings": { | |
| "network": "ws", | |
| "security": "tls", | |
| "wsSettings": { | |
| "path": "/REPLACE-YOUR-V2RAY-UUID-HERE" | |
| } | |
| } | |
| } | |
| ] | |
| } |
| { | |
| "log" : { | |
| "access": "/var/log/v2ray/access.log", | |
| "error": "/var/log/v2ray/error.log", | |
| "loglevel": "warning" | |
| }, | |
| "inbounds":[{ | |
| "port": 8002, | |
| "protocol": "vmess", | |
| "settings": { | |
| "clients": [ | |
| { | |
| // remove this comment line: I suggest that you can use a new uuid for your v2ray path | |
| // https://www.uuidgenerator.net/ | |
| "id": "YOUR CLIENT UUID generated by uuid tools", | |
| "level": 1, | |
| "alterId": 1 | |
| } | |
| ] | |
| }, | |
| "streamSettings": { | |
| "network": "ws", | |
| "wsSettings": { | |
| // remove this comment line: I suggest that you should generate a new uuid for your v2ray path | |
| // https://www.uuidgenerator.net/ | |
| "path": "/REPLACE-YOUR-V2RAY-UUID-HERE" | |
| } | |
| } | |
| }], | |
| "outbounds": [{ | |
| "protocol": "freedom", | |
| "settings": {} | |
| }] | |
| } |
| version: '3' | |
| services: | |
| v2ray: | |
| image: v2ray/official | |
| volumes: | |
| - ./config.json:/etc/v2ray/config.json | |
| expose: | |
| - "8002" # if you need to change this you should change Caddyfile as well | |
| caddy: | |
| image: abiosoft/caddy | |
| volumes: | |
| - ./Caddyfile:/etc/Caddyfile:ro | |
| - ./caddyCertificates:/root/.caddy | |
| environment: | |
| - ACME_AGREE=true | |
| ports: | |
| - "80:80" | |
| - "443:443" |
good job