https 节点检测
This commit is contained in:
28
main.go
Normal file
28
main.go
Normal file
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user