toolnet

package
v0.0.0-...-a361025 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckWhiteIP

func CheckWhiteIP(whiteRuleList []string, ip string) (bool, error)

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"

func DialSSH

func DialSSH(host string, port int, user string, password string, PublicKeysPath string) (*ssh.Client, error)

DialSSH 连接ssh

func TunnelService

func TunnelService(ctx context.Context, sshCli *ssh.Client, localIP string, localPort int, targetIP string, targetPort int, okCb func(addr net.Addr))

隧道

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