mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
0fe058254c
On Android, /etc/resolv.conf does not exist, causing Go's default DNS resolution to fail. This adds an init() hook that: 1. Detects missing /etc/resolv.conf (Android environment) 2. Configures a custom resolver with PreferGo: true 3. Supports multiple DNS servers via PICOCLAW_DNS_SERVER env var - Semicolon-separated: "8.8.8.8:53;1.1.1.1:53" - Single server also works: "8.8.8.8" - Auto-appends :53 if port omitted 4. Round-robin rotation across configured servers 5. Defaults to Google DNS + Cloudflare DNS Also patches http.DefaultTransport to use the custom resolver.