Versions in this module Expand all Collapse all v0 v0.32.3 Nov 7, 2020 v0.32.2 Nov 6, 2020 Changes in this version + const KB + const MB + func GetRenderedConfFromFile(path string) (out string, err error) + func LoadAllConfFromIni(prefix string, content string, startProxy map[string]struct{}) (proxyConfs map[string]ProxyConf, visitorConfs map[string]VisitorConf, ...) + func ParseRangeSection(name string, section ini.Section) (sections map[string]ini.Section, err error) + func RenderContent(in string) (out string, err error) + func UnmarshalPluginsFromIni(sections ini.File, cfg *ServerCommonConf) + type BandwidthQuantity struct + func NewBandwidthQuantity(s string) (BandwidthQuantity, error) + func (q *BandwidthQuantity) Bytes() int64 + func (q *BandwidthQuantity) Equal(u *BandwidthQuantity) bool + func (q *BandwidthQuantity) MarshalJSON() ([]byte, error) + func (q *BandwidthQuantity) String() string + func (q *BandwidthQuantity) UnmarshalJSON(b []byte) error + func (q *BandwidthQuantity) UnmarshalString(s string) error + type BaseProxyConf struct + BandwidthLimit BandwidthQuantity + Group string + GroupKey string + Metas map[string]string + ProxyName string + ProxyProtocolVersion string + ProxyType string + UseCompression bool + UseEncryption bool + func (cfg *BaseProxyConf) GetBaseInfo() *BaseProxyConf + func (cfg *BaseProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *BaseProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) error + func (cfg *BaseProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type BaseVisitorConf struct + BindAddr string + BindPort int + ProxyName string + ProxyType string + Role string + ServerName string + Sk string + UseCompression bool + UseEncryption bool + func (cfg *BaseVisitorConf) GetBaseInfo() *BaseVisitorConf + func (cfg *BaseVisitorConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + type BindInfoConf struct + RemotePort int + func (cfg *BindInfoConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *BindInfoConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *BindInfoConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type ClientCommonConf struct + AdminAddr string + AdminPort int + AdminPwd string + AdminUser string + AssetsDir string + DisableLogColor bool + DnsServer string + HeartBeatInterval int64 + HeartBeatTimeout int64 + HttpProxy string + LogFile string + LogLevel string + LogMaxDays int64 + LogWay string + LoginFailExit bool + Metas map[string]string + PoolCount int + Protocol string + ServerAddr string + ServerPort int + Start map[string]struct{} + TLSEnable bool + TcpMux bool + User string + func GetDefaultClientConf() ClientCommonConf + func UnmarshalClientConfFromIni(content string) (cfg ClientCommonConf, err error) + func (cfg *ClientCommonConf) Check() (err error) + type DomainConf struct + CustomDomains []string + SubDomain string + func (cfg *DomainConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *DomainConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *DomainConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type HealthCheckConf struct + HealthCheckAddr string + HealthCheckIntervalS int + HealthCheckMaxFailed int + HealthCheckTimeoutS int + HealthCheckType string + HealthCheckUrl string + func (cfg *HealthCheckConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + type HttpProxyConf struct + Headers map[string]string + HostHeaderRewrite string + HttpPwd string + HttpUser string + Locations []string + func (cfg *HttpProxyConf) CheckForCli() (err error) + func (cfg *HttpProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) + func (cfg *HttpProxyConf) Compare(cmp ProxyConf) bool + func (cfg *HttpProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *HttpProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *HttpProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type HttpsProxyConf struct + func (cfg *HttpsProxyConf) CheckForCli() (err error) + func (cfg *HttpsProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) + func (cfg *HttpsProxyConf) Compare(cmp ProxyConf) bool + func (cfg *HttpsProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *HttpsProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *HttpsProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type LocalSvrConf struct + LocalIp string + LocalPort int + Plugin string + PluginParams map[string]string + func (cfg *LocalSvrConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + type ProxyConf interface + CheckForCli func() error + CheckForSvr func(serverCfg ServerCommonConf) error + Compare func(conf ProxyConf) bool + GetBaseInfo func() *BaseProxyConf + MarshalToMsg func(pMsg *msg.NewProxy) + UnmarshalFromIni func(prefix string, name string, conf ini.Section) error + UnmarshalFromMsg func(pMsg *msg.NewProxy) + func NewConfByType(proxyType string) ProxyConf + func NewProxyConfFromIni(prefix string, name string, section ini.Section) (cfg ProxyConf, err error) + func NewProxyConfFromMsg(pMsg *msg.NewProxy, serverCfg ServerCommonConf) (cfg ProxyConf, err error) + type ServerCommonConf struct + AllowPorts map[int]struct{} + AssetsDir string + BindAddr string + BindPort int + BindUdpPort int + Custom404Page string + DashboardAddr string + DashboardPort int + DashboardPwd string + DashboardUser string + DetailedErrorsToClient bool + DisableLogColor bool + EnablePrometheus bool + HTTPPlugins map[string]plugin.HTTPPluginOptions + HeartBeatTimeout int64 + KcpBindPort int + LogFile string + LogLevel string + LogMaxDays int64 + LogWay string + MaxPoolCount int64 + MaxPortsPerClient int64 + ProxyBindAddr string + SubDomainHost string + TcpMux bool + TcpMuxHttpConnectPort int + TlsOnly bool + UserConnTimeout int64 + VhostHttpPort int + VhostHttpTimeout int64 + VhostHttpsPort int + func GetDefaultServerConf() ServerCommonConf + func UnmarshalServerConfFromIni(content string) (cfg ServerCommonConf, err error) + func (cfg *ServerCommonConf) Check() (err error) + type StcpProxyConf struct + Role string + Sk string + func (cfg *StcpProxyConf) CheckForCli() (err error) + func (cfg *StcpProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) + func (cfg *StcpProxyConf) Compare(cmp ProxyConf) bool + func (cfg *StcpProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *StcpProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *StcpProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type StcpVisitorConf struct + func (cfg *StcpVisitorConf) Check() (err error) + func (cfg *StcpVisitorConf) Compare(cmp VisitorConf) bool + func (cfg *StcpVisitorConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + type TcpMuxProxyConf struct + Multiplexer string + func (cfg *TcpMuxProxyConf) CheckForCli() (err error) + func (cfg *TcpMuxProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) + func (cfg *TcpMuxProxyConf) Compare(cmp ProxyConf) bool + func (cfg *TcpMuxProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *TcpMuxProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *TcpMuxProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type TcpProxyConf struct + func (cfg *TcpProxyConf) CheckForCli() (err error) + func (cfg *TcpProxyConf) CheckForSvr(serverCfg ServerCommonConf) error + func (cfg *TcpProxyConf) Compare(cmp ProxyConf) bool + func (cfg *TcpProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *TcpProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *TcpProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type UdpProxyConf struct + func (cfg *UdpProxyConf) CheckForCli() (err error) + func (cfg *UdpProxyConf) CheckForSvr(serverCfg ServerCommonConf) error + func (cfg *UdpProxyConf) Compare(cmp ProxyConf) bool + func (cfg *UdpProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *UdpProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *UdpProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type Values struct + Envs map[string]string + func GetValues() *Values + type VisitorConf interface + Check func() error + Compare func(cmp VisitorConf) bool + GetBaseInfo func() *BaseVisitorConf + UnmarshalFromIni func(prefix string, name string, section ini.Section) error + func NewVisitorConfByType(cfgType string) VisitorConf + func NewVisitorConfFromIni(prefix string, name string, section ini.Section) (cfg VisitorConf, err error) + type XtcpProxyConf struct + Role string + Sk string + func (cfg *XtcpProxyConf) CheckForCli() (err error) + func (cfg *XtcpProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) + func (cfg *XtcpProxyConf) Compare(cmp ProxyConf) bool + func (cfg *XtcpProxyConf) MarshalToMsg(pMsg *msg.NewProxy) + func (cfg *XtcpProxyConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error) + func (cfg *XtcpProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) + type XtcpVisitorConf struct + func (cfg *XtcpVisitorConf) Check() (err error) + func (cfg *XtcpVisitorConf) Compare(cmp VisitorConf) bool + func (cfg *XtcpVisitorConf) UnmarshalFromIni(prefix string, name string, section ini.Section) (err error)