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

Add IPv6 support [2 XMR] #1076

Open
shortwavesurfer2009 opened this issue Jun 25, 2024 · 19 comments
Open

Add IPv6 support [2 XMR] #1076

shortwavesurfer2009 opened this issue Jun 25, 2024 · 19 comments
Labels
💰bounty There is a bounty on this issue is:feature Request for a new feature

Comments

@shortwavesurfer2009
Copy link
Contributor

Haveno does not recognize nodes on ipv6 such as feder8.me:18089 or [2607:3c40:1900:33e0::1]:18089

@boldsuck
Copy link
Contributor

We discussed this topic in chat yesterday. Yes, IPv6 failed.
Mainnet-nodes for testing: 2a0b:f4c2:2::63:18081, 2a0b:f4c2:2:1::223:18081, 2001:4ba0:ffff:c4::2:18081
Stagenet: 2605:6400:30:f91d::2:38081

@woodser woodser added the is:bug Something isn't working as expected label Jun 26, 2024
@woodser
Copy link
Contributor

woodser commented Jun 30, 2024

Comment from @fa2a5qj3:

Seems monero-wallet-rpc/cli does not work through Tor proxy to an IPv6 destination (IPv4 is ok).

Prerequisites:

  • check ipv6 is supported with ping -6 feder8.me
  • have tor daemon running

Tests:

  1. start monero-wallet-rpc connecting to IPv4 node (node3.monerodevs.org:18089)
  2. start monero-wallet-rpc connecting to IPv4 node (node3.monerodevs.org:18089) through SOCKS5 proxy
  3. start monero-wallet-rpc connecting to IPv6 node (feder8.me:18089)
  4. start monero-wallet-rpc connecting to IPv6 node (feder8.me:18089) through SOCKS5 proxy
  5. start monero-wallet-rpc connecting to IPv6 node ([2a0b:f4c2:2::63]:18081)
  6. start monero-wallet-rpc connecting to IPv6 node ([2a0b:f4c2:2::63]:18081) through SOCKS5 proxy

Tests 4 and 6 fail. I would have expected all 6 tests to pass.
The error message is "no_connection_to_daemon".

@shortwavesurfer2009
Copy link
Contributor Author

this is still an issue. I just tried my monerod over ipv6 with no luck. I can connect my cake wallet and mysu wallets to it just fine but cannot make haveno use it. I am using the restricted rpc port 18089 so am not sure if that has something to do with it or not

@woodser woodser added is:feature Request for a new feature and removed is:bug Something isn't working as expected labels Jul 23, 2024
@woodser woodser changed the title Add IPv6 support Add IPv6 support [1 XMR] Jul 23, 2024
@woodser woodser added the 💰bounty There is a bounty on this issue label Jul 23, 2024
Copy link

There is a bounty on this issue, the amount is in the title. The reward will be awarded to the first person or group of people who resolves this issue.

If you are starting to work on this bounty, please write a comment, so that we can assign the issue to you. We expect contributors to provide a PR in a reasonable time frame or, in case of an extensive work, updates on their progresses. We will unassign the issue if we feel the assignee is not responsive or has abandoned the task.

Read the full conditions and details of our bounty system.

@fa2a5qj3
Copy link
Contributor

The issue will be resolved when monero-wallet-rpc supports SOCKS5.

@vtnerd said "I will put Socks5+IPv6 support in my next CCS proposal (hopefully I will have time for it)."

@shortwavesurfer2009
Copy link
Contributor Author

Maybe a bit of a dumb question, but why do wallets like cake and mysu work with IPv6 nodes while this does not?

@boldsuck
Copy link
Contributor

I think because of SOCKS5 support. Monero GUI and seednode to monerod works over IPv6.

@sneurlax
Copy link

See monero-project/monero#9443

@KewbitXMR
Copy link

KewbitXMR commented Aug 22, 2024 via email

@obamaruntz
Copy link

Bump this to 2 XMR and I’ll do it

@woodser
Copy link
Contributor

woodser commented Oct 8, 2024

@obamaruntz From vtnerd's comment, monero-project uses socks4 internally which only supports IPv4.

@vtnerd has said he might have time to work on changing that, but just checking if you are prepared to fix that within monero-project as well?

@obamaruntz
Copy link

Sure if monero-project would allow a big change like socks4 to socks5 or something? What do you think?

@woodser woodser changed the title Add IPv6 support [1 XMR] Add IPv6 support [2 XMR] Oct 8, 2024
@woodser
Copy link
Contributor

woodser commented Oct 8, 2024

I'd love to see IPv6 fully supported in monero-project. Bounty increased to 2 XMR in case you want to try.

@boldsuck
Copy link
Contributor

boldsuck commented Oct 8, 2024

I can confirm that Haveno IPv6 support works with externalTor.

Okt.-08 14:12:08.681 [JavaFX Application Thread] INFO  h.c.a.XmrConnectionService: XmrConnectionService.onConnectionChanged() uri=http://[2a0b:f4c2:2::63]:18081, connected=true 
Okt.-08 14:12:08.683 [JavaFX Application Thread] INFO  h.c.a.XmrConnectionService: XmrConnectionService.onConnectionChanged() uri=http://[2a0b:f4c2:2::63]:18081, connected=true 
Okt.-08 14:12:08.703 [JavaFX Application Thread] INFO  h.c.a.HavenoSetup: Init wallet 
Okt.-08 14:12:08.704 [JavaFX Application Thread] INFO  h.c.a.WalletAppSetup: Initialize WalletAppSetup with monero-java version 0.8.31 
Okt.-08 14:12:08.713 [JavaFX Application Thread] INFO  h.c.x.s.WalletsSetup: Using Socks5Proxy: localhost:9050	Version 5 
Okt.-08 14:12:08.714 [JavaFX Application Thread] INFO  o.b.c.Context: Creating bitcoinj 0.15.8.bisq.13 context. 
Okt.-08 14:12:09.157 [JavaFX Application Thread] INFO  h.c.x.n.XmrNetworkConfig: You connect with peerAddresses: [[6dsdenp6vjkvqzy4wzsnzn6wixkdzihx3khiumyzieauxuxslmcaeiad.onion]:18081, [ip4zpbps7unk6xhlanqtw24f75akfbl3upeckfjqjks7ftfnk4i73oid.onion]:18081, [i4jsfwmw22yjzzmzkoc7aahiaqlyhnykn5wxel43u3o5ibz2k4275jqd.onion]:18081, [217.79.184.72]:18081, [185.220.101.223]:18081, [185.220.101.63]:18081] 
Okt.-08 14:12:09.166 [ STARTING] INFO  h.c.x.w.XmrWalletService: Monero native libraries applied: false 
Okt.-08 14:12:09.177 [JavaFX Application Thread] INFO  h.c.a.AppStartupState: Combined initialized state = false = updatedDataReceived=false && isBlockDownloadComplete=true && isWalletSynced=false && hasSufficientPeersForBroadcast=false && allDomainServicesInitialized=false 
Okt.-08 14:12:09.179 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Initializing main wallet with monerod=http://[2a0b:f4c2:2::63]:18081 
Okt.-08 14:12:09.179 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: XmrWalletService.openWallet(haveno_XMR) 
Okt.-08 14:12:13.541 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Opening RPC wallet haveno_XMR with monerod=http://[2a0b:f4c2:2::63]:18081, proxyUri=null 
Okt.-08 14:12:23.377 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Done opening RPC wallet haveno_XMR 
Okt.-08 14:12:23.380 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Monero wallet path=haveno_XMR 
Okt.-08 14:12:23.694 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Syncing main wallet 
Okt.-08 14:12:40.076 [XmrWalletService] INFO  h.c.x.w.XmrWalletService: Done syncing main wallet in 16379 ms 
Okt.-08 14:12:40.214 [XmrWalletService] INFO  h.c.a.HavenoSetup: walletInitialized=true, p2pNetWorkReady=true 
Okt.-08 14:12:40.214 [XmrWalletService] INFO  h.c.a.HavenoSetup: initDomainServices 
Okt.-08 14:12:40.228 [XmrWalletService] INFO  h.c.t.TradeManager: Initializing persisted trades 
Okt.-08 14:12:40.238 [Thread-11] INFO  h.c.t.TradeManager: Done initializing persisted trades 

My torrc Socks conf:

SocksPort 9050 ExtendedErrors
SocksPort [::1]:9050 ExtendedErrors

SocksPolicy accept 127.0.0.1
SocksPolicy accept6 [::1]
SocksPolicy reject *

@woodser
Copy link
Contributor

woodser commented Oct 8, 2024

Actually @vtnerd has a PR open to support IPv6 in the daemon and wallet: monero-project/monero#9443

@boldsuck
Copy link
Contributor

boldsuck commented Oct 8, 2024

I just tested Haveno with internal Tor (Netlayer/jtorctl). It works too.

haveno.properties

xmrNode=[2a0b:f4c2:2::63]:18081
torrcOptions=%include /home/user/.local/share/Haveno-reto/torrc.local

torrc.local

SocksPort 19050
SocksPort [::1]:19050
SocksPolicy accept 127.0.0.1
SocksPolicy accept6 [::1]
SocksPolicy reject *

Configure only IPv6 SocksPort in torrc.local does not work. Haveno has SocksPort error message and cannot find any seeds. So torrc.local with only:
SocksPort [::1]:auto
or
SocksPort [::1]:19050

I have not yet tested configuring SOCKSPort [::1]:auto when compiling.
netlayer torrc

@boldsuck
Copy link
Contributor

boldsuck commented Oct 8, 2024

I'd love to see IPv6 fully supported in monero-project.

If someone is working on Monero IPv6 improvements. There is an inconsistency in the config.
For some time now, p2p-bind-ipv6-address= can no longer be specified with brackets in monerod.conf.
See: monero-project/monero#8818 (comment)

rpc-bind-ipv6-address=[::1] and rpc-restricted-bind-ipv6-address=[::] can be specified with brackets.
But p2p-bind-ipv6-address=:: not.
With p2p-bind-ipv6-address=[::] monerod is not LISTEN on IPv6 Port, I tested this just yesterday.

Until about 2 years ago IPv6 addresses had to be specified as "[xx:xx:xx::xx:xx]:port" in the configuration file.

@U65535F
Copy link

U65535F commented Feb 21, 2025

@woodser Can I take a look at this? Why is the PR abandoned? Can I recreate one such PR and maintain it with similar code?

@woodser
Copy link
Contributor

woodser commented Feb 21, 2025

Probably their PR just stalled. I left a comment for updates: monero-project/monero#9443 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💰bounty There is a bounty on this issue is:feature Request for a new feature
Projects
None yet
Development

No branches or pull requests

8 participants