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

[Feature request] 兼容通用 HOSTS 格式 #694

Open
cherinyy opened this issue Jul 5, 2023 · 5 comments
Open

[Feature request] 兼容通用 HOSTS 格式 #694

cherinyy opened this issue Jul 5, 2023 · 5 comments

Comments

@cherinyy
Copy link

cherinyy commented Jul 5, 2023

希望添加的功能

虽然都叫 hosts,但本插件所用的格式和平常 Win,Linux 系统内的那个 hosts 文件不一样。

从我的理解来看,mosdns 应该不调用系统 HOSTS 文件?

这个时候用户先前编写的 HOSTS 如果要重写为 mosdns 专用格式时面临大量无意义的重复性劳动,如果 mosdns 能够兼容通用 HOSTS 格式,直接调用是最好不过的选择了。

比如

tag: "system_hosts"
type: "hosts"
args:
  files_sys:
    - "/etc/hosts" 
    - "/etc/hosts.custom" 
@wangmice
Copy link

wangmice commented Jul 7, 2023

作者好长时间没上线了,是不是开发停止了?

@cherinyy
Copy link
Author

cherinyy commented Jul 7, 2023

作者好长时间没上线了,是不是开发停止了?

#667 (comment)

@sensec
Copy link

sensec commented Jul 8, 2023

系统自带的主机名和地址一对一,mosdns可以做到一对多。

@cherinyy
Copy link
Author

cherinyy commented Jul 8, 2023

系统自带的主机名和地址一对一,mosdns可以做到一对多。

对,但是这个特性并不是特别重要,即便提供了多个 IP 地址,客户端也只会连接其中一个。相比之下,传统的 HOSTS 自 1984 年至今已有差不多 40 年的历史,兼容传统的 HOSTS 还是非常有必要的。

@kkkgo
Copy link

kkkgo commented Jul 9, 2023

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

4 participants