Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyALPNPolicy(conn *utls.UConn, parameters url.Values) error
- func GetClientHelloIDFromParams(parameters url.Values) (utls.ClientHelloID, error)
- func GetDigestFunc(method string) func([]byte) []byte
- func GetFragmentConfigFromParams(parameters url.Values) (*fragmenter.FragmentConfig, error)
- func GetNextProtosFromParams(parameters url.Values) []string
- func GetSNIFromParams(parameters url.Values) string
- func LoadCertPoolFromParams(parameters url.Values, paramName string) (*x509.CertPool, int, error)
- func LoadCertsFromParams(parameters url.Values, paramName string) ([]*x509.Certificate, error)
- func LoadX509PairBytes(certPath, keyPath string) (cert []byte, key []byte, err error)
- func LoadX509PairBytesFromParams(parameters url.Values) (cert []byte, key []byte, err error)
- func LoadX509PairFromParams(parameters url.Values) (utls.Certificate, error)
- func LoadX509PairsBytesFromParams(parameters url.Values) (certs [][]byte, keys [][]byte, err error)
- func LoadX509PairsFromParams(parameters url.Values) ([]utls.Certificate, error)
- func ParseUTLS(parameters url.Values, isClient bool) (config *utls.Config, helloId utls.ClientHelloID, e error)
- func Sha1Sum(in []byte) []byte
- func Sha3Sum(in []byte) []byte
- func Sha224Sum(in []byte) []byte
- func Sha256Sum(in []byte) []byte
- func Sha384Sum(in []byte) []byte
- func Sha512Sum(in []byte) []byte
- func ShouldDisableALPN(parameters url.Values) bool
- func ShouldForceHTTP11ALPN(parameters url.Values) bool
- type CertificatePin
- type PeerVerifierFunc
Constants ¶
View Source
const ( ParamSNI = "tls.sni" ParamNextProtos = "tls.alpn" ParamDisableALPN = "tls.alpn.disable" ParamForceHTTP11ALPN = "tls.alpn.force_http11" ParamFragment = "tls.fragment" ParamHelloId = "tls.profile" ParamCertificate = "tls.cert" ParamPrivateKey = "tls.key" ParamCertificatePin = "tls.pin" ParamInsecure = "tls.insecure" ParamCA = "tls.ca" ParamClientCA = "tls.clientca" CertificatePinDigestMethodSeparator = ":" MultipleValuesSeparator = "," MultiplePathsSeparator = ":" )
Variables ¶
View Source
var ErrProfileNotSupported = errors.New("profile not supported by uTLS library")
Functions ¶
func ApplyALPNPolicy ¶ added in v0.0.4
func GetClientHelloIDFromParams ¶
func GetClientHelloIDFromParams(parameters url.Values) (utls.ClientHelloID, error)
func GetDigestFunc ¶
func GetFragmentConfigFromParams ¶ added in v0.0.4
func GetFragmentConfigFromParams(parameters url.Values) (*fragmenter.FragmentConfig, error)
func GetNextProtosFromParams ¶
func GetSNIFromParams ¶
func LoadCertPoolFromParams ¶
func LoadCertsFromParams ¶
func LoadX509PairBytes ¶
func LoadX509PairFromParams ¶
func LoadX509PairFromParams(parameters url.Values) (utls.Certificate, error)
func LoadX509PairsFromParams ¶
func LoadX509PairsFromParams(parameters url.Values) ([]utls.Certificate, error)
func ShouldDisableALPN ¶ added in v0.0.4
func ShouldForceHTTP11ALPN ¶ added in v0.0.4
Types ¶
type CertificatePin ¶
type PeerVerifierFunc ¶
type PeerVerifierFunc func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
func GetCertificatePinningAndInsecure ¶
func GetCertificatePinningAndInsecure(parameters url.Values) (vFunc PeerVerifierFunc, insecureBool bool, err error)
Click to show internal directories.
Click to hide internal directories.