Documentation
¶
Overview ¶
Package arcvpn interacts with the ARC-side fake VPN.
Index ¶
- Constants
- func CheckARCVPNState(ctx context.Context, a *arc.ARC, expectedRunning bool) error
- func ExpectARCPingSuccess(ctx context.Context, a *arc.ARC, network, addr string) error
- func SetARCVPNEnabled(ctx context.Context, a *arc.ARC, enabled bool) error
- func SetUpHostVPN(ctx, cleanupCtx context.Context) (*vpn.Connection, func() error, error)
Constants ¶
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 ¶
CheckARCVPNState confirms if ArcHostVpnService is running in the 'expectedRunning' state.
func ExpectARCPingSuccess ¶
ExpectARCPingSuccess checks if 'addr' is reachable over the 'network' in ARC. See ArcNetworkDebugTools#reachCmd for possible 'network' values.
func SetARCVPNEnabled ¶
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 ¶
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.