Skip to main content Link Search Menu Expand Document (external link)

WireguardInterface overview

Wireguard interface helpers

Added in v1.0.0


Table of contents


Datatypes

WireguardInterface (class)

A wireguard interface name.

Signature

export declare class WireguardInterface

Added in v1.0.0

SocketLocation (property)

Signature

readonly SocketLocation: string

Added in v1.0.0

upScoped (property)

Starts a wireguard tunnel that will be gracefully shutdown and stop serving traffic once the scope is closed.

Signature

upScoped: (config: WireguardConfig.WireguardConfig) =>
  Effect.Effect<
    WireguardInterface,
    Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException,
    | FileSystem.FileSystem
    | Path.Path
    | Scope.Scope
    | CommandExecutor.CommandExecutor
    | WireguardControl.WireguardControl
  >

Added in v1.0.0

up (property)

Starts a wireguard tunnel that will continue to run and serve traffic even after the nodejs process exits.

Signature

up: (config: WireguardConfig.WireguardConfig) =>
  Effect.Effect<
    WireguardInterface,
    Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException,
    FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor | WireguardControl.WireguardControl
  >

Added in v1.0.0

down (property)

Stops a previously started wireguard tunnel.

Signature

down: (config: WireguardConfig.WireguardConfig) =>
  Effect.Effect<
    WireguardInterface,
    PlatformError.PlatformError | ParseResult.ParseError | Cause.TimeoutException,
    FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor | WireguardControl.WireguardControl
  >

Added in v1.0.0

addPeer (property)

Adds a peer to this interface.

Signature

addPeer: (peer: WireguardPeer.WireguardPeer) =>
  Effect.Effect<
    void,
    Socket.SocketError | ParseResult.ParseError,
    WireguardControl.WireguardControl | CommandExecutor.CommandExecutor
  >

Added in v1.0.0

removePeer (property)

Removes a peer from this interface.

Signature

removePeer: (peer: WireguardPeer.WireguardPeer) =>
  Effect.Effect<void, Socket.SocketError | ParseResult.ParseError, WireguardControl.WireguardControl>

Added in v1.0.0