@@ -41,28 +41,31 @@ def check_network(self, is_no_proxy: bool = False, is_silent: bool = False):
41
41
# Determine the final proxy address, or empty
42
42
self .proxy = "" if is_no_proxy else self ._determine_proxy (is_silent = is_silent )
43
43
44
+ self .auth_token_url = self .SOME_URLS [0 ]
45
+ return self ._test_pixiv_connection (self .proxy )
46
+
44
47
# Determine the final auth host
45
48
# Check if the hosts are accessible
46
- is_conn_array = [
47
- self ._test_access (url = url , proxy = self .proxy , is_silent = False )
48
- for url in self .SOME_URLS
49
- ]
49
+ # is_conn_array = [
50
+ # self._test_access(url=url, proxy=self.proxy, is_silent=False)
51
+ # for url in self.SOME_URLS
52
+ # ]
50
53
51
54
# If Pixiv is accessible, just use the official
52
- if is_conn_array [0 ]:
53
- self .auth_token_url = self .SOME_URLS [0 ]
54
- return True
55
+ # if is_conn_array[0]:
56
+ # self.auth_token_url = self.SOME_URLS[0]
57
+ # return True
55
58
56
59
# Or, get the real ip of auth service from DoH service to bypass SNI
57
- for i in range (len (self .SOME_URLS )):
58
- if is_conn_array [i ] is False :
59
- continue
60
- final_ip = self ._get_host_ip (
61
- hostname = self .SOME_URLS [0 ], url = self .SOME_URLS [i ]
62
- )
63
- if final_ip is not False :
64
- self .auth_token_url = final_ip
65
- return True
60
+ # for i in range(len(self.SOME_URLS)):
61
+ # if is_conn_array[i] is False:
62
+ # continue
63
+ # final_ip = self._get_host_ip(
64
+ # hostname=self.SOME_URLS[0], url=self.SOME_URLS[i]
65
+ # )
66
+ # if final_ip is not False:
67
+ # self.auth_token_url = final_ip
68
+ # return True
66
69
67
70
return False
68
71
0 commit comments