Relayed connection to exit node with aliases enabled sends DNS while tunnel isn't ready yet
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- mobile, networking
Direzione di ricerca
Start by tracing how the Android client sets up DNS override and tunnel DNS while connecting through a relay; the issue does not name source files or tests. Use the provided reproduction steps with aliases enabled and force relay mode by blocking the handshake response. Done means the client connects through the relay and resolves the Pangolin domain without sending DNS through the tunnel before it is ready.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the Bug
When you attempt to connect to your Pangolin server while on a more restricted network, the direct WireGuard connection to the exit node might fail and requires you to use relay mode.
However, it seems to get stuck for me on the "registering" step. Looking closer at the logs it seems like the Pangolin client is trying to resolve the Pangolin domain through the tunnel, which isn't ready yet, causing the request to timeout and it never connects.
My phone is able to connect if I'm connected via mobile data, as then it manages to get a direct connection to the exit node. Strangely enough if I attempt to connect to the same exit node using the same DNS settings on my Macbook, which is on the same restricted network, it can connect via relay mode, indicating the server configuration is correct.
I also double checked if it wasn't an IPv4 vs IPv6 issue, but the restricted network I tested on doesn't have a public IPv6 address, so both my phone and Macbook connected via IPv4.
Entire log file: pangolin_cleaned.log
This log file is generated while my phone was connected to mobile data, with the Newt exit node having the iptables reproduce method enabled.
Some parts of this log have been replaced with the following dummy values:
- Organization ID:
example - Pangolin domain:
pangolin.example.net - Pangolin server IP:
111.111.111.111 - Exit node server IP:
222.222.222.222
Relevant logs snippet:
2026-11-18 19:37:15.124 [WARN] PangolinGo: olm: giving up on olm/wg/relay for site 3 (chain ed2dad0583be6711) after 10 attempts
2026-11-18 19:37:15.125 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:15.127 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:17.125 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:17.126 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:17.456 [DEBUG] PangolinGo: DNS query for pangolin.example.net. (type AAAA)
2026-11-18 19:37:17.457 [DEBUG] PangolinGo: No local record for pangolin.example.net., forwarding upstream to [10.70.0.20:53 10.70.0.20:53]
2026-11-18 19:37:17.457 [DEBUG] PangolinGo: DNS query for pangolin.example.net. (type A)
2026-11-18 19:37:17.457 [DEBUG] PangolinGo: wireguard: peer(o+Dd…Zgj0) - Sending handshake initiation
2026-11-18 19:37:17.457 [DEBUG] PangolinGo: No local record for pangolin.example.net., forwarding upstream to [10.70.0.20:53 10.70.0.20:53]
2026-11-18 19:37:19.124 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:19.125 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:19.458 [DEBUG] PangolinGo: Primary DNS failed, trying secondary: failed to read response: read udp 100.90.128.3:30778: i/o timeout
2026-11-18 19:37:19.458 [DEBUG] PangolinGo: Primary DNS failed, trying secondary: failed to read response: read udp 100.90.128.3:33252: i/o timeout
2026-11-18 19:37:21.124 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:21.125 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:21.460 [ERROR] PangolinGo: Both DNS servers failed: failed to read response: read udp 100.90.128.3:39103: i/o timeout
2026-11-18 19:37:21.461 [ERROR] PangolinGo: Failed to get DNS response for pangolin.example.net.
2026-11-18 19:37:21.461 [ERROR] PangolinGo: Both DNS servers failed: failed to read response: read udp 100.90.128.3:64134: i/o timeout
2026-11-18 19:37:21.461 [ERROR] PangolinGo: Failed to get DNS response for pangolin.example.net.
2026-11-18 19:37:22.461 [DEBUG] PangolinGo: DNS query for pangolin.example.net. (type AAAA)
2026-11-18 19:37:22.462 [DEBUG] PangolinGo: No local record for pangolin.example.net., forwarding upstream to [10.70.0.20:53 10.70.0.20:53]
2026-11-18 19:37:22.462 [DEBUG] PangolinGo: DNS query for pangolin.example.net. (type A)
2026-11-18 19:37:22.462 [DEBUG] PangolinGo: No local record for pangolin.example.net., forwarding upstream to [10.70.0.20:53 10.70.0.20:53]
2026-11-18 19:37:22.462 [DEBUG] PangolinGo: wireguard: peer(o+Dd…Zgj0) - Sending handshake initiation
2026-11-18 19:37:23.124 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:23.125 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:24.464 [DEBUG] PangolinGo: Primary DNS failed, trying secondary: failed to read response: read udp 100.90.128.3:42782: i/o timeout
2026-11-18 19:37:24.464 [DEBUG] PangolinGo: Primary DNS failed, trying secondary: failed to read response: read udp 100.90.128.3:56227: i/o timeout
2026-11-18 19:37:25.126 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:25.127 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:26.465 [ERROR] PangolinGo: Both DNS servers failed: failed to read response: read udp 100.90.128.3:54710: i/o timeout
2026-11-18 19:37:26.466 [ERROR] PangolinGo: Failed to get DNS response for pangolin.example.net.
2026-11-18 19:37:26.466 [ERROR] PangolinGo: Both DNS servers failed: failed to read response: read udp 100.90.128.3:35217: i/o timeout
2026-11-18 19:37:26.466 [ERROR] PangolinGo: Failed to get DNS response for pangolin.example.net.
2026-11-18 19:37:27.124 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:27.125 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:27.468 [ERROR] PangolinGo: Failed to resolve primary relay endpoint for site 3: DNS lookup failed using all upstream servers: lookup pangolin.example.net on [::1]:53: read udp 100.90.128.3:34256->84.241.227.81:53: i/o timeout
2026-11-18 19:37:27.469 [DEBUG] PangolinGo: websocket: setting config version to 0
2026-11-18 19:37:27.469 [DEBUG] PangolinGo: Received relay-peer message: map[chainIds:[ee733d283687444e] relayEndpoints:[pangolin.example.net] relayPort:21820 siteIds:[3]]
2026-11-18 19:37:27.469 [WARN] PangolinGo: CancelRelaySend: no active sender for chain ee733d283687444e
2026-11-18 19:37:27.470 [DEBUG] PangolinGo: wireguard: peer(o+Dd…Zgj0) - Sending handshake initiation
2026-11-18 19:37:29.125 [DEBUG] PangolinGo: websocket: Sending message: olm/wg/relay, data: map[chainIds:[aeb106ebcf51aab6] siteIds:[3]]
2026-11-18 19:37:29.127 [INFO] PangolinGo: olm: sent batched olm/wg/relay for 1 site(s)
2026-11-18 19:37:29.513 [INFO] PangolinGo: Holepunch to site 3 failed 10 times, triggering relay
2026-11-18 19:37:29.514 [INFO] PangolinGo: Queued relay message for site 3 (chain cbc97e63a19bcca5)
2026-11-18 19:37:29.715 [WARN] PangolinGo: olm: giving up on olm/wg/relay for site 3 (chain aeb106ebcf51aab6) after 10 attempts
Environment
- OS Type & Version: LineageOS 23.2 (Android 16) on a Google Pixel 6
- Pangolin Version: 1.25.3
- Edition (Community or Enterprise): Enterprise (Personal)
- Gerbil Version: 1.5.2
- Traefik Version: 3.7
- Newt Version: 1.19 via Docker
- Client Version: Android 0.8.3 from Play Store, compared against macOS 0.12.2 installed via Brew
To Reproduce
Please note that we will need to force the relay path for this issue, it doesn't seem to happen with direct connections to the site that is used as an exit node.
- Set up a site (Newt running via Docker in my case) with an exit node, and give the user access.
- On the Android client, set an upstream DNS server (PiHole server accessible from LAN in my case), enable "Enable Aliases (DNS override)" and "DNS over tunnel", and select the exit node.
- Put the phone on mobile data and note its public IP.
- On the Newt host that will act as the exit node, temporarily block the handshake response from reaching the phone in order to force relay mode:
sudo iptables -I DOCKER-USER -p udp -d <phone public IP> -j DROP
- Attempt to connect with the Android client.
- Observed: the client gets stuck at "Registering". The client log shows the relay-peer message, followed by the failed relay endpoint lookup from the tunnel IP. The Newt log repeatedly shows "Removing Endpoint for peer ..." (relay mode), but no traffic from the client arrives
- Disable "Enable Aliases (DNS override)" option
- Attempt to connect again: the client connects after a relatively long wait (about 20 seconds until the DNS timeout)
If it helps, here is a blueprint you can use:
- "pangolin.private-resources.example-site-exit-node.enabled=true"
- "pangolin.private-resources.example-site-exit-node.name=Example site Exit Node"
- "pangolin.private-resources.example-site-exit-node.mode=exit-node"
- "pangolin.private-resources.example-site-exit-node.sites[0]=example-site"
- "pangolin.private-resources.example-site-exit-node.roles[0]=Home Exit Node"
# This didn't make a difference for me, but the app did specifically mention you should add the DNS server as a resource
- "pangolin.private-resources.example-site-pihole.enabled=true"
- "pangolin.private-resources.example-site-pihole.name=Example site PiHole"
- "pangolin.private-resources.example-site-pihole.mode=host"
- "pangolin.private-resources.example-site-pihole.destination=10.70.0.20" # This should point to the IP of the DNS server on the LAN that the exit node can access
- "pangolin.private-resources.example-site-pihole.tcp-ports=53-53" # Also potentially another bug? Pangolin refuses the blueprint if just `53` was entered, so we use a range instead and then it does accept it
- "pangolin.private-resources.example-site-pihole.udp-ports=53-53"
- "pangolin.private-resources.example-site-pihole.disable-icmp=false"
- "pangolin.private-resources.example-site-pihole.sites[0]=example-site"
- "pangolin.private-resources.example-site-pihole.roles[0]=Home Exit Node"
And the following settings have been used inside the Pangolin client:
AI Disclosure
Claude was used to help troubleshoot the issue and process the log files.
It has also been used to come up with a more easily reproducible setup, which I was able to verify by triggering this issue from a network I know was able to connect to my Pangolin instance.
This issue report was written completely by hand and validated manually.
If the issue is difficult to reproduce for you guys, I'm able to verify if a potential fix also actually fixes it in my case.
Expected Behavior
When enabling the connection inside the Pangolin app with an exit node active and custom DNS server configured in the settings, it can connect to the exit node and also perform queries to the custom DNS server, even when the connection is in relay mode.
- Lingua principale
- Kotlin
- Stelle
- 46
- Fork
- 15
- Merge medio
- 1m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fosrl/android
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Memory Tagging Causing CrashApertabug needs investigating
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Possible client registration regression on version 0.7.0Forse già presa @oschwartz10612 l’ha presa 26 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Switching organizations breaks Olm hole punching for the same client installationForse di nuovo libera @oschwartz10612 l’ha presa 58 giorni fa e non c’è nessuna pull request aperta. Apertaneeds investigating
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di fosrl/android
Issue simili
-
bug desktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
simplex-chat/simplex-chat#8291 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted needs investigation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
LeanBitLab/LeanType#883 ·
I maintainer di solito rispondono entro 1 giorno
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
intellij-elixir/intellij-elixir#4782 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
komikku-app/komikku#1983 ·
I maintainer di solito rispondono entro 1 giorno