MCPcopy
hub / github.com/ph4ntonn/Stowaway / PrepareAndDecideWhichSProtoToUpper

Function PrepareAndDecideWhichSProtoToUpper

protocol/protocol.go:427–444  ·  view source on GitHub ↗
(conn net.Conn, secret string, uuid string)

Source from the content-addressed store, hash-verified

425}
426
427func PrepareAndDecideWhichSProtoToUpper(conn net.Conn, secret string, uuid string) Message {
428 switch Upstream {
429 case "raw":
430 tMessage := new(RawMessage)
431 tMessage.Conn = conn
432 tMessage.UUID = uuid
433 tMessage.CryptoSecret = crypto.KeyPadding([]byte(secret))
434 return tMessage
435 case "http":
436 tMessage := new(HTTPMessage)
437 tMessage.RawMessage = new(RawMessage)
438 tMessage.RawMessage.Conn = conn
439 tMessage.RawMessage.UUID = uuid
440 tMessage.RawMessage.CryptoSecret = crypto.KeyPadding([]byte(secret))
441 return tMessage
442 }
443 return nil
444}
445
446func PrepareAndDecideWhichSProtoToLower(conn net.Conn, secret string, uuid string) Message {
447 switch Downstream {

Callers 15

SendFileStatMethod · 0.92
CheckFileStatMethod · 0.92
UploadMethod · 0.92
NormalActiveFunction · 0.92
NormalPassiveFunction · 0.92
SoReusePassiveFunction · 0.92
normalPassiveReconnFunction · 0.92
soReusePassiveReconnFunction · 0.92
normalReconnActiveReconnFunction · 0.92
downStreamOfflineFunction · 0.92
tellAdminReonlineFunction · 0.92
sendMyInfoMethod · 0.92

Calls 1

KeyPaddingFunction · 0.92

Tested by

no test coverage detected