ntop / n2n

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

added optional choice of bind address (-p) to supernode #1016

Closed Logan007 closed 2 years ago

Logan007 commented 2 years ago

This PR ports optional bind address (default 'any') from edge to supernode, e.g. -p 127.0.0.1:7777 where the IP address is optional such that -p 7777 still works as well.

Solves #1015

codecov-commenter commented 2 years ago

Codecov Report

Merging #1016 (1ddddc8) into dev (24c9ab9) will decrease coverage by 0.05%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev    #1016      +/-   ##
==========================================
- Coverage   20.91%   20.86%   -0.06%     
==========================================
  Files          47       47              
  Lines        8377     8398      +21     
==========================================
  Hits         1752     1752              
- Misses       6625     6646      +21     
Impacted Files Coverage Δ
src/sn_utils.c 0.00% <0.00%> (ø)
src/supernode.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 24c9ab9...1ddddc8. Read the comment docs.

happyntec commented 2 years ago

Good work;

This is a very useful enhancement for who run supernode in docker container or docker swarm or cloud network with serveral ethernet interfaces;

I've made serveral supernodes runned for a federation by docker swarm network, and each supernode just didn't get external ip, it's a big problem; Now i can bind special external ip address for each internal supernode;

Thank you. I'd glad to do testing for this enhancement;