outbound

package
v0.0.0-...-f887393 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 10 Imported by: 1

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

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

type ProxyItem struct {
	Scheme       string     `json:"scheme"`
	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

func NewItem(rawUri string) *ProxyItem

func NewItemByEncryptedRawUri

func NewItemByEncryptedRawUri(enRawUri string) (item *ProxyItem)

func ParseEncryptedRawUriToProxyItem

func ParseEncryptedRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)

func ParseRawUriToProxyItem

func ParseRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)

Automatically parse rawUri to ProxyItem for certain Client[sing-box/xray-core]

func TransferProxyItem

func TransferProxyItem(oldProxyItem *ProxyItem, clientType ...ClientType) (newProxyItem *ProxyItem)

Transfer ProxyItem to specified ClientType: sing-box or xray-core

func (*ProxyItem) GetHost

func (that *ProxyItem) GetHost() string

func (*ProxyItem) GetOutbound

func (that *ProxyItem) GetOutbound() string

func (*ProxyItem) GetOutboundType

func (that *ProxyItem) GetOutboundType() ClientType

func (*ProxyItem) String

func (that *ProxyItem) String() string

Item string for conf.txt

type Result

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

func NewResult() *Result

func (*Result) AddItem

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

func (*Result) Clear

func (that *Result) Clear()

func (*Result) GetTotalList

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

func (*Result) Len

func (that *Result) Len() int

func (*Result) Load

func (that *Result) Load(fPath string)

func (*Result) Save

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