server

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRecordLayer

func AddRecordLayer(input []byte, typ []byte, ver []byte) []byte

AddRecordLayer adds record layer to data

func ComposeReply

func ComposeReply(ch *ClientHello) []byte

ComposeReply composes the ServerHello, ChangeCipherSpec and Finished messages together with their respective record layers into one byte slice. The content of these messages are random and useless for this plugin

func PeelRecordLayer

func PeelRecordLayer(data []byte) []byte

PeelRecordLayer peels off the record layer

func TouchStone

func TouchStone(ch *ClientHello, sta *State) (isSS bool, UID []byte, sessionID uint32)

Types

type ClientHello

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

ClientHello contains every field in a ClientHello message

func ParseClientHello

func ParseClientHello(data []byte) (ret *ClientHello, err error)

ParseClientHello parses everything on top of the TLS layer (including the record layer) into ClientHello type

type State

type State struct {
	SS_LOCAL_HOST  string
	SS_LOCAL_PORT  string
	SS_REMOTE_HOST string
	SS_REMOTE_PORT string

	Now      func() time.Time
	AdminUID []byte

	Userpanel *usermanager.Userpanel

	WebServerAddr string
	// contains filtered or unexported fields
}

State type stores the global state of the program

func InitState

func InitState(localHost, localPort, remoteHost, remotePort string, nowFunc func() time.Time) (*State, error)

func (*State) ParseConfig

func (sta *State) ParseConfig(conf string) (err error)

ParseConfig parses the config (either a path to json or in-line ssv config) into a State variable

func (*State) UsedRandomCleaner

func (sta *State) UsedRandomCleaner()

UsedRandomCleaner clears the cache of used random fields every 12 hours

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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