smux

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSmuxDialer

func NewSmuxDialer(s string, d proxy.Dialer) (proxy.Dialer, error)

NewSmuxDialer returns a smux dialer.

func NewSmuxServer

func NewSmuxServer(s string, p proxy.Proxy) (proxy.Server, error)

NewSmuxServer returns a smux transport layer before the real server.

Types

type SmuxClient

type SmuxClient struct {
	// contains filtered or unexported fields
}

SmuxClient struct.

func (*SmuxClient) Addr

func (s *SmuxClient) Addr() string

Addr returns forwarder's address.

func (*SmuxClient) Dial

func (s *SmuxClient) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the proxy.

func (*SmuxClient) DialUDP

func (s *SmuxClient) DialUDP(network, addr string) (net.PacketConn, error)

DialUDP connects to the given address via the proxy.

type SmuxServer

type SmuxServer struct {
	// contains filtered or unexported fields
}

SmuxServer struct.

func (*SmuxServer) ListenAndServe

func (s *SmuxServer) ListenAndServe()

ListenAndServe listens on server's addr and serves connections.

func (*SmuxServer) Serve

func (s *SmuxServer) Serve(c net.Conn)

Serve serves a connection.

func (*SmuxServer) ServeStream

func (s *SmuxServer) ServeStream(c *smux.Stream)

ServeStream serves a smux stream.

Jump to

Keyboard shortcuts

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