outbound

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShadowSocksMethodOnlyBySing = []string{
	"aes-256-cfb",
	"aes-128-ctr",
	"aes-192-ctr",
	"aes-256-ctr",
	"aes-128-cfb",
	"aes-192-cfb",
	"rc4-md5",
	"rc4",
	"chacha20-ietf",
	"xchacha20",
}

Functions

func EnableSingBox added in v0.0.6

func EnableSingBox(rawUri string) bool

Types

type ClientType

type ClientType string
const (
	XrayCore ClientType = "xray"
	SingBox  ClientType = "sing"
)

type IOutbound

type IOutbound interface {
	Parse(string)
	Addr() string
	Port() int
	Scheme() string
	GetOutboundStr() string
	GetRawUri() string
}

func GetOutbound

func GetOutbound(clientType ClientType, rawUri string) (result IOutbound)

type ProxyItem added in v0.0.2

type ProxyItem struct {
	Address      string     `json:"address"`
	Port         int        `json:"port"`
	RTT          int64      `json:"rtt"`
	RawUri       string     `json:"raw_uri"`
	Location     string     `json:"location"`
	Outbound     string     `json:"outbound"`
	OutboundType ClientType `json:"outbound_type"`
}

func NewItem added in v0.0.2

func NewItem(rawUri string) *ProxyItem

func NewItemByEncryptedRawUri added in v0.0.2

func NewItemByEncryptedRawUri(enRawUri string) (item *ProxyItem)

func (*ProxyItem) GetHost added in v0.0.2

func (that *ProxyItem) GetHost() string

func (*ProxyItem) GetOutbound added in v0.0.2

func (that *ProxyItem) GetOutbound() string

func (*ProxyItem) GetOutboundType added in v0.0.2

func (that *ProxyItem) GetOutboundType() ClientType

func (*ProxyItem) String added in v0.0.2

func (that *ProxyItem) String() string

Item string for conf.txt

type Result added in v0.0.4

type Result struct {
	Vmess        []*ProxyItem `json:"Vmess"`
	Vless        []*ProxyItem `json:"Vless"`
	ShadowSocks  []*ProxyItem `json:"Shadowsocks"`
	ShadowSocksR []*ProxyItem `json:"ShadowsocksR"`
	Trojan       []*ProxyItem `json:"Trojan"`
	UpdateAt     string       `json:"UpdateAt"`
	VmessTotal   int          `json:"VmessTotal"`
	VlessTotal   int          `json:"VlessTotal"`
	TrojanTotal  int          `json:"TrojanTotal"`
	SSTotal      int          `json:"SSTotal"`
	SSRTotal     int          `json:"SSRTotal"`
	// contains filtered or unexported fields
}

func NewResult added in v0.0.4

func NewResult() *Result

func (*Result) AddItem added in v0.0.4

func (that *Result) AddItem(proxyItem *ProxyItem)

func (*Result) Clear added in v0.0.4

func (that *Result) Clear()

func (*Result) GetTotalList added in v0.0.4

func (that *Result) GetTotalList() []*ProxyItem

func (*Result) Len added in v0.0.4

func (that *Result) Len() int

func (*Result) Load added in v0.0.4

func (that *Result) Load(fPath string)

func (*Result) Save added in v0.0.4

func (that *Result) Save(fPath string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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