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

nat: use libp2p UserAgent for the UPnP comment string #2307

Open
master255 opened this issue May 24, 2023 · 11 comments
Open

nat: use libp2p UserAgent for the UPnP comment string #2307

master255 opened this issue May 24, 2023 · 11 comments
Labels
effort/hours Estimated to take one or several hours exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now

Comments

@master255
Copy link

This is probably a minor bug.
When creating a host, there is a libp2p.UserAgent() field
It should name the port forwarded upnp with this name, not the name of the library (libp2p)
image

@marten-seemann
Copy link
Contributor

This is where it comes from:

func (nat *NAT) establishMapping(protocol string, internalPort int) (externalPort int) {
log.Debugf("Attempting port map: %s/%d", protocol, internalPort)
const comment = "libp2p"
nat.natmu.Lock()
var err error
externalPort, err = nat.nat.AddPortMapping(protocol, internalPort, comment, MappingDuration)

It's a comment / description, so it doesn't really matter what we put there. I agree though that it would be nice to use the user agent. Want to submit a patch?

@marten-seemann marten-seemann added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue P3 Low: Not priority right now good first issue Good issue for new contributors exp/beginner Can be confidently tackled by newcomers effort/hours Estimated to take one or several hours labels May 24, 2023
@marten-seemann marten-seemann changed the title UserAgent to use for the upnp port name nat: use libp2p UserAgent for the UPnP comment string May 24, 2023
@master255
Copy link
Author

@marten-seemann Yes. Of course :-) I'll give it a try.

@master255
Copy link
Author

@marten-seemann #2310

@master255
Copy link
Author

@marten-seemann It's been over two and a half months now. You promised me it would be added. Keep your promise. The task is ready.

@master255
Copy link
Author

@marten-seemann @MarcoPolo I'm starting to think you're spamming me on purpose to avoid adding my code.

@p-shahi
Copy link
Member

p-shahi commented Aug 18, 2023

@marten-seemann @MarcoPolo I'm starting to think you're spamming me on purpose to avoid adding my code.

Hi @master255 , the maintainers are not spamming you. I don't know why you make such a claim.
Looking at #2310 it seems like there's some back and forth between you and the maintainers. I agree with Marco's point about not changing the interface of the public DiscoverNAT method.
If you are having difficulty in designing the new function, then I suggest you join the maintainers call and we can discuss it a bit in person. Here's the community calendar

Apologies resolving this has taken a bit longer, the team has been dealing with other issues at higher priority (see recent patch release and fixes) - I can bring this up for a discussion the maintainer call so we can bring it to a close

@master255
Copy link
Author

@p-shahi I think such issues are better handled in writing. As it can take up to an hour of time to respond. And the conference does not have that much time.

What is the purpose of this public method? I think sometimes it is necessary to change public methods. This is the case when it is necessary to change it.

@master255
Copy link
Author

My last few responses there. Marco hasn't responded in days. Even very busy - I always find 5 minutes to reply. There's no way he doesn't have time. He probably just doesn't care.

@master255
Copy link
Author

Finally, developers themselves can correct the code if they see a bug.

@p-shahi
Copy link
Member

p-shahi commented Aug 18, 2023

@master255 It is a matter of priority - as you have pointed out this is a minor issue. Please don't attribute it to not caring but understand that maintainers are tasked with doing a dozen things at once. I agree that our response times need to be better as a team - that's fair.
However, the back and forth between you and maintainers in the PR shows that we need to be more hands on and guide/mentor you through the change - unfortunately, that's not a time commitment that can be made all the time.
Again you're more than welcome to join the open maintainers call where we can discuss this face to face and resolve it more quickly.
I won't be responding back anymore other than to provide an update on the path forward to this bugfix (no later than 2023/08/24)

@ameya-deshmukh
Copy link

Hey @p-shahi can I pick this up if the team is busy?

@p-shahi p-shahi added this to the Best Effort Track milestone Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

4 participants