vpn

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const USTBVpnHost = "n.ustb.edu.cn"
View Source
const USTBVpnHttpScheme = "http"
View Source
const USTBVpnHttpsScheme = "https"
View Source
const USTBVpnWSSScheme = "wss"
View Source
const USTBVpnWSScheme = "ws"

Variables

This section is empty.

Functions

This section is empty.

Types

type AesEncrypt

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

func (*AesEncrypt) Encrypt

func (encrypt *AesEncrypt) Encrypt(strMesg string) ([]byte, error)

type AutoLogin

type AutoLogin struct {
	Host        string
	ForceLogout bool
	SSLEnabled  bool // the vpn server supports https
}

func (*AutoLogin) LoginAddr

func (al *AutoLogin) LoginAddr(ssl bool) string

func (*AutoLogin) LogoutAddr

func (al *AutoLogin) LogoutAddr(ssl bool) string

func (*AutoLogin) TestAddr

func (al *AutoLogin) TestAddr(ssl bool) string

type AutoLoginInterface

type AutoLoginInterface interface {
	TestAddr() string
	LoginAddr() string
	LogoutAddr() string
}

type UstbVpn

type UstbVpn struct {
	Enable      bool
	Username    string
	Password    string
	TargetVpn   string
	HostEncrypt bool
	ForceLogout bool
}

func NewUstbVpnCli added in v0.5.0

func NewUstbVpnCli() *UstbVpn

create a UstbVpn instance, and add necessary command options to client sub-command.

func (*UstbVpn) BeforeRequest

func (v *UstbVpn) BeforeRequest(dialer *websocket.Dialer, url *url.URL, header http.Header) error

Jump to

Keyboard shortcuts

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