Documentation ¶
Index ¶
- Variables
- func SetAddr(s ...string) func(*SAMHTTPProxy) error
- func SetAddrMixed(s string, i int) func(*SAMHTTPProxy) error
- func SetCloseIdle(b bool) func(*SAMHTTPProxy) error
- func SetCloseIdleTime(u uint) func(*SAMHTTPProxy) error
- func SetCompression(b bool) func(*SAMHTTPProxy) error
- func SetControlAddr(s ...string) func(*SAMHTTPProxy) error
- func SetControlHost(s string) func(*SAMHTTPProxy) error
- func SetControlPort(s string) func(*SAMHTTPProxy) error
- func SetDebug(b bool) func(*SAMHTTPProxy) error
- func SetEncrypt(b bool) func(*SAMHTTPProxy) error
- func SetHost(s string) func(*SAMHTTPProxy) error
- func SetInBackups(u uint) func(*SAMHTTPProxy) error
- func SetInLength(u uint) func(*SAMHTTPProxy) error
- func SetInQuantity(u uint) func(*SAMHTTPProxy) error
- func SetInVariance(i int) func(*SAMHTTPProxy) error
- func SetKeysPath(s string) func(*SAMHTTPProxy) error
- func SetName(s string) func(*SAMHTTPProxy) error
- func SetOutBackups(u uint) func(*SAMHTTPProxy) error
- func SetOutLength(u uint) func(*SAMHTTPProxy) error
- func SetOutProxy(s string) func(*SAMHTTPProxy) error
- func SetOutProxySocks(s bool) func(*SAMHTTPProxy) error
- func SetOutQuantity(u uint) func(*SAMHTTPProxy) error
- func SetOutVariance(i int) func(*SAMHTTPProxy) error
- func SetPort(s string) func(*SAMHTTPProxy) error
- func SetPortInt(i int) func(*SAMHTTPProxy) error
- func SetProxyAddr(s ...string) func(*SAMHTTPProxy) error
- func SetProxyHost(s string) func(*SAMHTTPProxy) error
- func SetProxyPort(s string) func(*SAMHTTPProxy) error
- func SetReduceIdle(b bool) func(*SAMHTTPProxy) error
- func SetReduceIdleQuantity(u uint) func(*SAMHTTPProxy) error
- func SetReduceIdleTime(u uint) func(*SAMHTTPProxy) error
- func SetUnpublished(b bool) func(*SAMHTTPProxy) error
- func SetupProxy(addr string)
- func UnProxyLocal(additionalAddresses []string)
- type Option
- type SAMHTTPController
- type SAMHTTPProxy
- func (p *SAMHTTPProxy) Base32() string
- func (f *SAMHTTPProxy) Base32Readable() string
- func (p *SAMHTTPProxy) Base64() string
- func (p *SAMHTTPProxy) Cleanup()
- func (p *SAMHTTPProxy) Close() error
- func (f *SAMHTTPProxy) Config() *i2ptunconf.Conf
- func (f *SAMHTTPProxy) GetType() string
- func (p *SAMHTTPProxy) GuaranteePrefix(str string) string
- func (f *SAMHTTPProxy) ID() string
- func (f *SAMHTTPProxy) Keys() i2pkeys.I2PKeys
- func (handler *SAMHTTPProxy) Load() (samtunnel.SAMTunnel, error)
- func (p *SAMHTTPProxy) Print() string
- func (f *SAMHTTPProxy) Props() map[string]string
- func (p *SAMHTTPProxy) Save() string
- func (p *SAMHTTPProxy) Search(search string) string
- func (p *SAMHTTPProxy) Serve() error
- func (p *SAMHTTPProxy) ServeHTTP(wr http.ResponseWriter, req *http.Request)
- func (p *SAMHTTPProxy) SetupProxy()
- func (p *SAMHTTPProxy) Target() string
- func (f *SAMHTTPProxy) Up() bool
Constants ¶
This section is empty.
Variables ¶
var Quiet bool
Functions ¶
func SetAddr ¶
func SetAddr(s ...string) func(*SAMHTTPProxy) error
SetAddr sets a clients's address in the form host:port or host, port
func SetAddrMixed ¶
func SetAddrMixed(s string, i int) func(*SAMHTTPProxy) error
SetAddrMixed sets a clients's address in the form host, port(int)
func SetCloseIdle ¶
func SetCloseIdle(b bool) func(*SAMHTTPProxy) error
SetCloseIdle enables debugging messages
func SetCloseIdleTime ¶
func SetCloseIdleTime(u uint) func(*SAMHTTPProxy) error
SetCloseIdleTime sets time to wait before the tunnel quantity is reduced
func SetCompression ¶
func SetCompression(b bool) func(*SAMHTTPProxy) error
SetCompression sets the tunnels to close after a specific amount of time
func SetControlAddr ¶
func SetControlAddr(s ...string) func(*SAMHTTPProxy) error
SetControlAddr sets a clients's address in the form host:port or host, port
func SetControlHost ¶
func SetControlHost(s string) func(*SAMHTTPProxy) error
SetContrlHost sets the host of the client's Proxy controller
func SetControlPort ¶
func SetControlPort(s string) func(*SAMHTTPProxy) error
SetContrlPort sets the host of the client's Proxy controller
func SetEncrypt ¶
func SetEncrypt(b bool) func(*SAMHTTPProxy) error
SetEncrypt tells the router to use an encrypted leaseset
func SetHost ¶
func SetHost(s string) func(*SAMHTTPProxy) error
SetHost sets the host of the client's SAM bridge
func SetInBackups ¶
func SetInBackups(u uint) func(*SAMHTTPProxy) error
SetInBackups sets the inbound tunnel backups
func SetInLength ¶
func SetInLength(u uint) func(*SAMHTTPProxy) error
SetInLength sets the number of hops inbound
func SetInQuantity ¶
func SetInQuantity(u uint) func(*SAMHTTPProxy) error
SetInQuantity sets the inbound tunnel quantity
func SetInVariance ¶
func SetInVariance(i int) func(*SAMHTTPProxy) error
SetInVariance sets the variance of a number of hops inbound
func SetKeysPath ¶
func SetKeysPath(s string) func(*SAMHTTPProxy) error
SetKeysPath sets the path to the key save files
func SetName ¶
func SetName(s string) func(*SAMHTTPProxy) error
SetName sets a clients's address in the form host:port or host, port
func SetOutBackups ¶
func SetOutBackups(u uint) func(*SAMHTTPProxy) error
SetOutBackups sets the inbound tunnel backups
func SetOutLength ¶
func SetOutLength(u uint) func(*SAMHTTPProxy) error
SetOutLength sets the number of hops outbound
func SetOutProxy ¶
func SetOutProxy(s string) func(*SAMHTTPProxy) error
SetOutProxy sets the host of the client's outproxy, it may be a base32 or a local proxy
func SetOutProxySocks ¶
func SetOutProxySocks(s bool) func(*SAMHTTPProxy) error
SetOutProxySocks tells it to use a SOCKS outproxy instead of HTTP
func SetOutQuantity ¶
func SetOutQuantity(u uint) func(*SAMHTTPProxy) error
SetOutQuantity sets the outbound tunnel quantity
func SetOutVariance ¶
func SetOutVariance(i int) func(*SAMHTTPProxy) error
SetOutVariance sets the variance of a number of hops outbound
func SetPort ¶
func SetPort(s string) func(*SAMHTTPProxy) error
SetPort sets the port of the client's SAM bridge using a string
func SetPortInt ¶
func SetPortInt(i int) func(*SAMHTTPProxy) error
SetPortInt sets the port of the client's SAM bridge using a string
func SetProxyAddr ¶
func SetProxyAddr(s ...string) func(*SAMHTTPProxy) error
SetProxyAddr sets a clients's address in the form host:port or host, port
func SetProxyHost ¶
func SetProxyHost(s string) func(*SAMHTTPProxy) error
SetProxyHost sets the host of the client's Proxy controller
func SetProxyPort ¶
func SetProxyPort(s string) func(*SAMHTTPProxy) error
SetProxyPort sets the host of the client's Proxy controller
func SetReduceIdle ¶
func SetReduceIdle(b bool) func(*SAMHTTPProxy) error
SetReduceIdle sets the created tunnels to be reduced during extended idle time to avoid excessive resource usage
func SetReduceIdleQuantity ¶
func SetReduceIdleQuantity(u uint) func(*SAMHTTPProxy) error
SetReduceIdleQuantity sets number of tunnels to keep alive during an extended idle period
func SetReduceIdleTime ¶
func SetReduceIdleTime(u uint) func(*SAMHTTPProxy) error
SetReduceIdleTime sets time to wait before the tunnel quantity is reduced
func SetUnpublished ¶
func SetUnpublished(b bool) func(*SAMHTTPProxy) error
SetUnpublished tells the router to not publish the client leaseset
func SetupProxy ¶
func SetupProxy(addr string)
SetupProxy sets proxy environment variables based on a string address
func UnProxyLocal ¶
func UnProxyLocal(additionalAddresses []string)
UnProxyLocal adds local IP addresses to an un-proxied range. It is not used here but is useful for some servers.
Types ¶
type SAMHTTPController ¶
type SAMHTTPController struct { ProxyServer *http.Server Profiles []string // contains filtered or unexported fields }
func NewSAMHTTPController ¶
func NewSAMHTTPController(profiles []string, proxy *http.Server) (*SAMHTTPController, error)
func (*SAMHTTPController) ServeHTTP ¶
func (p *SAMHTTPController) ServeHTTP(wr http.ResponseWriter, req *http.Request)
type SAMHTTPProxy ¶
type SAMHTTPProxy struct { Hasher *hashhash.Hasher UseOutProxy string Conf *i2ptunconf.Conf // contains filtered or unexported fields }
func NewHttpProxy ¶
func NewHttpProxy(opts ...func(*SAMHTTPProxy) error) (*SAMHTTPProxy, error)
func (*SAMHTTPProxy) Base32 ¶
func (p *SAMHTTPProxy) Base32() string
func (*SAMHTTPProxy) Base32Readable ¶
func (f *SAMHTTPProxy) Base32Readable() string
Base32Readable returns the base32 address where the local service is being forwarded, but as a list of English words(More languages later if it works) instead of as a hash for person-to-person transmission.
func (*SAMHTTPProxy) Base64 ¶
func (p *SAMHTTPProxy) Base64() string
func (*SAMHTTPProxy) Cleanup ¶
func (p *SAMHTTPProxy) Cleanup()
func (*SAMHTTPProxy) Close ¶
func (p *SAMHTTPProxy) Close() error
func (*SAMHTTPProxy) Config ¶
func (f *SAMHTTPProxy) Config() *i2ptunconf.Conf
func (*SAMHTTPProxy) GetType ¶
func (f *SAMHTTPProxy) GetType() string
func (*SAMHTTPProxy) GuaranteePrefix ¶
func (p *SAMHTTPProxy) GuaranteePrefix(str string) string
func (*SAMHTTPProxy) ID ¶
func (f *SAMHTTPProxy) ID() string
func (*SAMHTTPProxy) Keys ¶
func (f *SAMHTTPProxy) Keys() i2pkeys.I2PKeys
func (*SAMHTTPProxy) Load ¶
func (handler *SAMHTTPProxy) Load() (samtunnel.SAMTunnel, error)
func (*SAMHTTPProxy) Print ¶
func (p *SAMHTTPProxy) Print() string
func (*SAMHTTPProxy) Props ¶
func (f *SAMHTTPProxy) Props() map[string]string
func (*SAMHTTPProxy) Save ¶
func (p *SAMHTTPProxy) Save() string
func (*SAMHTTPProxy) Search ¶
func (p *SAMHTTPProxy) Search(search string) string
func (*SAMHTTPProxy) Serve ¶
func (p *SAMHTTPProxy) Serve() error
func (*SAMHTTPProxy) ServeHTTP ¶
func (p *SAMHTTPProxy) ServeHTTP(wr http.ResponseWriter, req *http.Request)
func (*SAMHTTPProxy) SetupProxy ¶
func (p *SAMHTTPProxy) SetupProxy()
SetupProxy sets proxy environment variables based on the settings in use by the proxy
func (*SAMHTTPProxy) Target ¶
func (p *SAMHTTPProxy) Target() string
func (*SAMHTTPProxy) Up ¶
func (f *SAMHTTPProxy) Up() bool