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] 保存请求的域名 & 动态追加域名到 domain_set #743

Open
XiaoliChan opened this issue Nov 1, 2023 · 2 comments

Comments

@XiaoliChan
Copy link

XiaoliChan commented Nov 1, 2023

希望添加的功能:

  • 保存请求的域名
  • 动态追加域名到domain_set

Reason why:

  • 我看了网上很多人提到的分流功能,但是我认为里面存在一个不足的地方,如下图所示
    image

    x.com,不存在CN Domain List 或者 GFW List的时候,此时会进入IP判断,判断域名IP是否国内/外IP,但是此时缺少了一个记录域名的功能,比如说写入到external.txt,当完成一系列操作后,下次范围x.com的时候,如果读取到external.txt里面存在x.com,则就不需要进入IP判断模式,只需要在域名判断模式即可完成,如果缺少该功能的话,则每次访问x.com,都会去重复刚才的操作,域名判断完毕到IP判断,走重复的步骤

    上述功能可能会造成频繁读取文件,所以保存域名这个适用于重启了mosdns之后,读取external.txt,因此,希望能有个功能能够动态追加域名到domain_set,比如说把x.com写入到文件的同时,顺便追加到已经加载好的domain_set 列表

@XiaoliChan XiaoliChan changed the title [Feature request] 保存请求的域名 [Feature request] 保存请求的域名 & 动态追加域名到 domain_set Nov 1, 2023
@blueberry-pie-11
Copy link

启动时文件已经读入内存了,之后重复查询也就多一次ip对比,占用资源忽略不计的

@XiaoliChan
Copy link
Author

启动时文件已经读入内存了,之后重复查询也就多一次ip对比,占用资源忽略不计的

我想要的是能够写入到文件,并且实时的与文件内容匹配,但是这样会应该占用大量IO资源

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

2 participants