Documentation ¶
Index ¶
- Constants
- Variables
- func BoolIfString(val bool, trueval string) string
- func BoolToEnabled(val bool) string
- func BoolToString(val bool, trueval string, falseval string) string
- func ExecCmd(cmd string, arg ...string) error
- func ExecCmdGetStdOut(cmd string, arg ...string) (string, error)
- func GetPacketBufferSizeByMTU(mtu int) int
- func IPMaskGetNetMask(mask net.IPMask) string
- func IPNetGetNetMask(ipNet *net.IPNet) string
- func LoadConfigFile(file string, out interface{}) error
- func LoadConfigReader(reader io.Reader, out interface{}) error
- func MakeLogger(logType string, prefix string) *log.Logger
- func MakeSimpleCond() *sync.Cond
- func PrintVersion()
- func TLSSetCipherAESPreference(preferAES bool)
- func TLSVersionNum(version string) uint16
- func TLSVersionString(version uint16) string
- func UpdateLogger(logger *log.Logger, logType string, prefix string)
- type EventConfig
- type EventConfigHolder
- type VPNMode
- type VPNNet
- func (r *VPNNet) Equals(other *VPNNet) bool
- func (r *VPNNet) GetClientSlots() uint64
- func (r *VPNNet) GetIPAt(idx int) (net.IP, error)
- func (r *VPNNet) GetNetmask() string
- func (r *VPNNet) GetRaw() string
- func (r *VPNNet) GetRawIP() net.IP
- func (r *VPNNet) GetServerIP() net.IP
- func (r *VPNNet) GetSize() int
- func (r *VPNNet) GetSubnet() *net.IPNet
Constants ¶
View Source
const ( EventUp = "up" EventDown = "down" EventStartup = "startup" )
Variables ¶
View Source
var ( Version = "dev" ProtocolVersion = 12 )
View Source
var DefaultMAC = net.HardwareAddr{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
Functions ¶
func BoolIfString ¶
func BoolToEnabled ¶
func IPMaskGetNetMask ¶
func IPNetGetNetMask ¶
func LoadConfigFile ¶
func LoadConfigReader ¶
func MakeSimpleCond ¶
func PrintVersion ¶
func PrintVersion()
func TLSSetCipherAESPreference ¶
func TLSSetCipherAESPreference(preferAES bool)
func TLSVersionNum ¶
func TLSVersionString ¶
Types ¶
type EventConfig ¶
type EventConfigHolder ¶
func (*EventConfigHolder) LoadEventConfig ¶
func (c *EventConfigHolder) LoadEventConfig(config *EventConfig)
func (*EventConfigHolder) RunEventScript ¶
type VPNMode ¶
type VPNMode int
func VPNModeFromString ¶
func (VPNMode) ToWaterDeviceType ¶
func (m VPNMode) ToWaterDeviceType() water.DeviceType
type VPNNet ¶
type VPNNet struct {
// contains filtered or unexported fields
}
func ParseVPNNet ¶
func (*VPNNet) GetClientSlots ¶
func (*VPNNet) GetNetmask ¶
func (*VPNNet) GetServerIP ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.