Cloudflare 提供内容交付网络(CDN)
服务、DDoS 缓解、互联网安全和分布式域名服务器(DNS)
服务,位于访问者和 Cloudflare
用户的托管提供商之间,充当网站的反向代理
介绍
相关产品
- Cloudflare Turnstile 是一款替代 CAPTCHA 的免费工具
客户端
yarn global add wrangler
$ wrangler login
$ wrangler whoami
help
$ wrangler --help
wrangler
Commands:
wrangler docs [command..] 📚 Open wrangler's docs in your browser
wrangler init [name] 📥 Initialize a basic Worker project, including a wrangler.toml file
wrangler generate [name] [template] ✨ Generate a new Worker project from an existing Worker template. See https://github.com/cloudflare/workers-sdk/tree/main/templates
wrangler dev [script] 👂 Start a local server for developing your worker
wrangler deploy [script] 🆙 Deploy your Worker to Cloudflare. [aliases: publish]
wrangler delete [script] 🗑 Delete your Worker from Cloudflare.
wrangler tail [worker] 🦚 Starts a log tailing session for a published Worker.
wrangler secret 🤫 Generate a secret that can be referenced in a Worker
wrangler kv 🗂️ Interact with your Workers KV Namespaces
wrangler pages ⚡️ Configure Cloudflare Pages
wrangler queues 🇶 Configure Workers Queues
wrangler r2 📦 Interact with an R2 store
wrangler dispatch-namespace 📦 Interact with a dispatch namespace
wrangler d1 🗄 Interact with a D1 database
wrangler hyperdrive 🚀 Configure Hyperdrive databases
wrangler ai 🤖 Interact with AI models
wrangler vectorize 🧮 Interact with Vectorize indexes
wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
wrangler mtls-certificate 🪪 Manage certificates used for mTLS connections
wrangler login 🔓 Login to Cloudflare
wrangler logout 🚪 Logout from Cloudflare
wrangler whoami 🕵️ Retrieve your user info and test your auth config
wrangler types [path] 📝 Generate types from bindings & module rules in config
wrangler deployments 🚢 List and view details for deployments
wrangler rollback [deployment-id] 🔙 Rollback a deployment
Flags:
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
-c, --config Path to .toml configuration file [string]
-e, --env Environment to use for operations and .env files [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
workers
Zero Trust
代理SSH示例
wget https://github.com/shadow1ng/fscan/releases/download/1.8.4/fscan_mac
mv fscan_mac fscan
chmod a+x fscan
./fscan -h 192.168.5.1/24 -m ssh -p 22
ssh root@192.168.5.27
curl -L --output cloudflared-linux-arm64.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb &&
sudo dpkg -i cloudflared.deb &&
sudo cloudflared service install eyJhIjoi...
-
代理 Service,参考
- Type: SSH
- URL:
localhost:22
-
Connect as a user
vim ~/.ssh/config
Host ssh.example.com
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
# login
ssh <username>@ssh.example.com
其他