Documentation
¶
Overview ¶
Package app implements Warden's controlling-app side: activating the network system extension and talking to its XPC daemon. Mirrors Warden's App/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateExtension ¶
func ActivateExtension(bundleID string)
ActivateExtension submits an OSSystemExtensionRequest to install/activate the network system extension with the given bundle identifier, mirroring Warden's extension activation. The system presents its own approval UI; a full app would also set a request delegate to observe completion.
This only succeeds from a properly signed app bundle carrying the System Extension and Network Extension entitlements (see README).
func DeactivateExtension ¶
func DeactivateExtension(bundleID string)
DeactivateExtension submits a deactivation request for bundleID.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a connection to the Warden daemon's XPC service.
func Connect ¶
func Connect() Client
Connect dials the daemon mach service and configures the remote interface.
func (Client) DeleteRule ¶
DeleteRule removes the rule (key, uuid) on the daemon.
func (Client) GetRules ¶
GetRules requests the daemon's rule set (JSON), blocking up to 5s for the reply.
func (Client) ToggleRule ¶
ToggleRule enables/disables the rule (key, uuid) on the daemon.