UDP hole punching for partly firewalled servers #287

wants to merge 1 commit into


None yet
3 participants

klenze commented Jun 13, 2012

Hi Keith, I finally managed to get github to generate a pull request.

Most of the changes should already be described in my mail, I also added a string fw_hole_command which is read from some environment variable and meant to contain a shell line to get the server to dispatch another hole punching packet after client IP changes. (It is not used yet -- I'm not sure if it should be automatically run on some conditions or bound to a keyboard shortcut.)

I did not adapt the perl script yet but just wrote a minimal wrapper shell script (also included in the mail) to use the new hole-punching features.

I've attempted to bring Klenze's patch up to date with the latest head.


One difference is to pass the client's port to mosh-client via the command line instead of an environment variable.

I added a README to discuss some of the issues with this idea.


More work is needed including teaching the "mosh" script what to do and to try to hande roaming.

Would this be a good place to beg for better UPnP-style UDP port mapping for NAT'd servers? :) I know it's a feature request, just not certain if it's tracked anywhere else, and it'd be really, really useful.

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