tailscale.comtailscale.com/net/proxymux Index | Files

package proxymux

import "tailscale.com/net/proxymux"

Package proxymux splits a net.Listener in two, routing SOCKS5 connections to one and HTTP requests to the other.

It allows for hosting both a SOCKS5 proxy and an HTTP proxy on the same listener.

Index

Functions

func SplitSOCKSAndHTTP

func SplitSOCKSAndHTTP(ln net.Listener) (socksListener, httpListener net.Listener)

SplitSOCKSAndHTTP accepts connections on ln and passes connections through to either socksListener or httpListener, depending the first byte sent by the client.

Source Files

mux.go

Version
v1.84.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
1 day ago

Tools for package owners.