explaingit

yonggekkk/cloudflare-vless-trojan

14,610JavaScriptAudience · ops devopsComplexity · 4/5MaintainedSetup · moderate

TLDR

Chinese-language toolkit of scripts and Cloudflare Workers and Pages templates for self-hosting VLESS and Trojan proxy nodes on Cloudflare, with ECH-TLS and ProxyIP options.

Mindmap

mindmap
  root((Cloudflare-vless-trojan))
    Inputs
      Cloudflare account
      UUID or password
      ProxyIP
      Preferred IP list
    Outputs
      VLESS nodes
      Trojan nodes
      Subscription links
      Socks5 or HTTP proxy
    Use Cases
      Self-host a proxy
      Bypass blocked sites
      Share nodes with friends
    Tech Stack
      JavaScript
      Cloudflare Workers
      Cloudflare Pages
      Docker
      Shell
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 VLESS or Trojan proxy node on your own Cloudflare Workers or Pages account

USE CASE 2

Run a local Socks5 or HTTP proxy on a home router or small Linux box using the cfsh Docker image

USE CASE 3

Pick optimized Cloudflare IPs and ports per node for faster connections from China

USE CASE 4

Set a ProxyIP so blocked sites like X, ChatGPT, and Cloudflare pages are reachable through the node

Tech stack

JavaScriptCloudflare WorkersCloudflare PagesDockerShell

Getting it running

Difficulty · moderate Time to first run · 1h+

Documentation is Chinese-only and many flags assume familiarity with Cloudflare Workers, VLESS, Trojan, and proxy client apps.

In plain English

This repository is a Chinese-language toolkit for setting up personal proxies through Cloudflare. It bundles two main approaches. The first is a local script, also offered as the Docker image ygkkk/cfsh, that runs on a home router or a small Linux box and turns Cloudflare Workers or Pages into a Socks5 or HTTP proxy. The second is a set of Cloudflare Workers and Pages scripts that you deploy to your own Cloudflare account to host VLESS or Trojan proxy nodes. The local script supports three proxy modes: ECH-TLS, regular TLS, and no TLS. The README explains that ECH adds extra encryption at the TLS handshake stage, and that the script lets you pick which port system to use, 80 series or 443 series, with specific port numbers listed. You configure it through a small set of variables, such as the Cloudflare domain and port, an optional token, a local client port, a preferred IP or domain, an optional ProxyIP, the DNS-over-HTTPS endpoint, and switches for ECH and for split-tunnel routing between traffic inside and outside China. The Workers and Pages deployment path is aimed at less technical users. Default node IPs are official Cloudflare addresses, so the README says you do not need to constantly refresh subscriptions to get new optimized IPs. You set a UUID for VLESS or a password for Trojan, optionally a ProxyIP for reaching Cloudflare-blocked sites like X, ChatGPT, or Cloudflare's own pages, and optionally up to thirteen preferred IPs with matching ports for subscription links. The README notes that path-based ProxyIP only affects the single node where it is set, while a global ProxyIP affects all nodes that have not overridden it. There is a section about building your own ProxyIP or reverse-proxy IP using the REALITY protocol on a cheap IPv6 VPS near China, with links to two sibling scripts called x-ui-yg and sing-box-yg. The README lists official Cloudflare IP ranges and points to several Windows tools for testing and picking the fastest IP. The last sections cover client app recommendations and the fragment trick used to slip TLS nodes past blocked Workers domains. Supported clients include v2rayNG and Nekobox on Android, v2rayN and Hiddify on Windows, Karing and Shadowrocket on iOS, and Passwall on routers. Many links point to YouTube tutorials. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Give me a 5-minute setup guide for deploying the VLESS Worker template from this repo to my own Cloudflare account
Prompt 2
Explain how to choose between ECH-TLS, TLS, and no TLS modes in the cfsh local script and what each one buys me
Prompt 3
Show me how to configure a global ProxyIP across all nodes versus a path-based ProxyIP on one node
Prompt 4
Walk me through importing the generated subscription link into v2rayNG on Android and Hiddify on Windows
Prompt 5
How do I run ygkkk slash cfsh in Docker on a home router and expose the Socks5 port on my LAN
Open on GitHub → Explain another repo

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

Verify against the repo before relying on details.