libv2ray

package module
v0.0.0-...-6a3c7e2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: LGPL-3.0 Imports: 20 Imported by: 0

README

v2ray_mobile_lib

This library is used in V2RayNG-android for support V2Ray.

This library is used in V2RayNG-iOS for support V2Ray.

Setup

make init_env

Build

export http_proxy=http://127.0.0.1:10809
export https_proxy=http://127.0.0.1:10809
export ANDROID_HOME=/path/to/Android/Sdk
export ANDROID_NDK_HOME=/path/to/Android/android-ndk-r20b

# Build an AAR
make build_android

# Build a Framework
make build_ios

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion() int

CheckVersion int This func will return libv2ray binding version.

func CheckVersionX

func CheckVersionX() string

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

func TestConfig

func TestConfig(ConfigureFileContent string) error

Delegate Function

Types

type V2RayPoint

type V2RayPoint struct {
	SupportSet V2RayVPNServiceSupportsSet

	PackageName          string
	DomainName           string
	ConfigureFileContent string
	EnableLocalDNS       bool
	ForwardIpv6          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, assetsDirectory string, protectedDialer bool) *V2RayPoint

NewV2RayPoint new V2RayPoint

func (*V2RayPoint) GetIsRunning

func (v *V2RayPoint) GetIsRunning() bool

Delegate Funcation

func (V2RayPoint) QueryStats

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

Delegate Funcation

func (*V2RayPoint) RunLoop

func (v *V2RayPoint) RunLoop() (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) int
	OnEmitStatus(int, string) int
	SendFd() 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