Documentation
¶
Overview ¶
Package utlsx contains UTLS extensions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClientHelloID = &utls.HelloFirefox_55
DefaultClientHelloID is the default utls.ClientHelloID.
View Source
var DefaultNetDialer = &net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }
DefaultNetDialer is the default net.Dialer.
Functions ¶
func NewOOHTTPTransport ¶
func NewOOHTTPTransport( proxy ProxyFunc, tlsFactory TLSFactoryFunc, tlsDialer TLSDialFunc) *oohttp.StdlibTransport
NewOOHTTPTransport creates a new OOHTTP transport using the given funcs. Each function MAY be nil. In such a case, we'll use a reasonable default.
Types ¶
type ConnFactory ¶
type ConnFactory interface {
// NewUTLSConn creates a new UTLS connection. The conn and config arguments MUST
// NOT be nil. We will honour the following fields of config:
//
// - RootCAs
//
// - NextProtos
//
// - ServerName
//
// - InsecureSkipVerify
//
// - DynamicRecordSizingDisabled
//
// However, some of these fields values MAY be ignored depending on the parrot we use.
NewUTLSConn(conn net.Conn, config *tls.Config) oohttp.TLSConn
}
ConnFactory is a factory for creating UTLS connections.
type FactoryWithParrot ¶
type FactoryWithParrot struct {
// Parrot is the OPTIONAL parrot.
Parrot *utls.ClientHelloID
}
FactoryWithParrot implements ConnFactory.
func (*FactoryWithParrot) NewUTLSConn ¶
NewUTLSConn implements ConnFactory.
type TLSDialFunc ¶
TLSDialFunc is the type of the TLSDialer.DialTLSContext func.
type TLSDialer ¶
type TLSDialer struct {
// Config is the OPTIONAL Config. In case it's not nil, we will
// pass this config to [Factory] rather than a default one.
Config *tls.Config
// Parrot is the OPTIONAL parrot to use.
Parrot *utls.ClientHelloID
// contains filtered or unexported fields
}
TLSDialer is a dialer that uses UTLS
Click to show internal directories.
Click to hide internal directories.