[#SetNameProxy]
= SetNameProxy
:mrdocs:

Set the name proxy to use for all connections to nodes specified by a hostname&period; After setting this proxy, connecting to a node specified by a hostname won&apos;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&period;

== Synopsis

Declared in `&lt;netbase&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SetNameProxy(xref:Proxy.adoc[Proxy] const& addrProxy);
----

== Description

This delegation increases privacy for those who set the name proxy as they no longer leak their external hostname queries to their DNS servers&period;

[NOTE]
====
SOCKS5&apos;s support for UDP&hyphen;over&hyphen;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&period;

====

== Return Value

Whether or not the operation succeeded&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *addrProxy*
| The name proxy to delegate hostname lookups to&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
