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

@@ -4,6 +4,7 @@ import (
"context"
"net/http"
"strconv"
"strings"
"sync"
"time"
@@ -67,6 +68,9 @@ func getGroupDelay(server *Server) func(w http.ResponseWriter, r *http.Request)
query := r.URL.Query()
url := query.Get("url")
if strings.HasPrefix(url, "http://") {
url = ""
}
timeout, err := strconv.ParseInt(query.Get("timeout"), 10, 32)
if err != nil {
render.Status(r, http.StatusBadRequest)