unix

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: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUnixDialer

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

NewUnixDialer returns a unix domain socket dialer.

func NewUnixServer

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

NewUnixServer returns a unix domain socket server.

Types

type PktConn added in v0.13.0

type PktConn struct {
	*net.UnixConn
	// contains filtered or unexported fields
}

PktConn .

func (*PktConn) Close added in v0.13.0

func (pc *PktConn) Close() error

Close overrides the original function from net.PacketConn.

func (*PktConn) ReadFrom added in v0.13.0

func (pc *PktConn) ReadFrom(b []byte) (int, net.Addr, error)

ReadFrom overrides the original function from net.PacketConn.

func (*PktConn) WriteTo added in v0.13.0

func (pc *PktConn) WriteTo(b []byte, addr net.Addr) (int, error)

WriteTo overrides the original function from net.PacketConn.

type Session added in v0.15.0

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

Session is a udp session

type Unix

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

Unix domain socket struct.

func NewUnix

func NewUnix(s string, d proxy.Dialer, p proxy.Proxy) (*Unix, error)

NewUnix returns unix domain socket proxy.

func (*Unix) Addr

func (s *Unix) Addr() string

Addr returns forwarder's address.

func (*Unix) Dial

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

Dial connects to the address addr on the network net via the proxy. NOTE: must be the first dialer in a chain

func (*Unix) DialUDP

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

DialUDP connects to the given address via the proxy. NOTE: must be the first dialer in a chain

func (*Unix) ListenAndServe

func (s *Unix) ListenAndServe()

ListenAndServe serves requests.

func (*Unix) ListenAndServeTCP added in v0.13.0

func (s *Unix) ListenAndServeTCP()

ListenAndServeTCP serves tcp requests.

func (*Unix) ListenAndServeUDP added in v0.13.0

func (s *Unix) ListenAndServeUDP()

ListenAndServeUDP serves udp requests.

func (*Unix) Serve

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

Serve serves requests.

func (*Unix) ServePacket added in v0.16.0

func (s *Unix) ServePacket(pc net.PacketConn)

ServePacket implements proxy.PacketServer.

Jump to

Keyboard shortcuts

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