fix: remove plain http url for probing

This commit is contained in:
mzz2017 committed 2021-11-11 18:04:50 +08:00
1 parent 22a273af75
commit 4e2fa7a050
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1142,7 +1142,7 @@ func (t *Template) setGroupRouting(serverData *ServerData) (err error) {
probeUrl := serverData.OutboundName2Setting[outbound].ProbeURL
if _, err := url.Parse(probeUrl); err != nil {
log.Warn("observatory: %v", err)
probeUrl = "http://www.msftconnecttest.com/connecttest.txt"
probeUrl = "https://gstatic.com/generate_204"
}
t.MultiObservatory.Observers = append(t.MultiObservatory.Observers, coreObj.ObservatoryItem{
Tag: outbound,
+1 -1
View File
@@ -401,7 +401,7 @@ func GetOutboundSetting(outbound string) (setting OutboundSetting) {
err := db.Get(fmt.Sprintf("outbound.%v", outbound), "setting", &setting)
if err != nil {
return OutboundSetting{
ProbeURL: "http://www.msftconnecttest.com/connecttest.txt",
ProbeURL: "https://gstatic.com/generate_204",
ProbeInterval: "10s",
Type: LeastPing,
}
+1 -1
View File
@@ -19,7 +19,7 @@ import (
"time"
)
const HttpTestURL = "http://www.msftconnecttest.com/connecttest.txt"
const HttpTestURL = "https://gstatic.com/generate_204"
func Ping(which []*configure.Which, timeout time.Duration) (_ []*configure.Which, err error) {
var whiches = configure.NewWhiches(which)