Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Last active October 6, 2024 21:32
Show Gist options
  • Save arsalanses/d6d387c499ee5944d0fc3e407f3a04f4 to your computer and use it in GitHub Desktop.
Save arsalanses/d6d387c499ee5944d0fc3e407f3a04f4 to your computer and use it in GitHub Desktop.
caddy + v2ray
services:
# caddy:
# image: docker.arvancloud.ir/caddy:2.8-alpine
# restart: unless-stopped
# command: caddy reverse-proxy --access-log --from https://domain:443 --to http://jumper:6157
# ports:
# - "80:80"
# - "443:443"
# - "443:443/udp"
# volumes:
# - caddy:/data
# depends_on:
# - jumper
jumper:
image: docker.arvancloud.ir/teddysun/v2ray:latest
restart: always
ports:
- "0.0.0.0:9000:9000"
volumes:
- ./config.json:/etc/v2ray/config.json
volumes:
caddy:
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 9000,
"listen": "127.0.0.1",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "15d585fb-700d-41a9-abb5-ddc1021ec413",
"email": "[email protected]"
}
],
"decryption": "none"
},
"streamSettings": {
"security": "none",
"network": "h2",
"httpSettings": {
"path": "/metrics",
"host": [
"domain.ir"
]
}
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "blocked",
"protocol": "blackhole",
"settings": {}
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 9000,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "11c2a696-0366-4524-b8f0-9a9c21512b02",
"level": 0,
"email": "[email protected]"
}
],
"decryption": "none",
"fallbacks": [
{
"dest": 8001
}
]
},
"streamSettings": {
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment