ShardBrowser icon indicating copy to clipboard operation
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

Open angeloathayde opened this issue 2 months ago • 1 comments

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=)
  1. proxy::geo_check_via → reqwest with socks5h://user:pass@host:port to plain-HTTP http://ip-api.com/... fails with error sending request. The same URL through the same proxy works with curl -x socks5h://..., and the HTTPS providers work from reqwest: switching geo_checker to ipwho.is immediately yields country=BR tz=America/Sao_Paulo.
  2. full_test discards the error (let _ = geo_check(...)), so the UI shows a passing test with empty geo and the user has no signal.
  3. At launch, cached snapshot and country tag are empty too, so the code falls back to host_timezone() — which only reads /usr/share/zoneinfo and /var/db/timezone/zoneinfo, i.e. returns None on Windows → "UTC". A proxy user on Windows thus leaks UTC, which is worse than the host's real zone would have been.

Suggested fixes:

  • Default geo_checker to an HTTPS provider (or fix plain-HTTP over socks5h in the reqwest client — Proxy::all with http:// target may need Proxy::http + Proxy::https pair or reqwest socks feature 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_zones mapping) or, better, refuse to launch / warn in the UI when a proxy is bound and geo resolution failed, since timezone=auto then silently becomes UTC.

angeloathayde avatar Sep 11 '26 18:09 angeloathayde

in v2.0.3

ProxyShard avatar Sep 13 '26 12:09 ProxyShard