tproxy

package module
v0.0.0-...-125addb Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package tproxy provides the TCPDial and TCPListen tproxy equivalent of the net package Dial and Listen with tproxy support for linux ONLY.

Index

Constants

View Source
const IP_ORIGADDRS = 20

Variables

View Source
var Debug = false

Debug outs the library in Debug mode

Functions

func IPTcpAddrToUnixSocksAddr

func IPTcpAddrToUnixSocksAddr(addr string) (sa unix.Sockaddr, err error)

IPTcpAddrToUnixSocksAddr ---

func IPv6UdpAddrToUnixSocksAddr

func IPv6UdpAddrToUnixSocksAddr(addr string) (sa unix.Sockaddr, err error)

IPv6UdpAddrToUnixSocksAddr ---

func TCPDial

func TCPDial(localAddr, remoteAddr string) (conn net.Conn, err error)

TCPDial is a special tcp connection which binds a non local address as the source. Except then the option to bind to a specific local address which the machine doesn't posses it is exactly like any other net.Conn connection. It is advised to use port numbered 0 in the localAddr and leave the kernel to choose which Local port to use in order to avoid errors and binding conflicts.

func TCPListen

func TCPListen(listenAddr string) (listener net.Listener, err error)

TCPListen is listening for incoming IP packets which are being intercepted. In conflict to regular Listen mehtod the socket destination and source addresses are of the intercepted connection. Else then that it works exactly like net package net.Listen.

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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