Skip to content

Instantly share code, notes, and snippets.

@dcb9
Last active December 31, 2023 16:38
Show Gist options
  • Save dcb9/1e0f0346400e42fb4d03ead124da1658 to your computer and use it in GitHub Desktop.
Save dcb9/1e0f0346400e42fb4d03ead124da1658 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"
@ek2oo2
Copy link

ek2oo2 commented Sep 5, 2019

good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment