Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PIKACHUIM/CFWorkerUrls
A URL Short & STUN Redirect Service on Cloudflare Worker
https://github.com/PIKACHUIM/CFWorkerUrls
Last synced: 13 days ago
JSON representation
A URL Short & STUN Redirect Service on Cloudflare Worker
- Host: GitHub
- URL: https://github.com/PIKACHUIM/CFWorkerUrls
- Owner: PIKACHUIM
- License: apache-2.0
- Created: 2025-01-19T04:02:24.000Z (24 days ago)
- Default Branch: main
- Last Pushed: 2025-01-29T14:31:15.000Z (13 days ago)
- Last Synced: 2025-01-29T15:27:25.619Z (13 days ago)
- Language: HTML
- Size: 1.03 MB
- Stars: 9
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cloudflare - CFWorkerUrls
README
# Cloudflare Worker Short URL Server 短链接服务
利用Cloudflare Worker搭建一个无需服务器的短链接服务,支持:
1. 缩短您的网址URL,使它更容易书写或者点击访问
2. STUN服务器NAT端口转发,您无需公网IP即可使用
3. 支持API自动更新链接,支持到期自动删除Build a server free short link service using Cloudflare Worker, supporting:
1. Shorten your website URL to make it easier to write or click to access
2. STUN server NAT port forwarding, you don't need a public IP to use it
3. Support API automatic link update and automatic link deletion upon expirationDemo: https://1web.us.kg/
## Usages / 部署方式
### Clones / 克隆代码
```
git clone https://github.com/PIKACHUIM/CFWorkerUrls.git
cd CFWorkerUrls
npm install
cp wrangler.toml.example wrangler.toml
```### Config / 修改配置
修改`wrangler.toml`的内容
- `account_id`: 登录cloudflare,在workers-and-pages查看
- `FULL_URL`: 完整服务访问地址,比如https://1web.us.kg/
- `id`: 登录cloudflare-存储与数据库-KV-新建数据库查看ID
```
account_id = "******************************"
FULL_URL= "https://*********/"
id = "*****************************"
```### Deploy / 部署云端
```
wrangler login
wrangler deploy
```### Lucky Webhook
- 请求类型:POST
- 请求地址:`https://1web.us.kg/p/`
```json
{
"suffix": "网站后缀",
"tokens": "更新密码",
"typing": "http",
"ipaddr": "{ip}",
"porter": "{port}"
}
```
网站后缀和更新密码:https://1web.us.kg/### 自定义路径
修改`wrangler.toml`文件:
```yaml
...
[vars]
EDIT_SUB=true # <--- set true
EDIT_LEN=8
...
```