tun

package
v1.2.5-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT, GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Packages tun provides utilities for tun.

tun包提供 创建tun设备的方法,以及监听tun,将数据解析为tcp/udp数据的方法。

tun 工作在第三层 IP层上。

我们基本上抄了 xjasonlyu/tun2socks, 因此把GPL证书放在了本包的文件夹中

windows中, 需要从 https://www.wintun.net/ 下载 wintun.dll 放到vs可执行文件旁边

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(dev device.Device) (tcpChan chan netLayer.TCPRequestInfo, udpChan chan netLayer.UDPRequestInfo, closer io.Closer, err error)

func Open

func Open(name string) (device.Device, error)

Types

type StackCloser

type StackCloser struct {
	*stack.Stack
}

func (*StackCloser) Close

func (sc *StackCloser) Close() error

Close() and Wait()

Directories

Path Synopsis
iobased
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.
tun
Package tun provides TUN which implemented device.Device interface.
Package tun provides TUN which implemented device.Device interface.

Jump to

Keyboard shortcuts

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