vpn

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vpn provides Go bindings for android.net.

Index

Constants

View Source
const (
	ServiceInterface                = consts.ServiceInterface
	ServiceMetaDataSupportsAlwaysOn = consts.ServiceMetaDataSupportsAlwaysOn
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type Service added in v0.0.4

type Service struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Service wraps android.net.VpnService.

func (*Service) IsAlwaysOn added in v0.0.4

func (m *Service) IsAlwaysOn() (bool, error)

IsAlwaysOn calls android.net.VpnService.isAlwaysOn.

func (*Service) IsLockdownEnabled added in v0.0.4

func (m *Service) IsLockdownEnabled() (bool, error)

IsLockdownEnabled calls android.net.VpnService.isLockdownEnabled.

func (*Service) OnBind added in v0.0.4

func (m *Service) OnBind(arg0 *jni.Object) (*jni.Object, error)

OnBind calls android.net.VpnService.onBind.

func (*Service) OnRevoke added in v0.0.4

func (m *Service) OnRevoke() error

OnRevoke calls android.net.VpnService.onRevoke.

func (*Service) Prepare added in v0.0.4

func (m *Service) Prepare(arg0 *jni.Object) (*jni.Object, error)

Prepare calls android.net.VpnService.prepare.

func (*Service) Protect1 added in v0.0.4

func (m *Service) Protect1(arg0 int32) (bool, error)

Protect1 calls android.net.VpnService.protect.

func (*Service) Protect1_1 added in v0.0.4

func (m *Service) Protect1_1(arg0 *jni.Object) (bool, error)

Protect1_1 calls android.net.VpnService.protect.

func (*Service) Protect1_2 added in v0.0.4

func (m *Service) Protect1_2(arg0 *jni.Object) (bool, error)

Protect1_2 calls android.net.VpnService.protect.

func (*Service) SetUnderlyingNetworks added in v0.0.4

func (m *Service) SetUnderlyingNetworks(arg0 *jni.Object) (bool, error)

SetUnderlyingNetworks calls android.net.VpnService.setUnderlyingNetworks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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