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 97ac10b3c5
commit f20848fda7
4 changed files with 18 additions and 3 deletions

View File

@ -1942,10 +1942,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.
<pre>
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)
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.
An IPv6 address has to be written in square brackets.
<pre>
nscache 65535
nscache6 65535</pre>

View File

@ -1993,11 +1993,13 @@ socks -p1080
nscache и nsrecord.
<pre>
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 какие машины следует использвоать в качестве серверов
DNS. Сервер 192.168.1.3 будет использоваться по порту TCP/5353 (вместо дефолтного UDP/53) только при недостижимости
192.168.1.2. Можно указать до 5 серверов. Если nserver не указан, будут
использованы системные функции разрешения имен.
Адрес IPv6 необходимо записывать в квадратных скобках.
<pre>
nscache 65535
nscache6 65535</pre>

View File

@ -482,7 +482,11 @@ experimental.</p>
Nameserver to use for name resolutions. If none specified
system routines for name resolution is used. Optional port
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:9%; margin-top: 1em"><b>authnserver</b>

View File

@ -517,6 +517,13 @@ system routines for name resolution is
used. Optional port number may be specified.
If optional /tcp is added to IP address, name resolution is
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 authnserver