json

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2015 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PortValue            v2net.Port               `json:"port"` // Port of this Point server.
	LogConfigValue       *LogConfig               `json:"log"`
	RouterConfigValue    *routerjson.RouterConfig `json:"routing"`
	InboundConfigValue   *ConnectionConfig        `json:"inbound"`
	OutboundConfigValue  *ConnectionConfig        `json:"outbound"`
	InboundDetoursValue  []*InboundDetourConfig   `json:"inboundDetour"`
	OutboundDetoursValue []*OutboundDetourConfig  `json:"outboundDetour"`
}

Config is the config for Point server.

func LoadConfig

func LoadConfig(file string) (*Config, error)

func (*Config) InboundConfig

func (config *Config) InboundConfig() point.ConnectionConfig

func (*Config) InboundDetours

func (this *Config) InboundDetours() []point.InboundDetourConfig

func (*Config) LogConfig

func (config *Config) LogConfig() point.LogConfig

func (*Config) OutboundConfig

func (config *Config) OutboundConfig() point.ConnectionConfig

func (*Config) OutboundDetours

func (this *Config) OutboundDetours() []point.OutboundDetourConfig

func (*Config) Port

func (config *Config) Port() v2net.Port

func (*Config) RouterConfig

func (this *Config) RouterConfig() router.Config

type ConnectionConfig

type ConnectionConfig struct {
	ProtocolString  string           `json:"protocol"`
	SettingsMessage json.RawMessage  `json:"settings"`
	Type            proxyconfig.Type `json:"-"`
}

func (*ConnectionConfig) Protocol

func (c *ConnectionConfig) Protocol() string

func (*ConnectionConfig) Settings

func (c *ConnectionConfig) Settings() interface{}

type InboundDetourConfig

type InboundDetourConfig struct {
	ProtocolValue  string               `json:"protocol"`
	PortRangeValue *v2netjson.PortRange `json:"port"`
	SettingsValue  json.RawMessage      `json:"settings"`
	TagValue       string               `json:"tag"`
}

func (*InboundDetourConfig) PortRange

func (this *InboundDetourConfig) PortRange() v2net.PortRange

func (*InboundDetourConfig) Protocol

func (this *InboundDetourConfig) Protocol() string

func (*InboundDetourConfig) Settings

func (this *InboundDetourConfig) Settings() interface{}

func (*InboundDetourConfig) Tag

func (this *InboundDetourConfig) Tag() string

type LogConfig

type LogConfig struct {
	AccessLogValue string `json:"access"`
	ErrorLogValue  string `json:"error"`
	LogLevelValue  string `json:"loglevel"`
}

func (*LogConfig) AccessLog

func (this *LogConfig) AccessLog() string

func (*LogConfig) ErrorLog

func (this *LogConfig) ErrorLog() string

func (*LogConfig) LogLevel

func (this *LogConfig) LogLevel() log.LogLevel

type OutboundDetourConfig

type OutboundDetourConfig struct {
	ProtocolValue string          `json:"protocol"`
	TagValue      string          `json:"tag"`
	SettingsValue json.RawMessage `json:"settings"`
}

func (*OutboundDetourConfig) Protocol

func (this *OutboundDetourConfig) Protocol() string

func (*OutboundDetourConfig) Settings

func (this *OutboundDetourConfig) Settings() interface{}

func (*OutboundDetourConfig) Tag

func (this *OutboundDetourConfig) Tag() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL