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

增加不能使用CFW访问的域名配置 #241

Open
debugger-zhang opened this issue Sep 19, 2022 · 1 comment
Open

增加不能使用CFW访问的域名配置 #241

debugger-zhang opened this issue Sep 19, 2022 · 1 comment

Comments

@debugger-zhang
Copy link

以下域名因为托管在Cloudflare上,使用CFW访问会出错:
discord.com、discord.gg、discordapp.com、discordapp.net

目前我的hack是:
(1)

logging.warning('%s do_DIRECT "%s %s" 失败,尝试使用 "%s" 规则。',
,前面加上:

                        if ("discord.com" in self.url or "discord.gg" in self.url or "discordapp.com" in self.url or "discordapp.net" in self.url):
                            continue

(2)

if set_temp_connect_action(host):
,前面加上:

                if ("discord.com" in host or "discord.gg" in host or "discordapp.com" in host or "discordapp.net" in host) and "CFW" in GC.LISTEN_ACT:
                    return

(3)ActionFilter.ini的[0-fakecert]段增加:(discord.gg通常能正常访问,所以无需配置)

discord.com = @none
.discord.com = @none
.discordapp.net = none@none # 注意此条和其他3条不同,如果用@none会出问题
.discordapp.com = @none
@SeaHOH
Copy link
Owner

SeaHOH commented Sep 20, 2022

可以通过主配置中的 tempwhitelist 以跳过临时规则。
确实偶尔会连接不上服务器导致自动应用临时规则,但如果连接顺畅的话,会自动禁用 SNI 扩展来跳过连接重置 (这个 net 域名会验证失败)。

# 但建议还是要验证域名,none 仅用于兜底
.discordapp.net = discordapp.net@none

另,这些 discord 域名我这里测试是可以通过 CFW 成功代理的,不清楚你指的访问失败是怎么回事。

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