libv2ray

package module
v0.0.0-...-b96a6af Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: LGPL-3.0 Imports: 23 Imported by: 0

README

AndroidLibV2rayLite

步骤:

1.安装go环境

export PATH=$PATH:/usr/local/go/bin:~/go/bin

2.安装android-sdk-linux, openjdk-8-jdk 并配置环境变量ANDROID_HOME NDK_HOME

3.直接make

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion() int

func CheckVersionX

func CheckVersionX() string

CheckVersionX string This func will return libv2ray binding version and V2Ray version used.

func InitV2Env

func InitV2Env(envPath string)

InitV2Env set v2 asset path

func MeasureOutboundDelay

func MeasureOutboundDelay(ConfigureFileContent string) (int64, error)

func TestConfig

func TestConfig(ConfigureFileContent string) error

Delegate Funcation

Types

type V2RayPoint

type V2RayPoint struct {
	SupportSet V2RayVPNServiceSupportsSet

	Vpoint    *v2core.Instance
	IsRunning bool

	DomainName           string
	ConfigureFileContent string
	AsyncResolve         bool
	// contains filtered or unexported fields
}

V2RayPoint V2Ray Point Server This is territory of Go, so no getter and setters!

func NewV2RayPoint

func NewV2RayPoint(s V2RayVPNServiceSupportsSet, adns bool) *V2RayPoint

NewV2RayPoint new V2RayPoint

func (*V2RayPoint) MeasureDelay

func (v *V2RayPoint) MeasureDelay() (int64, error)

func (V2RayPoint) QueryStats

func (v V2RayPoint) QueryStats(tag string, direct string) int64

Delegate Funcation

func (*V2RayPoint) RunLoop

func (v *V2RayPoint) RunLoop(prefIPv6 bool) (err error)

RunLoop Run V2Ray main loop

func (*V2RayPoint) StopLoop

func (v *V2RayPoint) StopLoop() (err error)

StopLoop Stop V2Ray main loop

type V2RayVPNServiceSupportsSet

type V2RayVPNServiceSupportsSet interface {
	Setup(Conf string) int
	Prepare() int
	Shutdown() int
	Protect(int) bool
	OnEmitStatus(int, string) int
}

V2RayVPNServiceSupportsSet To support Android VPN mode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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