Interface IWireGuardVpnManager
interface IWireGuardVpnManager
Extends IVpnManager
WireGuard-specific VPN manager interface.
Inherits from IVpnManager and adds WireGuard-specific operations.
Methods
updateWireguardPeer()
Update WireGuard peer configuration.voidupdateWireguardPeer(com.amazon.kepler.net.vpn.wireguard.WgUpdatePeerupdateType,com.amazon.kepler.net.vpn.wireguard.WgPeerConfig*peerConfig)
Parameters
updateType
com.amazon.kepler.net.vpn.wireguard.WgUpdatePeer — Required
The type of peer update to perform.
peerConfig
com.amazon.kepler.net.vpn.wireguard.WgPeerConfig* — Required
The WireGuard peer configuration containing the new values.
Throws
SecurityError— if the app does not have the permissionInvalidArgumentError— if updateType or peerConfig is invalid or VPN type is not WireGuardInvalidOperationError— if VPN is not configured or called at wrong stateOutOfMemoryError— if memory allocation failsBaseError— for other errors
com.amazon.network.privilege.net-vpn-ctrl
updateWireguardInterface()
Update WireGuard interface configuration.voidupdateWireguardInterface(com.amazon.kepler.net.vpn.wireguard.WgUpdateInterfaceupdateType,com.amazon.kepler.net.vpn.wireguard.WgInterfaceConfig*config)
Parameters
updateType
com.amazon.kepler.net.vpn.wireguard.WgUpdateInterface — Required
The type of interface update to perform.
config
com.amazon.kepler.net.vpn.wireguard.WgInterfaceConfig* — Required
The WireGuard interface configuration containing the new values.
Throws
SecurityError— if the app does not have the permissionInvalidArgumentError— if updateType or config is invalid or VPN type is not WireGuardInvalidOperationError— if VPN is not configuredOutOfMemoryError— if memory allocation failsBaseError— for other errors
com.amazon.network.privilege.net-vpn-ctrl
removeWireGuardPeer()
Remove a WireGuard peer from the VPN interface.voidremoveWireGuardPeer(u8[]wgPeerKey)
Parameters
wgPeerKey
u8[] — Required
The WireGuard peer key (32 bytes) to remove.
Throws
SecurityError— if the app does not have the permissionInvalidArgumentError— if wgPeerKey is invalid or VPN type is not WireGuardInvalidOperationError— if VPN is not configured or called at wrong stateBaseError— for other errors
com.amazon.network.privilege.net-vpn-ctrl
getWgPeerStats()
Get WireGuard peer statistics.com.amazon.kepler.net.vpn.wireguard.WgInterfaceStats?getWgPeerStats(u8[]wgPeerKey)
Parameters
wgPeerKey
u8[] — Required
The WireGuard peer key (32 bytes) to get statistics for.
Returns
com.amazon.kepler.net.vpn.wireguard.WgInterfaceStats?
The return value is optional and might be absent.
The WireGuard peer statistics or null if not available.
Throws
SecurityError— if the app does not have the permissionInvalidArgumentError— if wgPeerKey is invalidInvalidOperationError— if VPN is not configured or called at wrong stateOutOfMemoryError— if memory allocation failsBaseError— for other errors
com.amazon.network.privilege.net-vpn-ctrl

