这个 repo 提供了一个开箱即用的梯子部署方案。你只需要有一个域名和一个 VPS,就可以使用脚本通过 Docker 容器化部署 V2Ray(v5.14.1) 和 OpenVPN(v2.6.12) 服务。
- V2Ray: V2Ray 代理服务 + DNS
- HAProxy: TCP 路由
- SWAG: HTTP 路由 + Web + CertBot
- Cloudflare-WARP: Cloudflare 提供的 socks5 代理
- OpenVPN:安全加密方式的 VPN
- 512MB RAM
- Ubuntu / Debian / Arch / Fedora / CentOS
- 拥有一个域名,并解析
prx
和dl
两个子域名到自己 VPS 的 IP,也可以使用通配符*
,如*.us.example.com
- 确保 VPS 的 80 和 443 端口是开放的
# 下载脚本
curl -LO https://raw.githubusercontent.com/PandaRyshan/ladder/main/setup.sh
# 给脚本执行权限
chmod +x setup.sh
# 运行脚本
./setup.sh
V2Ray 配置在 ladder 目录下的 info.txt 内,可以使用 cat
命令查看
修改 v2ray 的配置文件 config/v2ray/config.json
,找到 routing
配置中的 cf-warp
项,可以添加希望通过 warp 访问的域名或 IP 地址,例如:
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "cf-warp",
"domain": [
"geosite:openai",
"example.com"
]
},
{
"type": "field",
"outboundTag": "cf-warp",
"ip": [
"geoip:cn",
"10.10.10.0/24"
]
}
]
}
增加 rules 规则,按 inboundTag
拦截所有请求并转发,例如:
"outbounds": [
{
"tag": "my-remote-server",
"protocol": "vmess",
"settings": {
"vnext": [
"address": "my-remote-server.com",
"port": 443,
"users": [{"xxxxxx-xxxxxx-xxxxxx-xxxxxx"}]
]
},
"streamSettings": {
"network": "tcp",
"security": "tls"
}
}
]
"routing": {
"rules": [
{
"type": "field",
"inboundTag": ["tcp"]
"outboundTag": "my-remote-server"
}
]
}
使用菜单中的添加用户功能,会自动增加一个 v2ray 客户端 UUID,生成一个 OpenVPN 的客户端证书配置
- guide.v2fly.org
- v2fly.org
- v2ray.com
- haproxy manual
- haproxy.com
- ocserv manual
- openvpn howto
- openvpn ref
- 科学上网 | 左耳朵耗子
- add help