Skip to content

PandaRyshan/ladder

Repository files navigation

README

这个 repo 提供了一个开箱即用的梯子部署方案。你只需要有一个域名和一个 VPS,就可以使用脚本通过 Docker 容器化部署 V2Ray(v5.14.1) 和 OpenVPN(v2.6.12) 服务。

组件

要求

  • 512MB RAM
  • Ubuntu / Debian / Arch / Fedora / CentOS
  • 拥有一个域名,并解析 prxdl 两个子域名到自己 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 配置

V2Ray 配置在 ladder 目录下的 info.txt 内,可以使用 cat 命令查看

将访问目标通过 v2ray 转发至 warp 访问

修改 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"
         ]
      }
   ]
}

转发所有请求至其他 v2ray 服务器

增加 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 的客户端证书配置

问题

参考

Todo

  • add help

About

Quick start of v2ray via docker compose and shell script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages