Use HTTPS URLTest source

This commit is contained in:
世界
2023-04-13 09:03:08 +08:00
parent 542612129d
commit 9d32fc9bd1
7 changed files with 26 additions and 29 deletions

View File

@@ -50,6 +50,9 @@ func (s *HistoryStorage) StoreURLTestHistory(tag string, history *History) {
}
func URLTest(ctx context.Context, link string, detour N.Dialer) (t uint16, err error) {
if link == "" {
link = "https://www.gstatic.com/generate_204"
}
linkURL, err := url.Parse(link)
if err != nil {
return