No need to worry, this is just some misleading behavior from the Tor Project. By default, all traffic is treated as traffic with domain names. For example, when testing with curl using the command
curl -x socks5h://127.0.0.1:9050 -v https://1.0.0.1
this command doesn't access any DNS system at all, but Tor will still throw a warning:
[warn] Your application (using socks5 to port 443) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead. For more information, please see https://2019.www.torproject.org/docs/faq.html.en#WarningsAboutSOCKSandDNSInformationLeaks.`
This is Tor's way of promoting the use of Socks4A. Tor now generates massive warnings for any ip connections over socks5, just ignore them. If you're still concerned about accidental DNS leaks, you can follow these steps: Edit your /etc/tor/torrc file and add:
DNSPort 127.0.0.1:53
AutomapHostsOnResolve 1
Then edit your /etc/resolv.conf to set nameserver 127.0.0.1 as the only DNS resolution address. It's best to lock the resolv.conf file attributes using chattr +i /etc/resolv.conf to prevent other applications (especially various DHCP services) from accidentally modifying it. Finally, create an iptables rule to prohibit any DNS port 53 access from addresses other than 127.0.0.1
iptables -A INPUT -p udp -s 127.0.0.1 --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j DROP
#for save config
netfilter-persistent save
This approach can resolve the vast majority of DNS leak issues.