[GH-ISSUE #14] UDP hole punching is enabled by default #118

Closed
opened 2026-04-16 07:39:40 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @roopeshsn on GitHub (Aug 24, 2025).
Original GitHub issue: https://github.com/fosrl/olm/issues/14

From the logs I could see that the UDP hole punching technique is enabled by default.

I even tried by passing the --holepunching flag as false but it didn't change the behavior.

ubuntu@still-coral:~$ sudo ./olm --id 2ybl0tcs9es7zbr --secret qbgwcm89mpx6lepag72ljgkxj4gfqgwmvd7sar3tg7l8jrib --endpoint https://tunnel.*****.com --holepunch false
INFO: 2025/08/24 11:46:52 Olm version 1.1.0
WARN: 2025/08/24 11:46:52 Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments.
INFO: 2025/08/24 11:46:53 Websocket Connected
INFO: 2025/08/24 11:46:53 Sent registration message
INFO: 2025/08/24 11:46:53 Sent initial ping message
INFO: 2025/08/24 11:46:53 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:53 Starting UDP hole punch to tunnel.*****.com
INFO: 2025/08/24 11:46:54 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:54 Stopping UDP holepunch
INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended for tunnel.*****.com
INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended
INFO: 2025/08/24 11:46:55 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:55 Starting UDP hole punch to tunnel.*****.com
INFO: 2025/08/24 11:46:56 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:56 Stopping UDP holepunch
INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended for tunnel.*****.com
INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended
...

Also it's not stopping or fallback at some point. It's keep trying. I mapped a site that is down to this client on the dashboard. So I guess it might the reason.

Originally created by @roopeshsn on GitHub (Aug 24, 2025). Original GitHub issue: https://github.com/fosrl/olm/issues/14 From the logs I could see that the UDP hole punching technique is enabled by default. I even tried by passing the `--holepunching` flag as false but it didn't change the behavior. ``` ubuntu@still-coral:~$ sudo ./olm --id 2ybl0tcs9es7zbr --secret qbgwcm89mpx6lepag72ljgkxj4gfqgwmvd7sar3tg7l8jrib --endpoint https://tunnel.*****.com --holepunch false INFO: 2025/08/24 11:46:52 Olm version 1.1.0 WARN: 2025/08/24 11:46:52 Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments. INFO: 2025/08/24 11:46:53 Websocket Connected INFO: 2025/08/24 11:46:53 Sent registration message INFO: 2025/08/24 11:46:53 Sent initial ping message INFO: 2025/08/24 11:46:53 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= INFO: 2025/08/24 11:46:53 Starting UDP hole punch to tunnel.*****.com INFO: 2025/08/24 11:46:54 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= INFO: 2025/08/24 11:46:54 Stopping UDP holepunch INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended for tunnel.*****.com INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended INFO: 2025/08/24 11:46:55 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= INFO: 2025/08/24 11:46:55 Starting UDP hole punch to tunnel.*****.com INFO: 2025/08/24 11:46:56 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= INFO: 2025/08/24 11:46:56 Stopping UDP holepunch INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended for tunnel.*****.com INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended ... ``` Also it's not stopping or fallback at some point. It's keep trying. I mapped a site that is down to this client on the dashboard. So I guess it might the reason.
Author
Owner

@AstralDestiny commented on GitHub (Aug 26, 2025):

Pretty sure the flag is just --holepunch so by setting --holepunch false it's not caring about the false or even if it was true the value is literally just --holepunch so omit that as per docs if you don't want holepunch

From the logs I could see that the UDP hole punching technique is enabled by default.

I even tried by passing the --holepunching flag as false but it didn't change the behavior.

ubuntu@still-coral:~$ sudo ./olm --id 2ybl0tcs9es7zbr --secret qbgwcm89mpx6lepag72ljgkxj4gfqgwmvd7sar3tg7l8jrib --endpoint https://tunnel.*****.com --holepunch false
INFO: 2025/08/24 11:46:52 Olm version 1.1.0
WARN: 2025/08/24 11:46:52 Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments.
INFO: 2025/08/24 11:46:53 Websocket Connected
INFO: 2025/08/24 11:46:53 Sent registration message
INFO: 2025/08/24 11:46:53 Sent initial ping message
INFO: 2025/08/24 11:46:53 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:53 Starting UDP hole punch to tunnel.*****.com
INFO: 2025/08/24 11:46:54 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:54 Stopping UDP holepunch
INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended for tunnel.*****.com
INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended
INFO: 2025/08/24 11:46:55 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:55 Starting UDP hole punch to tunnel.*****.com
INFO: 2025/08/24 11:46:56 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM=
INFO: 2025/08/24 11:46:56 Stopping UDP holepunch
INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended for tunnel.*****.com
INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended
...

Also it's not stopping or fallback at some point. It's keep trying. I mapped a site that is down to this client on the dashboard. So I guess it might the reason.

<!-- gh-comment-id:3224899694 --> @AstralDestiny commented on GitHub (Aug 26, 2025): Pretty sure the flag is just ``--holepunch`` so by setting ``--holepunch`` false it's not caring about the false or even if it was true the value is literally just ``--holepunch`` so omit that as per docs if you don't want [holepunch](https://docs.digpangolin.com/manage/clients/add-client#nat-hole-punching-experimental) > From the logs I could see that the UDP hole punching technique is enabled by default. > > I even tried by passing the `--holepunching` flag as false but it didn't change the behavior. > > ``` > ubuntu@still-coral:~$ sudo ./olm --id 2ybl0tcs9es7zbr --secret qbgwcm89mpx6lepag72ljgkxj4gfqgwmvd7sar3tg7l8jrib --endpoint https://tunnel.*****.com --holepunch false > INFO: 2025/08/24 11:46:52 Olm version 1.1.0 > WARN: 2025/08/24 11:46:52 Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments. > INFO: 2025/08/24 11:46:53 Websocket Connected > INFO: 2025/08/24 11:46:53 Sent registration message > INFO: 2025/08/24 11:46:53 Sent initial ping message > INFO: 2025/08/24 11:46:53 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= > INFO: 2025/08/24 11:46:53 Starting UDP hole punch to tunnel.*****.com > INFO: 2025/08/24 11:46:54 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= > INFO: 2025/08/24 11:46:54 Stopping UDP holepunch > INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended for tunnel.*****.com > INFO: 2025/08/24 11:46:54 UDP hole punch goroutine ended > INFO: 2025/08/24 11:46:55 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= > INFO: 2025/08/24 11:46:55 Starting UDP hole punch to tunnel.*****.com > INFO: 2025/08/24 11:46:56 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9zY5YuaEnM= > INFO: 2025/08/24 11:46:56 Stopping UDP holepunch > INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended for tunnel.*****.com > INFO: 2025/08/24 11:46:56 UDP hole punch goroutine ended > ... > ``` > > Also it's not stopping or fallback at some point. It's keep trying. I mapped a site that is down to this client on the dashboard. So I guess it might the reason.
Author
Owner

@roopeshsn commented on GitHub (Aug 27, 2025):

Alright, I removed the flag.

Now I don't see this log, "Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments."

But I do see the below hole punch starting and stopping logs:

INFO: 2025/08/27 07:29:30 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9z*****
INFO: 2025/08/27 07:29:30 Starting UDP hole punch to tunnel.*****.com
INFO: 2025/08/27 07:29:31 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9z*****
INFO: 2025/08/27 07:29:31 Stopping UDP holepunch
INFO: 2025/08/27 07:29:31 UDP hole punch goroutine ended for tunnel.*****.com
INFO: 2025/08/27 07:29:31 UDP hole punch goroutine ended
...

I see that the log "Starting hole punch for exit node:" is part of "olm/wg/holepunch" handler. Is hole punching is the default behavior to connect with other clients or peers?

0d1fbd9605/main.go (L463)

<!-- gh-comment-id:3226501038 --> @roopeshsn commented on GitHub (Aug 27, 2025): Alright, I removed the flag. Now I don't see this log, "Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments." But I do see the below hole punch starting and stopping logs: ``` INFO: 2025/08/27 07:29:30 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9z***** INFO: 2025/08/27 07:29:30 Starting UDP hole punch to tunnel.*****.com INFO: 2025/08/27 07:29:31 Starting hole punch for exit node: tunnel.*****.com with public key: fFRXzO9ryMvuyQRtL8pGK0oLkzkloQrTn9z***** INFO: 2025/08/27 07:29:31 Stopping UDP holepunch INFO: 2025/08/27 07:29:31 UDP hole punch goroutine ended for tunnel.*****.com INFO: 2025/08/27 07:29:31 UDP hole punch goroutine ended ... ``` I see that the log "Starting hole punch for exit node:" is part of "olm/wg/holepunch" handler. Is hole punching is the default behavior to connect with other clients or peers? https://github.com/fosrl/olm/blob/0d1fbd9605610221c1cdd20c1fbd5e55752ddcf8/main.go#L463
Author
Owner

@oschwartz10612 commented on GitHub (Aug 27, 2025):

So it does always send the UDP packets to gerbil even if it is not doing
the --holepunch method because it uses the source IP and port to help
identify the sender for relaying down to the sites! :}

Sorry for the confusion!

<!-- gh-comment-id:3226596462 --> @oschwartz10612 commented on GitHub (Aug 27, 2025): So it does always send the UDP packets to gerbil even if it is not doing the --holepunch method because it uses the source IP and port to help identify the sender for relaying down to the sites! :} Sorry for the confusion!
Author
Owner

@oschwartz10612 commented on GitHub (Aug 27, 2025):

Let me know if any more ?s !

<!-- gh-comment-id:3226597043 --> @oschwartz10612 commented on GitHub (Aug 27, 2025): Let me know if any more ?s !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/olm#118