Documentation ¶
Index ¶
- type Option
- func WithBindAddress(binAddress string) Option
- func WithBytesPool(bytesPool statute.BytesPool) Option
- func WithContext(ctx context.Context) Option
- func WithListener(ln net.Listener) Option
- func WithLogger(logger *slog.Logger) Option
- func WithUserDialFunc(proxyDial statute.ProxyDialFunc) Option
- func WithUserForwardAddressFunc(packetForwardAddress statute.PacketForwardAddress) Option
- func WithUserHandler(handler userHandler) Option
- func WithUserListenPacketFunc(proxyListenPacket statute.ProxyListenPacket) Option
- func WithUserTCPHandler(handler userHandler) Option
- func WithUserUDPHandler(handler userHandler) Option
- type Proxy
- type SwitchConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Proxy)
func WithBindAddress ¶
func WithBytesPool ¶
func WithContext ¶
func WithListener ¶
func WithLogger ¶
func WithUserDialFunc ¶
func WithUserDialFunc(proxyDial statute.ProxyDialFunc) Option
func WithUserForwardAddressFunc ¶
func WithUserForwardAddressFunc(packetForwardAddress statute.PacketForwardAddress) Option
func WithUserHandler ¶
func WithUserHandler(handler userHandler) Option
func WithUserListenPacketFunc ¶
func WithUserListenPacketFunc(proxyListenPacket statute.ProxyListenPacket) Option
func WithUserTCPHandler ¶
func WithUserTCPHandler(handler userHandler) Option
func WithUserUDPHandler ¶
func WithUserUDPHandler(handler userHandler) Option
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) ListenAndServe ¶
type SwitchConn ¶
SwitchConn wraps a net.Conn and a bufio.Reader
func NewSwitchConn ¶
func NewSwitchConn(conn net.Conn) *SwitchConn
NewSwitchConn creates a new SwitchConn
Click to show internal directories.
Click to hide internal directories.