Currently, setting up a proxy (whether SOCKS5 or Tor) with an IPv6 address works correctly via the command line or configuration file in both bitcoind
and bitcoin-qt
(also from the UI the ipv6 address gets saved properly in settings.json
). However, the UI does not reflect this properly, which can create confusion. Since some ISPs and VPNs still experience issues with IPv6, users may mistakenly think there is a problem with Bitcoin Core, when in fact the proxy setup is functioning as expected.
So this PR ensures that the proxy IP is displayed correctly in the UI when using an IPv6 address.
No functionality impact; changes only affect UI display.
-
Before:
-
After:
(Ubuntu 22.04)
-
Start ssh service on localhost.
ssh -D [::1]:1080 -f -C -q -N localhost
-
Check that the service is up and running.
0ps aux | grep ssh 1pepe 2860289 0.0 0.0 20456 5576 ? Ss 06:59 0:00 ssh -D [::1]:1080 -f -C -q -N localhost
-
Check with
bitcoind
if it works correctly.bitcoind -onlynet=ipv6 -proxy=[::1]:1080
-
Check for established connections.
0netstat -natl |grep 1080 1tcp6 0 0 ::1:1080 :::* LISTEN 2tcp6 0 0 ::1:47610 ::1:1080 ESTABLISHED 3tcp6 0 0 ::1:1080 ::1:47610 ESTABLISHED 4tcp6 0 0 ::1:1080 ::1:47606 TIME_WAIT
0[ 1 { 2 "id": 0, 3 "addr": "[2a01:4f9:4a:2a07::2]:8333", 4 "addrbind": "[::1]:47638", 5 "network": "ipv6", 6...
-
Stop
bitcoind
and runbitcoin-qt
adding the corresponding configuration insettings.json
.0{ 1 "onlynet": "ipv6", 2 "proxy": "[::1]:1080", 3}
-
Open the Peers window to check available connections or run
getpeerinfo
on the rpc-console window. -
Same can be done for Tor setting up
tor
service (I’ll add instructions later) and configuring on its default port 9050 and forcing"onlynet": "onion"
to verify easily the net traffic.
Thanks jarolrod and vasild for your help on validating ipv6 was not broken.