Spaces:
Paused
Paused
feat: expand Cloudflare proxy support to include Discord and Google services while streamlining configuration settings
Browse filesFiles changed (5)
169 unmodified lines170171172173174175169 unmodified lines# Multiple user IDs (comma-separated for team access)# TELEGRAM_USER_IDS=123456789,987654321,555555555# ββ OPTIONAL: Workspace Backup to HF Dataset ββHF_USERNAME=your_hf_usernameHF_TOKEN=hf_your_token_here169 unmodified lines170171172173174175176177178179180181182183184185186187169 unmodified lines# Multiple user IDs (comma-separated for team access)# TELEGRAM_USER_IDS=123456789,987654321,555555555# ββ OPTIONAL: Cloudflare Outbound Proxy ββ# Automatically bypass platform network blocks for Telegram/WhatsApp/Google/etc.# Get a Cloudflare API Token with Account: Workers Scripts: Edit permissions.# CLOUDFLARE_WORKERS_TOKEN=your_cloudflare_api_token_here# Alternatively, if you already have a worker deployed:# CLOUDFLARE_PROXY_URL=https://your-proxy.workers.dev# CLOUDFLARE_PROXY_SECRET=your_proxy_secret_here# Domains to proxy (default: *)# CLOUDFLARE_PROXY_DOMAINS=*# ββ OPTIONAL: Workspace Backup to HF Dataset ββHF_USERNAME=your_hf_usernameHF_TOKEN=hf_your_token_here
12 unmodified lines1314151617181912 unmodified linesENV_FILE = Path("/tmp/huggingclaw-cloudflare-proxy.env")DEFAULT_ALLOWED = ["api.telegram.org","web.whatsapp.com",]12 unmodified lines1314151617181920212223242526272812 unmodified linesENV_FILE = Path("/tmp/huggingclaw-cloudflare-proxy.env")DEFAULT_ALLOWED = ["api.telegram.org","discord.com","discordapp.com","gateway.discord.gg","status.discord.com","web.whatsapp.com","graph.facebook.com","googleapis.com","google.com","googleusercontent.com","gstatic.com",]
47 unmodified lines48495051525347 unmodified linesnormalized === "127.0.0.1" ||normalized === "::1" ||normalized === "0.0.0.0" ||normalized.endsWith(".hf.space") ||normalized.endsWith(".huggingface.co") ||normalized === "huggingface.co";47 unmodified lines4849505152535447 unmodified linesnormalized === "127.0.0.1" ||normalized === "::1" ||normalized === "0.0.0.0" ||normalized === proxy.hostname ||normalized.endsWith(".hf.space") ||normalized.endsWith(".huggingface.co") ||normalized === "huggingface.co";
38 unmodified lines3940414243444538 unmodified linesconst allowProxyAll =String(env.ALLOW_PROXY_ALL || "true").toLowerCase() === "true";const allowedTargets = normalizeList(env.ALLOWED_TARGETS || "api.telegram.org,web.whatsapp.com",);const isAllowedHost = (hostname) => {38 unmodified lines3940414243444538 unmodified linesconst allowProxyAll =String(env.ALLOW_PROXY_ALL || "true").toLowerCase() === "true";const allowedTargets = normalizeList(env.ALLOWED_TARGETS || "api.telegram.org,discord.com,discordapp.com,gateway.discord.gg,status.discord.com,web.whatsapp.com,graph.facebook.com,googleapis.com,google.com,googleusercontent.com,gstatic.com",);const isAllowedHost = (hostname) => {
361 unmodified lines362363364365366367368361 unmodified lines| .channels.telegram.botToken = $token| .channels.telegram.commands.native = false| .channels.telegram.timeoutSeconds = 60| (if $proxy_url != "" then .channels.telegram.apiRoot = $proxy_url else . end)# | .channels.telegram.network.autoSelectFamily = false# | .channels.telegram.network.dnsResultOrder = "ipv4first"| .channels.telegram.retry = {361 unmodified lines362363364365366367361 unmodified lines| .channels.telegram.botToken = $token| .channels.telegram.commands.native = false| .channels.telegram.timeoutSeconds = 60# | .channels.telegram.network.autoSelectFamily = false# | .channels.telegram.network.dnsResultOrder = "ipv4first"| .channels.telegram.retry = {
.env.example+12
cloudflare-proxy-setup.py+9
cloudflare-proxy.js+1
cloudflare-worker.js+1-1
start.sh-1