redir

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: GPL-3.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// SO_ORIGINAL_DST from linux/include/uapi/linux/netfilter_ipv4.h
	SO_ORIGINAL_DST = 80
	// IP6T_SO_ORIGINAL_DST from linux/include/uapi/linux/netfilter_ipv6/ip6_tables.h
	IP6T_SO_ORIGINAL_DST = 80
)
View Source
const GETSOCKOPT = syscall.SYS_GETSOCKOPT

GETSOCKOPT from syscall

Variables

This section is empty.

Functions

func NewRedir6Server added in v0.6.9

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

NewRedir6Server returns a redir server for ipv6.

func NewRedirServer

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

NewRedirServer returns a redir server.

Types

type RedirProxy

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

RedirProxy struct.

func NewRedirProxy

func NewRedirProxy(s string, p proxy.Proxy, ipv6 bool) (*RedirProxy, error)

NewRedirProxy returns a redirect proxy.

func (*RedirProxy) ListenAndServe

func (s *RedirProxy) ListenAndServe()

ListenAndServe listens on server's addr and serves connections.

func (*RedirProxy) Serve added in v0.6.9

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

Serve serves connections.

Jump to

Keyboard shortcuts

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