Documentation
¶
Overview ¶
Package native implements the wireguard package's one route in the package itself: the administrator's WireGuard server keypair for the protocol form. It reads and stores nothing: the keys are generated for the caller, who saves the private key into a protocol through the kernel's protocol routes (protocol-runtime; v2_node_protocol is a protected kernel table). Responses have the legacy handler's shape (internal/tests/wireguardcompat); the keys are random on both sides.
The answer carries a private key either way: when the route is bridged, the legacy handler's answer passes through this package's host too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service holds what the native route needs.
func (*Service) Handlers ¶
func (s *Service) Handlers() map[string]pluginhostsdk.NativeHandler
Handlers returns the native handlers by route id.
func (*Service) Keypair ¶
func (s *Service) Keypair(context.Context, pluginhostsdk.NativeRequest) (pluginhostsdk.NativeResponse, error)
Keypair is POST /api/v2/admin/wireguard/keypair: a new X25519 keypair, both keys in standard base64, as the kernel's service.GenerateWireGuardKeypair generates it. The request body is ignored.