Files
check-https-proxy-node/main.go
2025-01-08 14:41:07 +08:00

29 lines
570 B
Go

package main
import (
"fmt"
"httppp/common/viper"
"httppp/core"
"httppp/global"
)
func init() {
viper.InitViper()
}
// 主程序,遍历多个代理地址
func main() {
//dump.P(global.Conf)
for _, node := range global.Conf.Nodes {
for _, port := range node.Ports {
node.Port = port
success, message := core.CheckHttpsProxy(&node, global.Conf.TargetURL)
if success {
fmt.Printf("代理 %s 端口 %d 可用.\n", node.Addr, node.Port)
} else {
fmt.Printf("代理 %s 端口 %d 不可用: %s\n", node.Addr, node.Port, message)
}
}
}
}