Skip to content

Commit

Permalink
Merge pull request #19 from ooni/utls-factory
Browse files Browse the repository at this point in the history
feat: add factory for TLS proxying with uTLS (v2)
  • Loading branch information
bassosimone committed Jan 4, 2022
2 parents a141311 + 475e580 commit 47436fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tlsconn.go
Expand Up @@ -24,7 +24,9 @@ type TLSConn interface {
}

// TLSClientFactory is the factory used when creating connections
// using a proxy inside of the HTTP library. By default, this is
// the tls.Client function. You'll need to override this factory if
// using a proxy inside of the HTTP library. By default, this will
// call the tls.Client func. You'll need to override this factory if
// you want to use refraction-networking/utls for proxied conns.
var TLSClientFactory = tls.Client
var TLSClientFactory = func(conn net.Conn, config *tls.Config) TLSConn {
return tls.Client(conn, config)
}

0 comments on commit 47436fe

Please sign in to comment.