vmess

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 39 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongProtocol = errors.New("wrong protocol")
)

Functions

func CoreHTTPClient

func CoreHTTPClient(inst *core.Instance, timeout time.Duration) (*http.Client, error)

func CoreHTTPRequest

func CoreHTTPRequest(inst *core.Instance, timeout time.Duration, method, dest string) (int, []byte, error)

func CoreVersion

func CoreVersion() string

func Vmess2Outbound

func Vmess2Outbound(v *Link, usemux bool) (*core.OutboundHandlerConfig, error)

Types

type Link struct {
	Ps   string      `json:"ps"`
	Add  string      `json:"add"`
	Port interface{} `json:"port"`
	ID   string      `json:"id"`
	Aid  interface{} `json:"aid"`
	Net  string      `json:"net"`
	Type string      `json:"type"`
	Host string      `json:"host"`
	Path string      `json:"path"`
	TLS  string      `json:"tls"`
}

func Parse

func Parse(s string) ([]*Link, error)

func ParseSingle

func ParseSingle(vmessURL string) (*Link, error)

ParseSingle parses single vmess URL into Link structure

func (*Link) Config

func (lk *Link) Config() map[string]string

func (*Link) Description

func (lk *Link) Description() string

func (*Link) DestAddr

func (lk *Link) DestAddr() string

func (*Link) Ping

func (lk *Link) Ping(round int, dst string) (ping.Status, error)

func (*Link) Safe

func (lk *Link) Safe() string

func (*Link) String

func (lk *Link) String() string

String converts vmess link to vmess:// URL

Jump to

Keyboard shortcuts

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