@@ -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 std::string&, std::vector<CService>&, int, bool, unsigned int, DNSLookupFn)
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, DNSLookupFn)
203
- * for 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 std::string&, std::vector<CService>&, int, bool, unsigned int, DNSLookupFn)
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,15 +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 otherwise.
281
- *
282
- * @see Lookup(const std::string&, std::vector<CService>&, int, bool, unsigned int, DNSLookupFn)
283
- * for additional parameter descriptions.
284
- */
285
229
CService LookupNumeric (const std::string& name, int portDefault, DNSLookupFn dns_lookup_function)
286
230
{
287
231
if (!ValidAsCString (name)) {
@@ -419,24 +363,6 @@ static std::string Socks5ErrorString(uint8_t err)
419
363
}
420
364
}
421
365
422
- /* *
423
- * Connect to a specified destination service through an already connected
424
- * SOCKS5 proxy.
425
- *
426
- * @param strDest The destination fully-qualified domain name.
427
- * @param port The destination port.
428
- * @param auth The credentials with which to authenticate with the specified
429
- * SOCKS5 proxy.
430
- * @param sock The SOCKS5 proxy socket.
431
- *
432
- * @returns Whether or not the operation succeeded.
433
- *
434
- * @note The specified SOCKS5 proxy socket must already be connected to the
435
- * SOCKS5 proxy.
436
- *
437
- * @see <a href="https://www.ietf.org/rfc/rfc1928.txt">RFC1928: SOCKS Protocol
438
- * Version 5</a>
439
- */
440
366
bool Socks5 (const std::string& strDest, int port, const ProxyCredentials* auth, const Sock& sock)
441
367
{
442
368
IntrRecvError recvr;
@@ -611,18 +537,6 @@ static void LogConnectFailure(bool manual_connection, const char* fmt, const Arg
611
537
}
612
538
}
613
539
614
- /* *
615
- * Try to connect to the specified service on the specified socket.
616
- *
617
- * @param addrConnect The service to which to connect.
618
- * @param hSocket The socket on which to connect.
619
- * @param nTimeout Wait this many milliseconds for the connection to be
620
- * established.
621
- * @param manual_connection Whether or not the connection was manually requested
622
- * (e.g. through the addnode RPC)
623
- *
624
- * @returns Whether or not a connection was successfully made.
625
- */
626
540
bool ConnectSocketDirectly (const CService &addrConnect, const SOCKET& hSocket, int nTimeout, bool manual_connection)
627
541
{
628
542
// Create a sockaddr from the specified service.
@@ -721,22 +635,6 @@ bool GetProxy(enum Network net, proxyType &proxyInfoOut) {
721
635
return true ;
722
636
}
723
637
724
- /* *
725
- * Set the name proxy to use for all connections to nodes specified by a
726
- * hostname. After setting this proxy, connecting to a node specified by a
727
- * hostname won't result in a local lookup of said hostname, rather, connect to
728
- * the node by asking the name proxy for a proxy connection to the hostname,
729
- * effectively delegating the hostname lookup to the specified proxy.
730
- *
731
- * This delegation increases privacy for those who set the name proxy as they no
732
- * longer leak their external hostname queries to their DNS servers.
733
- *
734
- * @returns Whether or not the operation succeeded.
735
- *
736
- * @note SOCKS5's support for UDP-over-SOCKS5 has been considered, but no SOCK5
737
- * server in common use (most notably Tor) actually implements UDP
738
- * support, and a DNS resolver is beyond the scope of this project.
739
- */
740
638
bool SetNameProxy (const proxyType &addrProxy) {
741
639
if (!addrProxy.IsValid ())
742
640
return false ;
@@ -767,21 +665,6 @@ bool IsProxy(const CNetAddr &addr) {
767
665
return false ;
768
666
}
769
667
770
- /* *
771
- * Connect to a specified destination service through a SOCKS5 proxy by first
772
- * connecting to the SOCKS5 proxy.
773
- *
774
- * @param proxy The SOCKS5 proxy.
775
- * @param strDest The destination service to which to connect.
776
- * @param port The destination port.
777
- * @param sock The socket on which to connect to the SOCKS5 proxy.
778
- * @param nTimeout Wait this many milliseconds for the connection to the SOCKS5
779
- * proxy to be established.
780
- * @param[out] outProxyConnectionFailed Whether or not the connection to the
781
- * SOCKS5 proxy failed.
782
- *
783
- * @returns Whether or not the operation succeeded.
784
- */
785
668
bool ConnectThroughProxy (const proxyType& proxy, const std::string& strDest, int port, const Sock& sock, int nTimeout, bool & outProxyConnectionFailed)
786
669
{
787
670
// first connect to proxy server
@@ -805,17 +688,6 @@ bool ConnectThroughProxy(const proxyType& proxy, const std::string& strDest, int
805
688
return true ;
806
689
}
807
690
808
- /* *
809
- * Parse and resolve a specified subnet string into the appropriate internal
810
- * representation.
811
- *
812
- * @param strSubnet A string representation of a subnet of the form `network
813
- * address [ "/", ( CIDR-style suffix | netmask ) ]`(e.g.
814
- * `2001:db8::/32`, `192.0.2.0/255.255.255.0`, or `8.8.8.8`).
815
- * @param ret The resulting internal representation of a subnet.
816
- *
817
- * @returns Whether the operation succeeded or not.
818
- */
819
691
bool LookupSubNet (const std::string& strSubnet, CSubNet& ret, DNSLookupFn dns_lookup_function)
820
692
{
821
693
if (!ValidAsCString (strSubnet)) {
0 commit comments