Documentation ¶
Index ¶
- Variables
- func GetVersion() string
- func PrintVersion()
- type BigIntWrapper
- type CertificateWrapper
- type HTTP
- type HTTPRequest
- type HTTPResponse
- type TLS
- type Task
- func (t *Task) Do() error
- func (t *Task) URL() *url.URL
- func (t *Task) WithBody(body string) *Task
- func (t *Task) WithConnectTimeout(connectTimeout int) *Task
- func (t *Task) WithCookie(key, value string) *Task
- func (t *Task) WithHeader(key, value string) *Task
- func (t *Task) WithHost(host string) *Task
- func (t *Task) WithHostType(hostType string) *Task
- func (t *Task) WithInsecureSkipVerify(insecureSkipVerify bool) *Task
- func (t *Task) WithMethod(method string) *Task
- func (t *Task) WithPath(path string) *Task
- func (t *Task) WithPort(port uint16) *Task
- func (t *Task) WithQuery(key, value string) *Task
- func (t *Task) WithSNI(sni string) *Task
- func (t *Task) WithScheme(scheme string) *Task
- func (t *Task) WithTimeout(timeout int) *Task
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetVersion ¶
func GetVersion() string
func PrintVersion ¶
func PrintVersion()
Types ¶
type BigIntWrapper ¶
func (*BigIntWrapper) MarshalJSON ¶
func (b *BigIntWrapper) MarshalJSON() ([]byte, error)
func (*BigIntWrapper) UnmarshalJSON ¶
func (b *BigIntWrapper) UnmarshalJSON(data []byte) error
type CertificateWrapper ¶
type CertificateWrapper struct { Fingerprint string `json:"fingerprint" bson:"fingerprint"` Raw []byte `json:"raw" bson:"raw"` }
CertificateWrapper is copied from crypto/x509/x509.go
type HTTP ¶
type HTTP struct { Request *HTTPRequest `json:"request,omitempty"` Response *HTTPResponse `json:"response,omitempty"` }
type HTTPRequest ¶
type HTTPRequest struct { Method string `json:"method"` URL string `json:"url"` Host string `json:"host"` RemoteAddr string `json:"remote_addr"` RequestURI string `json:"request_uri"` Proto string `json:"proto"` ProtoMajor int `json:"proto_major"` ProtoMinor int `json:"proto_minor"` Headers http.Header `json:"headers"` ContentLength int64 `json:"content_length"` TransferEncoding []string `json:"transfer_encoding,omitempty"` Close bool `json:"close"` Form url.Values `json:"form,omitempty"` PostForm url.Values `json:"post_form,omitempty"` MultipartForm *multipart.Form `json:"multipart_form,omitempty"` RawBody []byte `json:"raw_body"` BodySha256 string `json:"body_sha256"` Body string `json:"body"` Trailer http.Header `json:"trailer,omitempty"` }
func NewHTTPRequest ¶
func NewHTTPRequest(req *http.Request) (*HTTPRequest, error)
type HTTPResponse ¶
type HTTPResponse struct { Status string `json:"status"` StatusCode int `json:"status_code"` Proto string `json:"proto"` ProtoMajor int `json:"proto_major"` ProtoMinor int `json:"proto_minor"` Headers http.Header `json:"headers"` RawBody []byte `json:"raw_body"` BodySha256 string `json:"body_sha256"` Body string `json:"body"` ContentLength int64 `json:"content_length"` TransferEncoding []string `json:"transfer_encoding,omitempty"` Close bool `json:"close"` Uncompressed bool `json:"uncompressed"` Trailer http.Header `json:"trailer"` }
func NewHTTPResponse ¶
func NewHTTPResponse(resp *http.Response) (*HTTPResponse, error)
type TLS ¶
type TLS struct { // Version is the TLS version used by the connection (e.g. VersionTLS12). Version uint16 `json:"version"` // HandshakeComplete is true if the handshake has concluded. HandshakeComplete bool `json:"handshake_complete"` // DidResume is true if this connection was successfully resumed from a // previous session with a session ticket or similar mechanism. DidResume bool `json:"did_resume"` // CipherSuite is the cipher suite negotiated for the connection (e.g. // TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_AES_128_GCM_SHA256). CipherSuite uint16 `json:"cipher_suite"` // NegotiatedProtocol is the application protocol negotiated with ALPN. NegotiatedProtocol string `json:"negotiated_protocol"` // ServerName is the value of the Server Name Indication extension sent by // the client. It's available both on the server and on the client side. ServerName string `json:"server_name"` // PeerCertificate *x509.Certificate `json:"peer_certificate,omitempty"` PeerCertificate *CertificateWrapper `json:"peer_certificate,omitempty"` }
func NewTLS ¶
func NewTLS(cs *tls.ConnectionState) *TLS
type Task ¶
type Task struct { IP string `json:"ip"` Port uint16 `json:"port"` Scheme string `json:"scheme"` Method string `json:"method"` Path string `json:"path"` Host string `json:"host"` HostType string `json:"host_type"` Body string `json:"body"` Queries map[string]string `json:"queries"` Headers map[string]string `json:"headers"` Cookies map[string]string `json:"cookies"` SNI string `json:"sni"` HTTP HTTP `json:"http"` TLS *TLS `json:"tls,omitempty"` ConnectTimeout int `json:"connect_timeout"` Timeout int `json:"timeout"` InsecureSkipVerify bool `json:"insecure_skip_verify"` Error string `json:"error"` }
func (*Task) WithConnectTimeout ¶
func (*Task) WithCookie ¶
func (*Task) WithHeader ¶
func (*Task) WithHostType ¶
func (*Task) WithInsecureSkipVerify ¶
func (*Task) WithMethod ¶
func (*Task) WithScheme ¶
func (*Task) WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.