Documentation
¶
Index ¶
- Variables
- func WrapHTTPBody(body io.ReadCloser) (io.ReadCloser, error)
- type BodyReader
- type DNSRequest
- func (r *DNSRequest) GetBody() ([]byte, error)
- func (r *DNSRequest) GetCookies() ([]*http.Cookie, error)
- func (r *DNSRequest) GetHeaders() (map[string][]string, error)
- func (r *DNSRequest) GetIP() netip.Addr
- func (r *DNSRequest) GetMethod() (string, error)
- func (r *DNSRequest) GetQuestions() ([]dns.Question, error)
- func (r *DNSRequest) GetRaw() ([]byte, error)
- func (r *DNSRequest) GetURL() (*url.URL, error)
- type Entity
- type HTTPRequest
- func (r *HTTPRequest) GetBody() ([]byte, error)
- func (r *HTTPRequest) GetCookies() ([]*http.Cookie, error)
- func (r *HTTPRequest) GetHeaders() (map[string][]string, error)
- func (r *HTTPRequest) GetIP() netip.Addr
- func (r *HTTPRequest) GetMethod() (string, error)
- func (r *HTTPRequest) GetQuestions() ([]dns.Question, error)
- func (r *HTTPRequest) GetRaw() ([]byte, error)
- func (r *HTTPRequest) GetURL() (*url.URL, error)
- type RawPacket
- func (p *RawPacket) GetBody() ([]byte, error)
- func (p *RawPacket) GetCookies() ([]*http.Cookie, error)
- func (p *RawPacket) GetHeaders() (map[string][]string, error)
- func (p *RawPacket) GetIP() netip.Addr
- func (p *RawPacket) GetMethod() (string, error)
- func (p *RawPacket) GetQuestions() ([]dns.Question, error)
- func (p *RawPacket) GetRaw() ([]byte, error)
- func (p *RawPacket) GetURL() (*url.URL, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotSupported = errors.New("not supported")
)
Functions ¶
func WrapHTTPBody ¶
func WrapHTTPBody(body io.ReadCloser) (io.ReadCloser, error)
Types ¶
type BodyReader ¶
type BodyReader struct {
// contains filtered or unexported fields
}
func NewBodyReader ¶
func NewBodyReader(r io.Reader) (*BodyReader, error)
func (*BodyReader) Close ¶
func (r *BodyReader) Close() error
type DNSRequest ¶ added in v1.1.0
DNSRequest is a wrapper around dns.Msg implementing Entity interface.
func (*DNSRequest) GetBody ¶ added in v1.1.0
func (r *DNSRequest) GetBody() ([]byte, error)
func (*DNSRequest) GetCookies ¶ added in v1.1.0
func (r *DNSRequest) GetCookies() ([]*http.Cookie, error)
func (*DNSRequest) GetHeaders ¶ added in v1.1.0
func (r *DNSRequest) GetHeaders() (map[string][]string, error)
func (*DNSRequest) GetIP ¶ added in v1.1.0
func (r *DNSRequest) GetIP() netip.Addr
func (*DNSRequest) GetMethod ¶ added in v1.1.0
func (r *DNSRequest) GetMethod() (string, error)
func (*DNSRequest) GetQuestions ¶ added in v1.1.0
func (r *DNSRequest) GetQuestions() ([]dns.Question, error)
func (*DNSRequest) GetRaw ¶ added in v1.1.0
func (r *DNSRequest) GetRaw() ([]byte, error)
Return all questions in format: REQ_TYPE1 DOMAIN_NAME1 REQ_TYPE2 DOMAIN_NAME2 ...
type HTTPRequest ¶
HTTPRequest is a wrapper around http.Request implementing Entity interface. It's expected that Request.Body is already wrapped with BodyReader.
func (*HTTPRequest) GetBody ¶
func (r *HTTPRequest) GetBody() ([]byte, error)
func (*HTTPRequest) GetCookies ¶
func (r *HTTPRequest) GetCookies() ([]*http.Cookie, error)
func (*HTTPRequest) GetHeaders ¶
func (r *HTTPRequest) GetHeaders() (map[string][]string, error)
func (*HTTPRequest) GetIP ¶
func (r *HTTPRequest) GetIP() netip.Addr
TODO: FIX IP may be hijacked if set one of used headers.
func (*HTTPRequest) GetMethod ¶
func (r *HTTPRequest) GetMethod() (string, error)
func (*HTTPRequest) GetQuestions ¶ added in v1.1.0
func (r *HTTPRequest) GetQuestions() ([]dns.Question, error)
func (*HTTPRequest) GetRaw ¶
func (r *HTTPRequest) GetRaw() ([]byte, error)
type RawPacket ¶ added in v1.1.0
RawPacket is a wrapper around raw data (e.g. tcp packet) implementing Entity interface.
func (*RawPacket) GetCookies ¶ added in v1.1.0
func (*RawPacket) GetHeaders ¶ added in v1.1.0
func (*RawPacket) GetQuestions ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.