tun2socket

package
v0.3.1-rc.10 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT, MIT Imports: 19 Imported by: 0

README

Tun2Socket

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

Feature

  • IPv4
  • TCP/UDP
  • Ping Echo

from https://github.com/Kr328/tun2socket

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(name string) (fd int, err error)

Types

type Tun2Socket

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

func StartTun2SocketGvisor

func StartTun2SocketGvisor(device io.ReadWriteCloser, gateway, portal netip.Addr, mtu int32) (*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.UDPv2

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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