Samourai-Wallet / samourai-wallet-android

Bitcoin Wallet strongly focused on privacy when transacting on the bitcoin network
https://samouraiwallet.com
The Unlicense
634 stars 238 forks source link

Problem connecting via Tor on Samsumg XCover 4C #405

Open pantadeusz opened 4 years ago

pantadeusz commented 4 years ago

Configuration that works:

Configuration with problems

The problem

On my Motorola, everything works fine, but I didn't test with Dojo (I don't want to reset my config until I have working online wallet on second phone). Tor and plain net works great.

On Samsung there is a problem:

The Dojo seems to be working fine, the TorBrowser on Samsung works good and allows to use web interface on Dojo. The Tor on Samourai however does not want to cooperate with my Dojo.

The logs from API (when I refersh balance on my wallet) starts to appear as follows:

[20200409 11:12:12.010 026 MiB] POST /xpub
[20200409 11:12:14.017 026 MiB] POST /unspent
[20200409 11:12:15.581 026 MiB] POST /multiaddr
[20200409 11:12:17.359 026 MiB] POST /unspent
[20200409 11:12:19.524 026 MiB] GET /fees?at=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJTYW1vdXJhaSBXYWxsZXQgYmFja2VuZCIsInR5cGUiOiJhY2Nlc3MtdG9rZW4iLCJwcmYiOiJhcGkiLCJpYXQiOjE1ODY0Mjk3MDgsImV4cCI6MTU4NjQzMDYwOH0.BxMp0Zpq9TGANkkGFtjrfepKFpicDnvRGJcSq5umEBs
[20200409 11:12:21.290 026 MiB] POST /multiaddr
[20200409 11:12:22.861 026 MiB] POST /unspent
[20200409 11:12:24.404 026 MiB] POST /multiaddr
[20200409 11:12:26.185 026 MiB] POST /unspent
[20200409 11:12:27.858 026 MiB] POST /multiaddr
[20200409 11:12:30.188 025 MiB] POST /unspent

The Get request gives only the following information

{"status":"ok"}
pantadeusz commented 4 years ago

I found this (marked ------------------------- for secret):

I/APIFactory: lock XPUB:http://fgrzruiqbz-------------------------2nin3r3spk4jb5bid.onion/v2/
    lock XPUB:{address=bc1qphnhuzszlyap-------------------------auwraswsx8lx, at=eyJhbGciOiJIUzI1NiIsInR5cCI6I-------------------------1vdXJhaSBXYWxsZXQgYm-------------------------Y2Nlc3MtdG9rZW4iLCJwcmYi-------------------------QiOjE1ODY1NDc5OTQsImV4cCI6MTU4NjU0ODg5NH0.wiGlgfE7OTpdkEJIxnGoWLPa6eo-ZAnFx7cdNITSvt4, signature=IOM3ntsQyrHfbpknodCa8Jm1I0-------------------------UPDJuN17YlW7O7y/90xRajZEegTjRk=, message=lock}
D/OkHttp: --> POST http://fgrzruiqbz5yy4c7qnwaukzupsscewoppqq5jqe2nin3r3spk4jb5bid.onion/v2/xpub/zpub6qTrPXTFUvHwz9BevnyfC6opDjtUCsJNE5GS8kdX2LPWb1fSdYXPWKgKP97w6iJDVzskxdpzTUpiQupDRDhY63R2yeRPk3QFLGBHdNHkRHG/lock/
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 386
    address=bc1qphnhuzszl-------------------------raswsx8lx&at=eyJhbGci-------------------------haSBX-------------------------dNITSvt4&signature=IOM3nts-------------------------cUP-------------------------O7y%2F90xRajZEegTjRk%3D&message=lock
    --> END POST (386-byte body)
W/Notification: Use of stream types is deprecated for operations other than volume control
    See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
D/OkHttp: <-- 400 Bad Request http://fgrzruiqbz5yy4c7-------------------------d.onion/v2/xpub/zpub-------------------------fSdYXPWKgKP97w6iJ-------------------------QFLGBHdNHkRHG/lock/ (611ms)
D/OkHttp: Server: nginx
    Date: Fri, 10 Apr 2020 19:50:49 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 34
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    Content-Security-Policy: default-src "self"; style-src "self" "unsafe-inline"; img-src "self" data:
    X-DNS-Prefetch-Control: off
    X-Frame-Options: SAMEORIGIN
    Strict-Transport-Security: max-age=15552000; includeSubDomains
    X-Download-Options: noopen
    Surrogate-Control: no-store
    Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
    Pragma: no-cache
    Expires: 0
    X-Content-Type-Options: nosniff
    Referrer-Policy: no-referrer
    X-XSS-Protection: 1; mode=block
D/OkHttp: ETag: W/"22-T-------------------------oWFCr+gPo"
D/OkHttp: {"status":"error","error":"Error"}
    <-- END HTTP (34-byte body)
I/APIFactory: lock XPUB response:{"status":"error","error":"Error"}
V/TorManager: isRequired: true
D/APIFactory: utxos by value:0
I/BalanceActivity: setBalance: 0
D/JobRefreshService: JobRefreshService Destroy
pantadeusz commented 4 years ago

I found that dojo supports only transactions after installation. The wallet backup shows only new transactions. I will try to find where to document it and will create pull request