Crate bitcoin_proxy

source ·

Structs

Enums

Constants

Functions

  • | Try to connect to the specified service | on the specified socket. | | ———– | @param addrConnect | | The service to which to connect. | ––––– | @param sock | | The socket on which to connect. | ––––– | @param nTimeout | | Wait this many milliseconds for the | connection to be established. | ––––– | @param manual_connection | | Whether or not the connection was manually | requested (e.g. through the addnode | RPC) | | ———– | @return | | Whether or not a connection was successfully | made. |
  • | Connect to a specified destination | service through a SOCKS5 proxy by first | connecting to the SOCKS5 proxy. | | ———– | @param proxy | | The SOCKS5 proxy. | ––––– | @param strDest | | The destination service to which to | connect. | ––––– | @param port | | The destination port. | ––––– | @param sock | | The socket on which to connect to the | SOCKS5 proxy. | ––––– | @param nTimeout | | Wait this many milliseconds for the | connection to the SOCKS5 proxy to be | established. | ––––– | @param[out] outProxyConnectionFailed | | Whether or not the connection to the | | SOCKS5 proxy failed. | | ———– | @return | | Whether or not the operation succeeded. |
  • | Create a TCP socket in the given address | family. | | ———– | @param[in] address_family | | The socket is created in the same address | family as this address. | | ———– | @return | | pointer to the created Sock object or | unique_ptr that owns nothing in case | of failure |
  • | Return a vector of publicly routable | Network names; optionally append NET_UNROUTABLE. |
  • | Try to read a specified number of bytes | from a socket. Please read the “see also” | section for more detail. | | ———– | @param data | | The buffer where the read bytes should | be stored. | ––––– | @param len | | The number of bytes to read into the specified | buffer. | ––––– | @param timeout | | The total timeout in milliseconds for | this read. | ––––– | @param sock | | The socket (has to be in non-blocking | mode) from which to read bytes. | | ———– | @return | | An IntrRecvError indicating the resulting | status of this read. | | IntrRecvError::OK only if all of the | specified number of bytes were read. | @see This function can be interrupted | by calling InterruptSocks5(bool). | | Sockets can be made non-blocking with | SetSocketNonBlocking(const | | Socket&, bool). |
  • | Set the name proxy to use for all connections | to nodes specified by a hostname. After | setting this proxy, connecting to a | node specified by a hostname won’t result | in a local lookup of said hostname, rather, | connect to the node by asking the name | proxy for a proxy connection to the hostname, | effectively delegating the hostname | lookup to the specified proxy. | | This delegation increases privacy | for those who set the name proxy as they | no longer leak their external hostname | queries to their DNS servers. | | ———– | @note | | SOCKS5’s support for UDP-over-SOCKS5 | has been considered, but no SOCK5 server | in common use (most notably Tor) actually | implements UDP support, and a DNS resolver | is beyond the scope of this project. | | ———– | @return | | Whether or not the operation succeeded. |
  • | Set the TCP_NODELAY flag on a socket |
  • | Disable or enable blocking-mode for | a socket |
  • | Connect to a specified destination | service through an already connected | | SOCKS5 proxy. | | ———– | @note | | The specified SOCKS5 proxy socket must | already be connected to the | | SOCKS5 proxy. @see RFC1928: | SOCKS Protocol | | Version 5 | | ———– | @param strDest | | The destination fully-qualified domain | name. | ––––– | @param port | | The destination port. | ––––– | @param auth | | The credentials with which to authenticate | with the specified | | SOCKS5 proxy. | ––––– | @param socket | | The SOCKS5 proxy socket. | | ———– | @return | | Whether or not the operation succeeded. |
  • | Convert SOCKS5 reply to an error message |
  • | Wrapper for getaddrinfo(3). Do not | use directly: call Lookup/LookupHost/LookupNumeric/LookupSubNet. |