Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZedYeung/5b7703af631de55fa16abd3c927af782 to your computer and use it in GitHub Desktop.
Save ZedYeung/5b7703af631de55fa16abd3c927af782 to your computer and use it in GitHub Desktop.
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment