Document that an IPv6 nserver address needs square brackets

nserver and authnserver parse their argument with parsehost(), which reads
the first colon as the address/port separator, so a bare IPv6 address picks
up a bogus port number. Document the bracket form in 3proxy.cfg(5) and in
both HOWTOs.

Refs #1275, #460

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Vladimir Dubrovin 2026-09-16 15:04:08 +03:00
parent 3bd7cee5b7
commit a07665c01f
4 changed files with 18 additions and 3 deletions

View File

@ -1471,10 +1471,12 @@ allowed traffic in megabytes (MB). nocountin allows you to set exclusions.
For name resolution and caching, use the commands nserver, nscache / nscache6, and nsrecord. For name resolution and caching, use the commands nserver, nscache / nscache6, and nsrecord.
<pre> <pre>
nserver 192.168.1.2 nserver 192.168.1.2
nserver 192.168.1.3:5353/tcp</pre> nserver 192.168.1.3:5353/tcp
nserver [2001:4860:4860::8844]</pre>
sets DNS resolvers. 192.168.1.3 will be used via TCP/5353 (instead of default UDP/53) sets DNS resolvers. 192.168.1.3 will be used via TCP/5353 (instead of default UDP/53)
only if 192.168.1.2 fails. Up to 5 nservers may be specified. only if 192.168.1.2 fails. Up to 5 nservers may be specified.
If no nserver is configured, default system name resolution functions are used. If no nserver is configured, default system name resolution functions are used.
An IPv6 address has to be written in square brackets.
<pre> <pre>
nscache 65535 nscache 65535
nscache6 65535</pre> nscache6 65535</pre>

View File

@ -1536,11 +1536,13 @@ socks -p1080
nscache и nsrecord. nscache и nsrecord.
<pre> <pre>
nserver 192.168.1.2 nserver 192.168.1.2
nserver 192.168.1.3:5353/tcp</pre> nserver 192.168.1.3:5353/tcp
nserver [2001:4860:4860::8844]</pre>
указывает 3proxy какие машины следует использвоать в качестве серверов указывает 3proxy какие машины следует использвоать в качестве серверов
DNS. Сервер 192.168.1.3 будет использоваться по порту TCP/5353 (вместо дефолтного UDP/53) только при недостижимости DNS. Сервер 192.168.1.3 будет использоваться по порту TCP/5353 (вместо дефолтного UDP/53) только при недостижимости
192.168.1.2. Можно указать до 5 серверов. Если nserver не указан, будут 192.168.1.2. Можно указать до 5 серверов. Если nserver не указан, будут
использованы системные функции разрешения имен. использованы системные функции разрешения имен.
Адрес IPv6 необходимо записывать в квадратных скобках.
<pre> <pre>
nscache 65535 nscache 65535
nscache6 65535</pre> nscache6 65535</pre>

View File

@ -489,7 +489,11 @@ experimental.</p>
Nameserver to use for name resolutions. If none specified Nameserver to use for name resolutions. If none specified
system routines for name resolution is used. Optional port system routines for name resolution is used. Optional port
number may be specified. If optional /tcp is added to IP number may be specified. If optional /tcp is added to IP
address, name resolution is performed over TCP.</p> address, name resolution is performed over TCP. An IPv6 address
has to be enclosed in square brackets: <br>
<b>nserver 1.1.1.1</b> <br>
<b>nserver [2001:4860:4860::8844]</b> <br>
<b>nserver [2001:4860:4860::8844]:5353/tcp</b></p>
<p style="margin-left:6%; margin-top: 1em"><b>authnserver</b> <p style="margin-left:6%; margin-top: 1em"><b>authnserver</b>

View File

@ -514,6 +514,13 @@ system routines for name resolution is
used. Optional port number may be specified. used. Optional port number may be specified.
If optional /tcp is added to IP address, name resolution is If optional /tcp is added to IP address, name resolution is
performed over TCP. performed over TCP.
An IPv6 address has to be enclosed in square brackets:
.br
\fBnserver 1.1.1.1\fR
.br
\fBnserver [2001:4860:4860::8844]\fR
.br
\fBnserver [2001:4860:4860::8844]:5353/tcp\fR
.br .br
.BR authnserver .BR authnserver