Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoralConfig ¶
type CoralConfig struct { Common CoralConfigCommon Servers map[string]CoralServer }
func GetDefaultConfig ¶
func GetDefaultConfig() CoralConfig
func ParseFileConfig ¶
func ParseFileConfig(configFile string) (*CoralConfig, error)
func ParseIniConfig ¶
func ParseIniConfig(str string) (*CoralConfig, error)
func ParseRemoteConfig ¶
func ParseRemoteConfig(url string) (*CoralConfig, error)
type CoralConfigCommon ¶
type CoralConfigCommon struct { Host string `json:"address"` Port int `json:"port"` DirectTimeout time.Duration `json:"directTimeout"` Whitelist map[string]bool `json:"whitelist"` }
func (CoralConfigCommon) Address ¶
func (c CoralConfigCommon) Address() string
type CoralServer ¶
type CoralServer struct { Name string `json:"name"` Type string `json:"type"` Host string `json:"host"` Port string `json:"port"` Method string `json:"method"` Password string `json:"password"` Obfs string `json:"obfs"` ObfsParam string `json:"obfsParam"` Protocol string `json:"protocol"` ProtocolParam string `json:"protocolParam"` ReadTimeout time.Duration `json:"readTimeout"` }
func UnmarshalServerFormSection ¶
func UnmarshalServerFormSection(name string, section ini.Section) (CoralServer, error)
func (CoralServer) Address ¶
func (c CoralServer) Address() string
Click to show internal directories.
Click to hide internal directories.