tcp

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTCPDialer

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

NewTCPDialer returns a tcp dialer.

func NewTCPServer

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

NewTCPServer returns a tcp transport layer before the real server.

Types

type TCP

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

TCP struct.

func NewTCP

func NewTCP(s string, d proxy.Dialer, p proxy.Proxy) (*TCP, error)

NewTCP returns a tcp struct.

func (*TCP) Addr

func (s *TCP) Addr() string

Addr returns forwarder's address.

func (*TCP) Dial

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

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

func (*TCP) DialUDP

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

DialUDP connects to the given address via the proxy.

func (*TCP) ListenAndServe

func (s *TCP) ListenAndServe()

ListenAndServe listens on server's addr and serves connections.

func (*TCP) Serve

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

Serve serves a connection.

Jump to

Keyboard shortcuts

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