tunelo

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

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

Go to latest
Published: Dec 8, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

Tunelo User Guide

This guide provides detailed instructions to set up and use Tunelo on both the server and the client.


Server Configuration

1. Extract the package

Extract the Tunelo package to access the required files:

tar -vxzf tunelo.tar.gz
2. Navigate to the Tunelo directory

Move into the extracted directory:

cd tunelo
3. Configure the server

Generate the server configuration file (server.json) by running the following command:

./tunelo -mode config -new -server=server.json -public=<PUBLIC IP>
  • <PUBLIC IP>: Replace with the public IP address of your server.

Note: The server uses port 7000 by default. To specify a different port, use the -port option when creating the configuration file. Ensure that the firewall is configured to allow incoming UDP packets on the specified port.

4. Add a client

Add a client configuration to the server. This command creates a client.json file for the client and updates the server.json file with the client's information:

./tunelo -mode config -add -server=server.json -client=client.json
5. Start the server

Start the Tunelo server using the generated configuration file:

sudo ./server.sh start server.json

Client Configuration

1. Extract the package

Extract the Tunelo package:

tar -vxzf tunelo.tar.gz
2. Navigate to the Tunelo directory

Move into the extracted directory:

cd tunelo
3. Add the client configuration file

Copy the client.json file created on the server to the client's machine and place it in the Tunelo directory.

4. Start the client

Start the Tunelo client using the configuration file:

sudo ./client.sh start client.json
5. Stop the client

To stop the Tunelo client, use the following command:

sudo ./client.sh stop

Notes

  • Generated files:
    • server.json: Contains the server configuration.
    • client.json: Contains the specific client configuration.
  • Ensure that necessary ports are open on the server's firewall. By default, Tunelo uses port 7000 for UDP traffic.
  • Use superuser permissions (sudo) to start or stop Tunelo services.
  • For troubleshooting, check the logs in the Tunelo directory.

With this guide, you can easily configure and use Tunelo on your server and client systems.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	UtunPeer string             `json:"utun_peer"`
	UtunAddr string             `json:"utun_vaddr"`
	Sudp     *sudp.ClientConfig `json:"sudp"`
}

func LoadClientConfig

func LoadClientConfig(filePath string) (*ClientConfig, error)

func (*ClientConfig) DumpClientConfig

func (c *ClientConfig) DumpClientConfig(filePath string) error

type RouteTable

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

func NewRouteTable

func NewRouteTable() *RouteTable

func (*RouteTable) GetDestination

func (r *RouteTable) GetDestination(ip net.IP) (uint16, bool)

func (*RouteTable) SetDestination

func (r *RouteTable) SetDestination(ip net.IP, vaddr uint16)

type ServerConfig

type ServerConfig struct {
	UtunAddr string             `json:"utun_vaddr"`
	Mappings map[string]int     `json:"mappings"`
	Sudp     *sudp.ServerConfig `json:"sudp"`
}

func LoadServerConfig

func LoadServerConfig(filePath string) (*ServerConfig, error)

func NewServerConfig

func NewServerConfig(private string, public string, port int, utun string) (*ServerConfig, error)

func (*ServerConfig) AddPeer

func (s *ServerConfig) AddPeer() (*ClientConfig, error)

func (*ServerConfig) DumpServerConfig

func (c *ServerConfig) DumpServerConfig(filePath string) error

type VnetClient

type VnetClient struct {
	Tun *utun.Utun
	// contains filtered or unexported fields
}

func NewVnetClient

func NewVnetClient(cird string, peer string, cfg *sudp.ClientConfig, peergw bool) (*VnetClient, error)

func (*VnetClient) Display

func (c *VnetClient) Display()

func (*VnetClient) Run

func (c *VnetClient) Run() error

type VnetSwitch

type VnetSwitch struct {
	Tun *utun.Utun
	// contains filtered or unexported fields
}

func NewVnetSwitch

func NewVnetSwitch(cird string, peer string, cfg *sudp.ServerConfig) (*VnetSwitch, error)

func (*VnetSwitch) Run

func (v *VnetSwitch) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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