MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / authWebsocketsValue

Function authWebsocketsValue

internal/pluginhost/auth_callbacks.go:577–593  ·  view source on GitHub ↗
(auth *coreauth.Auth)

Source from the content-addressed store, hash-verified

575}
576
577func authWebsocketsValue(auth *coreauth.Auth) (bool, bool) {
578 if auth == nil {
579 return false, false
580 }
581 if auth.Attributes != nil {
582 if raw := strings.TrimSpace(auth.Attributes["websockets"]); raw != "" {
583 parsed, errParse := strconv.ParseBool(raw)
584 if errParse == nil {
585 return parsed, true
586 }
587 }
588 }
589 if auth.Metadata == nil {
590 return false, false
591 }
592 return parseWebsocketsValue(auth.Metadata["websockets"])
593}
594
595func parsePriorityValue(raw any) (int, bool) {
596 switch v := raw.(type) {

Callers 1

Calls 1

parseWebsocketsValueFunction · 0.85

Tested by

no test coverage detected