Skip to content

feat(cli, asb): Whonix and Tails support#391

Closed
nabijaczleweli wants to merge 185 commits intoeigenwallet:masterfrom
nabijaczleweli:bout
Closed

feat(cli, asb): Whonix and Tails support#391
nabijaczleweli wants to merge 185 commits intoeigenwallet:masterfrom
nabijaczleweli:bout

Conversation

@nabijaczleweli
Copy link

@nabijaczleweli nabijaczleweli commented Jun 8, 2025

Detect if running on whonix accd'g to documentation by checking if /usr/share/whonix/marker exists

In that case, never initialise a Tor connection to avoid tunneling Tor over Tor, instead log

INFO On whonix, not using Tor

The settings GUI is adapted to

  1. force the slider on
  2. disable it
  3. note that everything's always on Tor on whonix in the help

GUI, not whonix (baseline, not changed):
1nonwhonix

GUI, whonix, settings:
2whonix

GUI, whonix, log:
3whonixlog

asb, normal system:
4asbbefore

asb, whonix (emulated):
5asbafter

swap, normal system & whonix (emulated):
6swap
(I cranked the "Bootstrapping Tor client" message verbosity so it showed.)

Bounty: https://bounties.monero.social/posts/180/0-789m-make-unstoppable-swap-whonix-friendly

Please advise on how to correctly exercise the bounty system.

Summary by CodeRabbit

  • New Features
    • The application detects forced Tor usage in environments like Whonix, disabling the Tor toggle and updating tooltips to inform users.
    • Support added for legacy Tor configurations, enabling reuse of existing private keys and improved transport handling.
  • Bug Fixes
    • User prompts related to Tor configuration are skipped or defaulted when Tor is externally managed or unavailable, improving setup flow.
  • Chores
    • Updated dependencies and internal logic for Tor initialization and environment detection.

Richard Pospesel added 30 commits May 29, 2023 01:19
…r handling to use thiserror crate; convertd test code to use anyhow crate
…der object

- CircuitToken is now just a usize; leave it to TorProvier implementations to
  generate and manage them
- OnionListener is now a pointer-to-implementation wrapper, trait moved to
  OnionListnerImpl
- Update LegacyTorClient to use new interface definitions
…pe, updated gosling context to use a TorProvider rather than a specific implementation
- migrated integration tests to tor-interface/tests
- moved various free functions to be private functions of their relevant types
- added Debug implementations for various tor_crypto types
@Einliterflasche Einliterflasche linked an issue Jul 12, 2025 that may be closed by this pull request
11 tasks
@Einliterflasche
Copy link

Sorry for the delay. We've since moved our fork of libp2p-tor into this repo, could you please add your changes to it to this PR?

Detect if running on whonix accd'g to documentation
  https://www.whonix.org/wiki/Dev/Project_friendly_applications_best_practices#Programmatically_Detecting_Whonix
by checking if /usr/share/whonix/marker exists

In that case, never initialise a Tor connection
to avoid tunneling Tor over Tor, instead log
  INFO On whonix, not using Tor

The settings GUI is adapted to
  (a) force the slider on
  (b) disable it
  (c) note that everything's always on Tor on whonix in the help

