Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

vpnhood-token-updater

A lightweight Cloudflare Worker that allows VpnHood Manager to securely publish a farm-token.txt file to the edge — and serve it publicly from a fast, global CDN.


✨ Features

  • ✅ Public GET: anyone can access /farm-token.txt
  • ✅ Authenticated POST: only authorized clients can upload/update
  • ✅ Built with Cloudflare Workers + KV storage
  • ✅ Compatible with VpnHood’s “Farm Token URL” publishing
  • ✅ No backend server needed

🚀 Quick Deploy (via Wrangler)

npm install -g wrangler
git clone https://github.com/your-username/vpnhood-token-updater.git
cd vpnhood-token-updater
wrangler login
wrangler kv:namespace create "FARM_TOKENS"
wrangler secret put API_TOKEN
wrangler deploy

🔐 Security Model

Method Endpoint Access
GET /farm-token.txt Public
POST /farm-token.txt Bearer Token (env.API_TOKEN)

📥 VpnHood Configuration

Field Value
Publish URL https://vpnhood-token-updater..workers.dev/farm-token.txt
Access Token Your API token (e.g. wF9mX38UjPYr2nDbLkq7RZc0AH6BsEvo)
Auto Upload POST
Headers Authorization: Bearer {access_token}
Body {farm_token}

About

A lightweight Cloudflare Worker that allows **VpnHood Manager** to securely publish a `farm-token.txt` file to the edge — and serve it publicly from a fast, global CDN.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages