Giter VIP home page Giter VIP logo

workervless2sub's Introduction

WorkerVless2sub

这个是一个将 Cloudflare Workers - VLESS 搭配 自建优选域名 的 订阅生成器

此 Cloudflare Workers 脚本根据指定的首选项和额外的动态地址生成 VLESS 订阅链接。它提供了一种简便的方式来设置具有首选地址的 VLESS 订阅,并支持从 API 获取额外的地址。

使用方法

要使用此 Cloudflare Workers,请按照以下步骤进行:

在您的 Cloudflare 帐户上部署 worker.js 脚本。 配置您的 VLESS 客户端以使用生成的订阅链接。

参数

该脚本支持以下参数:

host:您的 VLESS 服务器主机名。

uuid:您的 VLESS 客户端 UUID。

path(可选):您的 VLESS 的 WS 路径(没有可留空不填)。

路径要求

路径必须包含 "/sub"。例如:

https://[YOUR-WORKER-URL]/sub?host=[YOUR-HOST]&uuid=[YOUR-UUID]&path=[YOUR-PATH]

用您实际的值替换占位符,如 YOUR-WORKER-URLYOUR-HOSTYOUR-UUIDYOUR-PATH为空可不填。此外,根据您的具体用例考虑添加更多详细信息或自定义。

设置你的专属优选域名

请自行修改添加 addresses 参数即可,若不带端口号默认8443,不支持生成非TLS订阅,#号后为备注别名

let addresses = [
	'www.visa.com.hk:2096#假装是香港',
	'icook.tw:2053#假装是**',
	'cloudflare.cfgo.cc#真的是美国'
];

获取额外优选地址

脚本允许从 API 获取额外的地址。在脚本中设置 addressesapi 变量为 优选地址API接口 的 URL。

let addressesapi = [
  'https://raw.githubusercontent.com/cmliu/WorkerVless2sub/main/addressesapi.txt' //该接口只是示例,并不进行维护。可参考内容格式 自行搭建。
];

示例

请求

https://sub.cmliussss.workers.dev/sub?host=www.google.com&uuid=bbcd7623-bae1-4513-b177-f17f9c244327&path=ws

响应

响应将是一个 Base64 编码的 VLESS 订阅链接:

dmxlc3M6Ly95b3VyLWhvc3Q9eXlvdXIuaG9zdDpkb2N0OjQ0My9lZG=...

感谢

我自己的脑洞,SAKURA-YUMIvfarid

workervless2sub's People

Contributors

cmliu avatar github-actions[bot] avatar sakura-yumi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.