Stop Manually Updating Your Proxy Subscription Links—Let a Cloudflare Worker Do It
If you use VMess, VLESS, or Trojan nodes for development, testing, or personal browsing, you know the pain of maintaining subscription links. Preferred IPs change, servers go down, and you're constantly editing config files or regenerating links. It's tedious, repetitive work that feels like it should be automated.
That's exactly the problem WorkerVless2sub solves. It's a Cloudflare Worker that automatically generates optimized subscription links for VMess, VLESS, and Trojan nodes. You deploy it once, point it at your preferred server list, and it handles the rest—no more manually curating links every time your setup changes.
What It Does
WorkerVless2sub is a subscription link generator built on Cloudflare Workers. It takes your node configuration—whether that's a single VLESS or Trojan endpoint or a whole list of preferred IPs—and produces ready-to-use subscription URLs that work with standard proxy clients.
The architecture is straightforward. You deploy the Worker code to Cloudflare's edge network, configure it with environment variables (or by editing the script directly), and it serves subscription links at a custom endpoint. The Worker pulls from multiple sources: static IP lists you define, remote text files containing preferred IPs, and even CSV files from speed test tools.
Under the hood, it's a single JavaScript file (_worker.js) that runs on Cloudflare's infrastructure. You can deploy it either as a Pages project connected to your GitHub repo or as a standalone Worker. The core logic handles merging your node information (host, UUID, path, password) with your list of preferred servers, then generating subscription links in the right format.
Why It's Cool
What makes this project genuinely useful is how it handles the "preferred server" problem. If you've ever used Cloudflare's free tier as a proxy relay, you know that not all IPs perform equally. Some are fast, some are slow, and the good ones change over time.
WorkerVless2sub attacks this from three angles:
-
Multiple input sources. You can feed it static IPs directly in code, pull from a remote text file URL, or import speed test results from a CSV. That flexibility means you're not locked into one workflow for maintaining your server list.
-
Built-in quality filtering. The
DLSvariable lets you set a minimum speed threshold for IPs pulled from CSV files. If an IP doesn't meet your speed requirement, it gets dropped from the generated subscription. That's a clever way to keep your links clean without manual pruning. -
Support for both TLS and non-TLS endpoints. The
ADDandADDNOTLSvariables let you mix and match. You can include standard TLS endpoints (default port 443) alongside non-TLS options (default port 80), giving you fallback options when one route is blocked or slow. -
Remarkably easy customization. The whole thing is configured through environment variables.
HOST,UUID, andPATHfor VLESS nodes;HOST,PASSWORD, andPATHfor Trojan. You don't need to touch the code itself unless you want to hardcode your static IP list.
There's also a practical warning baked into the README: this is designed as a public service tool, not a way to expose your private nodes. The author explicitly notes that putting personal nodes in the LINK variable makes them available to everyone. That's an honest acknowledgment of the project's intended use case.
How to Try It
Getting started takes about ten minutes if you already have a Cloudflare account. Here's the quick path:
- Fork the repository at github.com/cmliu/workervless2sub and star it while you're there.
- Create a Cloudflare Pages project and connect it to your fork. Or, if you prefer Workers, create a new Worker and paste the contents of
_worker.jsinto the editor. - Set up your subscription endpoint. Add a
TOKENvariable (default isauto). Your subscription URL becomeshttps://your-domain/auto. - Configure your node details. For VLESS nodes, add
HOST,UUID, andPATHvariables. For Trojan nodes, addHOST,PASSWORD, andPATH. - Add your preferred servers. Either edit the
addressesarray in the code for static IPs, or setADDAPI/ADDNOTLSAPIto point at remote text files containing IP lists. You can also useADDCSVwith aDLSspeed threshold for test result imports.
The README includes detailed setup instructions with video tutorials if you get stuck. There's also a Telegram group linked in the project if you need community support.
One thing worth noting: if you deploy via Pages, you'll want to set up a custom domain (like sub.yourdomain.com) rather than using the default Pages subdomain. The README walks through this with a CNAME record pointing to your Pages project.
Final Thoughts
WorkerVless2sub isn't flashy, but it solves a real, recurring problem for anyone maintaining proxy subscriptions. The multi-source approach to server lists and the speed filtering are genuinely thoughtful touches. It's best suited for developers who are already comfortable with Cloudflare's ecosystem and want to automate their node management without building something from scratch.
The project is honest about its scope—it's a public service tool, not a private node manager. If you're looking for a way to generate clean, optimized subscription links without babysitting your config files, this is worth a try. Deploy it, point it at your preferred IP sources, and let it do the boring work.