代码拉取完成,页面将自动刷新
package config
import "time"
var SHELL_LIST = [...]string{
"/bin/bash",
"/bin/ash",
"/bin/sh",
}
type DockerConfig struct {
DockerHost string // default is /var/run/docker.sock
PsOptions string
}
type KubeConfig struct {
ConfigPath string // normally is $HOME/.kube/config
}
type GRPCConfig struct {
Servers []string
Auth string
Proxy string // http or socks5
}
type BackendConfig struct {
Type string // docker or kubectl (for now)
Docker DockerConfig
Kube KubeConfig
GRPC GRPCConfig
}
type ControlConfig struct {
Enable bool
All bool
Start bool
Stop bool
Restart bool
}
type ServerConfig struct {
Address string
Port int
GrpcPort int
IdleTime time.Duration
Credential string
EnableReconnect bool
ReconnectTime int
MaxConnection int
WSOrigin string
Term string `default:"xterm"`
ShowLocation bool
Collaborate bool
// audit
EnableAudit bool
AuditLogDir string `default:"log"`
Control ControlConfig
// EnableBasicAuth bool `default:"false"`
// Once bool `default:"false"`
// TitleVariables map[string]interface{}
}
type Config struct {
Debug bool
Backend BackendConfig
Server ServerConfig
}
func New() *Config {
return &Config{
Backend: BackendConfig{
Docker: DockerConfig{},
Kube: KubeConfig{},
GRPC: GRPCConfig{
Servers: []string{},
},
},
Server: ServerConfig{
Control: ControlConfig{},
},
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。