-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat: provide a way to define advertised addresses #1797
Comments
We may need to adjust around the next: Line 112 in 940206b
|
I guess you can just reset that entire array and set it to the array passed in arguments if there is one? I don't know nim at all, but something like: if advertisedMultiaddress.isSome():
announcedAddresses = advertisedMultiaddress after line 121? |
Hey @filoozom ! Yes sth like that but we need to review it carefully so that other users are not impacted. We have been discussing the different options:
Personally, I think the best long-term option is to adapt the @vpavlin , @SionoiS , @rymnc , @alrevuelta - Feel free to correct me if I misunderstood or missed anything. |
@filoozom just to confirm. js-waku/js-libp2p should probably (I haven't checked but I know rust-libp2p does that) try to connect to the various multiaddrs available for a peer. Isn't it happening? What behaviour do you witness? |
@fryorcraken Yes, |
Finally wrapped my around this issue after discussing with @mfw78. I think it would make sense to correct this so that nwaku does not advertise useless |
Note that advertising a
While a generalized solution may be useful, one that only enables to discard |
The code that publishes the Lines 125 to 128 in f05528d
Notice that if we have a The variables So The solution that comes to mind is to correct our assumption that we don't have an external ws/wss address when we actually do. |
Weekly Update
|
Weekly Update
|
The PR #2122 did not actually solve the original issue. The proposal is then to add We'll come up with the PR and @filoozom can test the PR image to see if it solves the issue:) Then we can release v0.21.1 |
Weekly Update
|
Problem
I'm running
nwaku
nodes behind an SSL gateway that manages all the encryption and certificates. Basically, thenwaku
node listens to WebSocket requests without any encryption, and I add the right multi address via--ext-multiaddr
.However, there's no way to disable the default
/ip4/.../tcp/8000/ws/p2p/...
address, meaning thatjs-waku
will try to connect to it for example.I end up with the following advertised addresses:
Suggested solution
Add a
--advertised-multiaddr
flag that makes it possible to override all advertised addresses. In my example, I'd need to remove--ext-multiaddr
and to add the following flags:I could also then presumably remove
--nat:extip:ip
.Alternatives considered
An alternative that at least doesn't really break this is to also advertise the WebSocket address and forward that on the reverse proxy, so that
/ip4/.../tcp/8000/ws/p2p/...
actually works. But that's not what I want.An alternative solution to implement could be not to add
/ip4/.../tcp/8000/ws/p2p/...
by default when enabling WebSocket without making it much more flexible.Additional context
There are many reasons why one could want this:
Being able to precisely confuse the advertised addresses also makes everything more flexible. For example, I can have my
nwaku
node listen on port 60000 in a Docker container, VM or whatever, and NAT that to any IP:PORT combination without having to listen on that specific port and setting--nat:extip:IP
Acceptance criteria
I can configure exactly which multi addresses are being advertised by my node.
The text was updated successfully, but these errors were encountered: