ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.19k stars 934 forks source link

added port forwarding (upnp and pmp) #905

Closed Logan007 closed 2 years ago

Logan007 commented 2 years ago

This merges @fengdaolong 's #877 adding UPnP and PMP port forwarding techniques to the edge.

It relies on miniupnp and/or natpmp library support and is enabled by default. It can be disabled by --no-port-forwarding at the edge.

make tool chain will check for installed miniupnp and/or natpmp library and, if found, will compile with respective library support.

CMake integrates some snapshot of the libraries as submodules. Please do not forget to run git submodule init and git submodule update.

This is merged into dev for better access to testing. However, with a view to many WARNINGs at log output which might confuse users and also the delay when edge stops, we might change log output as well as default behavior (maybe: off by default) in the future.

Fixes #147

codecov-commenter commented 2 years ago

Codecov Report

Merging #905 (79957d1) into dev (a1facf0) will decrease coverage by 0.07%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #905      +/-   ##
==========================================
- Coverage   19.85%   19.77%   -0.08%     
==========================================
  Files          42       43       +1     
  Lines        8678     8713      +35     
==========================================
  Hits         1723     1723              
- Misses       6955     6990      +35     
Impacted Files Coverage Δ
src/edge.c 0.00% <0.00%> (ø)
src/edge_utils.c 1.41% <0.00%> (+<0.01%) :arrow_up:
src/n2n_port_mapping.c 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a1facf0...79957d1. Read the comment docs.