hezhijie0327 / GFWList2AGH

Generate diversion list for AdGuard Home and other softwares
228 stars 70 forks source link

域名格式需求 #14

Closed ghost closed 3 years ago

ghost commented 3 years ago

你好,可以在生成一个域名列表吗?域名的格式作为图片这种的。 image

ghost commented 3 years ago

就是纯域名 aaa.com bbb.com ccc.com ddd.com

hezhijie0327 commented 3 years ago

lite 列表就是纯一级域名列表

截图 2021-01-16 18 44 36

Duplicate of #4.

ghost commented 3 years ago

是域名的排版格式, aaa.com bbb.com ccc.com 这样生成排版

hezhijie0327 commented 3 years ago

类似这样的嘛?

截图 2021-01-16 19 06 33
ghost commented 3 years ago

是的

ghost commented 3 years ago

就是体现出纯域名,在国内和国外分别新建两个文件

ghost commented 3 years ago

如果可以的话,还可以做个支持smart 的配置文件,可以的话CN这个定义名可以自行修改一下 image

ghost commented 3 years ago

因为您的脚本很好,所以希望此项目可以可以不局限于AGH

ghost commented 3 years ago

dnsdnsmasq也可以支持一下

ghost commented 3 years ago

您的脚本优点在于,可以自定义添加排除自己指定的域名,合并多个项目收集的国内域名和国外域名,并去重复等一些操作,很实用。

hezhijie0327 commented 3 years ago
  1. 已支持生成 raw 列表;默认不自动生成,需手动将代码取消注释。 截图 2021-01-16 20 33 09

如果可以的话,还可以做个支持smart 的配置文件,可以的话CN这个定义名可以自行修改一下

dnsdnsmasq也可以支持一下

这两点后续也会和 raw 列表一致,默认不自动生成

ghost commented 3 years ago

split的区别是什么?

hezhijie0327 commented 3 years ago
  1. split 结尾是指纯白名单黑名单模式
  2. split 结尾将黑白名单结合。修正单个列表中存在的复合问题,如:fonts.googleapis.com 与其他 googleapis.com,前者在国内有 CDN,其余走国外 DNS
ghost commented 3 years ago

所以用黑白名单结合会好一些吗?

hezhijie0327 commented 3 years ago

ghost commented 3 years ago

黑白名单结合配置文件有些问题 中间应该去除上游dns,头部已经有了。 image

hezhijie0327 commented 3 years ago

这应该是刚刚那波改动导致,我稍后修复一下

ghost commented 3 years ago

]#的意思是规则内会遵守默认的dns上游查询对吗? 如果用黑白名单结合模式,AGH的处理能力,解析速度会有所保障吗?

ghost commented 3 years ago

smartdns和dnsdnsmasq的配置文件是在计划中吗?

hezhijie0327 commented 3 years ago

]#的意思是规则内会遵守默认的dns上游查询对吗? 对的

如果用黑白名单结合模式,AGH的处理能力,解析速度会有所保障吗? 使用下来没啥影响

截图 2021-01-16 21 01 56

smartdns和dnsdnsmasq的配置文件是在计划中吗? 是的,可能在明后两天内,今天有点事情

ghost commented 3 years ago

好的,辛苦,希望能尽快修复bug,我好使用黑白名单结合模式进行测试。

hezhijie0327 commented 3 years ago

嗯,可以先使用先前的 commit 3cbb80d5933a0ae7054a8e84157b4ee4fe31d508 做测试

ghost commented 3 years ago

今晚会修复好吗?如果可以,我等待新的脚本。

hezhijie0327 commented 3 years ago

ghost commented 3 years ago

你好,今晚还会修复bug吗?

hezhijie0327 commented 3 years ago

在修,现在在找出错的原因

hezhijie0327 commented 3 years ago

目前屏蔽生成 “split” 列表,就这块仍有问题

hezhijie0327 commented 3 years ago

已修复 335dd5c46ddeb508d17af0624d18c18494fef383

ghost commented 3 years ago

好的,辛苦,已经修复了。

ghost commented 3 years ago

upstream_dns_file: /root/AdGuardHome/gfwlist2agh_blacklist_full.txt 不知道为什么换成了黑白名单结合模式,AGH就启动失败

ghost commented 3 years ago

2021/01/17 11:55:16 [info] AdGuard Home, version 0.105.0-beta.2, channel beta, arch linux amd64 2021/01/17 11:55:16 [info] Configuration file is OK

ghost commented 3 years ago

● AdGuardHome.service - AdGuard Home: Network-level blocker Loaded: loaded (/etc/systemd/system/AdGuardHome.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Sun 2021-01-17 11:55:25 CST; 9s ago Process: 4732 ExecStart=/root/AdGuardHome/AdGuardHome -s run (code=exited, status=1/FAILURE) Main PID: 4732 (code=exited, status=1/FAILURE)

Jan 17 11:55:25 localhost.localdomain systemd[1]: Unit AdGuardHome.service entered failed state. Jan 17 11:55:25 localhost.localdomain systemd[1]: AdGuardHome.service failed.

hezhijie0327 commented 3 years ago
  1. 我这刚刚测试了下黑 / 白名单均能正常运行
  2. 试着运行 /root/AdGuardHome/AdGuardHome -v 查看报错原因,注:先将进程结束后再运行
ghost commented 3 years ago

2021/01/17 12:02:54 10435#1 [info] AdGuard Home, version 0.105.0-beta.2, channel beta, arch linux amd64 2021/01/17 12:02:54 10435#1 [debug] Current working directory is /root/AdGuardHome 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/home.upgradeConfig(): got schema version 7 2021/01/17 12:02:54 10435#1 [debug] Reading config file: /root/AdGuardHome/AdGuardHome.yaml 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: loading hosts from file /etc/hosts 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added 127.0.0.1 -> localhost 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address 127.0.0.1 -> localhost 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added 127.0.0.1 -> localhost.localdomain 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address 127.0.0.1 -> localhost.localdomain 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added 127.0.0.1 -> localhost4 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address 127.0.0.1 -> localhost4 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added 127.0.0.1 -> localhost4.localdomain4 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address 127.0.0.1 -> localhost4.localdomain4 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added ::1 -> localhost 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address ::1 -> localhost 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added ::1 -> localhost.localdomain 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address ::1 -> localhost.localdomain 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added ::1 -> localhost6 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address ::1 -> localhost6 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added ::1 -> localhost6.localdomain6 2021/01/17 12:02:54 10435#1 [debug] AutoHosts: added reverse-address ::1 -> localhost6.localdomain6 2021/01/17 12:02:54 10435#1 [debug] clients: removed 0 client aliases 2021/01/17 12:02:54 10435#1 [debug] Clients: added 0 client aliases from DHCP 2021/01/17 12:02:54 10435#1 [debug] Writing YAML file: /root/AdGuardHome/AdGuardHome.yaml 2021/01/17 12:02:54 10435#1 [info] Initializing auth module: /root/AdGuardHome/data/sessions.db 2021/01/17 12:02:54 10435#1 [debug] Auth: loaded 5 sessions from DB (removed 0 expired) 2021/01/17 12:02:54 10435#1 [info] Auth: initialized. users:1 sessions:5 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/home.verifyCertChain(): TLS: got certificate: 3449 bytes 2021/01/17 12:02:54 10435#1 [info] number of certs - 2 2021/01/17 12:02:54 10435#1 [info] got an intermediate cert 2021/01/17 12:02:54 10435#1 [info] Initialize web module 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).dbOpen(): db.Open... 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).dbOpen(): db.Open 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).beginTxn(): db.Begin... 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).beginTxn(): db.Begin 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.createObject(): Deleting old units... 2021/01/17 12:02:54 10435#1 [debug] Stats: initialized 2021/01/17 12:02:54 10435#1 [debug] DNS: added 0 A/PTR entries from DHCP 2021/01/17 12:02:54 10435#1 [debug] IPSET: added 0 hosts 2021/01/17 12:02:54 10435#1 [debug] DNS: using 4 upstream servers from file /root/AdGuardHome/gfwlist2agh_blacklist_full.txt 2021/01/17 12:02:54 10435#1 [debug] Bootstraps: [1.1.1.1 8.8.8.8 208.67.222.222] 2021/01/17 12:02:54 10435#1 [debug] Upstream 0: tls://dns.pub:853 2021/01/17 12:02:54 10435#1 [debug] Upstream 1: tls://dns.alidns.com:853 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).beginTxn(): db.Begin... 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).beginTxn(): db.Begin 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).flushUnitToDB(): Flushing unit 447460 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).commitTxn(): tx.Commit 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).Close(): db.Close... 2021/01/17 12:02:54 10435#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/stats.(statsCtx).Close(): db.Close 2021/01/17 12:02:54 10435#1 [debug] Stats: closed 2021/01/17 12:02:54 10435#1 [debug] querylog: there's nothing to write to a file 2021/01/17 12:02:54 10435#1 [debug] Closed all DNS modules 2021/01/17 12:02:54 10435#1 [fatal] dnsServer.Prepare: dns: proxy.ParseUpstreamsConfig: wrong hostname specification: #akadns.net

hezhijie0327 commented 3 years ago
  1. 问题来自你修改的 data_cnacc.txt 截图 2021-01-17 12 06 42
  2. 强制添加功能可能有个隐藏的 BUG 😭
ghost commented 3 years ago

😹是有冲突吗?

ghost commented 3 years ago

46我已经注释了。

ghost commented 3 years ago

因为对于我来说,不管是google/apple域名只要在国内有备案的域名就可以使用国内dns进行解析,因为备案域名太多数都会使用cdn调度,所以必须要在国内进行解析。

hezhijie0327 commented 3 years ago

理论上现在应该修复了,脚本更新下 ecdebabb291b354aa58dae538d4aa6371ded3cf0

ghost commented 3 years ago

ok,我更新一下脚本。

ghost commented 3 years ago

你好,已经正常了,是什么因为原因导致,那么后面强制添加域名和排除域名功能是否可以正常使用呢。

hezhijie0327 commented 3 years ago
  1. # 符号强制添加 / 排除时未排除所导致的
  2. 功能正常(当时测试时没测试#@example.org / #!example.org😭)
ghost commented 3 years ago

ok,已经完美,运行,我先运行个几天,看一下黑白名单的组合模式使用起来感觉如何。

ghost commented 3 years ago

你好,此国内域名列表,和国外域名列表是全网最全的吗?我看整合了几个域名规则。

hezhijie0327 commented 3 years ago
  1. 目前把能找到的都塞进去了,包括 v2raygeosite.dat
  2. 如果有其他可靠的列表可以再整合进去
ghost commented 3 years ago

我记得smartdns是conf文件。

ghost commented 3 years ago
  1. 目前把能找到的都塞进去了,包括 v2raygeosite.dat
  2. 如果有其他可靠的列表可以再整合进去

在我印象中,您的规则是全网最全的了。

ghost commented 3 years ago

感觉项目名可以修改了,支持了conf文件就不单单是AGH可以使用了,也不单单只有gfwlist

hezhijie0327 commented 3 years ago
  1. 项目名暂时不考虑更改
  2. 已支持生成简易的 DNSMasqSmartDNS 规则,默认不自动生成
  3. 可根据实际情况更改上游服务器或组名 截图 2021-01-17 13 41 43
ghost commented 3 years ago

OK,感谢。