udp-holepunch - Python script for UDP holepunching using a webserver. With an example of SSH using this and sctp-echo.

git clone https://benconnors.ca/git-repos/udp-holepunch

About | Log | Files | Refs

commit d99f969405fe754cd41142ec2400ef56391f3daa
parent 45e8ff1a9ccbc6a6086704d71ebee3ea3344ce2f
Author: Ben Connors <benconnors@outlook.com>
Date:   Thu, 30 Jul 2026 13:02:02 -0400

Formatting fixes

Diffstat:
Mudp_holepunch.py | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/udp_holepunch.py b/udp_holepunch.py @@ -282,7 +282,7 @@ if __name__ == "__main__": "-l", "--local-port", type=int, default=0, - help="Fixed UDP port for us to use (defaults to 0 = auto-assigned by system)" + help="Fixed internal UDP port for us to use (defaults to 0 = auto-assigned by system)" ) p.add_argument( "-p", "--server-port", @@ -314,9 +314,20 @@ if __name__ == "__main__": args = parser.parse_args() if args.type == "client": - ret = udp_holepunch_client(args.local_port, args.server_name, args.server_port, args.server_path, no_ack=args.skip_ack) + ret = udp_holepunch_client( + args.local_port, + args.server_name, + args.server_port, + args.server_path, + no_ack=args.skip_ack + ) else: - ret = udp_holepunch_server(args.local_port, args.server_port, args.server_path, no_ack=args.skip_ack) + ret = udp_holepunch_server( + args.local_port, + args.server_port, + args.server_path, + no_ack=args.skip_ack + ) if ret is None: sys.exit(1)