{"id":17793385,"url":"https://github.com/surfboardv2ray/v2ray-refiner","last_synced_at":"2025-03-16T19:30:32.791Z","repository":{"id":259314107,"uuid":"864645727","full_name":"Surfboardv2ray/v2ray-refiner","owner":"Surfboardv2ray","description":"Use Cloudflare Workers to access your v2ray Vmess, Vless and Trojan configs through Websockets.","archived":false,"fork":false,"pushed_at":"2024-10-23T22:23:00.000Z","size":830,"stargazers_count":18,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-24T09:49:55.384Z","etag":null,"topics":["cf","cloudflare","cloudflare-workers","proxy","trojan","v2ray","vless","vmess","worker"],"latest_commit_sha":null,"homepage":"https://refiner.surfboardv2ray-configs.workers.dev/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Surfboardv2ray.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-09-28T19:16:10.000Z","updated_at":"2024-10-23T22:23:03.000Z","dependencies_parsed_at":"2024-10-24T12:31:03.182Z","dependency_job_id":null,"html_url":"https://github.com/Surfboardv2ray/v2ray-refiner","commit_stats":null,"previous_names":["surfboardv2ray/v2ray-refiner"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surfboardv2ray%2Fv2ray-refiner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surfboardv2ray%2Fv2ray-refiner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surfboardv2ray%2Fv2ray-refiner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surfboardv2ray%2Fv2ray-refiner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Surfboardv2ray","download_url":"https://codeload.github.com/Surfboardv2ray/v2ray-refiner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221667132,"owners_count":16860554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cf","cloudflare","cloudflare-workers","proxy","trojan","v2ray","vless","vmess","worker"],"created_at":"2024-10-27T11:08:18.903Z","updated_at":"2025-03-16T19:30:32.765Z","avatar_url":"https://github.com/Surfboardv2ray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  V2ray Refiner\n\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003e\nAccess your configs by handling websocket requests via Cloudflare.\n  \u003ch3\u003e\n    English 🇬🇧 | \u003ca href=\"README_FA.md\"\u003e🇮🇷 فارسی\u003c/a\u003e\n  \u003c/h3\u003e \n\u003c/h2\u003e\n\n\u003e * [YouTube Instructions](https://www.youtube.com/watch?v=3Z6h6clnqC4)\n\u003e * New Update!! [Deploy to Cloudflare Pages](./docs/pages_en.md)\n\n[![Version](https://img.shields.io/github/v/release/surfboardv2ray/v2ray-refiner?label=Version\u0026color=blue)](https://github.com/surfboardv2ray/v2ray-refiner/releases/latest)\n[![Download](https://img.shields.io/github/downloads/surfboardv2ray/v2ray-refiner/total?label=Downloads)](https://github.com/surfboardv2ray/v2ray-refiner/releases/latest)\n[![Stars](https://img.shields.io/github/stars/surfboardv2ray/v2ray-refiner?style=flat\u0026label=Stars\u0026color=tomato\n)](https://github.com/surfboardv2ray/v2ray-refiner)\n\n## Introduction\n🟢 In an environment where direct connection to v2ray configs is not available, this alternative way can route the traffic to the destination server via Cloudflare.\n\n## Prerequisites\n1. Login or Signup at https://dash.cloudflare.com and verify your email address.\n2. Head to `Workers and Pages` to create and name a worker.\n3. Click `Edit Code` code to enter the editing environment.\n\n![0](./assets/redline.gif)\n\n## TLS Version (Cloudflare-registered domain with PROXY switched to ON)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/tls.jpg\" alt=\"html.jpg\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n🟡 This method only works if your v2ray panel has a domain registered on Cloudflare with a TLS certificate, and Cloudflare proxy status switch to ON. \n\n🟡 In your VPS v2ray panel, create a config with these specifications:\n* Type: Vmess, Vless or Trojan\n* Transporation: Websocket (WS)\n* Security: TLS\n* Host: Cloudflare-registered TLS-Certified Domain/Subdomain\n* Port: 443\n\n🟡 Get the latest version of the [TLS V2ray Refiner Worker Script](https://github.com/Surfboardv2ray/v2ray-refiner/releases/latest/download/_worker.js), copy and paste/upload the entire content to your Cloudflare worker and hit deploy. (Alternatively, you could copy the worker script from [here](./tls_worker.js))\n\n🟡 Open the deployed version of the worker and enter the TLS config you created on your VPS, and hit `Refine`.\n\n![0](./assets/redline.gif)\n\n## Non-TLS Version (No Cloudflare-registered domains, or domain with no TLS Certification)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/non-tls.jpg\" alt=\"html.jpg\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n🟠 This method only works if your v2ray panel is not bound to a Cloudflare-registered domain, or the domain doesn't have a TLS Certificate. \n\n🟠 First create a hostname with Type A pointing to your server IPv4 address, in any free DNS websites like https://noip.com/\n\n🟠 In your VPS v2ray panel, create a config with these specifications:\n* Type: Vmess, Vless or Trojan\n* Transporation: Websocket (WS)\n* Security: None\n* Host: Hostname pointing to your server's IP Address (If on Cloudflare, switch the PROXY to OFF)\n* Port: 80\n\n🟠 Get the latest version of the [Non-TLS V2ray Refiner Worker Script](https://github.com/Surfboardv2ray/v2ray-refiner/releases/latest/download/_worker.js), copy and paste/upload the entire content to your Cloudflare worker and hit deploy. (Alternatively, you could copy the worker script from [here](./nontls_worker.js))\n\n🟠 Open the deployed version of the worker and enter the Non-TLS config you created on your VPS. Set the hostname to the one you created in step 2. Enter a clean Cloudflare IP address that works on your network, and finally, hit `Refine Config`.\n\n![0](./assets/redline.gif)\n\n## Editing the Non-TLS Script\n🟢 The default port is 80. If your VPS config uses another port, edit the port in the script over at  `const workerPort = 80` and `url.port = 80` accordingly (You need to edit both).\n\n## Editing the TLS Script\n🟢 Allowed ports are those of Cloudflare TLS (443, 8443, 2053, 2083, 2087, 2096), changeable under `const allowedPorts`.\n\n## Additional Notes\n🟢 You could get Clean IPs via [IRCF Space Repo](https://github.com/ircfspace/cf2dns/blob/master/list/ipv4.json), but it's recommended to use [Scanners](https://ircf.space/scanner.html).\n\n![0](./assets/redline.gif)\n\n## Acknowledgements\n* Handling Websockets snippet and the idea of Rewriting Configs UI tribute to Vfarid's [v2ray-worker-merge](https://github.com/vfarid/v2ray-worker-merge/tree/main).\n* Handling Non-TLS configs snippet tribute to [GetAFreeNode](https://getafreenode.com/blog/index.php/tutorial/31.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurfboardv2ray%2Fv2ray-refiner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurfboardv2ray%2Fv2ray-refiner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurfboardv2ray%2Fv2ray-refiner/lists"}