-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 UPnP and NAT-PMP support #1539
Conversation
|
Done. |
Just tested this and it seems to work. It would be nice if this UPnP functionality could also map |
Done. |
LOGGER_INFO("A valid IGD has been found."); | ||
|
||
char portstr[10]; | ||
snprintf(portstr, sizeof(portstr), "%d", port); |
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.
I'm getting the following warning on make:
CC ../toxcore/libtoxcore_la-nat_traversal.lo
../toxcore/nat_traversal.c: In function 'upnp_map_port':
../toxcore/nat_traversal.c:70:13: warning: incompatible implicit declaration of built-in function 'snprintf'
snprintf(portstr, sizeof(portstr), "%d", port);
^
Compiled this with uTox and UPNP works as expected. Code looks also good to me, except the warning as commented above. My router does not support NAT-PMP so I could not test that. |
@cebe: should be fixed now. Please test again. |
I'll test this some time this week! |
@GrayHatter any news? |
No, haven't had the time. Don't let that discourage you from bumping this
|
Is there a way to disable UPnP at runtime? Eg if I'm on a network I don't want to open ports on? |
@GrayHatter set So this can be a dropdown in connection settings of the client. |
What @cebe said is correct, but the correct link to the code is https://github.com/irungentoo/toxcore/pull/1539/files#diff-a58028aec4211a18b170732935eba2e3R445 ( |
this is now merged into Thanks @Ansa89 |
Nice, thanks. |
This supersedes #1537 and is partially a rebase of #969.