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

RFE: UPNP support #55

Closed
leggewie opened this issue Mar 15, 2015 · 7 comments
Closed

RFE: UPNP support #55

leggewie opened this issue Mar 15, 2015 · 7 comments

Comments

@leggewie
Copy link
Member

It would be nice if freelan had a way to request via upnp for routers to open a port for incoming communications. To keep the maintenance burden low on freelan it would be good to try and identify an external tool that does the job.

I believe tribler and transmission already do this. I didn't find a dependency on an external package, maybe there ought to be one. But in any case it might be possible to learn how they do this and mimic it.

Debian seems to have a lot of libraries to choose from

  • libgupnp
  • libhupnp
  • libminiupnpc
  • libupnp
  • [...]
@korzec
Copy link

korzec commented Dec 30, 2016

One way could be to allow a shell command to be set in config file that would run the upnp function.

For example using the PortMapper can be a simple multi-platform solution:

java -jar PortMapper.jar -add -externalPort 1200 -internalPort 1200 [-ip <ip-addr>] -description desc

@s-vincent
Copy link
Member

The libminiupnpc (C library) is portable on GNU/Linux, macOS and Windows so it can be a good candidate.

The code to add a mapping does not seems too much complicated: https://stackoverflow.com/a/25789141.

@s-vincent
Copy link
Member

I begin an initial implementation for UPnP support with libminiupnpc. You can follow/test with the upnp branch.

@ereOn
Copy link
Member

ereOn commented Aug 12, 2017

@s-vincent Terrific news ! You seem unstoppable these days ! I like that ;)

@leggewie
Copy link
Member Author

Great news. Thanks, Sebastien.

I especially like the fact that miniupnp is maintained already in Debian. Even if it seems to be using a pretty old upstream version (from 2014).

@s-vincent
Copy link
Member

@ereOn Thanks ;).

And here is the PR #144! Feel free to review and test.

@s-vincent
Copy link
Member

PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants