mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
修改ssh部署
This commit is contained in:
@@ -220,3 +220,14 @@ func ExecCommand(command string) (string, string, error) {
|
||||
|
||||
return stdout.String(), stderr.String(), err
|
||||
}
|
||||
|
||||
func CheckIPType(address string) string {
|
||||
ip := net.ParseIP(address)
|
||||
if ip == nil {
|
||||
return "Invalid IP"
|
||||
}
|
||||
if ip.To4() != nil {
|
||||
return "IPv4"
|
||||
}
|
||||
return "IPv6"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user