[bisq-network/bisq] Allow IPv6 connections to Bitcoin nodes (#4045)

James Cox notifications at github.com
Wed Mar 11 04:04:50 UTC 2020

Fixes #3990

Currently bisq desktop does not accept IPv6 addresses in the settings for custom nodes or via the `--btcNodes` command line option.  
While the address format is already validated in `desktop / GUIUtil`, the separation of address and port is handled incorrectly in `core / BtcNodes::fromFullAddress`.
This results in IPv6 addresses being ignored, regardless of whether they are entered via the GUI or command line.

This change fixes the code in `BtcNodes::fromFullAddress` to identify an IPv6 address as being surrounded by square brackets.

- IPv6 addresses are a sequence of hexadecimal and ':' characters enclosed by square brackets, followed by an optional colon and port number
- Onion addresses are a sequence of alphanumeric characters followed by `.onion` and an optional colon and port number
- IPv4 addresses are a sequence of numeric and '.' characters followed by an optional colon and port number

the following use case tests were identified and checked:

- onion address no port
- onion address with port
- IPv4 address no port
- IPv4 address with port
- IPv6 address no port
- IPv6 address with port
- combination of all the above types
- invalid input

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * fix #3990

-- File Changes --

    M core/src/main/java/bisq/core/btc/nodes/BtcNodes.java (25)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200310/e680f5ed/attachment.html>

More information about the bisq-github mailing list