MCPcopy
hub / github.com/gdy666/lucky / Contains

Method Contains

config/whitelist.go:23–36  ·  view source on GitHub ↗
(ip string)

Source from the content-addressed store, hash-verified

21}
22
23func (w *WhiteListItem) Contains(ip string) bool {
24 netIP := net.ParseIP(ip)
25 if netIP == nil {
26 return false
27 }
28 if w.NetIP != nil {
29 return w.NetIP.Equal(netIP)
30 }
31
32 if w.Cidr != nil {
33 return w.Cidr.Contains(netIP)
34 }
35 return false
36}
37
38type WhiteListBaseConfigure struct {
39 URL string `json:"URL"`

Callers 15

GetListentAddressMethod · 0.45
StartProxyMethod · 0.45
StartProxyMethod · 0.45
ListenHandlerMethod · 0.45
NewTransportFunction · 0.45
PanicRedirectFunction · 0.45
outputPanicFunction · 0.45
outputPanicV2Function · 0.45
CallbackHttpClientDoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected