p2ptun

package module
v0.0.0-...-bf61d21 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 8 Imported by: 1

README

p2ptun

A simple webrtc tunnel client/server library. Just add signaling and ports to tunnel between.



derived from nobono/ssh-p2p

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartClientListener

func StartClientListener(ctx context.Context, addr string, conf webrtc.Configuration, sendSignal SignalSender, signals <-chan string)

StartClientListener starts listening on given TCP address and initiates a webrtc peer connection via sendSignal

func StartServerListener

func StartServerListener(ctx context.Context, addr string, conf webrtc.Configuration, sendSignal SignalSender, signals <-chan string)

StartServerListener starts the ssh p2p server which listens for incomming signals and handles multiple simultaneous connections

Types

type SignalSender

type SignalSender func(string) error

SignalSender takes an sdp as string and sends it as a signal

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

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