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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthMethodNoAuth   = "noauth"
	AuthMethodUserPass = "password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAddress

type IPAddress net.IP

func (*IPAddress) UnmarshalJSON

func (this *IPAddress) UnmarshalJSON(data []byte) error

type SocksAccount

type SocksAccount struct {
	Username string `json:"user"`
	Password string `json:"pass"`
}

type SocksAccountMap

type SocksAccountMap map[string]string

func (*SocksAccountMap) HasAccount

func (this *SocksAccountMap) HasAccount(user, pass string) bool

func (*SocksAccountMap) UnmarshalJSON

func (this *SocksAccountMap) UnmarshalJSON(data []byte) error

type SocksConfig

type SocksConfig struct {
	AuthMethod string          `json:"auth"`
	Accounts   SocksAccountMap `json:"accounts"`
	UDP        bool            `json:"udp"`
	HostIP     IPAddress       `json:"ip"`
}

func (*SocksConfig) HasAccount

func (sc *SocksConfig) HasAccount(user, pass string) bool

func (*SocksConfig) IP

func (sc *SocksConfig) IP() net.IP

func (*SocksConfig) IsNoAuth

func (sc *SocksConfig) IsNoAuth() bool

func (*SocksConfig) IsPassword

func (sc *SocksConfig) IsPassword() bool

func (*SocksConfig) UDPEnabled

func (this *SocksConfig) UDPEnabled() bool

Jump to

Keyboard shortcuts

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