Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common struct {
HostName string
Dialer network.Dial
DialTimeout time.Duration
Presets []Preset
OnlyAllowPresetRemotes bool
}
Common settings shared by multiple servers
type Configuration ¶
type Configuration struct {
HostName string
DialTimeout time.Duration
Socks5 string
Socks5User string
Socks5Password string
Servers []Server
Presets []Preset
OnlyAllowPresetRemotes bool
}
Configuration contains configuration of the application
type Loader ¶
type Loader func(log log.Logger) (name string, cfg Configuration, err error)
Loader Configuration loader
func Direct ¶
func Direct(cfg Configuration) Loader
Direct creates a loader that return raw configuration data directly. Good for integration.
type Meta ¶
Meta contains data of a Key -> Value map which can be use to store dynamically structured configuration options
type PresetReloader ¶
PresetReloader reloads preset
type Server ¶
type Server struct {
ListenInterface string
ListenPort uint16
InitialTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
HeartbeatTimeout time.Duration
ReadDelay time.Duration
WriteDelay time.Duration
TLSCertificateFile string
TLSCertificateKeyFile string
}
Server contains configuration of a HTTP server
func (Server) WithDefault ¶
WithDefault build the configuration and fill the blank with default values
Click to show internal directories.
Click to hide internal directories.