[GH-ISSUE #3331] [iOS][standalone AmneziaWG 3.1.4] Initial Endpoint DNS lookup fails with a system DoH profile while ordinary getaddrinfo succeeds #3195

Open
opened 2026-10-27 06:18:42 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @isillion22 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3331

Summary

This concerns the standalone AmneziaWG iOS app, version 3.1.4 (0), not the main AmneziaVPN app.

On an iPhone reported as running iOS 27, a hostname available only through a selected system DNS-over-HTTPS profile resolves successfully from an ordinary app, but activating an AmneziaWG tunnel with that hostname as its Endpoint fails with the DNS-resolution error. Is this setup supported for the initial Endpoint lookup, or is there a known limitation/workaround?

The root cause is not established: this could involve the app's initial resolver, system DNS selection, or iOS policy. We are reporting the observed difference, not claiming that AmneziaWG necessarily bypasses the profile.

Setup

  • Device: iPhone; model and exact iOS build were not recorded.
  • OS: iOS 27, as reported by the device owner.
  • App: standalone AmneziaWG 3.1.4 (0).
  • Network for the comparison: cellular/LTE, Wi-Fi disabled, VPN initially off. Cellular data permission for AmneziaWG is enabled.
  • A self-hosted DoH service returns the intended IPv4 address for one owned test hostname. Public DNS does not publish A/AAAA/CNAME answers for that hostname (NOERROR/NODATA).
  • The system DNS profile is installed, selected, and scoped to that test hostname. It specifies HTTPS, a working ServerURL, explicit IPv4 ServerAddresses for the DoH service, and AllowFailover=false.
  • Both the legacy DNS settings payload and the iOS 27 local declarative DNS settings format were tried. With the current declarative profile, the ordinary-app lookup succeeds and AmneziaWG activation still fails.
  • The tunnel uses that same fully qualified hostname as Endpoint, port 443. Its interface DNS is the numeric resolver 1.1.1.1, MTU 1280, with IPv4 and IPv6 default AllowedIPs.

Infrastructure addresses, actual hostnames, resolver access URLs, keys, and full client configurations are intentionally omitted. Names below are placeholders.

Reproduction and observed results

  1. With VPN off, select the system DoH profile for the private test hostname.
  2. On LTE with Wi-Fi off, run this in the already-installed LibTerm app:
import socket as s
print([a[4][0] for a in s.getaddrinfo(
    'vpn.example.net', 443,
    s.AF_UNSPEC, s.SOCK_DGRAM, s.IPPROTO_UDP, s.AI_ALL
)])

The actual owned test hostname is used in place of vpn.example.net. This returns the expected current VPN IPv4 address.

  1. Under the same selected profile and cellular network, activate the existing AmneziaWG tunnel whose Endpoint is that hostname on port 443.
  2. AmneziaWG fails with the DNS-resolution error before the tunnel connects. The current profile has not produced a successful private-hostname activation.

Earlier tests included closing/reopening the app, airplane mode, and a full phone reboot; they did not make the private-hostname setup work. An earlier numeric-Endpoint control with the same test peer did connect and pass internet traffic. The ordinary lookup was also repeated successfully after the server address changed; this was not merely an old-address result.

Sanitized earlier log excerpt

These lines are from an earlier failure of the same private-hostname tunnel, not a new log capture from the latest declarative-profile attempt. Only the hostname has been replaced here; no full config or keys are attached.

[NET] Adapter start requested
[NET] DNS resolution failed for the following hostnames: vpn.example.net
[NET] Path update state: state=stopped everHadHandshake=false lastNetworkSettingsUpdateAt=nil

The latest attempt with the declarative profile produced the same DNS error in the app UI. We do not have mDNSResponder policy diagnostics, a fresh binary attestation, or a wire capture proving whether that attempt used DoH, cache, or another resolver path.

Expected behavior / clarification requested

If a selected system encrypted-DNS profile is supported for the initial Endpoint lookup, the hostname should resolve before the tunnel starts, as it does in the ordinary-app control. Otherwise, please clarify the limitation and any supported way to configure this in the stock iOS app.

In particular:

  1. Should the initial lookup inside the packet-tunnel extension honor a separately selected system DoH profile scoped to the Endpoint hostname?
  2. Is there a supported pre-start resolver override or profile configuration for this case, without rebuilding the app?
  3. Is a failure specific to the extension context known on current iOS, and what minimal diagnostic information would help distinguish app behavior from system DNS/policy behavior?

Relevant source inspection

We reviewed the public 3.1.4 source tag at commit 811f5c8213e6b257e9520fff713ec4d22086e9ac:

The reviewed startup path resolves peer Endpoints inside the extension before generating/applying tunnel network settings. The initial getaddrinfo service and hints appear to match the ordinary-app control above. This is source inspection, not proof of the precise installed App Store binary or of the cause of the failure.

No screenshots, raw logs, or client configurations are attached because they contain infrastructure identifiers or sensitive material. The results above were observed and reported by the phone owner during controlled tests.

Originally created by @isillion22 on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3331 ## Summary This concerns the **standalone AmneziaWG iOS app, version 3.1.4 (0)**, not the main AmneziaVPN app. On an iPhone reported as running iOS 27, a hostname available only through a selected system DNS-over-HTTPS profile resolves successfully from an ordinary app, but activating an AmneziaWG tunnel with that hostname as its Endpoint fails with the DNS-resolution error. Is this setup supported for the initial Endpoint lookup, or is there a known limitation/workaround? The root cause is not established: this could involve the app's initial resolver, system DNS selection, or iOS policy. We are reporting the observed difference, not claiming that AmneziaWG necessarily bypasses the profile. ## Setup - Device: iPhone; model and exact iOS build were not recorded. - OS: iOS 27, as reported by the device owner. - App: standalone AmneziaWG 3.1.4 (0). - Network for the comparison: cellular/LTE, Wi-Fi disabled, VPN initially off. Cellular data permission for AmneziaWG is enabled. - A self-hosted DoH service returns the intended IPv4 address for one owned test hostname. Public DNS does not publish A/AAAA/CNAME answers for that hostname (NOERROR/NODATA). - The system DNS profile is installed, selected, and scoped to that test hostname. It specifies HTTPS, a working ServerURL, explicit IPv4 ServerAddresses for the DoH service, and AllowFailover=false. - Both the legacy DNS settings payload and the iOS 27 local declarative DNS settings format were tried. With the current declarative profile, the ordinary-app lookup succeeds and AmneziaWG activation still fails. - The tunnel uses that same fully qualified hostname as Endpoint, port 443. Its interface DNS is the numeric resolver 1.1.1.1, MTU 1280, with IPv4 and IPv6 default AllowedIPs. Infrastructure addresses, actual hostnames, resolver access URLs, keys, and full client configurations are intentionally omitted. Names below are placeholders. ## Reproduction and observed results 1. With VPN off, select the system DoH profile for the private test hostname. 2. On LTE with Wi-Fi off, run this in the already-installed LibTerm app: ```python import socket as s print([a[4][0] for a in s.getaddrinfo( 'vpn.example.net', 443, s.AF_UNSPEC, s.SOCK_DGRAM, s.IPPROTO_UDP, s.AI_ALL )]) ``` The actual owned test hostname is used in place of `vpn.example.net`. This returns the expected current VPN IPv4 address. 3. Under the same selected profile and cellular network, activate the existing AmneziaWG tunnel whose Endpoint is that hostname on port 443. 4. AmneziaWG fails with the DNS-resolution error before the tunnel connects. The current profile has not produced a successful private-hostname activation. Earlier tests included closing/reopening the app, airplane mode, and a full phone reboot; they did not make the private-hostname setup work. An earlier numeric-Endpoint control with the same test peer did connect and pass internet traffic. The ordinary lookup was also repeated successfully after the server address changed; this was not merely an old-address result. ## Sanitized earlier log excerpt These lines are from an earlier failure of the same private-hostname tunnel, not a new log capture from the latest declarative-profile attempt. Only the hostname has been replaced here; no full config or keys are attached. ```text [NET] Adapter start requested [NET] DNS resolution failed for the following hostnames: vpn.example.net [NET] Path update state: state=stopped everHadHandshake=false lastNetworkSettingsUpdateAt=nil ``` The latest attempt with the declarative profile produced the same DNS error in the app UI. We do not have mDNSResponder policy diagnostics, a fresh binary attestation, or a wire capture proving whether that attempt used DoH, cache, or another resolver path. ## Expected behavior / clarification requested If a selected system encrypted-DNS profile is supported for the initial Endpoint lookup, the hostname should resolve before the tunnel starts, as it does in the ordinary-app control. Otherwise, please clarify the limitation and any supported way to configure this in the stock iOS app. In particular: 1. Should the initial lookup inside the packet-tunnel extension honor a separately selected system DoH profile scoped to the Endpoint hostname? 2. Is there a supported pre-start resolver override or profile configuration for this case, without rebuilding the app? 3. Is a failure specific to the extension context known on current iOS, and what minimal diagnostic information would help distinguish app behavior from system DNS/policy behavior? ## Relevant source inspection We reviewed the public 3.1.4 source tag at commit `811f5c8213e6b257e9520fff713ec4d22086e9ac`: - https://github.com/amnezia-vpn/amneziawg-apple/blob/811f5c8213e6b257e9520fff713ec4d22086e9ac/Sources/WireGuardKit/DNSResolver.swift - https://github.com/amnezia-vpn/amneziawg-apple/blob/811f5c8213e6b257e9520fff713ec4d22086e9ac/Sources/WireGuardKit/WireGuardAdapter.swift The reviewed startup path resolves peer Endpoints inside the extension before generating/applying tunnel network settings. The initial getaddrinfo service and hints appear to match the ordinary-app control above. This is source inspection, not proof of the precise installed App Store binary or of the cause of the failure. No screenshots, raw logs, or client configurations are attached because they contain infrastructure identifiers or sensitive material. The results above were observed and reported by the phone owner during controlled tests.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3195
No description provided.