config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr      string
	SSHServer       string
	SSHUser         string
	SSHPassword     string
	SSHKeyFile      string
	SSHTargetDial   string
	SSHPort         string   // 添加SSH端口配置
	JumpHosts       []string // 跳板机列表
	Timeout         time.Duration
	Verbose         bool
	LogFile         string
	InteractiveAuth bool
	SystemProxy     bool // 是否启用系统代理
	RuleFile        string
}

Config 存储应用配置

func NewConfig

func NewConfig() *Config

NewConfig 创建默认配置

func (*Config) GetJumpHostInfo added in v0.3.0

func (c *Config) GetJumpHostInfo(jumpHost string) (user, host, port string, err error)

GetJumpHostInfo 获取跳板机信息

func (*Config) Validate

func (c *Config) Validate() error

Validate 验证配置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL