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

apps.apple.com 的问题 #18

Closed
pexcn opened this issue Sep 23, 2019 · 6 comments
Closed

apps.apple.com 的问题 #18

pexcn opened this issue Sep 23, 2019 · 6 comments

Comments

@pexcn
Copy link
Contributor

pexcn commented Sep 23, 2019

假如要访问美区的 https://apps.apple.com/us/app/speedtest-by-ookla/id1153157709, chinadns-ng 会返回国内的 IP 的结果,在网页上会显示 404(https://apps.apple.com/us/ 屏蔽了国内的 IP?)。

在 dnsmasq 添加 apps.apple.com 强制让可信 DNS 解析应该可以解决,想问下有没有更好的方法?

@zfl9
Copy link
Owner

zfl9 commented Sep 23, 2019

必须【美区】?这应该是使用了 cdn 吧,如果使用【域名列表】走可信 dns,估计也是走的 vps 所在区域附近的 cdn 节点。不过无论如何,域名匹配应该是避免不的。关于在 chinadns-ng 上的匹配功能,暂时有一个应该可行且性能也应该不错的想法,不过我人为的给它加了个限制:domain.list 文件中的每个域名,label 最少 2 个,最多 4 个。比如这 3 个都符合要求:

baidu.com # 2 个 label
google.co.jp # 3 个 label
www.google.com.hk # 4 个 label

@pexcn
Copy link
Contributor Author

pexcn commented Sep 23, 2019

我美国的 IP 这 4 个区的都能访问,看来是大陆 IP 的问题了...
https://apps.apple.com/hk/app/speedtest-by-ookla/id1153157709
https://apps.apple.com/tw/app/speedtest-by-ookla/id1153157709
https://apps.apple.com/jp/app/speedtest-by-ookla/id1153157709
https://apps.apple.com/sg/app/speedtest-by-ookla/id1153157709

不过我人为的给它加了个限制:domain.list 文件中的每个域名,label 最少 2 个,最多 4 个。比如这 3 个都符合要求:

baidu.com # 2 个 label
google.co.jp # 3 个 label
www.google.com.hk # 4 个 label

希望不合法的域名可以被忽略,不知道 gfwlist 里面的域名有没有超过 4 个 label 的...

@zfl9
Copy link
Owner

zfl9 commented Sep 23, 2019

我看了一下 gfwlist.txt,应该没有问题的,限制的原因当然也是主要考虑到性能问题。
image
1 个 label 的(比如 com),这种直接忽略。因为太短了,命中范围太大。
过长的(4个以上label),直接取后面 4 个label。这样也不会有太大的影响。

@zfl9
Copy link
Owner

zfl9 commented Oct 4, 2019

@pexcn 已更新,--gfwlist-file,具体见 readme 以及最新提交。

@zfl9 zfl9 closed this as completed Oct 4, 2019
@pexcn
Copy link
Contributor Author

pexcn commented Oct 4, 2019

嗯,好。

... - indicate stdin

有个疑问,gfwlist-file 选项的标准输入用在什么场景呢?

@zfl9
Copy link
Owner

zfl9 commented Oct 4, 2019

需要动态生成一个 gfwlist.txt 文件时,从 stdin 读取会比较方便。

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