-
Notifications
You must be signed in to change notification settings - Fork 75
ETCM-541 attempt UPnP port mapping to aid in peer discovery & connection #929
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This pull request was sent to the PullRequest network.
@jvdp you can click here to see the review status or cancel the code review job - or - cancel by adding [!pr] to the title of the pull request.
@@ -47,6 +47,9 @@ mantis { | |||
port = 9076 | |||
} | |||
|
|||
# Try automatic port forwarding via UPnP | |||
automatic-port-forwarding = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be on by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For it to be useful, I think so. Someone who wouldn't map the ports themselves probably won't be inclined to enable this manually either, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
Couple of comments about logging and repeatability.
src/main/scala/io/iohk/ethereum/network/discovery/DiscoveryServiceBuilder.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice and clean overall. I didn't see any issues beyond what was already pointed out.
Reviewed with ❤️ by PullRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for persevering with me! 🏁
With this addition Mantis will try to use UPnP to open an UDP port for Kademlia / peer discovery and a TCP port for the Ethereum protocol. Can be disabled via
mantis.network.automatic-port-forwarding = false
(defaults to true.)