https 节点检测
This commit is contained in:
21
common/common.go
Normal file
21
common/common.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user