Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialerChain ¶
DialerChain composes builders for multiple network layers, used to build the final transport.Dialer object based on the network layers. Each layer can hold individual configurations. Use 'Clone' to copy and replace/wrap layers at will. Once all Layers have been prepared, use Build to build a transport.Dialer that can used with any go library network packages relying on standard library based dialers.
For Additional Layering capabilities, DialerChain implements the NetDialer interface.
func (*DialerChain) AddLayer ¶
func (c *DialerChain) AddLayer(l Layer)
AddLayer adds another layer to the dialer chain. The layer being added is the new topmost network layer using the other already present layers on dial.
func (*DialerChain) Build ¶
Build create a new transport.Dialer for use with other networking libraries.
func (*DialerChain) Clone ¶
func (c *DialerChain) Clone() *DialerChain
Clone create a shallow copy of c.
func (*DialerChain) TestBuild ¶
func (c *DialerChain) TestBuild() error
TestBuild tries to build the DialerChain and reports any error reported by one of the layers.
type Layer ¶
Layer is a configured network layer, wrapping any lower-level network layers.
func ConstAddrLayer ¶
ConstAddrLayer introduces a network layer always passing a constant address to the underlying layer.
func MakeConstAddrLayer ¶
MakeConstAddrLayer always passes the same address to the original Layer. This is useful if a lookup did return multiple IPs for the same hostname, but the IP use to connect shall be fixed.
func SOCKS5Layer ¶
func SOCKS5Layer(config *transport.ProxyConfig) Layer
SOCKS5Layer configures a SOCKS5 proxy layer in a DialerChain.
The layer will update the active event with:
{ "socks5": { "rtt": { "connect": { "us": ... }} } }
type NetDialer ¶
NetDialer provides the most low-level network layer for setting up a network connection. NetDialer objects do not support wrapping any lower network layers.
func MakeConstAddrDialer ¶
MakeConstAddrDialer always passes the same address to the original NetDialer. This is useful if a lookup did return multiple IPs for the same hostname, but the IP use to connect shall be fixed.
func TCPDialer ¶
TCPDialer creates a new NetDialer with constant event fields and default connection timeout. The fields parameter holds additional constants to be added to the final event structure.
The dialer will update the active events with:
{ "tcp": { "port": ..., "rtt": { "connect": { "us": ... }} } }
func UDPDialer ¶
UDPDialer creates a new NetDialer with constant event fields and default connection timeout. The fields parameter holds additional constants to be added to the final event structure.
The dialer will update the active events with:
{ "udp": { "port": ..., "rtt": { "connect": { "us": ... }} } }