- caddy-*: http server related files
- v2ray-*: v2ray related files
- forword-*: files to relay requests
Last active
January 18, 2023 19:28
-
-
Save ihciah/eddd2c4bc381a3dfefac7ac85e8aab09 to your computer and use it in GitHub Desktop.
V2ray with cloudflare websocket
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
cf.domain.com { | |
tls ihciah@gmail.com | |
tls { | |
dns cloudflare aaaaaaaa | |
} | |
reverse_proxy /path localhost:10086 { | |
header_up -Origin | |
} | |
} | |
original.domain.com { | |
tls ihciah@gmail.com | |
tls { | |
dns cloudflare aaaaaaaa | |
} | |
root * /var/www/html | |
file_server | |
} |
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
version: '2.4' | |
services: | |
caddy: | |
image: ihciah/caddy:latest | |
container_name: caddy | |
restart: always | |
network_mode: "host" | |
volumes: | |
- type: "bind" | |
source: "./Caddyfile" | |
target: "/etc/caddy/Caddyfile" | |
- "./data:/data/caddy" | |
- "./html:/var/www/html:ro" |
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
FROM caddy:2.1.1-builder AS builder | |
RUN caddy-builder \ | |
github.com/caddy-dns/cloudflare | |
FROM caddy:2.1.1 | |
COPY --from=builder /usr/bin/caddy /usr/bin/caddy |
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
domain2.com:4431 { | |
tls ihciah@gmail.com | |
tls { | |
dns cloudflare aaaaaaaaa | |
} | |
reverse_proxy /path https://domain.com:443 { | |
header_up Host domain.com | |
header_up -Origin | |
} | |
} |
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": 10086, | |
"listen": "127.0.0.1", | |
"protocol": "vmess", | |
"settings": { | |
"clients": [ | |
{ | |
"id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | |
"level": 1, | |
"alterId": 64 | |
} | |
] | |
}, | |
"streamSettings": { | |
"network": "ws", | |
"wsSettings": { | |
"path": "/path" | |
} | |
} | |
}], | |
"outbounds": [{ | |
"protocol": "freedom", | |
"settings": {} | |
},{ | |
"protocol": "blackhole", | |
"settings": {}, | |
"tag": "blocked" | |
}], | |
"routing": { | |
"rules": [ | |
{ | |
"type": "field", | |
"ip": ["geoip:private"], | |
"outboundTag": "blocked" | |
} | |
] | |
} | |
} |
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
version: '2.4' | |
services: | |
v2ray: | |
image: v2ray/official:latest | |
container_name: v2ray | |
restart: always | |
network_mode: "host" | |
volumes: | |
- type: "bind" | |
source: "./config.json" | |
target: "/etc/v2ray/config.json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment