vpnkit

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 8 Imported by: 14

Documentation

Overview

Package vpnkit allows a running VPNKit service to be reconfigured.

Features

- expose/unexpose TCP and UDP ports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection represents an open control connection to vpnkit

func NewConnection

func NewConnection(ctx context.Context, path string) (*Connection, error)

NewConnection connects to a vpnkit Unix domain socket on the given path and returns the connection

type Port

type Port struct {
	// contains filtered or unexported fields
}

Port represents a UDP or TCP exposed port

func NewPort

func NewPort(connection *Connection, proto string, outIP net.IP, outPort int16, inIP net.IP, inPort int16) *Port

func (*Port) Expose

func (p *Port) Expose(ctx context.Context) error

Expose asks vpnkit to expose the port

func (*Port) Unexpose

func (p *Port) Unexpose(ctx context.Context) error

Unexpose asks vpnkit to hide the port again

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL