xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
2.85k stars 404 forks source link

[Feature] DNS Forwarder #287

Closed xtianxian closed 7 months ago

xtianxian commented 10 months ago

Description

Hi xjasonlyu,

Is there an way to easily I can forward DNS request to an upstream DNS server e.g. pdns, coredns, or to DOT, DOH using this tun2socks. btw i'm using it in Android vpn service.

Is this feature related to a specific bug?

No.

Do you have a specific solution in mind?

in the other tun2socks there is an option --dnsgw to where the dns request is forwarded.

xjasonlyu commented 10 months ago

Are you looking for the DNS hijack?

xtianxian commented 10 months ago

Yes. So i guess it is not possible for non rooted android device since iptables require root. Any plans of putting back FakeDns feature in the latest version?

By the way, thanks for the great work on this project i think it is the best tun2socks.

NNdroid commented 10 months ago

At times when socks5 does not support UDP, there can be issues with DNS resolution. Therefore, a fake DNS is required to resolve DNS.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days