tproxy

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTProxyServer

func NewTProxyServer(s string, dialer proxy.Dialer) (proxy.Server, error)

NewTProxyServer returns a udp tunnel server.

func ReadFromUDP

func ReadFromUDP(conn *net.UDPConn, b []byte) (int, *net.UDPAddr, *net.UDPAddr, error)

ReadFromUDP reads a UDP packet from c, copying the payload into b. It returns the number of bytes copied into b and the return address that was on the packet.

Out-of-band data is also read in so that the original destination address can be identified and parsed.

Types

type TProxy

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

TProxy struct

func NewTProxy

func NewTProxy(s string, dialer proxy.Dialer) (*TProxy, error)

NewTProxy returns a tproxy.

func (*TProxy) ListenAndServe

func (s *TProxy) ListenAndServe()

ListenAndServe .

func (*TProxy) ListenAndServeTCP

func (s *TProxy) ListenAndServeTCP()

ListenAndServeTCP .

func (*TProxy) ListenAndServeUDP

func (s *TProxy) ListenAndServeUDP()

ListenAndServeUDP .

func (*TProxy) Serve added in v0.6.9

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

Serve .

Jump to

Keyboard shortcuts

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