{"id":47796424,"url":"https://github.com/iotames/v2raypool","last_synced_at":"2026-04-03T16:25:30.665Z","repository":{"id":191540881,"uuid":"684934158","full_name":"iotames/v2raypool","owner":"iotames","description":"v2ray proxy pool: 同时运行多个v2ray代理，暴露多个本地IP端口，组成简单的IP代理池。","archived":false,"fork":false,"pushed_at":"2025-10-31T02:26:45.000Z","size":23876,"stargazers_count":139,"open_issues_count":8,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-31T04:22:57.371Z","etag":null,"topics":["proxies","proxy","proxy-list","proxy-server","proxypool","v2ray"],"latest_commit_sha":null,"homepage":"https://iotames.github.io/v2raypool/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotames.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-30T06:42:10.000Z","updated_at":"2025-10-31T02:26:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5fafcd4-a513-4cfd-afa6-97e136a99a3c","html_url":"https://github.com/iotames/v2raypool","commit_stats":null,"previous_names":["iotames/v2raypool"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/iotames/v2raypool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fv2raypool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fv2raypool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fv2raypool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fv2raypool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotames","download_url":"https://codeload.github.com/iotames/v2raypool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fv2raypool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31362723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["proxies","proxy","proxy-list","proxy-server","proxypool","v2ray"],"created_at":"2026-04-03T16:25:29.949Z","updated_at":"2026-04-03T16:25:30.653Z","avatar_url":"https://github.com/iotames.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n   \u003cp\u003e\n   \u003cimg style=\"width:200px\" alt=\"V2rayPool\" src=\"https://raw.githubusercontent.com/iotames/v2raypool/master/main/resource/v2raypool.logo.png\"\u003e\n   \u003c/p\u003e\n  \u003cstrong\u003e简单易用的v2ray客户端和代理池服务\u003c/strong\u003e\n\u003cbr\u003e\n\n\u003c/div\u003e\n\n\n## 简介\n\n[![GoDoc](https://badgen.net/badge/Go/referenct)](https://pkg.go.dev/github.com/iotames/miniutils)\n[![License](https://badgen.net/badge/License/MIT/green)](https://github.com/iotames/miniutils/blob/main/LICENSE)\n\n- 纯Go语言实现，Linux, Win, IOS 全平台支持\n- 同时运行多个v2ray代理，组成IP代理池\n- 使用gRPC接口控制和WebUI网页交互\n\n`gRPC` 接口请参照数据定义文件: `v2raypool.proto`\n\n[项目文档: https://iotames.github.io/v2raypool/](https://iotames.github.io/v2raypool/)\n\n\n## 用途\n\n1. 多个本地监听端口，组成简单的IP代理池。可供爬虫等程序调用。\n2. 选择单个节点设为系统代理，可作为普通的v2ray客户端使用。\n\n\n\n## 用户界面\n\n提供 `gRPC接口` 和 `Web网页` 两种交互方式。\n\n代理池节点列表:\n![WebUI面板1](https://raw.githubusercontent.com/iotames/v2raypool/master/screenshot_proxypool.jpg)\n\nv2ray服务进程列表:\n![WebUI面板2](https://raw.githubusercontent.com/iotames/v2raypool/master/screenshot_v2ray.jpg)\n\nWindows代理设置: `网络和Internet` -\u003e `代理` -\u003e `手动设置代理`\n\n## 使用说明\n\n不想自己编译项目源码，可下载[Release压缩包](https://github.com/iotames/v2raypool/releases)直接使用，再看第4-5步的使用说明。\n\n### 1. 下载依赖\n\n运行命令: `go mod tidy`\n\n1.1 如因网络问题下载失败，可设置模块代理。运行命令:\n```\ngo env -w GOPROXY=https://goproxy.cn,direct\n# 或者 go env -w GOPROXY=https://goproxy.io,direct\n```\n\n1.2 若出现依赖包版本冲突，请删除 `go.mod` 文件，再运行命令:\n```\ngo mod init github.com/iotames/v2raypool\ngo mod tidy\n```\n\n### 2. 编译可执行文件\n\n2.1 编译\n\n```\n# 进入项目 main 目录，并执行go编译命令\ncd main\n\n# linux或mac 运行: go build -o v2raypool -trimpath -ldflags \"-s -w -buildid=\" .\ngo build -o v2raypool.exe -trimpath -ldflags \"-s -w -buildid=\" .\n```\n\n编译出二进制可执行文件 `v2raypool`(linux or max) 或 `v2raypool.exe`(windows)\n\n2.2 生成配置文件\n\n命令行运行可执行文件(v2raypool.exe 或 ./v2raypool)，会生成配置文件 `.env`。并提示找不到v2ray核心文件：\n\n```\nv2raypool.exe\n请检查配置文件，路径:(.env)\nVP_V2RAY_PATH 配置项错误，找不到可执行文件。\n请下载v2ray核心文件(https://github.com/v2fly/v2ray-core/releases)\n```\n\n### 3. 下载v2ray核心文件\n\n3.1 官网下载核心文件Zip压缩包: https://github.com/v2fly/v2ray-core/releases\n\n3.2 解压到 `main/bin` 目录，并删除或改名解压后的 `config.json` 文件，防止程序错误读取。\n\n3.3 检查或修改v2ray `可执行文件路径`: 查看 `.env` 配置文件的 `VP_V2RAY_PATH` 配置项。\n\n\n### 4. 设置订阅地址\n\n设置代理节点的订阅源地址，请更改 `.env` 文件的 `VP_SUBSCRIBE_URL` 配置项，配置值为http网络地址。\n\n若网络地址访问异常，可使用 `VP_SUBSCRIBE_DATA_FILE` 配置项。设法查看订阅地址的响应结果，保存到文件 `subscribe_data.txt`。支持 `Clash` 的 `.yml` 文件格式。\n\n\n### 5. 运行服务端和客户端\n\n5.1 服务端\n\n可执行文件直接运行，会启动 `gRPC` 和 `WebUI` 服务端。\n首次运行，会自动生成 `.env` 和 `default.env` 配置文件。\n\n```\n# linux 或 mac 执行 ./v2raypool\nv2raypool.exe\n```\n\n5.2 客户端\n\n客户端有 `WebUI` 和 `gRPC` 两种。\n\n1. `WebUI` 网页面板: [http://127.0.0.1:8087](http://127.0.0.1:8087). `windows` 环境下网页会自动打开。\n\n2. `gRPC` 通用接口：详见 `v2raypool.proto` 文件\n\n```\n# 启动v2ray代理池，激活所有代理节点。\nv2raypool.exe --startproxynodes\n\n# 查看v2ray代理池信息(包括：本地代理端口号，测速结果，运行状态，测速时间，节点名，节点索引)\nv2raypool.exe --getproxynodes\n\n# 临时设置默认的URL测速地址。默认为 .env 文件中 VP_TEST_URL 配置项的值。\nv2raypool.exe --setproxytesturl\n\n# 测速(测速基准使用https://www.google.com)。测速结束后，会自动选择最快的节点作为系统代理节点。\nv2raypool.exe --testproxynodes\n\n# 指定已测速过的域名，按速度从快到慢，查看代理节点信息\nv2raypool.exe --getproxynodesbydomain=www.google.com\n\n# 根据索引值激活某个节点为系统代理的端口（--getproxynodes 命令可查看索引值，系统代理端口从VP_HTTP_PROXY的值读取）\nv2raypool.exe --activeproxynode=16\n\n# 更新订阅。更新节点的同时，也会更新 subscribe_data.txt 数据文件\nv2raypool.exe --updateproxynodes\n\n# 停止所有节点\nv2raypool.exe --stopproxynodes\n```\n\n\n### 6. Linux配置systemd系统服务(可选)\n\nLinux平台通过配置 `v2raypool.service` ，可使用 `systemctl` 系统命令来管理 `v2raypool`。\n可使用环境变量 `VP_ENV_FILE` 定义配置文件的路径。不设置默认为 `.env`\n\n1. 新建 `v2raypool.service` 文件：\n\n```\nvim /usr/lib/systemd/system/v2raypool.service\n```\n\nv2raypool.service内容示例(/root/v2raypool/main 为可执行文件所在路径):\n```\n[Unit]\nDescription=v2ray proxy pool\nAfter=network.target\n\n[Service]\nWorkingDirectory=/root/v2raypool/main\nExecStart=/root/v2raypool/main/v2raypool\nUser=root\nRestart=on-failure\nRestartSec=300\n# KillSignal=SIGQUIT\nTimeoutStopSec=10\nStandardOutput=file:/root/v2raypool/main/output.log\nStandardError=file:/root/v2raypool/main/output.err.log\n\n[Install]\nWantedBy=multi-user.target\n```\n\n2. 重载systemd配置\n\n```\nsystemctl daemon-reload\n```\n\n3. 使用 systemctl 管理v2raypool的gRPC服务端\n\n```\nsystemctl status v2raypool\nsystemctl start v2raypool\nsystemctl stop v2raypool\n```\n\n## 配置说明\n\n在 `main` 目录编译生成可执行文件，首次运行会生成2个文件:\n\n- `default.env`: 显示所有配置项的默认值，不应修改此文件。\n- `.env`: 程序配置文件。更改后可覆盖 default.env 文件中的默认值。\n\n```\n# 该目录存放程序运行时产生的文件\nVP_RUNTIME_DIR = \"runtime\"\n\n# 傻瓜模式。当配置满足条件时，应用启动后，自动运行所有节点，执行测速，并设置速度最快的节点为系统代理。\n# 适合打包现成的配置和应用，直接分享给小白用。\nVP_AUTO_START = true\n\n# Web服务器端口。设置为0可禁用Web面板\nVP_WEB_SERVER_PORT = 8087\n\n# 代理池的gRPC服务端口\nVP_GRPC_PORT = 50051\n\n# v2ray可执行文件路径\n# 例: \"D:\\\\Users\\\\yourname\\\\v2ray-windows-64\\\\v2ray.exe\" or \"/root/v2ray-linux64/v2ray\"\nVP_V2RAY_PATH = \"bin/v2ray.exe\"\n\n# 代理节点订阅地址\n# 支持 http:// 和 socks5:// 协议\nVP_SUBSCRIBE_URL = \"\"\n\n# 若订阅地址无法直接访问，可指定订阅数据文件，数据文件内容为访问订阅地址获取的原始数据。\n# 若有设置订阅数据文件，且文件内容不为空。则优先从该文件读取订阅节点信息。\n# 支持Clash的.yml订阅文件。\nVP_SUBSCRIBE_DATA_FILE = \"subscribe_data.txt\"\n\n# 设置HTTP代理，代理池每个节点的本地端口号，往后开始累加。为防止与常用端口冲突，尽量设大点。\nVP_HTTP_PROXY = \"http://127.0.0.1:30000\"\n\n# 节点测速的URL\nVP_TEST_URL = \"https://www.google.com\"\n```\n\n\n## 订阅节点\n\n\n### 已支持的出站协议\n\n| 出站协议   | 订阅数据格式 | 是否支持 |\n| -----     | ----------- | ------- |\n| vmess://  |   base64    |   ✅   |\n| ss://     |   base64    |   ✅   |\n| trojan:// |   -         |   ✅   |\n| ssr://    |   -         |   ❌   | \n\n- ✅ 已支持\n- ⛏️ 开发中\n- ❌ 不支持\n\n### 订阅数据格式\n\n1. `VP_SUBSCRIBE_URL`: 订阅源的地址配置。填写 `http` 开头的URL网址。\n\n2. `订阅数据`: 访问订阅源的URL地址得到的原始数据。数据可能被BASE64编码过，可保存为 `subscribe_data.txt` 文件，并配置 `VP_SUBSCRIBE_DATA_FILE` 选项。\n\n`订阅数据` 经过 `base64解码` 后，得到以 `\\n` 换行符分割的多个代理节点信息。\n\n每个节点信息，可能都被Base64编码过(vmess://)，也可能是明文(vless://)，或者二者混合(ss://)。如下所示:\n\n```\nvmess://eyJhZGQiOiAiMjAyLjc4LjE2Mi41IiwgImFpZCI6IDAsICJob3N0IjogImlyc29mdC5zeXRlcy5uZXQiLCAiaWQiOiAiMmZmOTdjNmQtODU1Ny00MmE0LWI0M2YtMTljNzdjNTk1OWVhIiwgIm5ldCI6ICJ3cyIsICJwYXRoIjogIi9AZm9yd2FyZHYycmF5IiwgInBvcnQiOiA0NDMsICJwcyI6ICJnaXRodWIuY29tL2ZyZWVmcSAtIFx1NTM3MFx1NWVhNiAgMiIsICJ0bHMiOiAidGxzIiwgInR5cGUiOiAiYXV0byIsICJzZWN1cml0eSI6ICJhdXRvIiwgInNraXAtY2VydC12ZXJpZnkiOiB0cnVlLCAic25pIjogIiJ9\nvless://26DL68CE-DL93-8342-LQ8F-317F4A6E7J76@45.43.31.159:443?encryption=none\u0026security=reality\u0026sni=azure.microsoft.com\u0026fp=safari\u0026pbk=c7qU9-_0WflwIKUiZFxSss_xw-2AP3jB1ENxKLI0OTw\u0026type=tcp\u0026headerType=none#u9un-US-Xr1\nss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTozNlpDSGVhYlVTZktqZlFFdko0SERW@185.242.86.156:54170#github.com/freefq%20-%20%E4%BF%84%E7%BD%97%E6%96%AF%20%201\nss://YWVzLTI1Ni1nY206N0JjTGRzTzFXd2VvR0QwWA@193.243.147.128:40368#github.com/freefq%20-%20%E6%B3%A2%E5%85%B0%20%205\nvmess://eyJhZGQiOiAic2VydmVyMzEuYmVoZXNodGJhbmVoLmNvbSIsICJhaWQiOiAwLCAiaG9zdCI6ICJzZXJ2ZXIzMS5iZWhlc2h0YmFuZWguY29tIiwgImlkIjogIjQxNTQxNDNjLWJiYmEtNDdhNC05Zjc5LWMyZWQwODdjYmNjOSIsICJuZXQiOiAid3MiLCAicGF0aCI6ICIvIiwgInBvcnQiOiA4ODgwLCAicHMiOiAiZ2l0aHViLmNvbS9mcmVlZnEgLSBcdTdmOGVcdTU2ZmRDbG91ZEZsYXJlXHU1MTZjXHU1M2Y4Q0ROXHU4MjgyXHU3MGI5IDYiLCAidGxzIjogIiIsICJ0eXBlIjogImF1dG8iLCAic2VjdXJpdHkiOiAiYXV0byIsICJza2lwLWNlcnQtdmVyaWZ5IjogdHJ1ZSwgInNuaSI6ICIifQ==\n```\n\n3. 由于协议不支持，数据格式不兼容，等原因造成的节点解析失败，都会被忽略，然后继续解析下个节点。\n\n4. `vmess` 节点信息再次经过 `BASE64解码` 后，解析为JSON字符串格式。如下所示:\n\n```\n{\"add\":\"us0.xxx.top\",\"host\":\"\",\"id\":\"93EA57CE-EA21-7240-EE7F-317F4A6A8B65\",\"net\":\"ws\",\"path\":\"\",\"port\":\"444\",\"ps\":\"xxx-v2-US-LosAngeles0\",\"tls\":\"\",\"type\":\"none\",\"v\":2,\"aid\":0}\n```\n\n### 调试工具\n\n- [base64在线解码](https://base64.us/)\n\n\n## 路由规则\n\n支持自定义域名和IP列表配置:\n\n- PROXY_DOMAIN_LIST 代理域名列表\n- DIRECT_DOMAIN_LIST 直连域名列表\n- PROXY_IP_LIST 代理IP列表\n- DIRECT_IP_LIST 直连IP列表\n\n\n域名匹配规则（使用geosite规则，可能要 `geosite.dat` 文件支持）:\n\n- `纯字符串`：当此字符串匹配`目标域名中任意部分`，该规则生效。比如 `sina.com` 可以匹配 `sina.com`、`sina.com.cn`、`sina.company` 和 `www.sina.com`，但不匹配 `sina.cn`。\n- `正则表达式`：由 `regexp:` 开始，余下部分是一个正则表达式。当此正则表达式匹配目标域名时，该规则生效。例如 `regexp:\\.goo.*\\.com$` 匹配 `www.google.com`、`fonts.googleapis.com`，但不匹配 `google.com`。\n- `子域名（推荐）`：由 `domain:` 开始，余下部分是一个域名。当此域名是目标域名或其子域名时，该规则生效。例如 `domain:v2ray.com` 匹配 `www.v2ray.com`、`v2ray.com`，但不匹配 `xv2ray.com`。\n- `完整匹配`：由 `full:` 开始，余下部分是一个域名。当此域名完整匹配目标域名时，该规则生效。例如 `full:v2ray.com` 匹配 `v2ray.com` 但不匹配 `www.v2ray.com`。\n- `预定义域名列表`：由 `geosite:` 开头，余下部分是一个类别名称（域名列表），如 `geosite:google` 或者 `geosite:cn`。名称及域名列表参考[预定义域名列表](https://www.v2fly.org/config/routing.html#%E9%A2%84%E5%AE%9A%E4%B9%89%E5%9F%9F%E5%90%8D%E5%88%97%E8%A1%A8)。\n- `从文件中加载域名`：形如 `ext:file:tag`，必须以 `ext:` 开头，后面跟文件名和标签，文件存放在[资源目录](https://www.v2fly.org/config/env.html#%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6%E8%B7%AF%E5%BE%84)中，文件格式与 `geosite.dat` 相同，标签必须在文件中存在。\n\nIP匹配规则（使用geoip规则，可能要 `geoip.dat` 文件支持）:\n\n- `IP`：形如 `127.0.0.1`。\n- `CIDR`：形如 `10.0.0.0/8`。\n- `GeoIP`：\n形如 `geoip:cn` 为正向匹配，即为匹配「中国大陆 IP 地址」。后面跟双字符国家或地区代码，支持所有可以上网的国家和地区。\n\n形如 `geoip:!cn` 为反向匹配，即为匹配「非中国大陆 IP 地址」。后面跟双字符国家或地区代码，支持所有可以上网的国家和地区。\n\n特殊值：`geoip:private`（V2Ray 3.5+），包含所有私有地址，如 `127.0.0.1`。\n\n- 从文件中加载 IP：\n形如 `ext:file:tag` 和 `ext-ip:file:tag` 为正向匹配，即为匹配 「tag 内的 IP 地址」。\n\n形如 `ext:file:!tag` 和 `ext-ip:file:!tag` 为反向匹配，即为匹配「非 tag 内的 IP 地址」。\n\n必须以 `ext:` 或 `ext-ip:` 开头，后面跟文件名、`标签`或 `!标签`，文件存放在[资源目录](https://www.v2fly.org/config/env.html#%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6%E8%B7%AF%E5%BE%84)中，文件格式与 `geoip.dat` 相同，标签必须在文件中存在。\n\n具体请参看 [v2ray路由规则](https://www.v2fly.org/config/routing.html#ruleobject)\n\n## 开发相关\n\n### gRPC接口\n\n1. 使用proto数据格式定义文件: `./v2raypool.proto` 可实现跨语言调用\n2. Go语言的gRPC接口文件位于 `./grpc` 目录。引用包名: `github.com/iotames/v2raypool/grpc`\n3. 调用过程参考代码文件: `./main/main_grpc.go`\n\n```\n# 从proto数据格式文件生成可供Go语言调用的代码包\nprotoc --go_out=./ --go-grpc_out=./ v2raypool.proto\n```\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=iotames/v2raypool\u0026type=Date)](https://star-history.com/#iotames/v2raypool\u0026Date)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotames%2Fv2raypool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotames%2Fv2raypool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotames%2Fv2raypool/lists"}