Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRecordLayer ¶
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 ¶
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 (*State) ParseConfig ¶
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