package
Version:
v0.0.0-...-a361025
Opens a new window with list of versions in this module.
Published: Mar 6, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func CheckWhiteIP(whiteRuleList []string, ip string) (bool, error)
-
func DialSSH(host string, port int, user string, password string, PublicKeysPath string) (*ssh.Client, error)
-
func TunnelService(ctx context.Context, sshCli *ssh.Client, localIP string, localPort int, ...)
CheckWhiteIP 检查白名单Ip
whiteRuleList 白名单规则列表 写法如: []string{"10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","127.0.0.0/8","169.254.0.0/16","::1/128"}
ip要验证的Ip 写法 如: "192.168.1.1"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.