arcvpn

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package arcvpn interacts with the ARC-side fake VPN.

Index

Constants

View Source
const (

	// ARCVPNPackage is the package name of the ARC-side fake VPN
	ARCVPNPackage = "org.chromium.arc.hostvpn"

	// ARCVPNService is the name of the Android Service that runs the ARC-side fake VPN
	ARCVPNService = "ArcHostVpnService"
)

Variables

This section is empty.

Functions

func CheckARCVPNState

func CheckARCVPNState(ctx context.Context, a *arc.ARC, expectedRunning bool) error

CheckARCVPNState confirms if ArcHostVpnService is running in the 'expectedRunning' state.

func ExpectARCPingSuccess

func ExpectARCPingSuccess(ctx context.Context, a *arc.ARC, network, addr string) error

ExpectARCPingSuccess checks if 'addr' is reachable over the 'network' in ARC. See ArcNetworkDebugTools#reachCmd for possible 'network' values.

func SetARCVPNEnabled

func SetARCVPNEnabled(ctx context.Context, a *arc.ARC, enabled bool) error

SetARCVPNEnabled flips the flag in the current running ARC instance. If running multiple tests within the same ARC instance, it's recommended to cleanup by flipping the flag back to the expected default state afterwards. Since no state is persisted, new ARC instances will initialize with the default state.

func SetUpHostVPN

func SetUpHostVPN(ctx, cleanupCtx context.Context) (*vpn.Connection, func() error, error)

SetUpHostVPN create the host VPN server, but does not initiate a connection. The returned vpn.Connection is immediately ready for Connect() to be called on it. Also returns a cleanup function that handles the VPN server cleanup for the caller to execute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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