explaingit

byjoey/cfnew

12,955Audience · developerComplexity · 3/5Setup · moderate

TLDR

cfnew deploys a proxy tunnel on Cloudflare Workers or Pages supporting VLESS, Trojan, and xhttp protocols, with a browser-based management UI for configuring proxies and generating client subscription links.

Mindmap

mindmap
  root((cfnew))
    What it does
      Proxy tunnel
      Traffic routing
      Subscription links
    Tech stack
      Cloudflare Workers
      Cloudflare Pages
      Cloudflare KV
    Protocols
      VLESS
      Trojan
      xhttp
    Features
      Latency tester
      GUI management
      REST API
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Deploy a personal proxy server on Cloudflare's infrastructure to route internet traffic through an intermediary.

USE CASE 2

Generate subscription links for popular proxy client apps like CLASH, Surge, or Sing-Box from a graphical management interface.

USE CASE 3

Run latency tests on a list of candidate IP addresses and automatically refresh the subscription to always use the fastest ones.

USE CASE 4

Manage proxy IP addresses programmatically via the built-in REST API instead of the browser UI.

Tech stack

Cloudflare WorkersCloudflare PagesCloudflare KVJavaScript

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Cloudflare account with Workers and KV storage enabled, no server or VPS needed.

In plain English

cfnew is a tool that runs on Cloudflare Workers or Cloudflare Pages and sets up a proxy tunnel for routing internet traffic. It supports three network protocols: VLESS, Trojan, and xhttp. These protocols are commonly used by people who need to route their internet traffic through an intermediary server, typically to access services that may be restricted on a particular network. The project includes a graphical management interface that appears when you navigate to a specific URL path after deployment. From there, you can configure which protocols are active, set up proxy IP addresses, run latency tests on candidate IP addresses, and generate subscription links that work with popular proxy client apps. Ten supported clients are listed, including CLASH, Surge, Sing-Box, Shadowrocket, and several others. Configuration is stored in Cloudflare key-value storage (called KV). Changes made through the graphical interface take effect immediately without redeploying the Worker. The tool also exposes a REST API for adding and removing preferred IP addresses programmatically, if you prefer to manage things via scripts or the companion selection tool. A latency tester is built directly into the management page. You can supply a list of IP addresses or domains, test them with up to 50 concurrent threads, and filter results by region or limit output to the fastest ten. The subscription refreshes automatically every 15 minutes to pick the best available IPs at any given time. The interface supports both Chinese and Persian, switching automatically based on your browser language. The project builds on an earlier open-source project called edgetunnel and credits several other contributors for portions of the proxy IP logic.

Copy-paste prompts

Prompt 1
Walk me through deploying cfnew to Cloudflare Workers from scratch, including creating the KV namespace, setting the required environment variables, and accessing the management UI.
Prompt 2
Using cfnew's management interface, how do I add 20 IP addresses, run a latency test with 50 threads, and export a CLASH subscription link for my phone?
Prompt 3
How do I use cfnew's REST API to add and remove preferred proxy IPs programmatically from a script?
Open on GitHub → Explain another repo

← byjoey on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.