json

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigTarget

type ConfigTarget struct {
	Address    v2net.Address
	Users      []*ConfigUser
	TCPEnabled bool
	UDPEnabled bool
}

func (*ConfigTarget) UnmarshalJSON

func (t *ConfigTarget) UnmarshalJSON(data []byte) error

type ConfigUser

type ConfigUser struct {
	Id    *config.ID
	Email string
}

ConfigUser is an user account in VMess configuration.

func (*ConfigUser) ID

func (u *ConfigUser) ID() *config.ID

func (*ConfigUser) UnmarshalJSON

func (u *ConfigUser) UnmarshalJSON(data []byte) error

type Inbound

type Inbound struct {
	AllowedClients []*ConfigUser `json:"clients"`
	UDP            bool          `json:"udp"`
}

func (*Inbound) AllowedUsers

func (c *Inbound) AllowedUsers() []vmessconfig.User

func (*Inbound) UDPEnabled

func (c *Inbound) UDPEnabled() bool

type Outbound

type Outbound struct {
	TargetList []*ConfigTarget `json:"vnext"`
}

func (*Outbound) Targets

func (o *Outbound) Targets() []*vmessconfig.OutboundTarget

type RawConfigTarget

type RawConfigTarget struct {
	Address string        `json:"address"`
	Port    uint16        `json:"port"`
	Users   []*ConfigUser `json:"users"`
	Network string        `json:"network"`
}

func (RawConfigTarget) HasNetwork

func (config RawConfigTarget) HasNetwork(network string) bool

Jump to

Keyboard shortcuts

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