ShardBrowser
ShardBrowser copied to clipboard
Geo probe through SOCKS5 fails with ip-api.com (reqwest), error is swallowed, and profiles launch with timezone=UTC on Windows
Environment: ShardX Launcher 2.0.1, Windows 11 x64, SOCKS5 proxy (ProxyShard residential, BR) with working TCP and UDP relay.
Symptom: Proxies → Test shows TCP/UDP OK but no IP/country; the proxy's country tag stays empty; every profile bound to it reports Intl.DateTimeFormat().resolvedOptions().timeZone === "UTC" and locale en-US — while the exit is in Brazil.
Cause chain (launcher stderr):
[launcher] resolving auto fields (tz=true lang=false geo=true proxy=relay-eu.proxyshard.com:1080)
[launcher] proxy geo failed: error sending request for url (http://ip-api.com/json/?fields=...) - falling back to cached snapshot
[launcher] WARNING: proxy is bound but every geo source failed; using the LAUNCHER HOST's TZ/locale...
[launcher] resolved tz=UTC locale=en-US (source=)
proxy::geo_check_via→reqwestwithsocks5h://user:pass@host:portto plain-HTTPhttp://ip-api.com/...fails witherror sending request. The same URL through the same proxy works withcurl -x socks5h://..., and the HTTPS providers work from reqwest: switchinggeo_checkertoipwho.isimmediately yieldscountry=BR tz=America/Sao_Paulo.full_testdiscards the error (let _ = geo_check(...)), so the UI shows a passing test with empty geo and the user has no signal.- At launch, cached snapshot and country tag are empty too, so the code falls back to
host_timezone()— which only reads/usr/share/zoneinfoand/var/db/timezone/zoneinfo, i.e. returnsNoneon Windows →"UTC". A proxy user on Windows thus leaksUTC, which is worse than the host's real zone would have been.
Suggested fixes:
- Default
geo_checkerto an HTTPS provider (or fix plain-HTTP oversocks5hin the reqwest client —Proxy::allwithhttp://target may needProxy::http+Proxy::httpspair orreqwestsocksfeature tuning). - Surface the geo error in the proxy test result instead of an empty snapshot.
- Implement
host_timezone()for Windows (GetDynamicTimeZoneInformation→ IANA via ICU /windows_zonesmapping) or, better, refuse to launch / warn in the UI when a proxy is bound and geo resolution failed, sincetimezone=autothen silently becomesUTC.
in v2.0.3