server

package
v0.0.0-...-e3fa1f4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2017 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// If TestChannel is set, spoofed packets will be sent to it, rather than to pcap.
	TestSpoofChannel chan []byte
)

Functions

func CreateSpoofedStream

func CreateSpoofedStream(source string, destination string) chan []byte

func IPHandler

func IPHandler(server *Server) http.Handler

func PathReflectionServerTrusted

func PathReflectionServerTrusted(conf Config, state *PathReflectionState) bool

func SendPathReflectionChallenge

func SendPathReflectionChallenge(conf Config, state *PathReflectionState) (string, error)

func SetupSpoofingSockets

func SetupSpoofingSockets(config Config) error

func SocketHandler

func SocketHandler(server *Server) http.Handler

func SpoofIPv4Message

func SpoofIPv4Message(packet []byte, realSrc net.IP, dest net.IP) error

Types

type Config

type Config struct {
	Port               int
	Device             string
	Src                string
	Dst                string
	PathReflectionFile string
}

type PathReflectionState

type PathReflectionState struct {
	ServerIP              net.IP
	ServerPort            uint16
	ClientIP              net.IP
	ClientPort            uint16
	SequenceNumber        uint32
	AcknowledgementNumber uint32
}

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf Config) *Server

func (Server) Authorize

func (s Server) Authorize(hello sp3.SenderHello) (challenge string, err error)

func (Server) Cleanup

func (s Server) Cleanup(remoteAddr string)

func (*Server) Serve

func (s *Server) Serve() error

Jump to

Keyboard shortcuts

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