name = "android-ddns" main = "src/index.ts" compatibility_date = "2024-11-06" account_id = "8a531676b3bee8cf9d26eca6a5ea817a" # ---- Custom domain route (REQUIRED for HTTP access from httpurl) ---- # The Android client uses httpurl which only speaks HTTP. Workers on # *.workers.dev force HTTPS, so you MUST bind a custom domain route here # and disable "Always Use HTTPS" for that subdomain in CF Dashboard. # # Before deploying: # 1. In CF Dashboard, add a proxied A record for ddns.eachtime.me -> 1.1.1.1 # 2. SSL/TLS → Edge Certificates → turn off "Always Use HTTPS" # OR create a Configuration Rule: hostname = ddns.eachtime.me → OFF routes = [ { pattern = "ddns.eachtime.me/*", zone_name = "eachtime.me" } ] # ---- Non-secret configuration ---- [vars] ZONE_ID = "324fa9007d22b749e4ca36bff126d038" DOMAIN = "eachtime.me" # Set to "true" to allow the Worker to fall back to CF-Connecting-IP # when the client does not supply an ip in the JSON body. ALLOW_IP_FALLBACK = "true" # Minimum TTL in seconds to set on the record when updating (1 = automatic). RECORD_TTL = "60" # Whether newly-created A records should be proxied through Cloudflare. RECORD_PROXIED = "false" # ---- Secrets (set via `wrangler secret put`) ---- # CF_API_TOKEN -> Cloudflare API token with Zone:DNS:Edit on the target zone # SHARED_TOKEN -> Pre-shared bearer token used by the Android client # # Example: # wrangler secret put CF_API_TOKEN # wrangler secret put SHARED_TOKEN # Observability (Workers logs) [observability] enabled = true