From a07665c01f4b307ebcc7b16b0178ca75cdf534cc Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Wed, 16 Sep 2026 15:04:08 +0300 Subject: [PATCH] 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 --- doc/html/howtoe.html | 4 +++- doc/html/howtor.html | 4 +++- doc/html/man5/3proxy.cfg.5.html | 6 +++++- man/3proxy.cfg.5 | 7 +++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/html/howtoe.html b/doc/html/howtoe.html index 117e460..3c71249 100644 --- a/doc/html/howtoe.html +++ b/doc/html/howtoe.html @@ -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.
   nserver 192.168.1.2
-  nserver 192.168.1.3:5353/tcp
+ nserver 192.168.1.3:5353/tcp + nserver [2001:4860:4860::8844] 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.
   nscache 65535
   nscache6 65535
diff --git a/doc/html/howtor.html b/doc/html/howtor.html index 2e55ad0..0182a6c 100644 --- a/doc/html/howtor.html +++ b/doc/html/howtor.html @@ -1536,11 +1536,13 @@ socks -p1080 nscache и nsrecord.
   nserver 192.168.1.2
-  nserver 192.168.1.3:5353/tcp
+ nserver 192.168.1.3:5353/tcp + nserver [2001:4860:4860::8844] указывает 3proxy какие машины следует использвоать в качестве серверов DNS. Сервер 192.168.1.3 будет использоваться по порту TCP/5353 (вместо дефолтного UDP/53) только при недостижимости 192.168.1.2. Можно указать до 5 серверов. Если nserver не указан, будут использованы системные функции разрешения имен. + Адрес IPv6 необходимо записывать в квадратных скобках.
   nscache 65535
   nscache6 65535
diff --git a/doc/html/man5/3proxy.cfg.5.html b/doc/html/man5/3proxy.cfg.5.html index 1981738..a32e730 100644 --- a/doc/html/man5/3proxy.cfg.5.html +++ b/doc/html/man5/3proxy.cfg.5.html @@ -489,7 +489,11 @@ experimental.

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.

+address, name resolution is performed over TCP. An IPv6 address +has to be enclosed in square brackets:
+nserver 1.1.1.1
+nserver [2001:4860:4860::8844]
+nserver [2001:4860:4860::8844]:5353/tcp

authnserver diff --git a/man/3proxy.cfg.5 b/man/3proxy.cfg.5 index 416bb17..0d33895 100644 --- a/man/3proxy.cfg.5 +++ b/man/3proxy.cfg.5 @@ -514,6 +514,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