example-proxy

command
v0.0.0-...-73c1263 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Example of using TLSClientFactory

This example shows how you can use Transport.TLSClientFactory to force this library to use refraction-networking/utls for proxied conns.

  • main.go sets up an oohttp.Transport instance, uses the Proxy field to configure a SOCKS5 proxy, and the TLSClientFactory to use uTLS when needed;

You should not change the Transport.TLSClientFactory while the transport is being used. Doing that is likely to cause data races.

An alternative strategy could be to set the global oohttp.TLSClientFactory field, which will cause all connections to use such a factory. If you choose to override the global factory (as opposed to the per-Transport one), you should do this only once before calling any HTTP code. Changing the global factory while HTTP code is running causes data races.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL