Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- Treat loopback port 53, the PassWall2 local forwarding instance, Xray node resolution and WAN DNS as separate layers to identify.
- Repeat queries for the same node hostname at the same time and capture the actual DNS destination and port; do not infer the path from config alone.
- Send HUP only to the PID of a confirmed PassWall2 dnsmasq cache. This does not clear Xray's internal cache or stabilize a variable WAN upstream.
- After resolution changes, make a real proxy request using the original hostname; do not pin the node to an IP or clear global DNS state.
Separate the DNS layers used for a node hostname
When a node uses a hostname as its entry point, the proxy core must resolve that name to a reachable address. If the name sometimes resolves but connections fail and later recover, possible layers include a local DNS cache, a PassWall2 forwarding instance, Xray's own resolution policy or changing WAN upstream answers. A successful query at one layer does not prove that the connection will work.
First determine whether the failure occurs in the router itself, while the core resolves the node entry or in a LAN client's DNS path. /etc/resolv.conf, firewall redirection, a PassWall2 helper, Xray DNS configuration and WAN resolvers can use different paths. Keep them distinct; a query to 127.0.0.1 may still be redirected through PassWall2.
Record repeated answers and the actual destination
Use an authorized node hostname and keep the test client, resolver and query time consistent. Repeat the query over a short interval and record each answer and TTL. If loopback and an explicit WAN DNS query differ, capture traffic to confirm whether the explicit query was redirected again by local rules. Do not call it a direct upstream answer until its destination is verified.
Also check the resolver port, listener PID, config path and node-connection logs used by PassWall2/Xray. Standard port 53 may be redirected by nftables OUTPUT to another local port. Reading /etc/resolv.conf or one WAN DNS answer does not prove which address the core ultimately used.
Compare loopback and configured WAN DNS answers
shset -eu
NODE_HOST='REPLACE_WITH_NODE_HOSTNAME'
WAN_DNS='REPLACE_WITH_CONFIGURED_WAN_DNS_IP'
DNS_PORT='REPLACE_WITH_LOCAL_PASSWALL_DNS_FORWARDER_PORT'
nslookup "$NODE_HOST" 127.0.0.1
nslookup "$NODE_HOST" "$WAN_DNS"
ps w | grep -E '[d]nsmasq|[x]ray'
netstat -lnup | grep -F ":$DNS_PORT"
Capture the query path at the same time
During a controlled maintenance window, start a short DNS capture and query the same hostname from the router and original test client. Record the query time, source interface, destination address and port, upstream answer, returned address and TTL. Correlate the capture with Xray/PassWall2 outbound logs and the real connection result.
A capture may reveal a private node hostname, client address and WAN DNS details. Analyze it locally and redact it before sharing. One usable or failed answer describes only that response. If repeated upstream queries still alternate between usable and unusable answers, flushing a cache does not prove the upstream has become stable.
Read DNS queries and responses briefly
shtcpdump -i any -n -l 'udp port 53 or tcp port 53'
Identify the dnsmasq process that owns the cache
A router may run both the base dnsmasq service and a dedicated dnsmasq instance for PassWall2 DNS forwarding. Identify the instance responsible for the query by checking its listener port, PID, command line and config path. Do not choose the base dnsmasq process by name alone, and do not send a dnsmasq cache signal to an Xray PID.
Read the target PID's full command line and confirm the local port it listens on before acting. If the process has exited, several processes share the port, the config path is unknown or Xray handles the query directly, stop this cache-refresh branch and use the instance-specific method for the actual resolver.
Check the DNS forwarding PID, command line and listener
shset -eu
DNS_PID='REPLACE_WITH_CONFIRMED_PASSWALL_DNSMASQ_PID'
DNS_PORT='REPLACE_WITH_LOCAL_PASSWALL_DNS_FORWARDER_PORT'
test -r "/proc/$DNS_PID/cmdline"
tr '\000' ' ' < "/proc/$DNS_PID/cmdline"
printf '\n'
netstat -lnup | grep -F ":$DNS_PORT"
Refresh only the confirmed instance cache
If repeated queries and the capture show that the unusable answer is held by a confirmed PassWall2 dnsmasq cache, send HUP to that process to refresh its cache. dnsmasq HUP is not a router reboot and does not clear Xray internal caches, other dnsmasq instances or WAN upstream state. Use it only for the verified dnsmasq PID.
Repeat the same hostname query and path immediately afterward, then make a real proxy request from the original LAN device using the original hostname. If the answer becomes usable and the request works, that only shows the cache refresh changed this test path's state. If upstream answers continue to vary, investigate forwarding and upstream selection; do not repeatedly clear global caches or pin one returned IP.
Send HUP to the verified PassWall2 dnsmasq process
shDNS_PID='REPLACE_WITH_VERIFIED_PASSWALL_DNSMASQ_PID'
kill -HUP "$DNS_PID"
Verify the original hostname and real connection
For final verification, use the node's original hostname rather than a temporarily pinned IP and make a real connection through the active PassWall2/Xray proxy. Correlate the DNS answer, destination selected by the core, handshake stage and client request on one timeline. If DNS succeeds but TLS or the connection still fails, continue with egress routing, server reachability and protocol parameters.
The historical environment included KWRT x86, PassWall2 26.10.20-r152 and Xray 26.10.17; these versions only bound that diagnostic context and are not current recommendations. If a WAN DNS server continues returning different answers, do not promote one cache refresh into a proven sole cause, evidence of upstream poisoning or a long-term stability guarantee.
Sources
Frequently Asked Questions
Does a successful WAN DNS query prove Xray used the same address?
No. Xray may have an independent resolution policy or use a PassWall2 forwarding instance. Compare config, captures, core logs and the real connection.
Does refreshing dnsmasq clear Xray's internal cache?
No. HUP applies only to the confirmed dnsmasq instance. Identify the process that owns the cache; never send the signal to Xray.
Can I pin the node hostname to one usable IP?
Do not use a temporary result as a general setting. Keep tracking the original name, upstream responses and real connections; a fixed address may expire or bypass server-side hostname configuration.
Does a phone working after one cache refresh prove the problem is fixed?
No. Check repeated queries, upstream variation and real proxy requests. Full reboot behavior, other clients and long-term stability need separate acceptance.