Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bisq 2 onion-grater profile #11

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

alvasw
Copy link
Contributor

@alvasw alvasw commented Jun 11, 2024

  • Remove deprecated SETEVENTS command
  • Add missing ADD_ONION pattern and replacement
  • Fix HS_DESC UPLOAD pattern and replacement
  • Add missing HS_DESC FAILED pattern and replacement

Ref: bisq-network/bisq2#1894

- Remove deprecated SETEVENTS command
- Add missing ADD_ONION pattern and replacement
- Fix HS_DESC UPLOAD pattern and replacement
- Add missing HS_DESC FAILED pattern and replacement

Ref: bisq-network/bisq2#1894
@alvasw
Copy link
Contributor Author

alvasw commented Jun 11, 2024

Hi @adrelanos,

I'm one of the Bisq core contributors and worked on the Bisq 2 Whonix support over the last few weeks. Bisq used the jtorctl library from the Tor Project [1] until now. Unforunately, is is not maintained by the Tor Project anymore and outdated. We re-implemented the Tor Control Protocol in Java to add Whonix/onion-grater support.

This commit and the commits in Bisq are signed with the same GPG key (see [2] and [3]).

[1] https://github.com/torproject/jtorctl
[2] https://github.com/bisq-network/bisq/pulls?q=is%3Apr+author%3Aalvasw+
[3] https://github.com/bisq-network/bisq2/pulls?q=is%3Apr+author%3Aalvasw+

- pattern: '650 HS_DESC FAILED (\S+) \S+ \S+ \S+ (.+)'
replacement: '650 HS_DESC FAILED {} redacted redacted redacted {}'
- pattern: '650 HS_DESC UPLOAD (\S+) (\S+) (\S+) (\S+) (\S+)'
replacement: '650 HS_DESC UPLOAD {} {} {} {} {}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all those fields in HS_DESC UPLOAD required to be seen by the Bisq client?

Cwtch can use less information and Onionshare also.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's used as a DoS defense in the handshake. When a Bisq client receives an incoming connection from another peer, the connecting peer proves its onion address ownership and the other peer verifies that the onion address is online by checking whether the onion service's hidden service descriptors were uploaded.

So if Alice connects to Bob before Alice has uploaded her hidden service descriptors, Bob will reject the connection.

@nyxnor
Copy link
Contributor

nyxnor commented Jun 13, 2024

Thanks for contributing!

@nyxnor
Copy link
Contributor

nyxnor commented Jun 13, 2024

For this PR to get merged, we need to test Bisq2 release greater than 2.0.4. bisq-network/bisq2#1894 (comment)

@alvasw
Copy link
Contributor Author

alvasw commented Sep 19, 2024

Please apologize my late reply!

Are all those fields in HS_DESC UPLOAD required to be seen by the Bisq client?

Yes, it's used as a DoS defense in the handshake. When a Bisq client receives an incoming connection from another peer, the connecting peer proves its onion address ownership and the other peer verifies that the onion address is online by checking whether the onion service's hidden service descriptors were uploaded.

So if Alice connects to Bob before Alice has uploaded her hidden service descriptors, Bob will reject the connection.

We could count the number of hidden service descriptor uploads and successes/failures instead of verifying the directories.

@nyxnor
Copy link
Contributor

nyxnor commented Sep 26, 2024

Tested on Bisq2.1.0. It is working!

@adrelanos
Copy link
Contributor

Thank you!

@adrelanos adrelanos merged commit a437dbf into Whonix:master Sep 27, 2024
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.

3 participants