Skip to content

Chore/update#2

Merged
sosso merged 12 commits into
mainfrom
chore/update
Apr 23, 2026
Merged

Chore/update#2
sosso merged 12 commits into
mainfrom
chore/update

Conversation

@sosso

@sosso sosso commented Apr 23, 2026

Copy link
Copy Markdown
Member

No description provided.

nemtsov and others added 12 commits April 7, 2026 21:31
Add a UDP DNS relay (pkg/net/dns_forwarder.go) that intercepts guest
DNS queries (redirected via an nftables DNAT rule on UDP/53) and
forwards them to the configured upstream resolvers on the host network.
The guest receives real DNS answers, matching how the macOS path handles
DNS via gVisor's UDP forwarder (pkg/net/stack_darwin.go handleDNS).

The transparent proxy still sees every hostname via Host header (HTTP)
or SNI (HTTPS) because the nftables TCP DNAT rules intercept all port
80/443 traffic regardless of destination IP.

An nftables rule in the prerouting chain redirects UDP/53 from the
guest TAP to the forwarder's ephemeral port on the gateway IP.

New: pkg/net/dns_forwarder.go, pkg/net/dns_forwarder_test.go
Modified: pkg/net/nftables.go (DNS DNAT rule + SetDNSForwarderPort)
Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
…pdate usage notes

Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
@sosso sosso merged commit d8571e1 into main Apr 23, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants