Documentation
¶
Index ¶
- Constants
- func AgeArmerDecrypt(data []byte, privateKey string) ([]byte, error)
- func BuildWithClash() bool
- func CalculatePEMCertChainSHA256Hash(input string) (string, error)
- func CalculatePEMCertPublicKeySHA256Hash(input string) (string, error)
- func CalculatePEMCertSHA256Hash(input string) (string, error)
- func CertificateToPrettyInfo(input string) (string, error)
- func DerToPem(input []byte) (string, error)
- func GetDepInfo() string
- func GetGoVersion() string
- func GetV2RayVersion() string
- func InitializeV2Ray(internalAssets string, externalAssets string, prefix string)
- func InterfaceUpdate()
- func IsIP(input string) bool
- func IsIPv4(input string) bool
- func IsIPv6(input string) bool
- func IsLoopbackIP(input string) bool
- func PemToDer(input string) ([]byte, error)
- func SetDiscardIPv6(shouldDiscardIPv6 bool)
- func SetNetworkType(networkType string)
- func SetSSID(ssid string)
- func SetUidDumper(uidDumper UidDumper, useProcfs bool)
- func Setenv(key, value string) error
- func Unsetenv(key string) error
- func UpdateSystemRoots(caProvider int32) (err error)
- func UrlTest(instance *V2RayInstance, inbound string, link string, timeout int32) (int32, error)
- type AppStats
- type CertProbeResult
- type CertProber
- type DebugInstance
- type HTTPClient
- type HTTPRequest
- type HTTPResponse
- type LocalResolver
- type ObservatoryStatusUpdateListener
- type Protector
- type STUNClient
- type StunLegacyResult
- type StunResult
- type TrafficListener
- type Tun2ray
- func (t *Tun2ray) Close() error
- func (t *Tun2ray) GetTrafficStatsEnabled() bool
- func (t *Tun2ray) NewConnection(source v2rayNet.Destination, destination v2rayNet.Destination, conn net.Conn)
- func (t *Tun2ray) NewPacket(source v2rayNet.Destination, destination v2rayNet.Destination, ...)
- func (t *Tun2ray) ReadAppTraffics(listener TrafficListener) error
- func (t *Tun2ray) ResetAppTraffics()
- type TunConfig
- type URL
- type UidDumper
- type V2RayInstance
- func (instance *V2RayInstance) Close() error
- func (instance *V2RayInstance) GetObservatoryStatus(tag string) ([]byte, error)
- func (instance *V2RayInstance) LoadConfig(content string) error
- func (instance *V2RayInstance) QueryStats(tag string, direct string) int64
- func (instance *V2RayInstance) SetStatusUpdateListener(tag string, listener ObservatoryStatusUpdateListener) error
- func (instance *V2RayInstance) Start() error
- func (instance *V2RayInstance) UpdateStatus(tag string, status []byte) error
- func (instance *V2RayInstance) WithLocalResolver(localResolver LocalResolver)
- func (instance *V2RayInstance) WithProtect(path string)
Constants ¶
View Source
const ( ProtectFailed byte = iota ProtectSuccess )
Variables ¶
This section is empty.
Functions ¶
func BuildWithClash ¶
func BuildWithClash() bool
func CertificateToPrettyInfo ¶
func GetDepInfo ¶
func GetDepInfo() string
func GetGoVersion ¶
func GetGoVersion() string
func GetV2RayVersion ¶
func GetV2RayVersion() string
func InitializeV2Ray ¶
func InterfaceUpdate ¶
func InterfaceUpdate()
func IsLoopbackIP ¶
func SetDiscardIPv6 ¶
func SetDiscardIPv6(shouldDiscardIPv6 bool)
func SetNetworkType ¶
func SetNetworkType(networkType string)
func SetUidDumper ¶
func UpdateSystemRoots ¶
Types ¶
type CertProbeResult ¶
type CertProber ¶
type CertProber interface {
ProbeTLS(host string, port int32, sni, alpn string) *CertProbeResult
ProbeQUIC(host string, port int32, sni, alpn string) *CertProbeResult
UseUDS(path string)
}
func NewCertProber ¶
func NewCertProber() CertProber
type DebugInstance ¶
type DebugInstance struct {
// contains filtered or unexported fields
}
func NewDebugInstance ¶
func NewDebugInstance(addr string) *DebugInstance
func (*DebugInstance) Close ¶
func (d *DebugInstance) Close()
type HTTPClient ¶
type HTTPClient interface {
RestrictedTLS()
UseUDS(path string)
KeepAlive()
NewRequest() HTTPRequest
Close()
}
func NewHttpClient ¶
func NewHttpClient() HTTPClient
type HTTPRequest ¶
type HTTPResponse ¶
type LocalResolver ¶
type STUNClient ¶
type STUNClient interface {
UseUDS(path string)
UseDNSUDS(path string)
StunTest(serverAddress string) *StunResult
StunLegacyTest(serverAddress string) *StunLegacyResult
}
func NewStunClient ¶
func NewStunClient() STUNClient
type StunLegacyResult ¶
type StunResult ¶
type TrafficListener ¶
type TrafficListener interface {
UpdateStats(t *AppStats)
}
type Tun2ray ¶
type Tun2ray struct {
// contains filtered or unexported fields
}
func NewTun2ray ¶
func (*Tun2ray) GetTrafficStatsEnabled ¶
func (*Tun2ray) NewConnection ¶
func (t *Tun2ray) NewConnection(source v2rayNet.Destination, destination v2rayNet.Destination, conn net.Conn)
func (*Tun2ray) ReadAppTraffics ¶
func (t *Tun2ray) ReadAppTraffics(listener TrafficListener) error
func (*Tun2ray) ResetAppTraffics ¶
func (t *Tun2ray) ResetAppTraffics()
type TunConfig ¶
type TunConfig struct {
FileDescriptor int32
Protect bool
Protector Protector
MTU int32
V2Ray *V2RayInstance
Addr4 string
Addr6 string
Dns4 string
Dns6 string
EnableIPv6 bool
Implementation int32
FakeDNS bool
Sniffing bool
OverrideDestination bool
Debug bool
DumpUID bool
TrafficStats bool
PCap bool
ProtectPath string
DiscardICMP bool
DiscardIPv6BasedOnNetwork bool
}
type URL ¶
type URL interface {
GetScheme() string
SetScheme(scheme string)
GetOpaque() string
SetOpaque(opaque string)
GetUsername() string
SetUsername(username string)
GetPassword() string
SetPassword(password string) error
GetHost() string
SetHost(host string)
GetPort() int32
SetHostPort(host string, port int32)
SetRawHost(host string)
GetRawHost() string
GetPath() string
SetPath(path string)
GetRawPath() string
SetRawPath(rawPath string) error
GetRawQuery() string
SetRawQuery(rawPath string)
HasQueryParameter(key string) bool
CountQueryParameter(key string) int
GetQueryParameter(key string) string
GetQueryParameterAt(key string, i int) string
AddQueryParameter(key, value string)
DeleteQueryParameter(key string)
GetFragment() string
SetFragment(fragment string)
GetRawFragment() string
SetRawFragment(rawFragment string) error
GetString() string
}
type V2RayInstance ¶
type V2RayInstance struct {
// contains filtered or unexported fields
}
func (*V2RayInstance) Close ¶
func (instance *V2RayInstance) Close() error
func (*V2RayInstance) GetObservatoryStatus ¶
func (instance *V2RayInstance) GetObservatoryStatus(tag string) ([]byte, error)
func (*V2RayInstance) LoadConfig ¶
func (instance *V2RayInstance) LoadConfig(content string) error
func (*V2RayInstance) QueryStats ¶
func (instance *V2RayInstance) QueryStats(tag string, direct string) int64
func (*V2RayInstance) SetStatusUpdateListener ¶
func (instance *V2RayInstance) SetStatusUpdateListener(tag string, listener ObservatoryStatusUpdateListener) error
func (*V2RayInstance) Start ¶
func (instance *V2RayInstance) Start() error
func (*V2RayInstance) UpdateStatus ¶
func (instance *V2RayInstance) UpdateStatus(tag string, status []byte) error
func (*V2RayInstance) WithLocalResolver ¶
func (instance *V2RayInstance) WithLocalResolver(localResolver LocalResolver)
func (*V2RayInstance) WithProtect ¶
func (instance *V2RayInstance) WithProtect(path string)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
modified from https://github.com/die-net/lrucache
|
modified from https://github.com/die-net/lrucache |
Click to show internal directories.
Click to hide internal directories.