From 19f01736c06c3c2eca101c7e02417b4f81d5d33f Mon Sep 17 00:00:00 2001 From: txperl Date: Sun, 14 Nov 2021 13:31:16 +0800 Subject: [PATCH] fix(login): add more DoH servers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 更多 DNS over HTTPS 查询服务器 --- .pkg/r_pixivpy.py | 5 ++++- app/lib/common/login_helper/main.py | 7 +++++-- app/lib/core/biu.py | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pkg/r_pixivpy.py b/.pkg/r_pixivpy.py index 2b5b4ce..e415302 100644 --- a/.pkg/r_pixivpy.py +++ b/.pkg/r_pixivpy.py @@ -20,10 +20,13 @@ def require_appapi_hosts(self, hostname="app-api.pixiv.net", timeout=3): """ URLS = ( "https://1.0.0.1/dns-query", - "https://1.1.1.1/dns-query", + "https://dns.alidns.com/dns-query", + "https://doh.dns.sb/dns-query", + "https://doh.opendns.com/dns-query", "https://[2606:4700:4700::1001]/dns-query", "https://[2606:4700:4700::1111]/dns-query", "https://cloudflare-dns.com/dns-query", + "https://dns.google/dns-query" ) params = { "ct": "application/dns-json", diff --git a/app/lib/common/login_helper/main.py b/app/lib/common/login_helper/main.py index 67984a5..8bf1882 100644 --- a/app/lib/common/login_helper/main.py +++ b/app/lib/common/login_helper/main.py @@ -32,10 +32,13 @@ def check_network(self, URLS=None, silent=False, proxy_="auto"): URLS = ( "https://public-api.secure.pixiv.net", "https://1.0.0.1/dns-query", - "https://1.1.1.1/dns-query", + "https://dns.alidns.com/dns-query", + "https://doh.dns.sb/dns-query", + "https://doh.opendns.com/dns-query", "https://[2606:4700:4700::1001]/dns-query", "https://[2606:4700:4700::1111]/dns-query", - "https://cloudflare-dns.com/dns-query" + "https://cloudflare-dns.com/dns-query", + "https://dns.google/dns-query" ) if URLS is None else URLS proxy = self.STATIC.util.getSystemProxy(platform.system()) if proxy_ == "auto" else proxy_ if silent is False: diff --git a/app/lib/core/biu.py b/app/lib/core/biu.py index 6dc0e58..ff6e1d5 100644 --- a/app/lib/core/biu.py +++ b/app/lib/core/biu.py @@ -15,7 +15,7 @@ @interRoot.bind("biu", "LIB_CORE") class core_module_biu(interRoot): def __init__(self): - self.ver = 202000 + self.ver = 202001 self.place = "local" self.sysPlc = platform.system() self.apiType = "public"