Built-in Tor leaves webhook and Meld requests on direct network path
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- mobile-dev, networking, security
调研方向
Start by reading data/src/commonMain/kotlin/com/blockstream/data/GreenWebhooksHttpClient.kt, data/src/commonMain/kotlin/com/blockstream/data/meld/MeldHttpClient.kt, and network/src/commonMain/kotlin/com/blockstream/network/AppHttpClient.kt, then trace how the active Tor proxy is exposed to HTTP clients. Verify both webhook and Meld requests wait for Tor readiness and never fall back to direct connections; add a production-flavor integration check covering both hosts.
由索引模型根据 Issue 内容生成。
描述
What happened
With the app's built-in Tor setting enabled and fully bootstrapped, the Android app still made direct DNS and TLS connections to green-webhooks.blockstream.com and ramps.blockstream.com. These connections came from the device network path rather than the app's Tor proxy.
Test setup and observed result
- Source: Blockstream/green_android commit 8062ee10a546fe408987366616cd5c4823b7e03c (5.7.0 tree).
- Runtime: Android API 36 x86_64 emulator; disposable, empty testnet wallet; built-in Tor switch enabled. The app log showed Tor bootstrap at 100% and GDK connections with use_tor=True.
- Build: source-built productionGoogleDebug, not the official signed release. The public checkout required two diagnostic changes to run on this emulator: removal of an early logging branch that crashed the local no-key debug build before Koin initialization, and addition of x86_64 to the productionGoogle ABI filter. Neither change altered the network clients or Tor routing.
- On wallet overview, device registration invoked https://green-webhooks.blockstream.com/register-device. The emulator capture showed direct DNS for that host and a direct TLS ClientHello with its SNI.
- On opening Transactions, the app invoked https://ramps.blockstream.com/payments/transactions. The capture again showed direct DNS and TLS connections for that host. The view schedules another poll every 60 seconds.
In the production-flavor capture, direct DNS was visible at original frames 33206 (green-webhooks) and 33994–33995 (ramps); corresponding direct TLS ClientHello packets appeared at 33248 and 34001. The redacted runtime log records the webhook and Meld requests after Tor reached 100%.
The relevant clients are data/src/commonMain/kotlin/com/blockstream/data/GreenWebhooksHttpClient.kt and data/src/commonMain/kotlin/com/blockstream/data/meld/MeldHttpClient.kt. Both inherit network/src/commonMain/kotlin/com/blockstream/network/AppHttpClient.kt, which does not bind these Ktor requests to the app's Tor proxy. The app's Tor setting reaches GDK but not these clients.
WalletOverviewViewModel.kt:122-143 passes greenWallet.xPubHashId as externalCustomerId with an FCM token to /register-device; only optional nodeId is gated to development/debug. TransactViewModel.kt:136-166 passes the wallet-derived ID as externalCustomerIds to /payments/transactions. The destination can therefore associate a stable wallet-derived ID with a direct IP connection. TLS keeps that ID out of an ordinary on-path packet capture; the capture proves the direct route and host, while the source establishes the request fields.
Expected result
When built-in Tor is enabled, these HTTP clients should use the active Tor proxy, wait for it to be ready, and avoid direct fallback. A production-flavor integration check for both hosts would help prevent regression.
I have not tested Blockstream's official signed APK, and this report does not establish how every release or platform behaves. No real funds or personal wallet data were used.
Evidence
- Capture, part 1 — original frames 1–20,000
- Capture, part 2 — original frames 20,001–34,423; contains the packets cited above
- Request-event log — original app log lines for the two requests
- Tor startup log — redacted bootstrap and GDK lines
The two ZIPs hold the complete 35,895,240-byte emulator capture, split at frame 20,000 to stay below GitHub's per-file limit. Original capture SHA-256: e38d08baa31460a9d23123c4ff249b0f61780310dcc51ed4538a70a974bf1a08. For a frame in part 2, subtract 20,000 to find its position in that file.
The request-event log includes the disposable test wallet's FCM token and wallet-derived ID. The full app logcat is omitted because it also contains mnemonic recovery words.
A short excerpt shows Tor fully bootstrapped before both requests:
1790406524.234 Tor progress=100
1790406546.842 GDK network=testnet use_tor=True
1790406566.884 request host=green-webhooks.blockstream.com path=/register-device
1790406625.737 request host=ramps.blockstream.com path=/payments/transactions
Related: #164 covered older Countly traffic with external Tor configuration. This report concerns built-in Tor and different HTTP clients.
- 主要语言
- Kotlin
- 星标
- 271
- 派生
- 108
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Blockstream/green_android 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
Blockstream/green_android#313 ·
-
难度 3/5 1-2 天 新手友好度 76/100
Blockstream/green_android#315 ·
-
Support scanning SeedQR recovery phrases可能重新可做 @ardier16 于 34 天前认领,目前没有进行中的 PR。 未关闭feature request
Blockstream/green_android#311 · 2 条评论 · 已指派 1 人 ·
-
UX: Use "Passphrase BIP39" as a universal untranslated label — don't translate it as "contraseña"可能重新可做 @ardier16 于 34 天前认领,目前没有进行中的 PR。 未关闭enhancement
Blockstream/green_android#310 · 4 条评论 · 已指派 1 人 ·
-
2-of-3 multisig with 2FA: Show service xpub (per-account) for faster recovery可能重新可做 @domegabri 于 40 天前认领,目前没有进行中的 PR。 未关闭enhancement status: planned
Blockstream/green_android#309 · 2 条评论 · 已指派 2 人 ·
查看 Blockstream/green_android 的全部 Issue
相似的 Issue
-
Meta request
难度 2/5 1-3 小时 新手友好度 70/100
keiyoushi/extensions-source#19500 ·
维护者通常 1 天内回复
-
go 🏃 testing 🧪
难度 2/5 1-3 小时 新手友好度 78/100
valkey-io/valkey-glide#7239 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 1/5 1 小时以内 新手友好度 90/100
ethereum-lists/chains#8788 ·
维护者通常 1 天内回复
-
documentation P1
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/kotlin-sdk#1050 ·
维护者通常 2 天内回复