From d1f8180eabcada4098b31e0f995cc0af86acea2b Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Fri, 15 Jan 2016 01:24:08 +0300 Subject: [PATCH 1/2] IPv6 and name resolution documentation updated for 0.8 --- doc/html/howtoe.html | 41 +++++++++++++++++++++++++++++++++++++++++ doc/html/howtor.html | 28 +++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/doc/html/howtoe.html b/doc/html/howtoe.html index 438aebd..91c0003 100644 --- a/doc/html/howtoe.html +++ b/doc/html/howtoe.html @@ -33,6 +33,8 @@
+ For name resolution and caching use commands nserver, nscache / nscache6 and nsrecord. +
+ nserver 192.168.1.2 + nserver 192.168.1.3:5353/tcp+ 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. +
+ nscache 65535 + nscache6 65535+ sets name cache size for IPv4 and IPv6. Name cache must be large enouth, if presents. + name cache is only used if nserver is configured. +
+ nsrecord server.mycompany.example.com 192.168.1.1 + nsrecord www.porno.com 127.0.0.2 + ... + deny * * 127.0.0.2+ adds static nsrecords. Also, static nsrecords are used for dnspr, unless -s option is specified. + Since 0.8 version, parent proxy may be configured for dnspr. + +
+ IPv6 is supported since 0.8. Please note, some proxy protolos, e.g. SOCKSv4,
+ do not support IPv6. SOCKSv5 supports IPv6 with special request type (must be
+ implemented by client).
+
+ 3proxy supports proxying from IPv4 and IPv6 networks to IPv4,
+ IPv6 and mixed networks. IPv6 address may be used in
+ internal, external, parent commands, ACLs, -i and -e options,etc.
+ external command and -e options may be given twice for each service - once with IPv4
+ and once with IPv6 address. internal can be given only once, to bind to all IPv4 and
+ IPv6 addresses use [0:0:0:0:0:0:0:0] or [::].
+
+ Any service may be configured with -4, -46, -64, -6 options to specify decied
+ priority for name to IPv4/IPv6 address resolution (IPv4 only, IPv4 priority,
+ IPv6 priority, IPv6 only).
+
nserver 192.168.1.2 - nserver 192.168.1.3+ nserver 192.168.1.3:5353/tcp указывает 3proxy какие машины следует использвоать в качестве серверов - DNS. Сервер 192.168.1.3 будет использоваться толкьо при недостижимости + DNS. Сервер 192.168.1.3 будет использоваться по порту TCP/5353 (вместо дефолтного UDP/53) только при недостижимости 192.168.1.2. Можно указать до 5 серверов. Если nserver не указан, будут использованы системные функции разрешения имен.
- nscache 65535- указывает размер кэша для разрешения имен (обычно достаточно большой). + nscache 65535 + nscache6 65535 + указывает размер кэша для разрешения имен (обычно достаточно большой) для IPv4 и IPv6 соответственно. Кэш исопльзуется только при явном указании nserver.
nsrecord server.mycompany.example.com 192.168.1.1 nsrecord www.porno.com 127.0.0.2 ... deny * * 127.0.0.2- добавляет статическую запись в кэш. + добавляет статическую запись в кэш. Статические записи так же влияют на разрешение через dnspr если не указана опция -s. Начиная с версии 0.8 для dnspr могут быть сконфигурированы родительские прокси. +
+ IPv6 поддерживается с версии 0.8. Обратите внимание, что в некоторых видах прокси (например SOCKSv4)
+ IPv6 не поддерживает на уровне протокола. В SOCKSv5 есть поддержка IPv6 с помощью отдельного вида
+ запроса, который должен быть реализован в клиентском приложении или соксификаторе.
+
+ Возможно проксирование из сетей IPv4 и IPv6 в сети IPv4,
+ IPv6 и смешанные. Адреса IPv6 могут использоваться в командах
+ internal, external, parent, ACL, опциях -i, -e и т.д. Команду external и опцию
+ -e для каждого сервиса можно давать два раза - один раз с IPv4 и один раз с IPv6
+ адресом. internal и -i может быть указан только один, для биндинга ко всем адресам IPv4 и IPv6
+ можно использовать адрес [0:0:0:0:0:0:0:0] or [::].
+
+ Кроме того, для каждого сервиса могут быть даны опции -4, -46, -64, -6 которые
+ задают приоритет разрешения имен в адреса IPv4 и IPv6 (только IPv4, приоритет IPv4, приоритет IPv6, только IPv6).
+
Команда dialer задает программу, которая будет запускаться при From 1ef7308cbf43c7da328c7ad7fbdf316c164a0716 Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Fri, 15 Jan 2016 02:26:56 +0300 Subject: [PATCH 2/2] Update documentation for connect back --- doc/html/howtoe.html | 25 +++++++++++++++++++++++-- doc/html/howtor.html | 20 ++++++++++++++++++++ man/3proxy.cfg.3 | 34 ++++++++++++++++++++++++---------- src/proxymain.c | 4 ++-- 4 files changed, 69 insertions(+), 14 deletions(-) diff --git a/doc/html/howtoe.html b/doc/html/howtoe.html index 91c0003..0029970 100644 --- a/doc/html/howtoe.html +++ b/doc/html/howtoe.html @@ -34,7 +34,8 @@
IPv6 is supported since 0.8. Please note, some proxy protolos, e.g. SOCKSv4, do not support IPv6. SOCKSv5 supports IPv6 with special request type (must be @@ -778,6 +779,26 @@ connection to external networks to provider's proxy. Any service may be configured with -4, -46, -64, -6 options to specify decied priority for name to IPv4/IPv6 address resolution (IPv4 only, IPv4 priority, IPv6 priority, IPv6 only). +
++ In example, users needs access from external network to proxy server located + on the host 192.168.1.2. This host can not be accessed from external network, + but it has access to external network with with external address 1.1.1.1. + Also, user has access to the host 2.2.2.2 (IP address may be dynamic) with + hostname host.dyndns.example.org via external network. User needs 2 instances + of 3proxy, first one on the host 192.168.1.2 with config +
+ users user:CL:password + auth strong + allow user + proxy -rhost.dyndns.example.org:1234+ second one on the host.dyndns.example.org (2.2.2.2) with config +
+ auth iponly + allow * * 1.1.1.1 + tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128+ For browser settings proxy is host.dyndns.example.org:3128. diff --git a/doc/html/howtor.html b/doc/html/howtor.html index 2192fb2..8aa200c 100644 --- a/doc/html/howtor.html +++ b/doc/html/howtor.html @@ -35,6 +35,7 @@
+ Например, пользователю нужен доступ к прокси-серверу, который расположен + на хосте 192.168.1.2 недоступном из внешней сети, но имеющем доступ во внешнюю + сеть с внешним адрес 1.1.1.1. Так же у него есть машина с именем host.dyndns.example.org + с внешним адресом 2.2.2.2. Пользователь запускает 2 экземпляра 3proxy, один на + хосте 192.168.1.2 с конфигурацией +
+ users user:CL:password + auth strong + allow user + proxy -rhost.dyndns.example.org:1234+ второй на хосте host.dyndns.example.org (2.2.2.2) с конфигурацией +
+ auth iponly + allow * * 1.1.1.1 + tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128+ В настройках браузера указывается host.dyndns.example.org:3128. +
Команда dialer задает программу, которая будет запускаться при
diff --git a/man/3proxy.cfg.3 b/man/3proxy.cfg.3
index 4977740..bd626a1 100644
--- a/man/3proxy.cfg.3
+++ b/man/3proxy.cfg.3
@@ -113,19 +113,30 @@ view without ability to reset).
(for dnspr) - simple, do not use 'resolver' and 3proxy cache, always use external DNS server.
.br
(for udppm) - singlepacket, expect only one packet from both client and server
+.br
.B -a
(for proxy) - anonymous proxy (no information about client reported)
.br
.B -a1
(for proxy) - anonymous proxy (random client information reported)
+.br
.B -6
Only resolve IPv6 addresses
+.br
.B -4
Only resolve IPv4 addresses
+.br
.B -46
Resolve IPv6 addresses if IPv4 address is not resolvable
+.br
.B -64
Resolve IPv4 addresses if IPv6 address is not resolvable
+.br
+.B -RHOST:port
+listen on given local HOST:port for incoming connections instead of making remote outgoing connection. Can be used with another 3proxy service running -r option for connect back functionality. Most commonly used with tcppm. HOST can be given as IP or hostname, useful in case of dynamic DNS.
+.br
+.B -rHOST:port
+connect to given remote HOST:port instead of listening local connection on -p or default port. Can be used with another 3proxy service running -R option for connect back functionality. Most commonly used with proxy or socks. HOST can be given as IP or hostname, useful in case of dynamic DNS.
.br
Also, all options mentioned for
.BR proxy (8)
@@ -157,13 +168,9 @@ proxy on a client with FTP proxy support. Username format is one of
.br
proxyuser:proxypassword:FTPuser:FTPpassword@FTPserver
.br
- Please note, if you use FTP client interface for FTP proxy
-do not add FTPpassword and FTPServer to username, because
-FTP client does it for you. That is, if you use 3proxy with
-authentication use
-proxyuser:proxypassword:FTPuser
-as FTP username, otherwise do not change original FTP user name
+ Please note, if you use FTP client interface for FTP proxy do not add FTPpassword and FTPServer to username, because FTP client does it for you. That is, if you use 3proxy with authentication use proxyuser:proxypassword:FTPuser as FTP username, otherwise do not change original FTP user name
+.br
.B include