Skip to content

About

Dialer with DNS Cache + Dial History

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

70 stars

Watchers

11 watching

Forks

Latest commit

 

History

744 Commits

Folders and files

Repository files navigation

Fastdialer

License Go version Release Checks GoDoc

Fastdialer is implementation of net.Dialer with lot of features like DNS Cache , Dial History etc

Features

  • DNS Cache
  • Dial History
  • Supports Memory/Hybrid/Disk Cache.
  • Supports Old/New TLS and x509 versions
  • Supports Resolution Using Hosts File
  • Cross Platform and more..

For more details and documentation refer GoDoc.

ZTLS Fallback

When the TLS handshake of DialTLS or DialTLSWithConfig fails, fastdialer retries it once with zcrypto (ztls), to reach servers that crypto/tls rejects, such as servers with old TLS versions or legacy ciphers. The retry uses ztls.ChromeCiphers and the default ztls curves instead of the cipher suites and curve preferences of the config. It retries only when:

  • the dial context isn't done, the handshake didn't time out, and the server's reply, if any, was TLS.
  • the TLS config allows versions older than TLS 1.3.
  • the TLS config uses nothing that zcrypto can't carry over: InsecureSkipVerify is true, and the config sets no VerifyPeerCertificate or VerifyConnection callback, no GetClientCertificate, and no Encrypted Client Hello settings. A Certificates chain is copied onto the retry. Otherwise the retry would verify the server differently, omit a certificate chosen by callback, or send the hidden server name in the clear.

Plain dials, including dials through a proxy, impersonated dials and ztls dials never fall back. A dial that falls back returns a *ztls.Conn instead of a *tls.Conn, which WithTLSData doesn't record. If the retry fails too, the error includes both failures.

To disable the fallback, set DisableZtlsFallback in the options or DISABLE_ZTLS_FALLBACK=true in the environment. Either one is enough.

Example

An Example showing usage of fastdialer as a library is specified here

cd example/
go run main.go

License

fastdialer is distributed under MIT License

About

Dialer with DNS Cache + Dial History

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

70 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages