dii2p

package
v0.0.0-...-bc8fae0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SamHTTPProxy

type SamHTTPProxy struct {
	Addr string
	// contains filtered or unexported fields
}

SamHTTPProxy is an http proxy for making isolated SAM requests

func CreateHTTPProxy

func CreateHTTPProxy(proxAddr, proxPort, initAddress, ahAddr, ahPort, addressHelperURL string, samStack *dii2pmain.SamList, timeoutTime int, keepAlives bool) *SamHTTPProxy

CreateHTTPProxy creates a SamHTTPProxy

func (*SamHTTPProxy) Do

func (proxy *SamHTTPProxy) Do(req *http.Request, client *http.Client, x int) (*http.Response, error)

Do does a request

func (*SamHTTPProxy) ServeHTTP

func (proxy *SamHTTPProxy) ServeHTTP(rW http.ResponseWriter, rq *http.Request)

type SamSOCKSProxy

type SamSOCKSProxy struct {
	Addr string
	// contains filtered or unexported fields
}

SamSOCKSProxy is a SOCKS proxy that automatically isolates per-destination

func CreateSOCKSProxy

func CreateSOCKSProxy(proxAddr, proxPort, samAddr, samPort, initAddress, ahAddr, ahPort, addressHelperURL string, timeoutTime int, keepAlives bool) *SamSOCKSProxy

CreateSOCKSProxy generates a SOCKS proxy conf := &socks5.Config{}

func (*SamSOCKSProxy) Do

func (proxy *SamSOCKSProxy) Do(req *http.Request, client *http.Client, x int) (*http.Response, error)

Do does a request

func (*SamSOCKSProxy) ServeSOCKS

func (proxy *SamSOCKSProxy) ServeSOCKS(rW http.ResponseWriter, rq *http.Request)

ServeSOCKS Starts serving a SOCKS proxy

Jump to

Keyboard shortcuts

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