https 节点检测

This commit is contained in:
2025-01-08 14:41:07 +08:00
commit fee0c7d845
15 changed files with 512 additions and 0 deletions

21
common/common.go Normal file
View File

@@ -0,0 +1,21 @@
package common
const (
AppEnv = "dev"
EnvConfig = "config.json"
)
type Config struct {
Debug bool `mapstructure:"debug" json:"debug" yaml:"debug"`
TargetURL string `mapstructure:"target_url" json:"target_url" yaml:"target_url"`
Nodes []Node `mapstructure:"nodes" json:"nodes" yaml:"nodes"`
}
type Node struct {
Protocol string `mapstructure:"protocol" yaml:"protocol" json:"protocol"`
Username string `mapstructure:"username" yaml:"username" json:"username"`
Password string `mapstructure:"password" yaml:"password" json:"password"`
Addr string `mapstructure:"addr" yaml:"addr" json:"addr"`
Port int `mapstructure:"port" yaml:"port" json:"port"`
Ports []int `mapstructure:"ports" yaml:"ports" json:"ports"`
}