handler

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const BufferSize = 2048

Variables

This section is empty.

Functions

func LinkAuth

func LinkAuth(w http.ResponseWriter, r *http.Request)

func LinkCstp

func LinkCstp(conn net.Conn, bufRW *bufio.ReadWriter, cSess *sessdata.ConnSession)

func LinkDtls

func LinkDtls(conn net.Conn, cSess *sessdata.ConnSession)

func LinkHome

func LinkHome(w http.ResponseWriter, r *http.Request)

func LinkIpvtap

func LinkIpvtap(cSess *sessdata.ConnSession) error

创建 Ipvtap 网卡

func LinkMacvtap

func LinkMacvtap(cSess *sessdata.ConnSession) error

创建 Macvtap 网卡

func LinkOtpQr

func LinkOtpQr(w http.ResponseWriter, r *http.Request)

func LinkTap

func LinkTap(cSess *sessdata.ConnSession) error

创建tap网卡

func LinkTun

func LinkTun(cSess *sessdata.ConnSession) error

创建tun网卡

func LinkTunnel

func LinkTunnel(w http.ResponseWriter, r *http.Request)

func Start

func Start()

func Stop

func Stop()

Types

type ClientRequest

type ClientRequest struct {
	XMLName              xml.Name       `xml:"config-auth"`
	Client               string         `xml:"client,attr"`                 // 一般都是 vpn
	Type                 string         `xml:"type,attr"`                   // 请求类型 init logout auth-reply
	AggregateAuthVersion string         `xml:"aggregate-auth-version,attr"` // 一般都是 2
	Version              string         `xml:"version"`                     // 客户端版本号
	GroupAccess          string         `xml:"group-access"`                // 请求的地址
	GroupSelect          string         `xml:"group-select"`                // 选择的组名
	SessionId            string         `xml:"session-id"`
	SessionToken         string         `xml:"session-token"`
	Auth                 auth           `xml:"auth"`
	DeviceId             deviceId       `xml:"device-id"`
	MacAddressList       macAddressList `xml:"mac-address-list"`
}

type LinkDriver

type LinkDriver interface {
	io.ReadWriteCloser
	Name() string
}

type RequestData

type RequestData struct {
	Groups []string
	Group  string
	Error  string

	// complete
	SessionId    string
	SessionToken string
	Banner       string
}

设置输出信息

type Vtap

type Vtap struct {
	*os.File
	// contains filtered or unexported fields
}

func (*Vtap) Close

func (v *Vtap) Close() error

Jump to

Keyboard shortcuts

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