Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUDPServer = errors.New("UDP server crashed") ErrTCPServer = errors.New("TCP server crashed") )
Functions ¶
This section is empty.
Types ¶
type Settings ¶ added in v0.3.0
type Settings struct { // Listening address for the TCP and UDP servers. // It defaults to ":8388". It cannot be nil in the // internal state. Note it overrides the Address for both // the TCP and the UDP servers. Address *string // LogAddresses to log addresses proxied for the TCP server. // It cannot be nil in the internal state. // Note it overrides the LogAddresses for both the TCP and the UDP servers. LogAddresses *bool // CipherName is the cipher to use for the TCP and UDP servers. // It defaults to chacha20-ietf-poly1305. It cannot be empty in the // internal state. CipherName string // Password for the TCP and UDP servers. It cannot be nil in the // internal state. Password *string // TCP can be used to set specific settings for the TCP server. TCP tcp.Settings // UDP can be used to set specific settings for the UDP server. UDP udp.Settings }
func (*Settings) MergeWith ¶ added in v0.4.0
MergeWith returns the merge result of the receiver settings with any unset fields set to the field of the other settings argument.
func (*Settings) OverrideWith ¶ added in v0.4.0
OverrideWith sets any field of the receiving settings with the field value of any set field from the other settings.
func (*Settings) SetDefaults ¶ added in v0.4.0
func (s *Settings) SetDefaults()
SetDefaults sets default values for all unset field in the settings.
Click to show internal directories.
Click to hide internal directories.