Documentation
¶
Overview ¶
Package proxyfront pkg/proxyfront/proxyfront.go
One listener, two proxy protocols. The resolving proxies speak SOCKS5; this lets the same port also answer HTTP proxy requests (CONNECT and absolute-URL requests), which is what an OS-level HTTP proxy setting — Android's VpnService.Builder.setHttpProxy, a browser's "HTTP proxy" field — speaks. A connection whose first byte is the SOCKS5 version goes to the SOCKS5 server; anything else is handled as HTTP through the same dial path, so .dmsg, .skynet, the status pages and the upstream rules behave identically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DialFunc ¶
DialFunc opens a connection to host:port the way the proxy's SOCKS5 server would for a CONNECT to that name.
func SOCKSDial ¶
func SOCKSDial(resolver socks5.NameResolver, dial func(ctx context.Context, network, addr string) (net.Conn, error)) DialFunc
SOCKSDial builds a DialFunc from a SOCKS5 server's resolver and dial callback, taking the steps go-socks5 takes for a CONNECT: resolve a name (which is where the resolving proxies record the original hostname), then dial the resolved address.