URenko / Accesser

🌏一个解决SNI RST导致维基百科、Pixiv等站点无法访问的工具 | A tool for solving SNI RST
GNU General Public License v3.0
874 stars 77 forks source link

添加对于discord,duckduckgo,twitch和v2ex的支持 #124

Closed Kenxu2022 closed 1 year ago

Kenxu2022 commented 1 year ago

看到 #123 ,正好周五试验过,效果不错,除了discordapp.net这个域名访问会报403 forbidden,其余的都没问题 ps:由于*.discordapp.net无法连接,所以无法从网页端下载应用(dl.discordapp.net),但不加上会导致看不了图片(cdn.discordapp.com)

URenko commented 1 year ago

感谢。 不过*.discordapp.net并不匹配cdn.discordapp.com,这两者有什么联系?

Kenxu2022 commented 1 year ago

我研究了一下,现在明白了 discord上有两种图片,一种是用户上传的,另一种是来自其他网站的(例如图床),但不管是哪种图片,discord都会为其生成一张缩略图 对于用户上传的图片,图片本体存储在cdn.discordapp.com上,缩略图存储在media.discordapp.net上 而其他网站的图片,缩略图则是存储在images-ext-*.discordapp.net上(其中可以是1或2) media.discordapp.net是不看SNI的,而`images-ext-.discordapp.net则需要 这就是为什么在不加*.discordapp.net`的时候,虽然看不了图片(其实是缩略图),但是点击图片再选择“跳转到浏览器打开”也能看,加上了之后,用户上传的图的缩略图能显示了,但来自其他网站的图的缩略图依然显示不了。

URenko commented 1 year ago

可以考虑将glob写得更明确些,参考 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file#shexpmatch

Kenxu2022 commented 1 year ago

非常感谢,不过这一行您是不是写错了? "*://images-ext-*.discordapp.net/*": 1 这里应该改成"*://media.discordapp.net/*": 1才对 就像我说的一样,images-ext-*.discordapp.net是看SNI的,media.discordapp.net才不看

zdm9981 commented 1 year ago

discord这些域名都是cf的 应该是不能用这个方法的吧 我测了也是不行的 不知道你是怎么成功的

Kenxu2022 commented 1 year ago

绝大多数套了cloudflare的网站确实无法通过这种方法连接,但discord订阅了cloudflare的enterprise计划,有独立的ip,也就不需要SNI区分不同网站了。你可以看看连接discord.com时是不是使用了以下几个ip,以及这几个ip在你的网络环境下能否访问

discord.com. 605 IN A 162.159.128.233 discord.com. 605 IN A 162.159.135.232 discord.com. 605 IN A 162.159.136.232 discord.com. 605 IN A 162.159.137.232 discord.com. 605 IN A 162.159.138.232


From: zdm9981 @.> Sent: Thursday, August 3, 2023 9:43:48 PM To: URenko/Accesser @.> Cc: Kenxu2022 @.>; Author @.> Subject: Re: [URenko/Accesser] 添加对于discord,duckduckgo,twitch和v2ex的支持 (PR #124)

这些域名都是cf的 应该是不能用这个方法的吧 我测了也是不行的 不知道你是怎么成功的

― Reply to this email directly, view it on GitHubhttps://github.com/URenko/Accesser/pull/124#issuecomment-1664010425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYAH6W4STXECFEE6ZAOUCSTXTOTJJANCNFSM6AAAAAAYBBHINM. You are receiving this because you authored the thread.Message ID: @.***>

Kenxu2022 commented 1 year ago

discord.com

zdm9981 commented 1 year ago

原来如此 我本地用了cf的优选工具 修改了分配到的ip 导致无法连接成功 感谢回复!