Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BTCDDial ¶
BTCDDial connects to the address on the named network using the appropriate dial function depending on the address and configuration options. For example, .onion addresses will be dialed using the onion specific proxy if one was specified, but will otherwise use the normal dial function (which could itself use a proxy or not).
func BTCDLookup ¶
BTCDLookup resolves the IP of the given host using the correct DNS lookup function depending on the configuration options. For example, addresses will be resolved using tor when the --proxy flag was specified unless --noonion was also specified in which case the normal system DNS resolver will be used.
Any attempt to resolve a tor address (.onion) will return an error since they are not intended to be resolved outside of the tor proxy.
func GenCertPair ¶
GenCertPair generates a key/cert pair to the paths provided.
Types ¶
type NAT ¶
type NAT interface { // Get the external address from outside the NAT. GetExternalAddress() (addr net.IP, err error) // Add a port mapping for protocol ("udp" or "tcp") from external port to // internal port with description lasting for timeout. AddPortMapping(protocol string, externalPort, internalPort int, description string, timeout int) (mappedExternalPort int, err error) // Remove a previously added port mapping from external port to // internal port. DeletePortMapping(protocol string, externalPort, internalPort int) (err error) }
NAT is an interface representing a NAT traversal options for example UPNP or NAT-PMP. It provides methods to query and manipulate this traversal to allow access to services.
type Peer ¶
type Peer struct { *peer.Peer // The following variables must only be used atomically FeeFilter int64 DynamicBanScore connmgr.DynamicBanScore DisableRelayTx bool // contains filtered or unexported fields }
Peer extends the peer to maintain state shared by the server and the blockmanager.