tun2socket

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

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 3 Imported by: 0

README

Tun2Socket

A utilize that use kernel tcpip stack to forward packet from tun device.

Feature
  • IPv4
  • TCP/UDP
  • Ping Echo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tun2Socket

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

func StartTun2Socket

func StartTun2Socket(device io.ReadWriteCloser, address netip.Prefix, portal netip.Addr) (*Tun2Socket, error)

noinspection GoUnusedExportedFunction

func (*Tun2Socket) Close

func (t *Tun2Socket) Close() error

func (*Tun2Socket) TCP

func (t *Tun2Socket) TCP() *nat.TCP

func (*Tun2Socket) UDP

func (t *Tun2Socket) UDP() *nat.UDP

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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