Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
juantascon opened this issue Sep 10, 2024 · 2 comments
Open

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

juantascon opened this issue Sep 10, 2024 · 2 comments

Comments

@juantascon
Copy link

  • how to reproduce:

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

  • error msg:

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
Copy link

s1sw commented Sep 16, 2024

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.

@alxistr
Copy link

alxistr commented Nov 20, 2024

DNSProxy prepends a slash to the path

But why? I've encountered this too and it's confusing.

For example, if you're in /home/whoever, you would need --hosts-files=home/whoever/path.

In other words the path is always considered as absolute (a current directory doesn't matter) and a leading slash has to be omitted?

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

No branches or pull requests

3 participants