asb:
  nabijaczleweli@tarta:~/uwu/core$ ./target/release/asb --testnet start
  2025-06-08T02:10:18.426428165Z  INFO Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=testnet/logs
  2025-06-08T02:10:18.426499966Z  INFO Setting up context binary="asb" version="preview-1-gacd9ade-dirty" os="linux" arch="x86_64"
  2025-06-08T02:10:18.426566003Z DEBUG Reading in seed from testnet/seed.pem
  2025-06-08T02:10:18.42659969Z DEBUG Using existing sqlite database.
  2025-06-08T02:10:18.427903356Z DEBUG Opening Monero wallet
  2025-06-08T02:10:49.253500345Z DEBUG Created Monero wallet monero_wallet_name=asb-wallet
  2025-06-08T02:10:49.338552856Z  INFO Monero wallet address monero_address=9tWysVoWvpGR33qBZoTJcq4HzzQoe49HiStVNx5oMVJu6wKzsBYjy1xdegiVYBMZyp3i1kuXmDySqYmJRieKmW4nSWx1kNm
  2025-06-08T02:10:49.383891181Z  WARN The Monero balance is 0, make sure to deposit funds at monero_address=9tWysVoWvpGR33qBZoTJcq4HzzQoe49HiStVNx5oMVJu6wKzsBYjy1xdegiVYBMZyp3i1kuXmDySqYmJRieKmW4nSWx1kNm
  2025-06-08T02:10:49.383950078Z DEBUG Opening Bitcoin wallet
  2025-06-08T02:10:50.20519519Z  INFO Starting initial Bitcoin wallet scan. This might take a while...
  2025-06-08T02:10:51.33690081Z DEBUG Full scanning Bitcoin wallet, currently at index 0. We will scan around 500 in total.
  2025-06-08T02:10:51.337269269Z DEBUG Full scanning Bitcoin wallet, currently at index 1. We will scan around 500 in total.
  2025-06-08T02:10:52.38770465Z DEBUG Full scanning Bitcoin wallet, currently at index 52. We will scan around 500 in total.
  2025-06-08T02:10:53.909561884Z DEBUG Full scanning Bitcoin wallet, currently at index 103. We will scan around 500 in total.
  2025-06-08T02:10:54.687464795Z DEBUG Full scanning Bitcoin wallet, currently at index 153. We will scan around 500 in total.
  2025-06-08T02:10:56.313618739Z DEBUG Full scanning Bitcoin wallet, currently at index 203. We will scan around 500 in total.
  2025-06-08T02:10:57.145982225Z DEBUG Full scanning Bitcoin wallet, currently at index 254. We will scan around 500 in total.
  2025-06-08T02:10:58.886810752Z DEBUG Full scanning Bitcoin wallet, currently at index 305. We will scan around 500 in total.
  2025-06-08T02:11:00.572357489Z DEBUG Full scanning Bitcoin wallet, currently at index 356. We will scan around 500 in total.
  2025-06-08T02:11:02.395423731Z DEBUG Full scanning Bitcoin wallet, currently at index 432. We will scan around 532 in total.
  2025-06-08T02:11:19.093438653Z DEBUG Not syncing because there are no spks in our wallet
  2025-06-08T02:11:19.093475438Z DEBUG Starting to sync Bitcoin wallet with 0 concurrent chunks and batch size of 32
  2025-06-08T02:11:19.12235274Z  INFO Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-06-08T02:11:19.375064128Z DEBUG Bootstrapping Tor client
  2025-06-08T02:11:20.677955503Z DEBUG Connected to Kraken websocket API
  2025-06-08T02:11:20.678051027Z DEBUG Subscribed to updates for ticker
  2025-06-08T02:11:24.434699921Z DEBUG Setting up onion service for libp2p to listen on addr=/onion3/6b5rqgvgofdi7qx6um25hfitolhxkxnfqxlogicqxhl7xjtxsvrpv6yd:9939
  2025-06-08T02:11:24.566743497Z  INFO Network layer initialized peer_id=12D3KooWHGUUHbxUpBXjfL1u6JWknBfETHkCEbWFozhf9nHcHi9K
  2025-06-08T02:11:24.60886221Z  INFO New listen address reported address=/onion3/6b5rqgvgofdi7qx6um25hfitolhxkxnfqxlogicqxhl7xjtxsvrpv6yd:9939
  2025-06-08T02:11:24.613757136Z  INFO New listen address reported address=/ip4/127.0.0.1/tcp/9939
  2025-06-08T02:11:24.613836425Z  INFO New listen address reported address=/ip4/192.168.1.250/tcp/9939
  2025-06-08T02:11:24.6139116Z  INFO New listen address reported address=/ip4/10.0.2.2/tcp/9939

  nabijaczleweli@tarta:~/uwu/core$ unshare -rm
  root@tarta:~/uwu/core# mount -t tmpfs tmpfs /usr/share
  root@tarta:~/uwu/core# mkdir /usr/share/whonix
  root@tarta:~/uwu/core# > /usr/share/whonix/marker
  root@tarta:~/uwu/core# ./target/release/asb --testnet start
  2025-06-08T02:12:07.15259209Z  INFO Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=testnet/logs
  2025-06-08T02:12:07.152648706Z  INFO Setting up context binary="asb" version="preview-1-gacd9ade-dirty" os="linux" arch="x86_64"
  2025-06-08T02:12:07.152718078Z DEBUG Reading in seed from testnet/seed.pem
  2025-06-08T02:12:07.1527521Z DEBUG Using existing sqlite database.
  2025-06-08T02:12:07.15392353Z DEBUG Opening Monero wallet
  2025-06-08T02:12:20.274522678Z  INFO Monero wallet address monero_address=9tWysVoWvpGR33qBZoTJcq4HzzQoe49HiStVNx5oMVJu6wKzsBYjy1xdegiVYBMZyp3i1kuXmDySqYmJRieKmW4nSWx1kNm
  2025-06-08T02:12:20.27523474Z  WARN The Monero balance is 0, make sure to deposit funds at monero_address=9tWysVoWvpGR33qBZoTJcq4HzzQoe49HiStVNx5oMVJu6wKzsBYjy1xdegiVYBMZyp3i1kuXmDySqYmJRieKmW4nSWx1kNm
  2025-06-08T02:12:20.360353998Z DEBUG Opening Bitcoin wallet
  2025-06-08T02:12:20.555861074Z DEBUG Loading existing Bitcoin wallet from database
  2025-06-08T02:12:20.802818807Z DEBUG Not syncing because there are no spks in our wallet
  2025-06-08T02:12:20.802858811Z DEBUG Starting to sync Bitcoin wallet with 0 concurrent chunks and batch size of 32
  2025-06-08T02:12:20.802982132Z  INFO Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-06-08T02:12:20.803068289Z  INFO On whonix, not using Tor
  2025-06-08T02:12:20.897994249Z  INFO Network layer initialized peer_id=12D3KooWHGUUHbxUpBXjfL1u6JWknBfETHkCEbWFozhf9nHcHi9K
  2025-06-08T02:12:21.086817444Z DEBUG Connected to Kraken websocket API
  2025-06-08T02:12:21.111092228Z  INFO New listen address reported address=/ip4/127.0.0.1/tcp/9939
  2025-06-08T02:12:21.111314184Z  INFO New listen address reported address=/ip4/192.168.1.250/tcp/9939
  2025-06-08T02:12:21.111465536Z  INFO New listen address reported address=/ip4/10.0.2.2/tcp/9939
  2025-06-08T02:12:21.14171648Z DEBUG Subscribed to updates for ticker

