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 a --nat flag to reth node #854

Closed
Tracked by #851
onbjerg opened this issue Jan 13, 2023 · 2 comments · Fixed by #888
Closed
Tracked by #851

Add a --nat flag to reth node #854

onbjerg opened this issue Jan 13, 2023 · 2 comments · Fixed by #888
Assignees
Labels
A-cli Related to the reth CLI C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@onbjerg
Copy link
Collaborator

onbjerg commented Jan 13, 2023

Describe the feature

It should be possible to specify what kind of NAT mechanism to use when invoking reth node.

The supported methods can be found here:

pub enum NatResolver {

The flag should be: --nat <method>, where <method> is any of:

  • any
  • upnp
  • auto (maps to PublicIp)
  • extip:<ip> (maps to ExternalIp)
  • none (maps to None)

The default should be any.

Ideally, the NatResolver enum would be re-used for the CLI to not duplicate code.

The resolution method is set on NetworkConfigBuilder using:

builder::discovery(
  Discv4Config::builder()
    .external_ip_resolver(Some(nat_resolution_method))
)

Additional context

No response

@onbjerg onbjerg added C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started A-cli Related to the reth CLI labels Jan 13, 2023
@literallymarvellous
Copy link
Contributor

Would like to take this

@onbjerg onbjerg moved this from Todo to In Progress in Reth Tracker Jan 13, 2023
@onbjerg
Copy link
Collaborator Author

onbjerg commented Jan 13, 2023

Thanks! I've assigned you to the issue. If you feel stuck, open up a draft PR with your questions and someone will help you. If you are prevented from solving the issue, let me know and I will unassign you 😄

@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
2 participants