@@ -166,21 +166,6 @@ static bool LookupIntern(const std::string& name, std::vector<CNetAddr>& vIP, un
166
166
return (vIP.size () > 0 );
167
167
}
168
168
169
- /* *
170
- * Resolve a host string to its corresponding network addresses.
171
- *
172
- * @param name The string representing a host. Could be a name or a numerical
173
- * IP address (IPv6 addresses in their bracketed form are
174
- * allowed).
175
- * @param[out] vIP The resulting network addresses to which the specified host
176
- * string resolved.
177
- *
178
- * @returns Whether or not the specified host string successfully resolved to
179
- * any resulting network addresses.
180
- *
181
- * @see Lookup(const char *, std::vector<CService>&, int, bool, unsigned int)
182
- * for additional parameter descriptions.
183
- */
184
169
bool LookupHost (const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup , DNSLookupFn dns_lookup_function)
185
170
{
186
171
if (!ValidAsCString (name)) {
@@ -196,12 +181,6 @@ bool LookupHost(const std::string& name, std::vector<CNetAddr>& vIP, unsigned in
196
181
return LookupIntern (strHost, vIP, nMaxSolutions, fAllowLookup , dns_lookup_function);
197
182
}
198
183
199
- /* *
200
- * Resolve a host string to its first corresponding network address.
201
- *
202
- * @see LookupHost(const std::string&, std::vector<CNetAddr>&, unsigned int, bool) for
203
- * additional parameter descriptions.
204
- */
205
184
bool LookupHost (const std::string& name, CNetAddr& addr, bool fAllowLookup , DNSLookupFn dns_lookup_function)
206
185
{
207
186
if (!ValidAsCString (name)) {
@@ -215,26 +194,6 @@ bool LookupHost(const std::string& name, CNetAddr& addr, bool fAllowLookup, DNSL
215
194
return true ;
216
195
}
217
196
218
- /* *
219
- * Resolve a service string to its corresponding service.
220
- *
221
- * @param name The string representing a service. Could be a name or a
222
- * numerical IP address (IPv6 addresses should be in their
223
- * disambiguated bracketed form), optionally followed by a port
224
- * number. (e.g. example.com:8333 or
225
- * [2001:db8:85a3:8d3:1319:8a2e:370:7348]:420)
226
- * @param[out] vAddr The resulting services to which the specified service string
227
- * resolved.
228
- * @param portDefault The default port for resulting services if not specified
229
- * by the service string.
230
- * @param fAllowLookup Whether or not hostname lookups are permitted. If yes,
231
- * external queries may be performed.
232
- * @param nMaxSolutions The maximum number of results we want, specifying 0
233
- * means "as many solutions as we get."
234
- *
235
- * @returns Whether or not the service string successfully resolved to any
236
- * resulting services.
237
- */
238
197
bool Lookup (const std::string& name, std::vector<CService>& vAddr, int portDefault, bool fAllowLookup , unsigned int nMaxSolutions, DNSLookupFn dns_lookup_function)
239
198
{
240
199
if (name.empty () || !ValidAsCString (name)) {
@@ -254,12 +213,6 @@ bool Lookup(const std::string& name, std::vector<CService>& vAddr, int portDefau
254
213
return true ;
255
214
}
256
215
257
- /* *
258
- * Resolve a service string to its first corresponding service.
259
- *
260
- * @see Lookup(const char *, std::vector<CService>&, int, bool, unsigned int)
261
- * for additional parameter descriptions.
262
- */
263
216
bool Lookup (const std::string& name, CService& addr, int portDefault, bool fAllowLookup , DNSLookupFn dns_lookup_function)
264
217
{
265
218
if (!ValidAsCString (name)) {
@@ -273,16 +226,6 @@ bool Lookup(const std::string& name, CService& addr, int portDefault, bool fAllo
273
226
return true ;
274
227
}
275
228
276
- /* *
277
- * Resolve a service string with a numeric IP to its first corresponding
278
- * service.
279
- *
280
- * @returns The resulting CService if the resolution was successful, [::]:0
281
- * otherwise.
282
- *
283
- * @see Lookup(const char *, CService&, int, bool) for additional parameter
284
- * descriptions.
285
- */
286
229
CService LookupNumeric (const std::string& name, int portDefault, DNSLookupFn dns_lookup_function)
287
230
{
288
231
if (!ValidAsCString (name)) {
@@ -420,24 +363,6 @@ static std::string Socks5ErrorString(uint8_t err)
420
363
}
421
364
}
422
365
423
- /* *
424
- * Connect to a specified destination service through an already connected
425
- * SOCKS5 proxy.
426
- *
427
- * @param strDest The destination fully-qualified domain name.
428
- * @param port The destination port.
429
- * @param auth The credentials with which to authenticate with the specified
430
- * SOCKS5 proxy.
431
- * @param sock The SOCKS5 proxy socket.
432
- *
433
- * @returns Whether or not the operation succeeded.
434
- *
435
- * @note The specified SOCKS5 proxy socket must already be connected to the
436
- * SOCKS5 proxy.
437
- *
438
- * @see <a href="https://www.ietf.org/rfc/rfc1928.txt">RFC1928: SOCKS Protocol
439
- * Version 5</a>
440
- */
441
366
bool Socks5 (const std::string& strDest, int port, const ProxyCredentials* auth, const Sock& sock)
442
367
{
443
368
IntrRecvError recvr;
@@ -612,18 +537,6 @@ static void LogConnectFailure(bool manual_connection, const char* fmt, const Arg
612
537
}
613
538
}
614
539
615
- /* *
616
- * Try to connect to the specified service on the specified socket.
617
- *
618
- * @param addrConnect The service to which to connect.
619
- * @param hSocket The socket on which to connect.
620
- * @param nTimeout Wait this many milliseconds for the connection to be
621
- * established.
622
- * @param manual_connection Whether or not the connection was manually requested
623
- * (e.g. through the addnode RPC)
624
- *
625
- * @returns Whether or not a connection was successfully made.
626
- */
627
540
bool ConnectSocketDirectly (const CService &addrConnect, const SOCKET& hSocket, int nTimeout, bool manual_connection)
628
541
{
629
542
// Create a sockaddr from the specified service.
@@ -722,22 +635,6 @@ bool GetProxy(enum Network net, proxyType &proxyInfoOut) {
722
635
return true ;
723
636
}
724
637
725
- /* *
726
- * Set the name proxy to use for all connections to nodes specified by a
727
- * hostname. After setting this proxy, connecting to a node specified by a
728
- * hostname won't result in a local lookup of said hostname, rather, connect to
729
- * the node by asking the name proxy for a proxy connection to the hostname,
730
- * effectively delegating the hostname lookup to the specified proxy.
731
- *
732
- * This delegation increases privacy for those who set the name proxy as they no
733
- * longer leak their external hostname queries to their DNS servers.
734
- *
735
- * @returns Whether or not the operation succeeded.
736
- *
737
- * @note SOCKS5's support for UDP-over-SOCKS5 has been considered, but no SOCK5
738
- * server in common use (most notably Tor) actually implements UDP
739
- * support, and a DNS resolver is beyond the scope of this project.
740
- */
741
638
bool SetNameProxy (const proxyType &addrProxy) {
742
639
if (!addrProxy.IsValid ())
743
640
return false ;
@@ -768,21 +665,6 @@ bool IsProxy(const CNetAddr &addr) {
768
665
return false ;
769
666
}
770
667
771
- /* *
772
- * Connect to a specified destination service through a SOCKS5 proxy by first
773
- * connecting to the SOCKS5 proxy.
774
- *
775
- * @param proxy The SOCKS5 proxy.
776
- * @param strDest The destination service to which to connect.
777
- * @param port The destination port.
778
- * @param sock The socket on which to connect to the SOCKS5 proxy.
779
- * @param nTimeout Wait this many milliseconds for the connection to the SOCKS5
780
- * proxy to be established.
781
- * @param[out] outProxyConnectionFailed Whether or not the connection to the
782
- * SOCKS5 proxy failed.
783
- *
784
- * @returns Whether or not the operation succeeded.
785
- */
786
668
bool ConnectThroughProxy (const proxyType& proxy, const std::string& strDest, int port, const Sock& sock, int nTimeout, bool & outProxyConnectionFailed)
787
669
{
788
670
// first connect to proxy server
@@ -806,17 +688,6 @@ bool ConnectThroughProxy(const proxyType& proxy, const std::string& strDest, int
806
688
return true ;
807
689
}
808
690
809
- /* *
810
- * Parse and resolve a specified subnet string into the appropriate internal
811
- * representation.
812
- *
813
- * @param strSubnet A string representation of a subnet of the form `network
814
- * address [ "/", ( CIDR-style suffix | netmask ) ]`(e.g.
815
- * `2001:db8::/32`, `192.0.2.0/255.255.255.0`, or `8.8.8.8`).
816
- * @param ret The resulting internal representation of a subnet.
817
- *
818
- * @returns Whether the operation succeeded or not.
819
- */
820
691
bool LookupSubNet (const std::string& strSubnet, CSubNet& ret, DNSLookupFn dns_lookup_function)
821
692
{
822
693
if (!ValidAsCString (strSubnet)) {
0 commit comments