swap:
  nabijaczleweli@tarta:~/uwu/core$ ./target/release/swap --testnet resume --enable-tor  --swap-id 69420694206942069420694206942069
  2025-06-08T02:24:20.130489739Z  INFO Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=info logs_dir=/home/nabijaczleweli/.local/share/xmr-btc-swap/cli/testnet/logs
  2025-06-08T02:24:20.130752975Z  INFO Setting up context binary="cli" version="preview-1-gacd9ade-dirty" os="linux" arch="x86_64"
  2025-06-08T02:24:20.275872264Z DEBUG Bootstrapping Tor client
  ^C
  nabijaczleweli@tarta:~/uwu/core$ unshare -rm
  root@tarta:~/uwu/core# mount -t tmpfs tmpfs /usr/share
  root@tarta:~/uwu/core# mkdir /usr/share/whonix
  root@tarta:~/uwu/core# > /usr/share/whonix/marker
  root@tarta:~/uwu/core# ./target/release/swap --testnet resume --enable-tor  --swap-id 69420694206942069420694206942069
  2025-06-08T02:24:37.62796112Z  INFO Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=info logs_dir=/home/nabijaczleweli/.local/share/xmr-btc-swap/cli/testnet/logs
  2025-06-08T02:24:37.628228005Z  INFO Setting up context binary="cli" version="preview-1-gacd9ade-dirty" os="linux" arch="x86_64"
  2025-06-08T02:24:37.642638339Z  INFO On whonix, not using Tor
  ^C

Bounty: https://bounties.monero.social/posts/180/0-789m-make-unstoppable-swap-whonix-friendly
…rrelevant/would-be-misleading parts of the questionnaire on whonix
…640244aa14d51f8ea8d9ee..df7553d1671679e2d7b86defae8f91f2b86b4135
@nabijaczleweli
Copy link
Author

For the record I would like to state that this was the worst rebase I've ever done and it's not close.

@binarybaron
Copy link

Thanks for the rebase.

Could you add some explanation as to how this works? This has become quite a big PR and we cannot merge this unless we can fully understand how it works

@nabijaczleweli
Copy link
Author

Nothing's changed except that this also inlines the dependency PRs (blueprint-freespeech/gosling#132 + eigenwallet/libp2p-tor#4) into the vendored crates (tor-interface by git filter-branch + merge (this can probably stand to get squashed so it's not as daunting for no reason, history's like 80 commits) and libp2p-tor by applying the diff since that's functionally what the PR reduces to).
For details on those see the PRs but tor-interface gains a unix-domain-socket back-end and libp2p-tor gains a back-end using tor-interface.

All the wallet does is (a) detect if it's on whonix, and if so (b) use the system tor daemon and (c) adjust the UI a little bit so it's not confusing (the "use tor" toggle is always on, setup questions for tor configuration that would be ineffective are skipped). No change since the first time.

@binarybaron
Copy link

binarybaron commented Oct 15, 2025

Again thank you for your work. We cannot introduce this amount of complexity into the codebase at the moment. We cannot merge this as it is.

If you want you can rework this to:

  1. Not use any external dependencies (except widely used low level networking libraries)
  2. Create an internal adapter that wraps either an Arti client or a external Tor socks proxy
  3. Drop support for hidden services for non arti clients due to the huge amount of complexity involved
  4. Massively reduce the size of the diff

I'll contribute 1 XMR to the bounty if you do this.

@nabijaczleweli
Copy link
Author

I'll reanalyse the problem under this angle and see what falls out.

@binarybaron
Copy link

If you do this, please also update: https://www.whonix.org/wiki/UnstoppableSwap

@binarybaron
Copy link

binarybaron commented Oct 19, 2025

We’ve created a bounty for this! The community can also contribute, so the amount might grow over time.

We’d really love to see this get done, and I believe you have the expertise to make it happen. Please consider joining our Matrix space. We’ll be happy to support you if you have any questions.

Again, I’m sorry we couldn’t merge all the great work you put in. It truly looked impressive. I hope this hasn’t been too discouraging.

nabijaczleweli added a commit to nabijaczleweli/core that referenced this pull request Oct 20, 2025
On whonix, collect $TOR_SOCKS_* and use that as the default Transport.
Listening on a hidden service is not supported
(cf. eigenwallet#391 (comment)).

  # TOR_SOCKS_HOST=127.0.0.1 TOR_SOCKS_PORT=46105 ./target/debug/asb --testnet start
  2025-10-20T00:59:02.523377742Z  INFO swap::common::tracing_util: swap/src/common/tracing_util.rs:225: Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/logs
  2025-10-20T00:59:02.523734203Z  INFO asb: swap-asb/src/main.rs:59: Setting up context binary="asb" version="3.2.0-rc.4" os="linux" arch="x86_64"
  2025-10-20T00:59:02.524117896Z DEBUG swap::seed: swap/src/seed.rs:128: Reading in seed from /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/seed.pem
  2025-10-20T00:59:02.524380312Z DEBUG swap::database: swap/src/database.rs:99: Using existing sqlite database.
  2025-10-20T00:59:02.527334775Z  INFO asb: swap-asb/src/main.rs:176: Not tipping the developers (maker.developer_tip = 0 or not set in config)
  2025-10-20T00:59:02.527582262Z DEBUG asb: swap-asb/src/main.rs:613: Initializing Monero wallets
  2025-10-20T00:59:02.527860291Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:45: Using database at /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero-rpc-pool/nodes_v3.db
  2025-10-20T00:59:02.539417001Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:59: Database migration completed
  2025-10-20T00:59:02.585025016Z  INFO monero_rpc_pool: monero-rpc-pool/src/lib.rs:174: Started server on 127.0.0.1:45251 (random port)
  2025-10-20T00:59:02.585302006Z  INFO asb: swap-asb/src/main.rs:637: Monero RPC Pool started for ASB on http://127.0.0.1:45251
  2025-10-20T00:59:02.590742943Z DEBUG monero_sys: monero-sys/src/lib.rs:1354: Updating wallet manager's remote node address=127.0.0.1:45251
  2025-10-20T00:59:09.182046612Z DEBUG monero_sys: monero-sys/src/lib.rs:1116: Opening or creating wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182339945Z DEBUG monero_sys: monero-sys/src/lib.rs:1367: Checking if wallet exists path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182665481Z DEBUG monero_sys: monero-sys/src/lib.rs:1120: Wallet already exists, opening it wallet=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182925233Z DEBUG monero_sys: monero-sys/src/lib.rs:1318: Opening wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.844215951Z DEBUG monero_sys: monero-sys/src/lib.rs:1489: Initializing wallet address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:09.844695338Z DEBUG monero_sys: monero-sys/src/lib.rs:1577: Initializing wallet daemon_address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:12.471017858Z DEBUG monero_sys: monero-sys/src/lib.rs:1502: Initialized wallet, setting daemon address
  2025-10-20T00:59:12.471279924Z DEBUG monero_sys: monero-sys/src/lib.rs:1552: Setting daemon address address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:14.216130174Z DEBUG monero_sys: monero-sys/src/lib.rs:1507: Background sync enabled, starting refresh thread
  2025-10-20T00:59:14.243361749Z  INFO asb: swap-asb/src/main.rs:186: Monero wallet address monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.244657192Z  WARN asb: swap-asb/src/main.rs:196: The Monero balance is 0, make sure to deposit funds at monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.245413828Z DEBUG asb: swap-asb/src/main.rs:574: Opening Bitcoin wallet
  2025-10-20T00:59:14.254739766Z DEBUG swap::bitcoin::wallet: swap/src/bitcoin/wallet.rs:621: Loading existing Bitcoin wallet from database
  2025-10-20T00:59:14.351859914Z  INFO asb: swap-asb/src/main.rs:601: Skipping Bitcoin wallet sync because we are only using it for receiving funds
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352573504Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T00:59:14.353600945Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Ip(127.0.0.1:46105)

  # TOR_SOCKS_IPC_PATH=$PWD/SocksPort/sock ./target/debug/asb --testnet start
  2025-10-20T01:00:53.213704267Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T01:00:53.214061031Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T01:00:53.215044718Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Unix("/home/nabijaczleweli/uwu/another-bout/SocksPort/sock")

  $ tor ControlPort auto SocksPort unix:$PWD/uwu/another-bout/SocksPort/sock SafeLogging 0
  ...
  Oct 20 03:02:51.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
  Oct 20 03:02:51.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
  Oct 20 03:02:52.000 [notice] Bootstrapped 100% (done): Done
  Oct 20 03:03:20.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
  Oct 20 03:03:29.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
@nabijaczleweli
Copy link
Author

Wiki rolled back, butcher's cut in #634.

nabijaczleweli added a commit to nabijaczleweli/core that referenced this pull request Oct 20, 2025
On whonix, collect $TOR_SOCKS_* and use that as the default Transport.
Listening on a hidden service is not supported
(cf. eigenwallet#391 (comment)).

  # TOR_SOCKS_HOST=127.0.0.1 TOR_SOCKS_PORT=46105 ./target/debug/asb --testnet start
  2025-10-20T00:59:02.523377742Z  INFO swap::common::tracing_util: swap/src/common/tracing_util.rs:225: Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/logs
  2025-10-20T00:59:02.523734203Z  INFO asb: swap-asb/src/main.rs:59: Setting up context binary="asb" version="3.2.0-rc.4" os="linux" arch="x86_64"
  2025-10-20T00:59:02.524117896Z DEBUG swap::seed: swap/src/seed.rs:128: Reading in seed from /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/seed.pem
  2025-10-20T00:59:02.524380312Z DEBUG swap::database: swap/src/database.rs:99: Using existing sqlite database.
  2025-10-20T00:59:02.527334775Z  INFO asb: swap-asb/src/main.rs:176: Not tipping the developers (maker.developer_tip = 0 or not set in config)
  2025-10-20T00:59:02.527582262Z DEBUG asb: swap-asb/src/main.rs:613: Initializing Monero wallets
  2025-10-20T00:59:02.527860291Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:45: Using database at /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero-rpc-pool/nodes_v3.db
  2025-10-20T00:59:02.539417001Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:59: Database migration completed
  2025-10-20T00:59:02.585025016Z  INFO monero_rpc_pool: monero-rpc-pool/src/lib.rs:174: Started server on 127.0.0.1:45251 (random port)
  2025-10-20T00:59:02.585302006Z  INFO asb: swap-asb/src/main.rs:637: Monero RPC Pool started for ASB on http://127.0.0.1:45251
  2025-10-20T00:59:02.590742943Z DEBUG monero_sys: monero-sys/src/lib.rs:1354: Updating wallet manager's remote node address=127.0.0.1:45251
  2025-10-20T00:59:09.182046612Z DEBUG monero_sys: monero-sys/src/lib.rs:1116: Opening or creating wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182339945Z DEBUG monero_sys: monero-sys/src/lib.rs:1367: Checking if wallet exists path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182665481Z DEBUG monero_sys: monero-sys/src/lib.rs:1120: Wallet already exists, opening it wallet=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182925233Z DEBUG monero_sys: monero-sys/src/lib.rs:1318: Opening wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.844215951Z DEBUG monero_sys: monero-sys/src/lib.rs:1489: Initializing wallet address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:09.844695338Z DEBUG monero_sys: monero-sys/src/lib.rs:1577: Initializing wallet daemon_address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:12.471017858Z DEBUG monero_sys: monero-sys/src/lib.rs:1502: Initialized wallet, setting daemon address
  2025-10-20T00:59:12.471279924Z DEBUG monero_sys: monero-sys/src/lib.rs:1552: Setting daemon address address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:14.216130174Z DEBUG monero_sys: monero-sys/src/lib.rs:1507: Background sync enabled, starting refresh thread
  2025-10-20T00:59:14.243361749Z  INFO asb: swap-asb/src/main.rs:186: Monero wallet address monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.244657192Z  WARN asb: swap-asb/src/main.rs:196: The Monero balance is 0, make sure to deposit funds at monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.245413828Z DEBUG asb: swap-asb/src/main.rs:574: Opening Bitcoin wallet
  2025-10-20T00:59:14.254739766Z DEBUG swap::bitcoin::wallet: swap/src/bitcoin/wallet.rs:621: Loading existing Bitcoin wallet from database
  2025-10-20T00:59:14.351859914Z  INFO asb: swap-asb/src/main.rs:601: Skipping Bitcoin wallet sync because we are only using it for receiving funds
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352573504Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T00:59:14.353600945Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Ip(127.0.0.1:46105)

  # TOR_SOCKS_IPC_PATH=$PWD/SocksPort/sock ./target/debug/asb --testnet start
  2025-10-20T01:00:53.213704267Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T01:00:53.214061031Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T01:00:53.215044718Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Unix("/home/nabijaczleweli/uwu/another-bout/SocksPort/sock")

  $ tor ControlPort auto SocksPort unix:$PWD/uwu/another-bout/SocksPort/sock SafeLogging 0
  ...
  Oct 20 03:02:51.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
  Oct 20 03:02:51.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
  Oct 20 03:02:52.000 [notice] Bootstrapped 100% (done): Done
  Oct 20 03:03:20.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
  Oct 20 03:03:29.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
@binarybaron
Copy link

Wiki rolled back, butcher's cut in #634.

Should this PR here be closed ?

@binarybaron
Copy link

Please re-open if required.

nabijaczleweli added a commit to nabijaczleweli/core that referenced this pull request Oct 21, 2025
On whonix, collect $TOR_SOCKS_* and use that as the default Transport.
Listening on a hidden service is not supported
(cf. eigenwallet#391 (comment)).

  # TOR_SOCKS_HOST=127.0.0.1 TOR_SOCKS_PORT=46105 ./target/debug/asb --testnet start
  2025-10-20T00:59:02.523377742Z  INFO swap::common::tracing_util: swap/src/common/tracing_util.rs:225: Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/logs
  2025-10-20T00:59:02.523734203Z  INFO asb: swap-asb/src/main.rs:59: Setting up context binary="asb" version="3.2.0-rc.4" os="linux" arch="x86_64"
  2025-10-20T00:59:02.524117896Z DEBUG swap::seed: swap/src/seed.rs:128: Reading in seed from /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/seed.pem
  2025-10-20T00:59:02.524380312Z DEBUG swap::database: swap/src/database.rs:99: Using existing sqlite database.
  2025-10-20T00:59:02.527334775Z  INFO asb: swap-asb/src/main.rs:176: Not tipping the developers (maker.developer_tip = 0 or not set in config)
  2025-10-20T00:59:02.527582262Z DEBUG asb: swap-asb/src/main.rs:613: Initializing Monero wallets
  2025-10-20T00:59:02.527860291Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:45: Using database at /home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero-rpc-pool/nodes_v3.db
  2025-10-20T00:59:02.539417001Z  INFO monero_rpc_pool::database: monero-rpc-pool/src/database.rs:59: Database migration completed
  2025-10-20T00:59:02.585025016Z  INFO monero_rpc_pool: monero-rpc-pool/src/lib.rs:174: Started server on 127.0.0.1:45251 (random port)
  2025-10-20T00:59:02.585302006Z  INFO asb: swap-asb/src/main.rs:637: Monero RPC Pool started for ASB on http://127.0.0.1:45251
  2025-10-20T00:59:02.590742943Z DEBUG monero_sys: monero-sys/src/lib.rs:1354: Updating wallet manager's remote node address=127.0.0.1:45251
  2025-10-20T00:59:09.182046612Z DEBUG monero_sys: monero-sys/src/lib.rs:1116: Opening or creating wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182339945Z DEBUG monero_sys: monero-sys/src/lib.rs:1367: Checking if wallet exists path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182665481Z DEBUG monero_sys: monero-sys/src/lib.rs:1120: Wallet already exists, opening it wallet=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.182925233Z DEBUG monero_sys: monero-sys/src/lib.rs:1318: Opening wallet path=/home/nabijaczleweli/.local/share/xmr-btc-swap/asb/testnet/monero/wallets/asb-wallet
  2025-10-20T00:59:09.844215951Z DEBUG monero_sys: monero-sys/src/lib.rs:1489: Initializing wallet address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:09.844695338Z DEBUG monero_sys: monero-sys/src/lib.rs:1577: Initializing wallet daemon_address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:12.471017858Z DEBUG monero_sys: monero-sys/src/lib.rs:1502: Initialized wallet, setting daemon address
  2025-10-20T00:59:12.471279924Z DEBUG monero_sys: monero-sys/src/lib.rs:1552: Setting daemon address address=127.0.0.1:45251 ssl=false
  2025-10-20T00:59:14.216130174Z DEBUG monero_sys: monero-sys/src/lib.rs:1507: Background sync enabled, starting refresh thread
  2025-10-20T00:59:14.243361749Z  INFO asb: swap-asb/src/main.rs:186: Monero wallet address monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.244657192Z  WARN asb: swap-asb/src/main.rs:196: The Monero balance is 0, make sure to deposit funds at monero_address=5AiDHB58fhFHB8u4uoSE8YHKbSxCEN8onDh4S8PKKQqMN2MekXNAJB42foDBgNq2wUAGnNzfZeEVfhwHQ6837Yf25gm6jmS
  2025-10-20T00:59:14.245413828Z DEBUG asb: swap-asb/src/main.rs:574: Opening Bitcoin wallet
  2025-10-20T00:59:14.254739766Z DEBUG swap::bitcoin::wallet: swap/src/bitcoin/wallet.rs:621: Loading existing Bitcoin wallet from database
  2025-10-20T00:59:14.351859914Z  INFO asb: swap-asb/src/main.rs:601: Skipping Bitcoin wallet sync because we are only using it for receiving funds
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352228163Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T00:59:14.352573504Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T00:59:14.353600945Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Ip(127.0.0.1:46105)

  # TOR_SOCKS_IPC_PATH=$PWD/SocksPort/sock ./target/debug/asb --testnet start
  2025-10-20T01:00:53.213704267Z  INFO asb: swap-asb/src/main.rs:218: Bitcoin wallet balance bitcoin_balance=0 BTC
  2025-10-20T01:00:53.214061031Z  INFO swap_env::env: swap-env/src/env.rs:147: On whonix, not starting Tor
  2025-10-20T01:00:53.215044718Z DEBUG swap::common::tor: swap/src/common/tor.rs:192: Using SOCKS5 proxy at Unix("/home/nabijaczleweli/uwu/another-bout/SocksPort/sock")

  $ tor ControlPort auto SocksPort unix:$PWD/uwu/another-bout/SocksPort/sock SafeLogging 0
  ...
  Oct 20 03:02:51.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
  Oct 20 03:02:51.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
  Oct 20 03:02:52.000 [notice] Bootstrapped 100% (done): Done
  Oct 20 03:03:20.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
  Oct 20 03:03:29.000 [notice] Have tried resolving or connecting to address '94.74.164.77' at 3 different places. Giving up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.789 XMR] Tails/Whonix Support

4 participants