proxy

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestGeoInfo

func TestGeoInfo()

Types

type CountryItem

type CountryItem struct {
	ISO2 string `json:"iso2"`
	ISO3 string `json:"iso3"`
	ENG  string `json:"eng"`
}

type EdgeTunnelProxy

type EdgeTunnelProxy struct {
	CNF *conf.NeoConf
	// contains filtered or unexported fields
}

Handle edgetunnel rawList see: https://github.com/3Kmfi6HP/EDtunnel

https://edtunnel.pages.dev/sub/uui https port: 443, 8443, 2053, 2096, 2087, 2083

func NewEdgeTunnelProxy

func NewEdgeTunnelProxy(cnf *conf.NeoConf) (etp *EdgeTunnelProxy)

func (*EdgeTunnelProxy) DownloadAndSaveRawList

func (that *EdgeTunnelProxy) DownloadAndSaveRawList(addr, uuid string)

func (*EdgeTunnelProxy) RandomlyChooseEdgeTunnel

func (that *EdgeTunnelProxy) RandomlyChooseEdgeTunnel(addr, uuid string) (newItem *outbound.ProxyItem)

func (*EdgeTunnelProxy) RandomlyChooseEdgeTunnelByOldProxyItem

func (that *EdgeTunnelProxy) RandomlyChooseEdgeTunnelByOldProxyItem(p *outbound.ProxyItem) (newItem *outbound.ProxyItem)

type GeoInfo

type GeoInfo struct {
	CNF *conf.NeoConf
	// contains filtered or unexported fields
}

func NewGeoInfo

func NewGeoInfo(cnf *conf.NeoConf) (g *GeoInfo)

func (*GeoInfo) DoesGeoInfoFileExist

func (that *GeoInfo) DoesGeoInfoFileExist() bool

func (*GeoInfo) Download

func (that *GeoInfo) Download()

func (*GeoInfo) GetGeoDir

func (that *GeoInfo) GetGeoDir() string

type Info

type Info struct {
	GVCLatestVersion string               `json:"GVCLatestVersion"`
	InfoList         map[string]*InfoItem `json:"InfoList"`
}

type InfoItem

type InfoItem struct {
	SHA256  string `json:"SHA256"`
	UpdatAt string `json:"UpdatAt"`
}

type MannualProxy

type MannualProxy struct {
	CNF    *conf.NeoConf
	Result *outbound.Result
	// contains filtered or unexported fields
}

func NewMannualProxy

func NewMannualProxy(cnf *conf.NeoConf) (m *MannualProxy)

func (*MannualProxy) AddEdgeTunnelByAddressUUID

func (that *MannualProxy) AddEdgeTunnelByAddressUUID(addr, uuid string)

func (*MannualProxy) AddFromFile

func (that *MannualProxy) AddFromFile(fPath, sourceType string)

func (*MannualProxy) AddRawUri

func (that *MannualProxy) AddRawUri(rawUri, sourceType string)

func (*MannualProxy) RemoveMannualProxy

func (that *MannualProxy) RemoveMannualProxy(addr string, port int, sourceType string)

type Pinger

type Pinger struct {
	CNF          *conf.NeoConf
	ProxyFetcher *ProxyFetcher
	Result       *outbound.Result
	// contains filtered or unexported fields
}

func NewPinger

func NewPinger(cnf *conf.NeoConf) (p *Pinger)

func (*Pinger) GetResultByReload

func (that *Pinger) GetResultByReload() *outbound.Result

func (*Pinger) Run

func (that *Pinger) Run(force ...bool)

func (*Pinger) Statistics

func (that *Pinger) Statistics() (singCount, xrayCount int)

type ProxyFetcher

type ProxyFetcher struct {
	CNF *conf.NeoConf
	Key *conf.RawListEncryptKey

	Result *outbound.Result
	// contains filtered or unexported fields
}

func NewProxyFetcher

func NewProxyFetcher(cnf *conf.NeoConf) (p *ProxyFetcher)

func (*ProxyFetcher) DecryptAndLoad

func (that *ProxyFetcher) DecryptAndLoad()

func (*ProxyFetcher) DownAndLoad

func (that *ProxyFetcher) DownAndLoad(force ...bool)

func (*ProxyFetcher) Download

func (that *ProxyFetcher) Download()

func (*ProxyFetcher) GetResultByReload

func (that *ProxyFetcher) GetResultByReload() *outbound.Result

func (*ProxyFetcher) LoadHistoryListToRawDecrypted

func (that *ProxyFetcher) LoadHistoryListToRawDecrypted()

load history verified list items to rawlist.

type ProxyLocations

type ProxyLocations struct {
	CNF *conf.NeoConf

	CountryItemList map[string]*CountryItem
	// contains filtered or unexported fields
}

func NewLocations

func NewLocations(cnf *conf.NeoConf) (pl *ProxyLocations)

func (*ProxyLocations) Query

func (that *ProxyLocations) Query(pxy *outbound.ProxyItem) (name string)

type ProxyQRCode

type ProxyQRCode struct {
	CNF *conf.NeoConf
	// contains filtered or unexported fields
}

func NewQRCodeProxy

func NewQRCodeProxy(cnf *conf.NeoConf) (pqc *ProxyQRCode)

func (*ProxyQRCode) GenQRCode

func (that *ProxyQRCode) GenQRCode()

func (*ProxyQRCode) SetProxyItem

func (that *ProxyQRCode) SetProxyItem(p *outbound.ProxyItem)

type Verifier

type Verifier struct {
	CNF     *conf.NeoConf
	Pinger  *Pinger
	Locater *ProxyLocations
	Result  *outbound.Result
	// contains filtered or unexported fields
}

func NewVerifier

func NewVerifier(cnf *conf.NeoConf) (v *Verifier)

func (*Verifier) GetProxyFromDB

func (that *Verifier) GetProxyFromDB(sourceType string) []*outbound.ProxyItem

func (*Verifier) GetResultByReload

func (that *Verifier) GetResultByReload() *outbound.Result

func (*Verifier) GetResultListByReload

func (that *Verifier) GetResultListByReload() []*outbound.ProxyItem

func (*Verifier) IsRunning

func (that *Verifier) IsRunning() bool

func (*Verifier) ResultList

func (that *Verifier) ResultList() []*outbound.ProxyItem

func (*Verifier) Run

func (that *Verifier) Run(force ...bool)

Jump to

Keyboard shortcuts

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