AdguardTeam / dnsproxy

Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
Apache License 2.0
2.44k stars 247 forks source link

using --hosts-files=./path gives invalid argument error #418

Open juantascon opened 2 months ago

juantascon commented 2 months ago

echo "10.10.10.10 somehost" >> path dnsproxy --hosts-files=./path

2024/09/10 13:30:09.174559 INFO dnsproxy starting version=0.73.1 revision="" branch="" commit_time="" 2024/09/10 13:30:09.174606 ERROR running dnsproxy err="configuring proxy: creating default handler: open ./path: invalid argument"

s1sw commented 1 month ago

DNSProxy prepends a slash to the path, so you need the full path without a leading slash. For example, if you're in /home/whoever, you would need --hosts-files=home/whoever/path.