@@ -45,11 +45,11 @@ static inline bool operator&(ConnectionDirection a, ConnectionDirection b) {
4545 return (underlying (a) & underlying (b));
4646}
4747
48- class proxyType
48+ class Proxy
4949{
5050public:
51- proxyType (): randomize_credentials(false ) {}
52- explicit proxyType (const CService &_proxy, bool _randomize_credentials=false ): proxy(_proxy), randomize_credentials(_randomize_credentials) {}
51+ Proxy (): randomize_credentials(false ) {}
52+ explicit Proxy (const CService &_proxy, bool _randomize_credentials=false ): proxy(_proxy), randomize_credentials(_randomize_credentials) {}
5353
5454 bool IsValid () const { return proxy.IsValid (); }
5555
@@ -73,8 +73,8 @@ enum Network ParseNetwork(const std::string& net);
7373std::string GetNetworkName (enum Network net);
7474/* * Return a vector of publicly routable Network names; optionally append NET_UNROUTABLE. */
7575std::vector<std::string> GetNetworkNames (bool append_unroutable = false );
76- bool SetProxy (enum Network net, const proxyType &addrProxy);
77- bool GetProxy (enum Network net, proxyType &proxyInfoOut);
76+ bool SetProxy (enum Network net, const Proxy &addrProxy);
77+ bool GetProxy (enum Network net, Proxy &proxyInfoOut);
7878bool IsProxy (const CNetAddr &addr);
7979/* *
8080 * Set the name proxy to use for all connections to nodes specified by a
@@ -92,9 +92,9 @@ bool IsProxy(const CNetAddr &addr);
9292 * server in common use (most notably Tor) actually implements UDP
9393 * support, and a DNS resolver is beyond the scope of this project.
9494 */
95- bool SetNameProxy (const proxyType &addrProxy);
95+ bool SetNameProxy (const Proxy &addrProxy);
9696bool HaveNameProxy ();
97- bool GetNameProxy (proxyType &nameProxyOut);
97+ bool GetNameProxy (Proxy &nameProxyOut);
9898
9999using DNSLookupFn = std::function<std::vector<CNetAddr>(const std::string&, bool )>;
100100extern DNSLookupFn g_dns_lookup;
@@ -218,7 +218,7 @@ bool ConnectSocketDirectly(const CService &addrConnect, const Sock& sock, int nT
218218 *
219219 * @returns Whether or not the operation succeeded.
220220 */
221- bool ConnectThroughProxy (const proxyType & proxy, const std::string& strDest, uint16_t port, const Sock& sock, int nTimeout, bool & outProxyConnectionFailed);
221+ bool ConnectThroughProxy (const Proxy & proxy, const std::string& strDest, uint16_t port, const Sock& sock, int nTimeout, bool & outProxyConnectionFailed);
222222
223223/* * Disable or enable blocking-mode for a socket */
224224bool SetSocketNonBlocking (const SOCKET& hSocket, bool fNonBlocking );
0 commit comments