Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type Config ¶
type Config struct { Debug bool `yaml:"debug,omitempty"` LogFile string `yaml:"log_file,omitempty"` ClientId string `yaml:"id,omitempty"` //if EncryptMode is tls and ServerName is empty,ServerAddr can't be IP format ServerAddr string `yaml:"server_addr"` ServerUdpAddr string `yaml:"server_udp_addr"` ServerTcpAddr string `yaml:"server_tcp_addr"` Aes Aes `yaml:"aes,omitempty"` Tls Tls `yaml:"tls,omitempty"` EncryptMode string `yaml:"encrypt_mode,omitempty"` //none:no encryption //aes:encrpted by aes //tls:encrpted by tls,which is default Tunnels map[string]TunnelConfig `yaml:"tunnels"` AuthToken string `yaml:"auth_token,omitempty"` //mix: switch between kcp and tcp automatically,which is default //kcp: communicate with server in kcp //tcp: communicate with server in tcp Transport string `yaml:"transport,omitempty"` HttpProxy string `yaml:"http_proxy,omitempty"` DSN string `yaml:"dsn,omitempty"` EnableCompress bool `yaml:"enable_compress,omitempty"` Durable bool `yaml:"durable,omitempty"` DurableFile string `yaml:"durable_file,omitempty"` Health Health `yaml:"health,omitempty"` ManagePort uint16 `yaml:"manage_port,omitempty"` DisableManage bool `yaml:"disable_manage,omitempty"` }
type Control ¶
type Control struct { ClientID uuid.UUID // contains filtered or unexported fields }
func NewControl ¶
func (*Control) ClientAddTunnels ¶
func (*Control) SyncTunnels ¶
func (c *Control) SyncTunnels(cstm *msg.AddTunnels) error
type TunnelConfig ¶
type TunnelConfig struct { Schema string `yaml:"schema,omitempty"` Host string `yaml:"host,omitempty"` Port uint16 `yaml:"port,omitempty"` LocalAddr string `yaml:"local,omitempty"` HttpHostRewrite string `yaml:"http_host_rewrite,omitempty"` HttpsSkipVerify bool `yaml:"https_skip_verify,omitempty"` }
Click to show internal directories.
Click to hide internal directories.