No description
Find a file
ZeroDeng 2b1c1884f3 refactor(api): 移除多余函数并优化变量命名
- 删除未使用的 `buildSurgeRenamedNodeLink` 函数,减少冗余代码。
- 统一将遍历变量名从 `node` 改为缩写 `n`,提升代码一致性。
- 替换调用中 `buildSurgeRenamedNodeLink` 为现有的 `buildRenamedNodeLink`,确保逻辑正确。
- 更新相关单元测试方法名称以匹配最新改动。
2026-06-09 10:19:36 +08:00
.github refactor(workflows,docs): 移除 Zeabur 部署相关工作流和文档 2026-05-16 17:51:35 +08:00
api refactor(api): 移除多余函数并优化变量命名 2026-06-09 10:19:36 +08:00
cache feat(lint): 引入 golangci-lint 并优化类型声明为 any 2026-05-11 15:43:30 +08:00
config feat(ui,config): 移除节点预览功能的实验性开关并调整相关逻辑 2026-05-12 18:21:09 +08:00
constants feat(nodes): 增强速度和延迟状态管理,统一状态显示和过滤逻辑 2025-12-12 14:19:38 +08:00
database refactor(models, services): 统一指针创建逻辑提升代码一致性 2026-06-08 18:33:35 +08:00
docs feat(i18n): 引入国际化支持与语言切换功能 2026-06-07 19:00:50 +08:00
dto feat(airports): 增加仅检测变化节点功能支持 2026-06-04 15:08:50 +08:00
internal/testutil feat(testutil): 添加用于测试的 SQLite 工具函数支持 2026-03-18 15:18:38 +08:00
middlewares feat(lint): 引入 golangci-lint 并优化类型声明为 any 2026-05-11 15:43:30 +08:00
models refactor(models, services): 统一指针创建逻辑提升代码一致性 2026-06-08 18:33:35 +08:00
node refactor(models, services): 统一指针创建逻辑提升代码一致性 2026-06-08 18:33:35 +08:00
routers feat(cloudflared): 支持 Cloudflare Tunnel 配置和管理 2026-05-14 16:28:22 +08:00
services refactor(models, services): 统一指针创建逻辑提升代码一致性 2026-06-08 18:33:35 +08:00
settings feat(lint): 引入 golangci-lint 并优化类型声明为 any 2026-05-11 15:43:30 +08:00
template feat(template): 更新默认模板 2026-05-17 20:17:06 +08:00
utils feat(i18n): 引入国际化支持与语言切换功能 2026-06-07 19:00:50 +08:00
webs feat(login): 优化主题与语言切换功能 2026-06-08 10:30:58 +08:00
.dockerignore fix: 清理old-webs目录旧文件 2025-12-08 18:11:51 +08:00
.env chore(deps): 升级 Go 至 1.24.3 2025-05-31 09:30:57 +08:00
.gitattributes chore(repo): 添加.gitattributes文件配置 2026-01-06 10:39:33 +08:00
.gitignore feat(airports): 支持显示更新后检测策略名称 2026-06-04 14:50:15 +08:00
.golangci.yml feat(i18n): 引入国际化支持与语言切换功能 2026-06-07 19:00:50 +08:00
AGENTS.md feat(i18n): 引入国际化支持与语言切换功能 2026-06-07 19:00:50 +08:00
config.example.yaml feat(config): 增加对可信反向代理的配置和支持 2026-03-18 23:00:19 +08:00
docker-compose.example.yml 多数据库版本支持 (#143) 2026-03-17 22:25:50 +08:00
Dockerfile refactor(docker): 简化 cloudflared 下载逻辑并移除版本校验 2026-05-14 18:24:36 +08:00
Dockerfile.ci refactor(docker): 简化 cloudflared 下载逻辑并移除版本校验 2026-05-14 18:24:36 +08:00
embed_dev.go chore(deps): 升级 Go 至 1.24.3 2025-05-31 09:30:57 +08:00
embed_prod.go chore(webs): 移除用户头像SVG图标文件 2025-12-08 11:01:32 +08:00
go.mod chore(dependencies): 更新依赖库版本至最新稳定版本 2026-06-08 18:14:26 +08:00
go.sum chore(dependencies): 更新依赖库版本至最新稳定版本 2026-06-08 18:14:26 +08:00
install.sh feat(install):重构安装脚本并增强功能 2025-12-15 17:50:38 +08:00
LICENSE docs(readme): 全面更新项目README文档,重新设计页面布局和内容结构 2025-12-09 21:48:09 +08:00
main.go feat(cloudflared): 支持 Cloudflare Tunnel 配置和管理 2026-05-14 16:28:22 +08:00
README.md feat(docs): 文档国际化 2026-06-05 16:07:44 +08:00
README.zh-CN.md feat(docs): 文档国际化 2026-06-05 16:07:44 +08:00
uninstall.sh feat(script): 添加一键卸载脚本 2025-12-15 17:40:27 +08:00
VERSION feat(workflows): 添加版本号写入流程并优化版本读取逻辑 2025-10-29 11:29:04 +08:00

Powerful proxy subscription management and conversion

Go Version React Version MUI Version Vite Version

Latest Release Release Date

Docker Stable Version Docker Pulls Docker Image Size

GitHub Stars GitHub Forks GitHub Issues License

Issues Releases

English | 简体中文


📖 Project Overview

SublinkPro is a deeply refactored and enhanced project based on the excellent open source projects sublinkX and sublinkE. Thanks to the original authors for their work and contributions.

Warning

⚠️ This project is not database compatible with the original projects. Don't mix their databases.

⚠️ Don't use this project, or any derivative of it, for activities that violate the laws and regulations of your location or the location of the users you serve. This project is for personal development, learning, and exchange only.


Highlights

Feature Description Details
🏷️ Smart tag system Automatic rule based tagging, no code filtering, IP quality conditions 📖
Professional speed test system Two stage tests, smart latency measurement, IP quality and unlock checks 📖
🔗 Chain proxy Native Dialer-Proxy support, visual configuration, IP quality based node selection 📖
🤖 AI template editing Generate template drafts from natural language, review with edit and diff views, apply or roll back locally 📖
✈️ Airport management Multi format import, scheduled updates, traffic monitoring, one click full refresh 📖
🗂️ Group ordering Drag airport priority within a group to control node order in subscription output 📖
📋 Subscription sharing Multiple links, expiration policies, access statistics 📖
🌐 Host management Domain mappings, DNS configuration, CDN preferred IPs 📖
☁️ Cloudflare Tunnel Expose the admin UI without a public IP, with cloudflared managed from the page 📖
🤖 Telegram Bot Remote speed tests, subscription management, system monitoring 📖
📜 Script system Node filtering, content post processing, chained scripts 📖
🔔 Webhooks Supports PushDeer, Bark, DingTalk, ServerChan, and other notification platforms 📖
🔐 Security features Token authorization, API Key, IP allow and block lists, access logs 📖

🚀 Quick Start

Important

Runtime data is stored in these directories by default. Keep them during upgrades and migrations:

  • ./db: database, configuration files, GeoIP, and other local data
  • ./template: template files
  • ./logs: runtime logs

Create docker-compose.yml:

services:
  sublinkpro:
    image: zerodeng/sublink-pro
    container_name: sublinkpro
    ports:
      - "8000:8000"
    volumes:
      - "./db:/app/db"
      - "./template:/app/template"
      - "./logs:/app/logs"
    restart: unless-stopped

Start the service:

docker-compose up -d

Open http://localhost:8000 and sign in with admin / 123456.

SQLite is used by default. To switch to MySQL or PostgreSQL, set the database connection through SUBLINK_DSN, dsn: in the config file, or the --dsn command line flag. See ⚙️ Configuration for examples.

Note

Even when SUBLINK_WEB_BASE_PATH is configured to hide the admin UI entry, API paths (/api/*) and subscription or share paths (/c/*) stay at the root path. This is a project specific frontend and backend integration rule.

Tip

For more install methods, including Docker, one line scripts, updates, and upgrades, see the 📦 Installation Guide.

Tip

The Docker image includes cloudflared. After signing in, open User Center -> Cloudflare Tunnel, enter the token, and start it. When auto connect is enabled, the Tunnel connects when the service starts.

Migrate from SQLite to MySQL / PostgreSQL

If your earlier instance used SQLite and you now want to migrate to MySQL or PostgreSQL, use this flow:

  1. Sign in to the old SQLite instance, open System Backup from the avatar menu in the upper right, and export backup.zip.
  2. Configure the DSN for MySQL or PostgreSQL in the new instance, and make sure the target database is a fresh empty database.
  3. Start the new instance and open Settings -> Data Migration.
  4. Upload the backup.zip exported from the old instance.
  5. Choose whether to migrate AccessKey and subscription access logs, then start the migration.
  6. After migration completes, manually restart the project instance, then sign in again and check the data.

Important

Using backup.zip is recommended. Uploading a .db file directly migrates database records only and won't restore the template directory.

Note

If you migrate AccessKey, make sure both old and new instances use the same API encryption key; otherwise old API Keys may no longer work.

Tip

If migration finishes with “N warnings”, open the corresponding “Database Migration” task in Task Center to view details.


📖 Documentation

🔧 Installation and Configuration

Document Description
📦 Installation Docker, one line scripts, updates, Watchtower automatic updates
⚙️ Configuration Environment variables, command line flags, CAPTCHA configuration

Feature Guides

Document Description
🏷️ Smart tag system Automatic rule based tagging, no code filtering, IP quality rules
Speed test system Test design, IP quality checks, unlock checks, parameter tuning
🌍 Unlock checks Streaming and AI availability checks, Provider architecture, extensions
🔗 Chain proxy Dialer-Proxy, condition based node selection, configuration flow
🤖 AI template editing AI generated template drafts, edit and diff review, local apply and rollback
✈️ Airport management Subscription import, scheduled updates, traffic monitoring
📋 Subscription sharing Multiple links, expiration policies, access statistics
🌐 Host management Domain mappings, DNS configuration, speed test persistence
☁️ Cloudflare Tunnel Create a Tunnel, get a token, configure public access
🤖 Telegram Bot Command list and setup guide
📜 Script support Node filtering, content post processing, function reference
🔐 Multi factor authentication, MFA TOTP setup, recovery codes, emergency reset flow

👨‍💻 Developers

Document Description
🛠️ Development Guide Project structure, local development, scheduled task development
🔌 Protocol Extension Guide Add a protocol, register capabilities, field metadata, ProtocolDemo example

📡 Multi Protocol Support

Client Supported protocols
v2ray base64 common format, without Clash/mihomo specific protocols such as Mieru
clash / mihomo ss, ssr, trojan, vmess, vless, hy, hy2, tuic, AnyTLS, Socks5, HTTP, HTTPS, Mieru
surge ss, trojan, vmess, hy2, tuic

Note

Mieru currently supports Clash/mihomo YAML import and export only. Official Mieru has mieru:// and mierus:// share links, but does not define a general URL schema suitable for field by field editing. For raw editing and Clash/mihomo import write back, SublinkPro uses an internal editable form: mieru://username:password@server:port?...#name, with port ranges written as portRange=2090-2099. v2ray and Surge don't support Mieru in SublinkPro. Subscription output skips that protocol instead of converting it to a downgraded form.


🖼️ Preview

Show or hide screenshots
Preview 1 Preview 2
Preview 3 Preview 4
Preview 5 Preview 6
Preview 7 Preview 8
Preview 9 Preview 10
Preview 11 Preview 12

📊 Project Stats

Star History Chart


🤝 Contributing and Support

If this project helps you, you are welcome to:

  • Star the project
  • 🐛 Open an Issue for bugs or suggestions
  • 🔧 Submit a Pull Request
  • 📖 Improve the docs and tutorials

If you need to buy a server, you can support the maintainer through the links below. Purchases through these links may provide commission rewards to the maintainer. Check official pages for exact pricing, promotion eligibility, network performance, and renewal rules.

  • BandwagonHost: premium routes, multiple data centers, and CN2 GIA options. Good for high quality route servers, or as a stable landing server with other nodes. Highlights: many VPS locations, CN2 GIA optimized routes, quality route machines.
  • Vultr: many regions, hourly billing, IP and region changes, starting at $2.5 per month. Good for websites, AI service hosting, route servers, and landing servers. Highlights: many regions, hourly billing, low price, stable service, IPv6 only machines.
  • Aliyun: 99 RMB per year server offer with the same price for new purchase and renewal. Good for domestic deployment and testing, including newapi and SublinkPro. Registration through the link may provide discounts, including AI related discounts. Highlights: suitable for China based deployment and development testing, 99 RMB per year new purchase and renewal, discount coupons.

🙏 Acknowledgements

Thanks to these open source projects:


Made with ❤️ by ZeroDeng01