Closed Terrance closed 7 months ago
Yikes, that's because qname
is empty. Fixed: https://github.com/celzero/firestack/commit/c29695783ab1e7a8dcb02da6d317f64d9da12905
To analyse debug logs from the network engine, you can enable Configure -> Settings -> Log Level -> Verbose
For what it's worth, this is what we get with verbose logging enabled:
02-02 22:14:48.311 1942 1942 E OPLUS_KEVENT_RECORD: oplus_kevent Receive message from kernel, event_type=3
02-02 22:14:48.311 1942 1942 E OPLUS_KEVENT_RECORD: OPLUS_KEVENT payload:10291,path@@/data/data/com.termux/files/usr/opt/q
02-02 22:14:48.311 1942 1942 I OPLUS_KEVENT_RECORD: oplus_put_exec_kevent_to_list
02-02 22:14:48.383 29788 13840 I GoLog : V ns.dispatchers.dispatch: got(45 bytes), err(<nil>)
02-02 22:14:48.388 29788 13893 I GoLog : V ns.dispatchers.dispatch (from-tun) proto(2048) for pkt-id(0)
02-02 22:14:48.388 29788 13893 I GoLog : V ns.dispatchers.dispatch: resume
02-02 22:14:48.389 29788 20849 I GoLog : V ns.e.inject-inbound(from-tun) 2048 pkt(0)
02-02 22:14:48.390 29788 20849 I GoLog : V dns64: handle: No local nat64 to for ip(9.9.9.9)
02-02 22:14:48.390 29788 20849 I GoLog : V udp: onFlow: no realips() or domains(), for src=10.111.222.1:37171 dst=9.9.9.9:53
02-02 22:14:48.412 29788 20849 D VpnLifecycle: process-firewall-request: ConnTrackerMetaData(uid=10291, sourceIP=10.111.222.1, sourcePort=37171, destIP=9.9.9.9, destPort=53, timestamp=1706912088412, isBlocked=false, blockedByRule=, blocklists=, protocol=17, query=, connId=44232610fbfb1135), true, false
02-02 22:14:48.418 29788 20849 I GoLog : V ns.udp.forwarder: NEW src(10.111.222.1:37171) => dst(9.9.9.9:53)
02-02 22:14:48.418 29788 20849 I GoLog : V ns.udp.forwarder: DATA src(10.111.222.1:37171) => dst(l:10.111.222.1:37171 / r:9.9.9.9:53)
02-02 22:14:48.418 29788 20849 I GoLog : V udp: closing conn [10.111.222.1:37171 -> 9.9.9.9:53]
02-02 22:14:48.432 29788 0 E Go : panic: interface conversion: interface {} is nil, not string
...
Admittedly I'm not sure what I'm looking for in there, though having tried it against my local DNS server (with "Do not route Private IPs" enabled, so it bypasses Rethink) I can see the default query is for the root nameservers, which is presumably the empty QNAME you've identified:
$ q @172.16.1.1
. 2h55m48s NS a.root-servers.net.
. 2h55m48s NS b.root-servers.net.
. 2h55m48s NS c.root-servers.net.
. 2h55m48s NS d.root-servers.net.
. 2h55m48s NS e.root-servers.net.
. 2h55m48s NS f.root-servers.net.
. 2h55m48s NS g.root-servers.net.
. 2h55m48s NS h.root-servers.net.
. 2h55m48s NS i.root-servers.net.
. 2h55m48s NS j.root-servers.net.
. 2h55m48s NS k.root-servers.net.
. 2h55m48s NS l.root-servers.net.
. 2h55m48s NS m.root-servers.net.
Toying with q installed in Termux, I've stumbled upon a crash in Rethink when I try to run it pointing at an external DNS server:
I assume this is something to do with Rethink's routing of all DNS traffic to its configured DNS server.
Rethink v055a running on Android 13 (OnePlus Nord CE).