teotun

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

README

Teonet tunnel

Teotun creates secret tunnel between hosts without public IPs using Teonet. The connection based on TRU transport and create reliable, low latency, encrypted P2P channels between connected peers.

GoDoc Go Report Card

Usage example

Create regular tunnel between thee hosts.

One host will be Main and all other will connect to main host on start. Main host does not have -connectto parameter. All other hosts use teonet address of Main host in -connectto parameter.

For any hosts

Connect to your host and clone this reposipory:

git clone https://github.com/teonet-go/teotun.git
cd teotun
Start teotun on Main host
TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -postcon="./if_up.sh $TUN 10.1.2.1/24" -loglevel=connect -hotkey -stat

Copy teonet address which prints after Main teotun started:

Teonet address: MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM

Use this address in -connectto parameter in Host A and Host B

Start teotun in Host A
TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -connectto=MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM -postcon="./if_up.sh $TUN 10.1.2.2/24" -loglevel=connect -hotkey -stat
Start teotun in Host B
TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -connectto=MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM -postcon="./if_up.sh $TUN 10.1.2.3/24" -loglevel=connect -hotkey -stat
How to use

When teotun will be started on all hosts, you can use any network commands between this hosts by its local IPs 10.1.2.1, 10.1.2.2, 10.1.2.3.

For example, you can ping Host B from Host A.

Login to Host B and execute command:

ping 10.1.2.2

All host in teotun network connect P2P so you will see lowest ping between Host B and Host A.

License

BSD

Documentation

Overview

Teotun is package for creating client/server application which make regular tunnel between hosts without IPs based on Teonet

Index

Constants

View Source
const Version = "0.0.6"

Variables

This section is empty.

Functions

This section is empty.

Types

type Teotun

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

Teotun is main package methods holder and data structure type

func New

func New(teo *teonet.Teonet, iface, connectto, postcon string) (t *Teotun, err error)

Create new Teonet tunnel, where:

teo - connected teonet client
iface - tunnels interface name
connectto - remote peer teonet address to connet
postcon - post connection shell command

Directories

Path Synopsis
cmd
teotun
Teonet tunnel is client/server application to creating regular tunnel between hosts without IPs.
Teonet tunnel is client/server application to creating regular tunnel between hosts without IPs.

Jump to

Keyboard shortcuts

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