Added commandline arguments and functionality usefull to run behind a NAT #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This turn server enumerates all the interfaces found on the system, identifies globally addressable addresses and creates an UDP listen socket on the default port. Relay connections for this scenario is not restricted and the whole port range should be allowed in the firewall. This setup will work when the public addresses are configured on the system. For home setups where the server is behind a NAT this won't work.
There fore I have added ability to specify local listen address and a public relay address for listening connections and additional minimum and maximum port for the relay connections. Both the listen port and the relay port range have to be forwarded in the gateway providing network address translation so incoming UDP connections will end up reaching running instance of this turn server.
While testing run
to discover the commandline arguments.