-
Notifications
You must be signed in to change notification settings - Fork 949
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: automate port-forwarding e.g. via UPnP #3903
Comments
I guess the questions would be
Additional thoughts:
|
Really good questions!
From what I understand, We might have some shared code between
Use both if it doesn't result in too much complexity? Not sure if we need to make a call on this here.
My primary concern would be the dependency footprint given that this will be included for pretty much everyone because you need one of those transports for a libp2p deployment. Preferably pure Rust but I don't see FFI as a blocker.
It makes sense to not reinvent the wheel. Esp when it comes to sending HTTP messages. It needs to work across all executors so whatever crate we use shouldn't hardcode
Isn't that orthogonal? With protocols like AutoNAT, I'd expect that because of Upnp, we end up being publicly reachable and thus AutoNAT will report it as such. If the port forwarding is disabled somewhere, we will also learn that again through AutoNAT. I am not sure there needs to be a direct link in the sense of reporting an event that we stopped forwarding. |
In natpmp the only part implemented in C is the functionality of getting a user's default gateway. Looks like it would be trivial to convert this part to Rust. |
@jxs I assigned you to this as I believe you are currently working on this :) |
Sorry for the late response
I think my original idea was to make swarm more aware of the external ip directly rather than depending solely on another protocol to notify swarm about it (though the use of it can be more reaffirming), especially in cases of where one may not be using something like AutoNAT, etc. However, I think making use of |
Yes, I had a conversation with @jxs about this and we also concluded that likely the best way to implement this is using What happens if we are behind more than one NAT? Does ITP guarantee us that we are reachable via the public internet in case of a successful port opening? Or does ITP only care about one NAT device? |
I would expect the |
Small correction, I meant IGD, not sure where ITP came from 🙃
In most deployments, a successful port-forwarding would result in a publicly reachable address and thus AutoNAT would not be needed in this case. It is more correct to rely on AutoNAT but as I stated in a previous discussion, it would be great if we wouldn't create such a strong dependency here. Like, it would be great if we have multiple solutions for external addresses instead of essentially forcing users into AutoNAT. |
Description
Leverage protocols like UPnP to configure port-forwarding on ones router when behind NAT and/or firewall.
Motivation
Reachable from outside a private network.
Are you planning to do it yourself in a pull request?
No
The text was updated successfully, but these errors were encountered: