Relayed connection to exit node with aliases enabled sends DNS while tunnel isn't ready yet
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- mobile, networking
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Kotlin
- スター
- 46
- フォーク
- 15
- 平均マージ
- 1分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fosrl/android のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
bug needs investigating
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
Possible client registration regression on version 0.7.0対応中かも @oschwartz10612 が 26 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
Switching organizations breaks Olm hole punching for the same client installation再び着手できるかも @oschwartz10612 が 58 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds investigating
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
似ている issue
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#8291 ·
メンテナーはふだん 1 日以内に返信
-
help wanted needs investigation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
LeanBitLab/LeanType#883 ·
メンテナーはふだん 1 日以内に返信
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
intellij-elixir/intellij-elixir#4782 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
komikku-app/komikku#1983 ·
メンテナーはふだん 1 日以内に返信