initial import to git

This commit is contained in:
z3APA3A committed 2014-04-08 13:03:21 +04:00
commit a060376f1e
217 files changed
+64253

No files matched your search

+158
View File
@@ -0,0 +1,158 @@
<h3>Why ... doesn't work?</h3>
<p><i>Q: Why does nothing work?</i></p>
A: Valid configuration file is required.
<p><i>Q: Why restrictions (redirections, limits, etc) do not work?</i></p>
A: Most probable reasons: 'auth none' or no auth is used. For any ACL based feature one of 'iponly', 'nbname' or 'strong' auths required. Sequence of commands may be invalid. Commands are executed one-by-one and 'proxy', 'tcppm', 'socks' or another service commands must follow valid configuration. Invalid sequence of ACLs. First matching ACL is used (except of internal redirections, see below). If ACL contains at least one records last record is assumed to be 'deny *'.
<p><i>Q: Why doesn't 3proxy work as service under Windows?</i></p>
Possible reasons:
<ul>
<li>'service' command absents in configuration file. Command is required for
3proxy.exe to behave as system service in 3proxy 0.5.2 and prior.
<li>there are relative paths in configuration file for included files,
log files, etc. Always use absolute paths. For example
$"c:\3proxy\networks.local" instead of $networks.local. For debugging remove
'service' and 'daemon', log to stdout an try to execute 3proxy from command
line from some different directory (for example from disk root).
<li>SYSTEM account doesn't have access to executable file, configuration files,
log files, etc.
<li>configuration files is not located in default path (3proxy.cfg in same
location with 3proxy.exe). For alternative configuration file location use
<pre>
3proxy --install full_path_to_configuration_file
</pre>
<li>user has no rights to install or start service
<li>service is already installed and/or started
</ul>
<p><A NAME="INTEXT"><i>Q: Why doesn't internal and external commands work as expected</i></A></li></p>
A: Check your expectations first.
Both internal and external IPs are IPs of the host running 3proxy itself.
This configuration option is usefull in situation 3proxy is running on the
border host with 2 (or more) connections: e.g. LAN and WAN with different IPs
<pre>
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
^+-------------+^
| |
Internal IP External IP
</pre>
If 3proxy is used on the host with single connection, both internal and
external are usually same IP.
<br>Internal should exist and be UP on the moment 3proxy is started and
should never be disconnected/DOWN. If this interface is periodically
disconnected (e.g. direct link between 2 hosts), do not specify internal
address or use 0.0.0.0 instead. In this case, if you have 2 or more
interfaces you must use firewall (preferably) or 3proxy ACLs to avoid open
proxy situation.
<br>
External IP (if specified) must exist in the momet 3proxy
serves client request. If external interface is no specified (or 0.0.0.0),
system select external IP. It may be possible to access resources of internal
network, to prevent this use ACLs. In addition, SOCKSv5 will not support BIND
operation, required for incoming connections (this operation is quite rarely
implemented in SOCKSv5 clients and usually is not required). In case of
dynamic address, do not specify external or use external 0.0.0.0 or, if
external address is required, create a script to determine current external
IP and save it to file, and use external "$path_to_file" with "monitor" command
to automatically reload configuration on address change.
<p><i>Q: Why doesn't ODBC loggind work?</i></p>
A: Check you use system DSN.
Check SQL request is valid.
The best way to check is to make file or stdout logging, get SQL request from log file or console and execute this request manually.
<p><i>Q: Why doesn't APOP/CRAM-MD5 authentication work with POP3 proxy?</i></p>
A: Any Challenge-response authentication require challenge to be transmitted from server. Pop3p doesn't know which server to use before authentication, it makes it impossible to obtain challenge. You can encrypt your POP3 communications with TLS (i.e. stunnel) or IPSec.
<h3>Redirection to local proxy</h3>
<p><i>Q: What is it for?</i></p>
A: To have control based on request and to have URLs and another protocol specific parameters to be logged.
<p><i>Q: What are restrictions?</i></p>
A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends username, but not password), for SOCKSv5 only cleartext password authentication is supported.
<p><i>Q: What are advantages?</i></p>
A: You need only to setup SOCKS proxy in browser settings. You can use socksifier, i.e. FreeCAP or SocksCAP with application which is not proxy aware.
<p><i>Q: How to setup?</i></p>
A: You should specify parent proxy with IP of 0.0.0.0 and port 0. Examples:
<pre>
auth iponly
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
allow * * * 80,8080-8088
#redirect ports 80 and 8080-8088 to local HTTP proxy
#Second allow is required, because ACLs are checked
#twice: first time by socks and second by http proxy.
allow * * * 21,2121
parent 1000 ftp 0.0.0.0 0
allow * * * 21,2121
#redirect ports 21 and 2121 to local
#ftp proxy
allow *
#allow rest of connections directly
socks
#now let socks server to start
</pre>
<p><i>Q: How it affects different ACL rules?</i></p>
A: After local redirections rules are applied again to protocol-level request. Redirection rule itself is skipped. It makes it possible to redirect request again on the external proxy depending on request itself.
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
#redirect http traffic to internal proxy
allow * * $c:\3proxy\local.nets 80,8080-8088
#allow direct access to local.nets networks
allow * * * 80,8080-8088
parent 1000 http proxy.sandy.ru 3128
#use parent caching proxy for rest of the networks
allow *
#allow direct connections for rest of socks
#requests
</pre>
<h3>Can I ...?</h3>
<p><i>Q: Is it possible to resolve names through parent proxy?</i></p>
A: Yes, use 'proxy', 'connect+', 'socks4+' or 'socks5+' as parent proxy type.
3proxy itself requires name resolutions for ACL checks, so, if it's impossible
to resolve names from 3proxy host, use
<pre>
fakeresolve
</pre>
command. Fakeresolve resolves any name to 127.0.0.2.
<p><i>Q: Can I use 3proxy as FTP proxy?</i></p>
A: There are two kinds of FTP proxy supported: FTP over HTTP support (known as FTP proxy inside Internet Explorer, Mozilla and another browsers) and real FTP proxy (usable in Far and different FTP clients). Both are supported in 3proxy: first one as a part of HTTP 'proxy' and second one as 'ftppr'.
<p><i>Q: Can I bind any 3proxy service to non-default port?</i></p>
A: proxy -p8080
<h3>Why so ...?</h3>
<p><i>Q: Why traffic accounting is incomplete? It differs for what my provider (or another accounting application) shows to me?</i></p>
A: 3proxy accounts protocol level traffic. Provider counts channel or IP-level traffic with network and transport headers. In additions, 3proxy doesn't counts DNS resolutions, pings, floods, scans, etc. It makes approx. 10% of difference. That's why you should have 15% reserve if you use 3proxy to limit your traffic. If difference with your provider is significantly above 10% you should look for traffic avoiding proxy server, for example connections through NAT, traffic originated from the host with proxy installed, traffic from server applications, etc.
<p><i>Q: Why configuration is so difficult and non-intuitive?</i></p>
A: Configuration format is created in a way it's easy to parse and matches to internal 3proxy structures. In addition, there are some older things left for compatibility to be cleaned in 3proxy release. And last, I think it's easy and intuitive.
<p><i>Q: Why the code is so difficult and non-intuitive?</i></p>
A: First, I'm not programmer. Second, 3proxy was 'proof of concept' in reply for some conference post. Request was to write proxy server in 100 lines of code. First version of 3proxy had less, with HTTP and SOCKS support and portmappers. Third, there are peoples who want to use 3proxy code in trojans. I don't want to help them. Fourth, the aim is to support different platforms. It's well known - the worse code is, the better it compiles.
<p><i>Q: Why do you use insecure strcpy, sprintf, etc?</i></p>
A: Why not? I try to use insecure function in secure manner. You're welcome to look for vulnerabilities.
<pre>
$Id: faqe.html,v 1.10 2007/07/31 08:42:38 vlad Exp $
</pre>
+283
View File
@@ -0,0 +1,283 @@
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
3APA3A 3proxy tiny proxy server Frequently Asked Questions (FAQ)
<ul>
<li><a href="#TROUBLE">Почему не работает...</a></li>
<ul>
<li><a href="#NOTHING">Q: Почему ничего не работает?</a></li>
<li><a href="#LIMITS">Q: Почему не работают ограничения доступа (перенаправления, ограничения по скорости, трафику и т.д.)?</a></li>
<li><a href="#SERVICE">Q: Почему 3proxy не запускается как служба?</a></li>
<li><a href="#INTEXT">Q: Почему не получается указать internal и external?</a></li>
<li><a href="#ODBC">Q: Почему не работает ведение журналов в ODBC?</a></li>
<li><a href="#CHAP">Q: Почему не поддерживаются APOP и CRAM-MD5 в POP3 прокси?</a></li>
</ul>
<li><a href="#SOCKSREDIR">Перенаправление socks соединений в локальный прокси</a></li>
<ul>
<li><a href="#REDIR">Q: Для чего это надо?</a></li>
<li><a href="#REDIRLIMIT">Q: Какие недостатки?</a></li>
<li><a href="#REDIRADV">Q: Какие преимущества?</a></li>
<li><a href="#REDIRHOW">Q: Как настраивается?</a></li>
<li><a href="#REDIINTER">Q: Как взаимодействует с другими правилами в ACL?</a></li>
</ul>
<li><a href="#ISIT">А есть ли...</a></li>
<ul>
<li><a href="#NAMES">Можно ли разрешать имена на родительском прокси?</a></li>
<li><a href="#ISFTP">Существует ли сейчас поддержка FTP прокси в продукте?</a></li>
<li><a href="#PORT">Каким образом можно прибиндить сервисы на свой порт, к примеру, HTTP прокси к 8080, а не 3128 как по-умолчанию?</a></li>
<li><a href="#BANDLIM">Как ограничить ширину канала?</a></li>
</ul>
<li><a href="#BRRR">Почему так криво...</a></li>
<ul>
<li><a href="#TRAF">Почему так криво считается трафик? Не совпадает с ...</a></li>
<li><a href="#CONFIG">Почему такая кривая конфигурация и ничерта не понятно?</a></li>
<li><a href="#CODE">Почему так криво написан код?</a>
<li><a href="#UNSAFE">Почему так много strcpy, sprintf и т.д., это ж дыры!</a>
</ul>
</ul>
<hr>
<li><b><a name="TROUBLE">Почему не работает...<a></b></li>
<ul>
<li><a name="NOTHING"><i>Q: Почему ничего не работает?</i></a></li>
<p>
<i>A:</i> Потому что для работы нужен правильный файл конфигурации.
</p>
<li><a name="LIMITS"><i>Q: Почему не работают ограничения доступа (перенаправления, ограничения по скорости,
трафику и т.д.)?</i></a></li>
<p>
<i>A:</i> Обычные ошибки - использование auth none (для работы любых
функций, основанных на ACL, требуется auth iponly, nbname или strong),
нарушение порядка ввода команд (команды выполняются последовательно,
запуск сервиса proxy, socks, tcppm и т.д. должен осуществляться после
того, как указана его конфигурация), неправильный порядок записей в ACL
(записи просматриваются последовательно до первой, удовлетворяющей
критериям). Если в ACL имеется хотя бы одна запись, то считается, что
последняя запись в ACL - это неявная deny *.
</p>
<li><a name="SERVICE"><i>Q: Почему 3proxy не запускается как служба?</i></a></li>
<p>
<i>A:</i> Наиболее вероятные причины:
<ul>
<li>Отсутствие команды service в файле конфигурации - команда необходима в 3proxy 0.5.2 и более ранних, чтобы 3proxy вел себя как системная служба Windows
<li>Использование относительных (неполных) путей файлов в файле конфигурации
При использовании файлов журналов, файлов вставок ($filename) используйте
полные пути, например, $"c:\3proxy\include files\networks.local". Тоже самое
относится к файлам журналов и любым другим.
Для отладки лучше запускать 3proxy с ведением журнала на стандартный вывод.
Не забудьте в таком случае отключить daemon и service в файле конфигурации.
Для чистоты эксперимента запускать 3proxy из коммандной строки в таком случае
следует, находясь в другой папке.
<li>Отсутствие у системной записи прав на доступ к исполняемому файлу, каким-либо файлам конфигурации, журнала и т.п.
<li>Отсутствие файла конфигурации по стандартному расположению -
3proxy.cfg в одном каталоге с исполняемым файлом. Если файл расположен по
другому пути, необходимо использовать команду
<pre>
3proxy --install path_to_configuration_file</pre>
<li>Отсутствие у пользователя прав на установку или запуск службы
<li>Служба уже установлена или запущена
</ul>
</p>
<li><a name="INTEXT"><i>Q: Почему не получается указать internal и external?</i></a></li></li>
<p>
<i>A:</i> Убедитесь, что выправильно понимаете что такое internal и external адреса.
Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy.
Эта опция конфигурации необходима в классической ситуации, когда 3proxy
установлен на граничном компьютере с двумя (или более) подключениями:
<pre>
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
^+-------------+^
| |
Internal IP External IP</pre>
Если 3proxy работает на хосте с одним интерфейсом, то его адрес будет и
internal и external.
<br>Интерфейс с адресом internal должен существовать и быть рабочим на момент
запуска 3proxy, и не должен отключаться. Если internal интерфейс
периодически отключается, то не следует его указывать, или можно указать адрес
0.0.0.0. При этом прокси будет принимать запросы на всех интерфейсах, поэтому
при наличии нескольких интерфейсов для ограничения доступа следует использовать
фаервол или хотя бы ACL.
</p>
<p>
Интерфейс с адресом external, если он указан, должен быть рабочим на момент
получения запроса клиента. При отсутствии external или адресе 0.0.0.0 внешний
адрес будет выбираться системой при установке соединения. При этом, может быть
возможность доступа через прокси к ресурсам локальной сети, поэтому для
предотвращения несанкционированного доступа следует использовать ACL. Кроме
того, могут быть проблемы с приемом входящих соединений через SOCKSv5
(SOCKSv5 используется в клиентах исключительно редко).
В случае, если адрес динамический, можно либо не
указывать external, либо использовать адрес 0.0.0.0, либо, если необходима
поддержка входящих соединений в SOCKSv5, использовать скрипт,
который будет получать текущий адрес и сохранять его в файл, который будет
отслуживаться через команду monitor.
</p>
<li><a name="ODBC"><i>Q: Почему не работает ведение журналов в ODBC?</i></a></li>
<p>
<i>A:</i> Убедитесь, что используется системный, а не
пользовательский DSN. Убедитесь, что выполняется правильный SQL запрос. Наиболее
распространенная проблема связана с отсутствием кавычек или неправильным
форматом данных. Самый простой способ - сделать ведение журнала в файл или
на стандартный вывод, просмотреть выдаваемые SQL запросы и попробовать
дать такой запрос вручную.
</p>
<li><a name="CHAP"><i>Q: Почему не поддерживаются APOP и CRAM-MD5 в POP3 прокси?</i></a></li>
<p>
<i>A:</i> Любая challenge-response аутентификация, к которым относятся APOP
и CRAM-MD5, требует, чтобы со стороны сервера был передан уникальный challenge.
До начала аутентификации POP3 прокси не знает, к какому серверу следует
подключаться для получения Challenge, поэтому challenge-response в принципе
невозможен. Защитить соединение можно с помощью TLS (например, stunnel) или
IPSec.
</p>
</ul>
<hr>
<li><b><a name="SOCKSREDIR">Перенаправление socks соединений в локальный прокси</a></b></li>
<ul>
<li><a name="REDIR"><i>Q: Для чего это надо?</i></a></li>
<p>
<i>A:</i> Чтобы иметь в логах URL запросов, если пользователь SOCKS пользуется
Web, FTP или POP3.
</p>
<li><a name="REDIRLIMIT"><i>Q: Какие недостатки?</i></a></li>
<p>
<i>A:</i> Перенапраление невозможно для web-серверов или FTP, висящих на
нестандартных портах, для SOCKSv4 не поддрживается авторизация с
паролем (IE поддерживает только SOCKSv4), но при этом IE передает
имя пользователя по SOCKSv4 (имя, с которым пользователь вошел в систему).
Для SOCKSv5 не поддерживается NTLM авторизация, пароли передаются в открытом
тексте.
</p>
<li><a name="REDIRADV"><i>Q: Какие преимущества?</i></a></li>
<p>
<i>A:</i> Достаточно в настройках IE только указать адрес SOCKS прокси. В
больших сетях можно для этого использовать WPAD (автоматическое
обнаружение прокси). В 3proxy достаточно запускать только одну службу
(socks). Если используется только Internet Explorer, то можно
автоматически получать имя пользователя в логах, не запрашивая
логин/пароль.
</p>
<li><a name="REDIRHOW"><i>Q: Как настраивается?</i></a></li>
<p>
<i>A:</i> Указывается parent http proxy со специальным адресом 0.0.0.0 и портом
0. Пример:
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
allow * * * 80,8080-8088
#перенаправить соединения по портам 80 и 8080-8088 в локальный
#http прокси. Вторая команда allow необходима, т.к. контроль доступа
#осуществляется 2 раза - на уровне socks и на уровне HTTP прокси
allow * * * 21,2121
parent 1000 ftp 0.0.0.0 0
allow * * * 21,2121
#перенаправить соединения по портам 21 и 2121 в локальный
#ftp прокси
allow *
#пустить все соединения напрямую
socks</pre>
</p>
<li><a name="REDIINTER"><i>Q: Как взаимодействует с другими правилами в ACL?</i></a></li>
<p>
<i>A:</i> После внутреннего перенаправления правила рассматриваются еще раз за
исключением самого правила с перенаправлением (т.е. обработка правил не
прекращается). Это позволяет сделать дальнейшие перенаправления на
внешний прокси. По этой же причине локальное перенаправление не должно
быть последним правилом (т.е. должно быть еще хотя бы правило allow,
чтобы разрешить внешние соединения через HTTP прокси).
Например,
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
#перенаправить во внутренний прокси
allow * * $c:\3proxy\local.nets 80,8080-8088
#разрешить прямой web-доступ к сетям из local.nets
allow * * * 80,8080-8088
parent 1000 http proxy.sandy.ru 3128
#все остальные веб-запросы перенаправить на внешний прокси-сервер
allow *
#разрешить socks-запросы по другим портам</pre>
</p>
</ul>
<hr>
<li><b><a name="ISIT">А есть ли...</a></b></li>
<ul>
<li><a name="NAMES"><i>Q: Можно ли разрешать имена на родительском прокси?</i></a></li>
<p>
<i>A:</i> Можно. Для этого надо использовать тип родительского прокси http,
connect+, socks4+ и socks5+. Однако, при это надо помнить, что самому 3proxy
требуется разрешение имени для управления ACL. Поэтому, если с прокси-хоста
не работают разрешения имени, необходимо в конфигурации дать команду
<pre>
fakeresolve</pre>
которая разрешает любое имя в адрес 127.0.0.2.
</p>
<li><a name="ISFTP"><i>Q: Существует ли сейчас поддержка FTP прокси в продукте?</i></a></li>
<p>
Есть поддержка как FTP через HTTP (то, что называется FTP прокси в Internet
Explorer, Netscape, Opera) так и настоящего FTP прокси (то, что называется
FTP proxy в FAR и FTP клиентах).
</p>
<li><a name="PORT"><i>Q: Каким образом можно прибиндить сервисы на свой порт, к примеру, HTTP прокси к 8080, а не 3128 как по-умолчанию?</i></a></li>
<p>
А:
<pre>
proxy -p8080</pre>
</p>
<li><a name="BANDLIM"><i>Q: Как ограничить ширину канала?</i></a></li>
<p>
<i>A:</i> Читайте HowTo <a href="http://3proxy.ru/howtor.asp#BANDLIM">http://3proxy.ru/howtor.asp#BANDLIM</a>
</p>
</ul>
<hr>
<li><b><a name="BRRR">Почему так криво...</a></b></li>
<ul>
<li><a name="TRAF"><i>Q: Почему так криво считается трафик? Не совпадает с ...</i></a></li>
<p>
<i>A:</i> Следует учитывать, что 3proxy считает трафик только на прикладном уровне и
только проходящий через прокси-сервер. Провайдеры и другие средства учета
трафика считают трафик на сетевом уровне, что уже дает расхождение порядка 10%
за счет информации из заголовков пакетов. Кроме того, часть трафика, как
минимум DNS-разрешения, различный флудовый трафик и т.д. идут мимо прокси.
Уровень "шумового" трафика в Internet сейчас составляет порядка 50KB/день на
каждый реальный IP адрес, но может сильно варьироваться в зависимости от сети,
наличия открытых портов, реакции на ping-запросы и текущего уровня вирусной
активности. По этим причинам, если 3proxy используется чтобы не "выжрать"
трафик, выделенный провайдером, всегда следует делать некий запас порядка
15%.
</p>
<p>
Если на одной с 3proxy машине имеются какие-либо сервисы или
работает пользователь, то их трафик не проходит через proxy-сервер и так же
не будет учтен. Если где-то есть NAT, то клиенты, выходящие через NAT мимо
прокси, так же останутся неучтенными. Если расхождение с провайдером превышает
10% - нужно искать причину именно в этом.
</p>
<li><a name="CONFIG"><i>Q: Почему такая кривая конфигурация и ничерта не понятно?</i></a></li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, до выхода релиза (т.е. версии 1.0) я буду изо
всех сил добиваться совместимости конфигурации между версиями. Во-вторых,
конфигурация сделана так, чтобы ее можно было легко разбирать программно.
В-третьих, все там понятно. При желании. Если знать как все работает.
</p>
<li><a name="CODE"><i>Q: Почему так криво написан код?</i></a></li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, я не программист. Во-вторых, 3proxy изначально
писался на коленке (в отет на &quot;слабо&quot; в одной из конференций). Никто
не мог предположить, что им кто-то реально будет пользоваться. В-третьих, у многих
возникает желание разобраться в коде 3proxy чтобы внедрить его в какой-нибудь
троян. Очень не хочется облегчать эту задачу. В-четвертых, мне надо добиться
компиляции кода в как можно большем числе систем. Замечено, что чем кривее код в
C, тем он лучше переносится.
</p>
<li><a name="UNSAFE"><i>Q: Почему так много strcpy, sprintf и т.д., это ж дыры!</i></a><li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, несмотря на дурной тон использования этих
функций, они наиболее совместимы между разными системами и компиляторами.
Во-вторых, само по себе их использование не означает присутствие дыры, если их
параметры должным образом контролируются. Найдете дыру - обязательно сообщите.
В третьих, может быть я уберу их перед конечным релизом, чтобы никого не
пугать.
</p>
</ul>
<pre>
$Id: faqr.html,v 1.28 2007/09/25 09:47:13 vlad Exp $
</pre>
+835
View File
@@ -0,0 +1,835 @@
<ul>
<li>3APA3A 3proxy tiny proxy server HowTo
<br>Under construction, very incomplete
<ul>
<li><A HREF="#COMPILE">Compilation</A>
<ul>
<li><A HREF="#MSVC">How to compile 3proxy with Visual C++</A>
<li><A HREF="#INTL">How to compile 3proxy with Intel C Compiler under Windows</A>
<li><A HREF="#GCCWIN">How to compile 3proxy with GCC under Windows</A>
<li><A HREF="#GCCUNIX">How to compile 3proxy with GCC under Unix/Linux</A>
<li><A HREF="#CCCUNIX">How to compile 3proxy with Compaq C Compiler under Unix/Linux</A>
</ul>
<li><A HREF="#INSTALL">Proxy server installation and removal</A>
<ul>
<li><A HREF="#INSTNT">How to install/remove 3proxy under Windows NT/2000/XP</A>
<li><A HREF="#INST95">How to install/remove 3proxy under Windows 95/98/ME</A>
<li><A HREF="#INSTUNIX">How to install/remove 3proxy under Unix/Linux</A>
</ul>
<li><A HREF="#SERVER">Server configuration</A>
<ul>
<li><A HREF="#SAMPLE">Where to find configuration example</A>
<li><A HREF="#LOGGING">How to set up logging</A>
<li><A HREF="#LOGFORMAT">How to setup logging format</A>
<li><A HREF="#LOGANALIZERS">How to use log analizers with 3proxy</A>
<li><A HREF="#LAUNCH">How to start any of proxy services (HTTP, SOCKS etc)</A>
<li><A HREF="#BIND">How to bind service to specific interface and port?</A>
<li><A HREF="#AUTH">How to limit service access</A>
<li><A HREF="#USERS">How to create user list</A>
<li><A HREF="#ACL">How to limit user access to resources</A>
<li><A HREF="#REDIR">How to manage redirections</A>
<li><A HREF="#ROUNDROBIN">How to balance traffic between few external channgels?</A>
<li><A HREF="#CHAIN">How to manage proxy chains</A>
<li><A HREF="#BANDLIM">How to limit bandwidth</A>
<li><A HREF="#TRAFLIM">How to limit traffic amount</A>
<li><A HREF="#NETLIST">How to build network lists</A>
</ul>
<li><A HREF="#CLIENT">Client configuration</A>
<li><A HREF="#ADMIN">Administering and information analisys</A>
<ul>
<li><A HREF="#NEWVERSION">How to obtain latest 3proxy version</A>
<li><A HREF="#NTSERVICE">How to control 3proxy service under Windows NT/2000/XP</A>
<li><A HREF="#ERRORS">Log error codes reference</A>
</ul>
<li><A HREF="#QUEST">How To ask quiestion not in How To?</A>
</ul>
<br>
<ul>
<hr>
<li><A NAME="COMPILE">Compilation</A>
<p>
<ul>
<li><A NAME="MSVC">How to compile 3proxy with Visual C++</A>
<p>
Extract source code files from 3proxy.tgz (with WinZip or another utility).
Use nmake /f Makefile.msvc command
</p>
<li><A NAME="INTL">How to compile 3proxy with Intel C Compiler under Windows</A>
<p>
See <A HREF="#MSVC">How to compile 3proxy with Visual C++</A>
Use Makefile.intl instead of Makefile.msvc
</p>
<li><A NAME="GCCWIN">How to compile 3proxy with GCC under Windows</A></li>
<p>
Extract source files from 3proxy.tgz (for example with tar -xzf 3proxy.tgz command if you have tar installed)
Use make -f Makefile.win command.
If you want to use POSIX emulation Cygwin library (normally you shouldn't) - use make -f Makefile.unix instead.
Windows specific things (like installing as service) will not be available if compiled with Cygwin emulation.
</p>
<li><A NAME="GCCUNIX">How to compile 3proxy with GCC under Unix/Linux</A></li>
<p>
Use
<pre>
make -f Makefile.Linux
</pre>
for Linux or Cygwin, Makefile.Solaris* (depending on compiler version) for Solaris
and Makefile.unix for different Unix-like OS. On BSD derivered systems make
sure to use GNU make, sometimes it's called gmake instead of make.
<br>Compilation is tested under FreeBSD/i386, NetBSD/i386, OpenBSD/i386,
RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC, Solaris/x86 but you
shouldn't have problems under different Solaris, BSD or linux compatible systems.
For different systems you may be required to patch Makefile or even source codes.
If you want to use ODBC support, make sure to install ODBC for unix, remove -DNOODBC
option from makefile compiler options and add ODBC library to linker variable.
</p>
</ul>
<hr>
<li><A NAME="CCCUNIX">How to compile 3proxy with Compaq C Compiler under Unix/Linux</A></li>
<p>
See <A HREF="#GCCUNIX">How to compile 3proxy with GCC under Unix/Linux</A>, use Makefile.ccc instead of Makefile.unix.
</p>
</ul>
<hr>
<li><A NAME="INSTALL">Proxy server installation and removal</A>
<p>
<ul>
<li><A NAME="INSTNT">How to install/remove 3proxy under Windows NT/2000/XP</A>
<p>
Unpack 3proxy.zip to any directory, for example
c:\Program Files\3proxy. If needed, create directory for storing log files,
ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See <A HREF="#SERVER">Server configuration</A>).
If you use 3proxy before 0.6 Add
<pre>
service
</pre>
string into 3proxy.cfg. Now, start command prompt (cmd.exe).
Change directory to 3proxy installation and run 3proxy.exe --install:
<pre>
D:\>C:
C:\>cd C:\Program Files\3proxy
C:\Program Files\3proxy>3proxy.exe --install
</pre>
Now, you should have 3proxy service installed and running. If service is not
started, remove "service" string from 3proxy.cfg, run 3proxy.exe manually
and correct all errors.
</p><p>
To remove 3proxy run 3proxy --remove:
<pre>
D:\>C:
C:\>cd C:\Program Files\3proxy
C:\Program Files\3proxy>net stop 3proxy
C:\Program Files\3proxy>3proxy.exe --remove
</pre>
Now you can simply remove 3proxy installation directory.
</p>
<li><A NAME="INST95">How to install/remove 3proxy under Windows 95/98/ME</A>
<p>
Unpack 3proxy.zip to any directory, for example
c:\Program Files\3proxy. If needed, create directory for storing log files,
ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See <A HREF="#SERVER">Server configuration</A>).
Remove string
<pre>
service
</pre>
from 3proxy.cfg and add
<pre>
daemon
</pre>
if you want 3proxy to run in background.
Create shortcut for 3proxy.exe and place it in autostart or add
to registry with regedit.exe:
<br>HKLM\Software\Microsoft\Windows\CurrentVersion\Run</br>
Type: String
<br>3proxy = "c:\Program Files\3proxy.exe" "C:\Program Files\3proxy.cfg"<br>
You must use quotes if path contains space. If neccessary, restart Windows.
If service is not started, check log. Remove "daemon" command from 3proxy.cfg,
start 3proxy.exe manually and correct all errors.
</p>
<li><A NAME="INSTUNIX">How to install/remove 3proxy under Unix/Linux</A>
<p>
Complie 3proxy (see <A HREF="#COMPILE">Compilation</A>). Copy
executables to any appropriate location (for example /usr/local/3proxy/sbin
for servers and /usr/local/3proxy/bin for utilities).
Create /usr/local/etc/3proxy.cfg.
(see <A HREF="#SERVER">Server configuration</A>).
You can change default configuration file location by specifing configuration file
in 3proxy command line.
Add 3proxy to system startup scripts.
</p>
</ul>
<hr>
<li><A NAME="SERVER">Server configuration</A>
<p>
<ul>
<li><A NAME="SAMPLE">Where to find configuration example</A>
<p>
Server configuration example 3proxy.cfg.sample is in any 3proxy distribution.
</p>
<li><A NAME="LOGGING">How to set up logging</A>
<p>
3proxy can log to stdout, file, ODBC datasource and
syslog (Unix/Linux/Cygwin only). For using ODBC under Unix/Linux you must
compile 3proxy with Unix ODBC libraries, see <A HREF="#COMPILE">Compilation</A>.
You can control logging from 3proxy.cfg for all services or you can control
logging of individual service, for example
/usr/local/sbin/socks -l/var/log/socks.log starts SOCKS proxy with logging to file.
For universal proxy (3proxy) log file rotation and archiving is supported.
Log type is defined with "log" configuration file command or with
-l switch on individual service invokation. log or -l is stdout logging.
<pre>
log filename
</pre>
and
<pre>
-lfilename
</pre>
specify filename for logging
<pre>
log @ident
</pre>
and
<pre>
-l@ident
</pre>
specify ident for syslog logging. If filename within "log" command contains
'%' characters, it's processes as format specificator (see "logformat"). E.g.
log c:\3proxy\logs\%y%m%d.log D creates file like c:\3proxy\logs\060729.log,
date is generated based on local time.
<pre>
log &connstring
</pre>
specifies ODBC connection string, connstring is in format
datasource,username,password (2 last are optional of
datasource does not require or already has authentication information).
Also, you must specify logformat to build SQL query, to insert recod into
log, see <A HREF="#LOGFORMAT">How to setup logging format</A>
</p>
<p>
Rotation and archiving may be set up with log, rotate ¨ archiver commands
<pre>
log filename LOGTYPE
</pre>
sets rotation type. LOGTYPE may be:
<ul>
<li>M, monthely
<li>W, weekly
<li>D, daily
<li>H, hourly
<li>‘, minutely
</ul>
<pre>
rotate NUMBER
</pre>
specifies number of files in rotation (that is how many files to keep).
<pre>
archiver EXT COMMAND PARAMETERS
</pre>
Sets external archiver. EXT is extention of archived files
(for example zip, gz, Z, rar etc) COMMAND and PARAMETERS are command
to execute and command line PARAMETERS. Originale file is not deleted by
3proxy, this work is left for archiver.
You can pass original filename to archiver with %F macro and archive filename with %A.
Examples are located in
3proxy.cfg.sample
</p>
<li><A NAME="LOGFORMAT">How to setup logging format</A>
<p>
Since 0.3 version log format may be set with "logformat" command.
First symbol of log format specifies format of date and time and
should be L (LOCAL) or G (GMT - Grinwitch Meridian Time). Format
string may contains some macro substitutions:
<ul>
<li> %y - Year (2 digits)
<li> %Y - Year (4 digits)
<li> %m - Month (2 digits)
<li> %o - mOnth (3 letter abbriviation)
<li> %d - Day (2 digits)
<li> %H - Hour (2 digits)
<li> %M - Minute (2 digits)
<li> %S - Second (2 digits)
<li> %t - Timestamp (seconds since January, 1 1970 00:00:00 GMT)
<li> %. - Milliseconds
<li> %z - Timezone in mail format (from GMT, '+' east, '-' west HHMM), For example Moscow winter time is +0300.
<li> %U - Username ('-' if unknown).
<li> %N - Service name (PROXY, SOCKS, POP3P, etc)
<li> %p - Service port
<li> %E - Error code (see. <A HREF="#ERRORS">Log error codes reference</A>)
<li> %C - client IP
<li> %c - client port
<li> %R - target IP
<li> %r - target port
<li> %e - external IP address used to establish connection
<li> %Q - requested IP
<li> %q - requested port
<li> %I - bytes received from target
<li> %O - bytes sent to target
<li> %n - host name from request
<li> %h - hops before target (if redirection or chaning is used).
see <A HREF="#CHAIN">How to use chains and parent proxies</A>)
<li> %T - service specific text (for example URL requested). %X-YT
where X and Y are positive numbers, only displays fields
(space delimited) X to Y of the text. An example is %1-2T.
</ul>
Example:
<pre>
logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
</pre>
generates something like
<p><font face="courier">
1042454727.0296 SOCK4.1080 000 3APA3A 127.0.0.1:4739 195.122.226.28:4739 505 18735 1 GET http://3proxy.ru/ HTTP/1.1
</font>
<br>(no line breaks)
</p>
<p>
If ODBC used, logformat should specify SQL command,
to insert record into log, for example
<p><font face="courier">
logformat "GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"
</font>
<br>(no line breaks)
</p>
<li><A NAME="LOGANALIZERS">How to use log analizers with 3proxy</A>
<p>
Just make format of 3proxy logs compatible with format supported by your
favourite log analizer. Examples of compatible logformats are:
<br>
For Squid access.log:
<p><font face="courier">
&quot;- +_G%t.%. %D %C TCP_MISS/200 %I %1-1T %2-2T %U DIRECT/%R application/unknown&quot;
</p>
or, more compatible format without %D
<pre>
&quot;- +_G%t.%. 1 %C TCP_MISS/200 %I %1-1T %2-2T %U
DIRECT/%R application/unknown&quot;
</pre>
ISA 2000 proxy WEBEXTD.LOG (fields are TAB-delimited):
<pre>
&quot;- + L%C %U Unknown Y %Y-%m-%d %H:%M:%S
w3proxy 3PROXY - %n %R %r %D
%O %I http TCP %1-1T %2-2T - -
%E - - -&quot;
</pre>
ISA 2004 proxy WEB.w3c (fields are TAB-delimited):
<pre>
&quot;- + L%C %U Unknown %Y-%m-%d %H:%M:%S
3PROXY - %n %R %r %D %O
%I http %1-1T %2-2T - %E -
- Internal External 0x0 Allowed&quot;
</pre>
ISA 2000/2004 firewall FWSEXTD.log (fields are TAB-delimited):
<pre>
&quot;- + L%C %U unnknown:0:0.0 N %Y-%m-%d
%H:%M:%S fwsrv 3PROXY - %n %R %r
%D %O %I %r TCP Connect - -
- %E - - - - -&quot;
</pre>
HTTPD standard log (Apache and others):
<p><font face="courier">
&quot;-&quot;&quot;+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] &quot;&quot;%T&quot;&quot; %E %I&quot;
</p>
or more compatible without error code
<p><font face="courier">
&quot;-&quot;&quot;+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] &quot;&quot;%T&quot;&quot; 200 %I&quot;
</p>
<li><A NAME="LAUNCH">How to start any of proxy services (HTTP, SOCKS etc)</A>
<p>
3proxy is distributed in 2 variants: as a set of standalone modules (proxy,
socks, pop3p, tcppm, udppm) and as universal proxy server. These services are
absolutely independant, and if you use 3proxy you needn't any of standalone
modules.
<br>Standalone modules are only configurable via command line interface while
3proxy uses configuration file. Many functions, such as ODBC logging, log
rotation, access control, etc are only available in 3proxy, not in standalone
proxies.
Standalone module may be started from command line, for example:
<pre>
$/sbin/socks -l/var/log/socks.log -i127.0.0.1
</pre>
Starts SOCKS server binded to localhost ip, port 1080 with logging to
/var/log/socks.log.
You can get help for any standalone service with -? command line option.
</p><p>
If 3proxy is used you should start all services in 3proxy.cfg file. 3proxy.cfg
is executed by 3proxy as a batch file. Example of 3proxy.cfg and command syntaxys
can be found in
3proxy.cfg.sample.
<pre>
log /var/log/3proxy.log D
rotate 30
internal 127.0.0.1
external 192.168.1.1
proxy
socks -p3129
pop3p
</pre>
Starts 3 services: HTTP PROXY, SOCKS and POP3 PROXY. Each listens localhost
interface with default port (3128 for HTTP, 1080 for SOCKS and 110 for POP3P)
except socks started with port 3129.
All logs are in file /var/log/3proxy.log (with daily date modification and
rotation). 30 last files are stored.
</p>
<li><A NAME="BIND">How to bind service to specific interface and port?</A>
<p>
-i options specifies internal interface, -p - listening port. No space are
allowed. To bind 'proxy' service to port 8080 on interfaces 192.168.1.1
and 192.168.2.1 use
<pre>
proxy -p8080 -i192.168.1.1
proxy -p8080 -i192.168.2.1
</pre>
</p>
<li><A NAME="AUTH">How to limit service access</A>
<p>
First, always specify internal interface to accept incoming connection with
'internal' configuration command or '-i' service command. (See
<A HREF="#LAUNCH">How to start any of proxy services (HTTP, SOCKS etc)</A>). If
no internal interface is specified your proxy will act as open one.
<p>It's also important to specify external interface to prevent access to
internal network with 'external' or -e.
<p>3proxy with configuration files allows to use authentication and
authorization for user's access. Authentication is possible by
username/password or user's NetBIOS name. Authentication type is specified by
'auth' command.
<pre>
auth none
</pre>
Disables both authentication and authorization. You can not use ACLs.
<pre>
auth iponly
</pre>
Specifies no authentication, ACLs authorization is used.
<pre>
auth nbname
</pre>
Authentication by NetBIOS name + ACLs. NetBIOS name of 'messenger' service
is obrained before ACL validation. If no name is obtained it's assumed to be
empty. Messenger is started by default in Windows NT/2000/XP. For Win9x
WinPopUP need to be launched. This type of authentication may be spoofed
by privileged local user.
<pre>
auth strong
</pre>
Authentication by username/password. If user is not registered his
access is denied regardless of ACLs.
<p>
Different services can have different authentication levels.
<pre>
auth none
pop3p
auth iponly
proxy
auth strong
socks
</pre>
It's possible to authorize access by client IP address, IP address or requested resource,
target port, time, etc after authentication.
(See <A HREF="#ACL">How to limit resource access</A>).
</p><p>Since 0.6 version double authentication is possible, e.g.
<pre>
auth iponly strong
allow * * 192.168.0.0/16
allow user1,user2
proxy
</pre>
strong authentication will only be used if ACL requires username to deside if
access must be granted. That is, in example, strong username authentication
is not required to access 192.168.0.0/16
</p><p>0.6 version introduces authentication (username) caching to increase
productivity. It's recommended to use authentication caching with resource
or time consuming authentication types, such as nbname or external plugins
(WindowsAuthentication).
Caching can be set with 'authcache' command with 2 parameters: caching type
and caching time (in seconds). Caching type defines the type of cached access:
'ip' - after successful authentication all connections during caching time
from same IP are assigned to the same user, username is not requested.
"ip,user" - username is requested and all connections from the same IP are
assigned to the same user without actual authentication. "user" - same as above,
but IP is not checked. "user,password" - username and password are checked
against cached ones. For authentication special authentication type 'cache'
must be used.
Example:
<pre>
authcache ip 60
auth cache strong windows
proxy -n
</pre>
</p>
Please note, that caching affects security. Never use caching for access to
critical resources, such as web administration.
<li><A NAME="USERS">How to create user list</A>
<p>
Userslist is created with 'users' command.
<pre>
users USERDESC ...
</pre>
With a single command it's possible to define few users, or you
can use few 'users' commands. USERDESC is user description. Description
consists of three semicolon delimited parts - login, password type and
<pre>
users admin:CL:bigsecret test:CL:password test1:CL:password1
users "test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49."
users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
</pre>
Please note the usage of quotation sign: it's required to comment out $ sign
overwise used as a file inclusion macro.
Next password types are available:
<ul>
<li>No password type: use system authentication.
<li>CL - cleartext password
<li>CR - crypt password, only MD5 crypt passwords are supported
<li>NT - NT-hashed (MD4) passwords in hex, as used in pwdump or SAMBA
</ul>
NT and crypt passwords can be used to import accounts from Windows/SAMBA or
Unix. For Windows you can use pwdump family of utilities.
It's convenient to store accounts apart and include account file with $ macro.
Because for included files newlines are treated as a space, it's possible to
use atandard passwd file format:
<pre>
users $/etc/.3proxypasswd
</pre>
or
<pre>
users $"c:\Program Files\3proxy\passwords"
</pre>
It's possible to create NT and crypt passwords with mycrypt utility included
in distribution.
<br>Userlist is system-wide. To manage user access to specific service use ACLs.
</p>
<li><A NAME="ACL">How to limit user access to resources</A>
<p>
Commands allow, deny and flush are used to manage ACLs:
<p><font face="courier">
allow &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt; &lt;weekdaylist&gt; &lt;timeperiodlist&gt;
<br>deny &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;weekdaylist&gt; &lt;timeperiodlist&gt;
<br>flush
</font>
</p>
'flush' command is used to finish with existing ACL and to start new one.
It's required to have different ACLs for different services.
'allow' is used to allow connection and 'deny' to deny connection. 'allow'
command can be extended by 'parent' command to manage redirections (see <A NAME="REDIR">How to manage redirections</A>)). If ACL
is empty it allow everything. If ACL is not empty, first matching ACL entry
is searched for user request and ACL action (allow or deny) performed. If
no matching record found, connection is denied and user will be asked to
re-authenticate (requested for username/password). To prevent this request
add 'deny *' to the end of list.
<ul>
<li>&lt;userlist&gt; - comma delimited list of users
<li>&lt;sourcelist&gt; - comma delimited list of source (client) networks.
Networks can be defined as single IP address or in CIDR form
xxx.yyy.zzz.mmm/l, where l - is the length of network mask
(a number of non-zero bits). 192.168.1.0/24
means network with 255.255.255.0 mask.
<li>&lt;targetlist&gt; - comma delimited list of target (server) networks.
In 3proxy 0.6 and above it's allowed to use hostnames with wildmasks
in targetlist. Wildmask may only present in the begginning or at the
end of the hostname, e.g.
192.168.0.0/16,www.example.com,*wrongsite.com,*wrongcontent*.
<li>&lt;targetportlist&gt; - comma delimited list of ports. I
It's possible to define port ranges with -, e.g. 80,1024-65535
means port 80 and all unprivileged ports.
<li>&lt;commandlist&gt; - the list of allowed actions
<br> CONNECT - establish outgoing TCP connection. e.g. POP3 or SOCKSv5
<br> BIND - allow incoming TCP connection (SOCKSv5)
<br> UDPASSOC - create UDP association (SOCKSv5)
<br> ICMPASSOC - create ICMP association (not implemented)
<br> HTTP_GET - HTTP GET request (HTTP proxy)
<br> HTTP_PUT - HTTP PUT request (HTTP proxy)
<br> HTTP_POST - HTTP POST request (HTTP proxy)
<br> HTTP_HEAD - HTTP HEAD request (HTTP proxy)
<br> HTTP_CONNECT - HTTP CONNECT, aka HTTPS request (HTTP proxy)
<br> HTTP_OTHER - another HTTP request (HTTP proxy)
<br> HTTP - any HTTP request except HTTP_CONNECT (HTTP proxy)
<br> HTTPS - alias to HTTP_CONNECT (HTTP proxy)
<br> FTP_GET - FTP get request (http, ftp proxy)
<br> FTP_PUT - FTP put request (ftp proxy)
<br> FTP_LIST - FTP list request (http, ftp proxy)
<br> FTP - any FTP request
<br> ADMIN - administration interface access
<p>
<li>&lt;weeksdays&gt; - week days numbers or periods (0 or 7 means Sunday, 1 is Monday, 1-5 means Monday through Friday).
<li>&lt;timeperiodlists&gt; - a list of time periods in HH:MM:SS-HH:MM:SS format. For example,
00:00:00-08:00:00,17:00:00-24:00:00 lists non-working hours.
</ul>
* in ACL means &quot;any&quot;.
Usage examples could be found in 3proxy.cfg.sample.
</p>
<li><A NAME="REDIR">How to manage redirections</A>
<p>
Redirections are usefull to e.g. forward requests from specific clients
to different servers or proxy server. Additionally, redirections are usefull
to convert proxy interface from ont format to another, e.g. requests from
SOCKS proxy can be redirected to parent HTTP proxy, or SOCKSv5 client can be
redirected to SOCKSv4 proxy.
<br>Because 3proxy understand "transparent" web request, it can be used as an
intermediate software between HTTP proxy and NAT server for transparent HTTP
forwarding, because it can convert "Web server" request issued by client to
"proxy request" required by proxy server. A simplest redirection is:
<pre>
auth iponly
allow *
parent 1000 http 192.168.1.1 3128
proxy
</pre>
All trafiic of HTTP proxy is redirected to parent proxy 192.168.1.1 port 3128.
<br>If port number is '0', IP address from 'parent' is used as external address
for this connection (that is like -eIP, but only for connections matching
'allow').
<br>Special case of redirection are local redirections. In this case both IP is
0.0.0.0 and port is 0. It's only usseful with SOCKS service. In this case no
new connection is established, but request is parsed by corresponding local
service. E.g.:
<pre>
auth iponly
allow * * * 80
parent 1000 http 0.0.0.0 0
allow * * * 21
parent 1000 ftp 0.0.0.0 0
allow * * * 110
parent 1000 pop3 0.0.0.0 0
socks
</pre>
In this case all SOCKS traffic with destination port 80 is forwarded to local
'proxy' service, destination port 21 to 'ftppr' and 110 to 'pop3pr'. There is
no need to run these services expicitly. Local redirections are usefull if
you want to see and control via ACLs protocol specific parameters, e.g.
filenames requests thorugh FTP while clients are using SOCKS.
</p>
<li><A NAME="ROUNDROBIN">How to balance traffic between few external channgels?</A>
<p>
Proxy itself doesn't manage network level routing. The only way to control
outgoing channel is to select external interface. It's possible to make
external interface (what is usually selected with 'external' command or
'-e' option) random by using local redirection with external port 0.
<pre>
auth iponly
allow *
parent 500 http 10.1.1.101 0
parent 500 http 10.2.1.102 0
</pre>
Now external interface is randomly selected with 0.5 probability between
10.1.1.101 and 10.2.1.102. To work as expected, different default routes
must between 2 interfaces.
used
<p>
If both interface addresses are in same network, e.g. 10.1.1.101 and 10.1.1.102
and you want to select random gateway between 10.1.1.1 and 10.1.1.2, you must
control it by using routing table, in case there is no default gateway route
for Windows:
<pre>
route add -p 10.1.1.1 10.1.1.101
route add -p 10.1.1.2 10.1.1.102
route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1
route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.2
</pre>
If you have no second address yet, just add it. Under Linux/Unix it's better
to use source routing.
</p>
<li><A NAME="CHAIN">How to manage proxy chains</A>
<p>
parent command may also be used to build a proxy chains. In this case
few 'parent' commands are used for single 'allow' rule with different
weights (first argument of parent command). Chain may contain any number
of proxy servers, but it should be noted that every hope significantly
reduces productivity. It's possible to mix different types of proxy within
single chain: HTTPS (HTTP connect), SOCKS4, SOCKS5. Weight different from
1000 is used to build random chains. if weight W is below 1000, this proxy
will be used as a next chain hop with probability of W/1000. That is, if
the weight is 250 probability this proxy will be used for the next hope is
25%. 'parent' records with common weight of 1000 establish a group, one of
these record will be used for the hop with probability according to weight.
Warning: each group must have a weight even of 1000. As follows, common
weight of all 'parent' records must also be even of 1000. If common weight
of 'parent' records in te chain is 3000, chain has 3 hops and must be formed
of 3 groups. Example:
<pre>
allow *
parent 500 socks5 192.168.1.1 1080
parent 500 connect 192.168.10.1 3128
</pre>
In this case we have 1 parent proxy (1 hop) which is randomely choosen between
2 hosts: 192.168.1.1 and 192.168.10.1. 2 records form a single group.
<pre>
allow * * * 80
parent 1000 socks5 192.168.10.1 1080
parent 1000 connect 192.168.20.1 3128
parent 300 socks4 192.168.30.1 1080
parent 700 socks5 192.168.40.1 1080
</pre>
In this case we have 3 groups (3 hops in the chain). First hop is 192.168.10.1,
second hop is 192.168.20.1 and 3rd one is either 192.168.30.1 with probability
of 30% or 192.168.40.1 with probability of 70%.
</p>
<li><A NAME="BANDLIM">How to limit bandwidth</A>
<p>
3proxy supports bandwidth filters. To manage filters bandlimin/bandlimout and
nobandlimin/nobandlimout. 'in' means incoming and 'out' - outgoing traffic.
<p><font face="courier">
bandlimin &lt;bitrate&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
<br>nobandlimin &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
</font>
</p>
Commands are applied to all services. Imagine bandwidth filters as a series of
pipes. Bitrate is a pipe's width and ACLs controls the flow thorugh this pipe.
<pre>
bandlimin 57600 * 192.168.10.16
bandlimin 57600 * 192.168.10.17
bandlimin 57600 * 192.168.10.18
bandlimin 57600 * 192.168.10.19
</pre>
Create 4 separete pipes for 4 client with emulation of modem connection.
<pre>
bandlimin 57600 * 192.168.10.16/30
</pre>
Create single pipe for all 4 clients. That is 4 clients share modem connection.
In this example:
<pre>
nobandlimin * * * 110
bandlimin 57600 * 192.168.10.16/32
</pre>
mail traffic from POP3 servers bypasses the pipe and has no bandwidth
limitation.
</p>
<li><A NAME="TRAFLIM">How to limit traffic amount</A>
<p>
<p><font face="courier">
counter &lt;filename&gt; &lt;type&gt; &lt;reportpath&gt;
<br>countin &lt;number&gt; &lt;type&gt; &lt;amount&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
<br>nocountin &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
<br>countout &lt;number&gt; &lt;type&gt; &lt;amount&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
<br>nocountout &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;commandlist&gt;
</font>
</p>
<p>
You can set traffic limit per day (D), week (W), month (M), year (Y) or
absolute ('N'), as specified by 'type' argument of counterin command.
Traffic information is stored in binary file specified by 'filename' argument.
countersutil utility can be used to manage this file.
reportpath specifies location of text reports, type parameter of 'counter'
command controls how often text reports are created. amount is amount of
allowed traffic in Megabytes (MB). nocountin allows you to set exclusions.
</p>
<li><A NAME="NETLIST">How to build network lists</A>
<p>Networks or users lists are often very huge. 3proxy doesn't currently
supports user groups, but ones can be created by the means of include files.
You can store comma-delimited lists of networks or users in the separate
file and use $ macro to insert this list into 3proxy.cfg.
3proxy comes with 'dighosts'
utility. This utility helps to grab the list of the network from HTTP page.
It may be usefull to e.g. obtain a regullary updated list of local networks
from ISP's server. A network list can be either in form of NETWORK MASK,
e.g. 192.168.1.0 255.255.255.0 or NETWORK/LENGTH, e.g. 192.168.1.0/24. You can
launch dighosts from 3proxy.cfg to be executed on every 3proxy startup or
configuration reload:
<pre>
system "dighosts http://provider/network.html local.networks"
allow * * $local.networks
allow *
parent 1000 proxy.provider 3128 *
proxy
flush
</pre>
In this example we obtain list of local networks from provider's page to
local.networks file, allow direct access to these networks and redirect all
connection to external networks to provider's proxy.
</p>
</ul>
<hr>
<li><A NAME="CLIENT">Client configuration</A>
<p>
<hr>
<li><A NAME="ADMIN">Administering and information analisys</A>
<p>
<ul>
<li><A NAME="NEWVERSION">How to obtain latest 3proxy version</A>
<p>
Latest version of 3proxy may be obtained
<A HREF="http://3proxy.ru/">here</A>.
New version may have changes and incompatibilities with previous one in files
format or commands. Please, read CHANGELOG file and another documentation
before installing new version.
</p>
<li><A NAME="NTSERVICE">How to control 3proxy service under Windows NT/2000/XP</A>
<p>
If installed as system service, 3proxy understands Windows service commands
for START, STOP, PAUSE and RESUME. If service is PAUSEd, no new connections
are accepted while older connections are processed. Currently there is no
support for dynamic configuration change, so, you have to restart service
completely if you have changed any configuration.
You can control 3proxy service via "Services" administration ot via "net" command:
<pre>
net start 3proxy
net stop 3proxy
net pause 3proxy
net continue 3proxy
</pre>
</p>
<li><A NAME="ERRORS">Log error codes reference</A>
<p>
<ul>
<li>0 - Operation successfully complited (connection
was closed by one of peers)
<li>1-9 - AUTHENTICATION ERRORS
<li>1 - Access denied by ACL (deny)
<li>2 - Redirection (should not appear)
<li>3 - No ACL found, denied by default
<li>4 - auth=strong and no username in request
<li>5 - auth=strong and no matching username in configuration
<li>6 - User found, wrong password (cleartext)
<li>7 - User found, wrong password (crypt)
<li>8 - User found, wrong password (NT)
<li>9 - Redirection data not found (should not appear)
<li>10 - Traffic limit exceeded
<li>11-19 - CONNECTION ERRORS
<li>11 - failed to create socket()
<li>12 - failed to bind()
<li>13 - failed to connect()
<li>14 - failed to getpeername()
<li>20-29 - COMMON ERRORS
<li>21 - memory allocation failed
<li>30-39 - CONNECT PROXY REDIRECTION ERRORS
<li>31 - failed to request HTTP CONNECT proxy
<li>32 - CONNECT proxy connection timed out or wrong reply
<li>33 - CONNECT proxy fails to establish connection
<li>34 - CONNECT proxy timed out or closed connection
<li>40-49 - SOCKS4 PROXY REDIRECTION ERRORS
<li>50-69 - SOCKS5 PROXY REDIRECTION ERRORS
<li>70-79 PARENT PROXY CONNECTION ERRORS (identical to 1x)
<li>90-99 - established connection errors
<li>90 - socket error or connection broken
<li>91 - TCP/IP common failure
<li>92 - connection timed out
<li>93 - error on reading data from server
<li>94 - error on reading data from client
<li>95 - timeout from bandlimin/bandlimout limitations
<li>96 - error on sending data to client
<li>97 - error on sending data to server
<li>98 - server data limit (should not appear)
<li>99 - client data limit (should not appear)
<li>100 - HOST NOT FOUND
<li>200-299 - UDP portmapper specific bugs
<li>300-399 - TCP portmapper specific bugs
<li>400-499 - SOCKS proxy specific bugs
<li>500-599 - HTTP proxy specific bugs
<li>600-699 - POP3 proxy specific bugs
<li>999 - NOT IMPLEMENTED
</ul>
</p>
</ul>
<hr>
<li><A NAME="QUEST">How To ask quiestion not in How To?</A>
<p>
Ask it in <A HREF="http://3proxy.ru/board4.html">3proxy forum</A>.
Don't try to ask something before reading this document.
</ul>
</ul>
<pre>$Id: howtoe.html,v 1.41 2009/02/02 10:04:49 vlad Exp $</pre>
+1031
View File
File diff suppressed because it is too large. Load diff
+18
View File
@@ -0,0 +1,18 @@
<html><title>3proxy documentation</title><body><h2>3proxy documentation</h2>
<a href="securityen.html">Security recommendations</a><br>
<a href="howtoe.html">How To (English, very incomplete)</a><br>
<a href="howtor.html">How To (Russian, Windows1251)</a><br>
<a href="faqe.html">FAQ (English)</a><br>
<a href="faqr.html">FAQ (Russian, Windows1251)</a>
<h3>Man pages:</h>
<br><A HREF="man8/3proxy.8.html">3proxy.8</A>
<br><A HREF="man8/ftppr.8.html">ftppr.8</A>
<br><A HREF="man8/icqpr.8.html">icqpr.8</A>
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
<br><A HREF="man8/proxy.8.html">proxy.8</A>
<br><A HREF="man8/smtpp.8.html">smtpp.8</A>
<br><A HREF="man8/socks.8.html">socks.8</A>
<br><A HREF="man8/tcppm.8.html">tcppm.8</A>
<br><A HREF="man8/udppm.8.html">udppm.8</A>
<br><A HREF="man3/3proxy.cfg.3.html">3proxy.cfg.3</A>
</body></html>
File diff suppressed because it is too large. Load diff
+268
View File
@@ -0,0 +1,268 @@
<HTML><HEAD><TITLE>Manpage of 3proxy</TITLE>
</HEAD><BODY>
<H1>3proxy</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>3proxy</B>
- 3[APA3A] tiny proxy server, or trivial proxy server, or free proxy
server
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>3proxy</B>
[<I>config_file</I>]
<BR>
<B>3proxy</B>
[<I>--install</I>]
<BR>
<B>3proxy</B>
[<I>--remove</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>3proxy</B>
is universal proxy server. It can be used to provide internal users wuth
fully controllable access to external resources or to provide external
users with access to internal resources. 3proxy is not developed to replace
<B><A HREF="../man8/squid.8.html">squid</A></B>(8),
but it can extend functionality of existing cashing proxy.
It can be used to route requests between different types of clients and proxy
servers. Think about it as application level
gateway with configuration like hardware router has for network layer.
It can establish multiple
gateways with HTTP and HTTPS proxy with FTP over HTTP support, SOCKS v4,
v4.5 and v5, POP3 proxy, UDP and TCP portmappers. Each gateway is started
from configuration file like independant service
<B><A HREF="../man8/proxy.8.html">proxy</A></B>(8)
<B><A HREF="../man8/socks.8.html">socks</A></B>(8)
<B><A HREF="../man8/pop3p.8.html">pop3p</A></B>(8)
<B><A HREF="../man8/tcppm.8.html">tcppm</A></B>(8)
<B><A HREF="../man8/udppm.8.html">udppm</A></B>(8)
<B><A HREF="../man8/ftppr.8.html">ftppr</A></B>(8)
<B>dnspr</B>
but
<B>3proxy</B>
is not a kind of wrapper or superserver for this daemons. It just has same
code compiled in, but provides much more functionality. SOCKSv5
implementatation allows to use 3proxy with any UDP or TCP based client
applications designed without
proxy support (with
<I>SocksCAP</I>,
<I>FreeCAP</I>
or another client-side redirector under Windows of with socksification library
under Unix). So you can play your favourite games, listen music, exchange
files and messages and even accept incoming connections behind proxy server.
<P>
<I>dnspr</I>
does not exist as independant service. It' DNS caching proxy (it requires
<I>nscache</I>
and
<I>nserver</I>
to be set in configuration. Only A-records are cached. Please note, the
this caching is mostly a 'hack' and has nothing to do with real
DNS server, but it works perfectly for SOHO networks.
<P>
<P>
3proxy supports access control lists (ACL) like network router. Source
and destination networks and destination port can be specified. In addition,
usernames and gateway action (for example GET or POST) can be used in ACLs.
In order to filter request on username basis user must be authenticated somehow. There are few
authentication types including password authentication and authentication by
NetBIOS name for Windows clients (it's very like ident authentication).
Depending on ACL action request can be allowed, denied or redirected to another
host or to another proxy server or even to a chain of proxy servers.
<P>
It supports different types of logging: to logfiles,
<B><A HREF="../man3/syslog.3.html">syslog</A></B>(3)
(only under Unix) or to ODBC database. Logging format is turnable to provide
compatibility with existing log file parsers. It makes it possible to use
3proxy with IIS, ISA, Apache or Squid log parsers.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>config_file</B>
<DD>
Name of config file. See
<B><A HREF="../man3/3proxy.cfg.3.html">3proxy.cfg</A></B>(3)
for configuration file format. Under Windows, if config_file is not specified,
<B>3proxy</B>
looks for file named
<I>3proxy.cfg</I>
in the default location (in same directory with executable file and in current
directory). Under Unix, if no config file is specified, 3proxy reads
configuration from stdin. It makes it possible to use 3proxy.cfg file as
executable script just by setting +x mode and adding
<BR>
#!/usr/local/3proxy/3proxy
<BR>
as a first line in 3proxy.cfg
<DT><B>--install</B>
<DD>
(Windows NT family only) install
<B>3proxy</B>
as a system service
<DT><B>--remove</B>
<DD>
(Windows NT family only) remove
<B>3proxy</B>
from system services
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SIGNALS</H2>
Under Unix there are few signals
<B>3proxy</B>
catches. See
<B><A HREF="../man1/kill.1.html">kill</A></B>(1).
<DL COMPACT>
<DT><B>SIGTERM</B>
<DD>
cleanup connections and exit
<DT><B>SIGPAUSE</B>
<DD>
stop to accept new connections, on second signal - start and re-read
configuration
<DT><B>SIGCONT</B>
<DD>
start to accept new conenctions
<DT><B>SIGUSR1</B>
<DD>
reload configuration
</DL>
<P>
Under Windows, if
<B>3proxy</B>
is installed as service you can standard service management to start, stop,
pause and continue 3proxy service, for example:
<BR>
<B>net start 3proxy</B>
<BR>
<B>net stop 3proxy</B>
<BR>
<B>net pause 3proxy</B>
<BR>
<B>net continue 3proxy</B>
<P>
Web admin service can also be used to reload configuration. Use
wget to automate this task.
<A NAME="lbAG">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT><I>/usr/local/3proxy/3proxy.cfg (3proxy.cfg)</I>
<DD>
<B>3proxy</B>
configuration file
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man3/3proxy.cfg.3.html">3proxy.cfg</A>(3), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8),
<A HREF="../man1/kill.1.html">kill</A>(1), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAJ">&nbsp;</A>
<H2>TRIVIA</H2>
3APA3A is pronounced as ``zaraza''.
<A NAME="lbAK">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">SIGNALS</A><DD>
<DT><A HREF="#lbAG">FILES</A><DD>
<DT><A HREF="#lbAH">BUGS</A><DD>
<DT><A HREF="#lbAI">SEE ALSO</A><DD>
<DT><A HREF="#lbAJ">TRIVIA</A><DD>
<DT><A HREF="#lbAK">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:55 GMT, April 07, 2014
</BODY>
</HTML>
+693
View File
@@ -0,0 +1,693 @@
<HTML><HEAD><TITLE>Manpage of 3proxy.conf</TITLE>
</HEAD><BODY>
<H1>3proxy.conf</H1>
Section: Universal proxy server␍ (5)<BR>Updated: December 2004<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>3proxy.conf</B>
- 3proxy configuration file
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
Common structure:
Configuration file is a text file 3proxy reads configuration from. Each line
of the file is command and is executed immediately, as it was given from
console. Each line of the file is treated as a blank (space or tab) separated
command line. Additional space characters are ignored.
Think about 3proxy as &quot;application level router&quot; with console interface.
Comments:
Any string beginning with space character or '#' character is comment. It's
ignored. &lt;LF&gt;s are ignored. &lt;CR&gt; is end of command.
Quotation:
Quotation character is spaces or another special characters. To use quotation character inside
quotation character must be dubbed (BASIC convention). For example to use
HELLO Good practice is to quote any argument you use.
File inclusion:
You can include file by using $FILENAME macro (replace FILENAME with a path
to file, for example $/usr/local/etc/3proxy/conf.incl or
<BR>&nbsp;$&quot;c:\Program&nbsp;Files\3proxy\include.cfg&quot;&nbsp;Quotation&nbsp;is
required in last example because path contains space character.
For included file &lt;CR&gt; (end of line characters) is treated as space character
(arguments delimiter instead of end of command delimiter).
Thus, include files are only useful to store long signle-line commands
(like userlist, network lists, etc).
To use dollar sign somewhere in argument it must be quoted.
Recursion is not allowed.
Commands:
<B>proxy</B>
[options]
<BR>
<B>socks</B>
[options]
<BR>
<B>pop3p</B>
[options]
<BR>
<B>ftppr</B>
[options]
<BR>
<B>admin</B>
[options]
<BR>
<B>dnspr</B>
[options]
<BR>
<B>tcppm</B>
[options]
&lt;SRCPORT&gt; &lt;DSTADDR&gt; &lt;DSTPORT&gt;
<BR>
<B>udppm</B>
[options]
&lt;SRCPORT&gt; &lt;DSTADDR&gt; &lt;DSTPORT&gt;
starts gateway services
<B>proxy</B>
- HTTP/HTTPS proxy (default port 3128)
<BR>
<B>socks</B>
- SOCKS 4/4.5/5 proxy (default port 1080)
<BR>
<B>pop3p</B>
- POP3 proxy (default port 110)
<BR>
<B>ftppr</B>
- FTP proxy (default port 21)
<BR>
<B>admin</B>
- Web interface (default port 80)
<BR>
<B>dnspr</B>
- caching DNS proxy (default port 53)
<BR>
<B>tcppm</B>
- TCP portmapper
<BR>
<B>udppm</B>
- UDP portmapper
Options:
<BR>
<B>-pNUMBER</B>
change default server port to NUMBER
<BR>
<B>-n</B>
disable NTLM authentication (required if passwords are stored in Unix crypt format.
<BR>
Also, all options mentioned for
<B><A HREF="../man8/proxy.8.html">proxy</A></B>(8)
<B><A HREF="../man8/socks.8.html">socks</A></B>(8)
<B><A HREF="../man8/pop3p.8.html">pop3p</A></B>(8)
<B><A HREF="../man8/tcppm.8.html">tcppm</A></B>(8)
<B><A HREF="../man8/udppm.8.html">udppm</A></B>(8)
<B><A HREF="../man8/ftppr.8.html">ftppr</A></B>(8)
are also supported.
Portmapping services listen at SRCPORT and connect to DSTADDR:DSTPORT
HTTP and SOCKS proxies are standard.
POP3 proxy must be configured as POP3 server and requires username in the form of:
<A HREF="mailto:pop3username@pop3server">pop3username@pop3server</A>. If POP3 proxy access must be authenticated, you can
specify username as proxy_username:proxy_password:<A HREF="mailto:POP3_username@pop3server">POP3_username@pop3server</A>
DNS proxy is only capable to resolve hostnames (no MX, PTR, SRV, etc) and
requires nserver/nscache to be configured.
FTP proxy can be used as FTP server in any FTP client or configured as FTP
proxy on a client with FTP proxy support. Username format is one of
<BR>&nbsp;<A HREF="mailto:FTPuser@FTPServer">FTPuser@FTPServer</A>
<BR>&nbsp;FTPuser:<A HREF="mailto:FTPpassword@FTPserver">FTPpassword@FTPserver</A>
<BR>&nbsp;proxyuser:proxypassword:FTPuser:<A HREF="mailto:FTPpassword@FTPserver">FTPpassword@FTPserver</A>
<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<TT>&nbsp;</TT><BR>
<B>config</B>
&lt;path&gt;
<BR>
Path to configuration file to use on 3proxy restart or to save configuration.
<B>writable</B>
<BR>
ReOpens configuration file for write access via Web interface,
and re-reads it. Usually should be first command on config file
but in combination with &quot;config&quot; it can be used anywhere to open
alternate config file. Think twice before using it.
<B>end</B>
<BR>
End of configuration
<B>log</B>
[[@|&amp;]logfile] [&lt;LOGTYPE&gt;]
<BR>
sets logfile for all gateways
<BR>&nbsp;@&nbsp;-&nbsp;(for&nbsp;Unix)&nbsp;use&nbsp;syslog,&nbsp;filename&nbsp;is&nbsp;used&nbsp;as&nbsp;ident&nbsp;name
<BR>&nbsp;&amp;&nbsp;-&nbsp;use&nbsp;ODBC,&nbsp;filename&nbsp;consists&nbsp;of&nbsp;comma-delimited&nbsp;datasource,username,password&nbsp;(username&nbsp;and&nbsp;password&nbsp;are&nbsp;optional)
<BR>&nbsp;LOGTYPE&nbsp;is&nbsp;one&nbsp;of:
<BR>&nbsp;&nbsp;M&nbsp;-&nbsp;Monthly
<BR>&nbsp;&nbsp;W&nbsp;-&nbsp;Weekly&nbsp;(starting&nbsp;from&nbsp;Sunday)
<BR>&nbsp;&nbsp;D&nbsp;-&nbsp;Daily
<BR>&nbsp;&nbsp;H&nbsp;-&nbsp;Hourly
if logfile is not specified logging goes to stdout. You can specify individual logging options for gateway by using
-l option in gateway configuration.
<B>rotate</B>
&lt;n&gt;
how many archived log files to keep
<B>logformat</B>
&lt;format&gt;
Format for log record. First symbol in format must be L (local time)
or G (absolute Grinwitch time).
It can be preceeded with -XXX+Y where XXX is list of characters to be
filtered in user input (any non-printable characters are filtered too
in this case) and Y is replacement character. For example, &quot;-,%+ L&quot; in
the beginning of logformat means comma and percent are replaced
with space and all time based elemnts are in local time zone.
You can use:
<BR>&nbsp;%y&nbsp;-&nbsp;Year&nbsp;in&nbsp;2&nbsp;digit&nbsp;format
<BR>&nbsp;%Y&nbsp;-&nbsp;Year&nbsp;in&nbsp;4&nbsp;digit&nbsp;format
<BR>&nbsp;%m&nbsp;-&nbsp;Month&nbsp;number
<BR>&nbsp;%o&nbsp;-&nbsp;Month&nbsp;abbriviature
<BR>&nbsp;%d&nbsp;-&nbsp;Day
<BR>&nbsp;%H&nbsp;-&nbsp;Hour
<BR>&nbsp;%M&nbsp;-&nbsp;Minute
<BR>&nbsp;%S&nbsp;-&nbsp;Second
<BR>&nbsp;%t&nbsp;-&nbsp;Timstamp&nbsp;(in&nbsp;seconds&nbsp;since&nbsp;01-Jan-1970)
<BR>&nbsp;%.&nbsp;-&nbsp;milliseconds
<BR>&nbsp;%z&nbsp;-&nbsp;timeZone&nbsp;(from&nbsp;Grinvitch)
<BR>&nbsp;%D&nbsp;-&nbsp;request&nbsp;duration&nbsp;(in&nbsp;milliseconds)
<BR>&nbsp;%b&nbsp;-&nbsp;average&nbsp;send&nbsp;rate&nbsp;per&nbsp;request&nbsp;(in&nbsp;Bytes&nbsp;per&nbsp;second)&nbsp;this&nbsp;speed&nbsp;is&nbsp;typically&nbsp;below&nbsp;connection&nbsp;speed&nbsp;shown&nbsp;by&nbsp;download&nbsp;manager.
<BR>&nbsp;%B&nbsp;-&nbsp;average&nbsp;receive&nbsp;rate&nbsp;per&nbsp;request&nbsp;(in&nbsp;Bytes&nbsp;per&nbsp;second)&nbsp;this&nbsp;speed&nbsp;is&nbsp;typically&nbsp;below&nbsp;connection&nbsp;speed&nbsp;shown&nbsp;by&nbsp;download&nbsp;manager.
<BR>&nbsp;%U&nbsp;-&nbsp;Username
<BR>&nbsp;%N&nbsp;-&nbsp;service&nbsp;Name
<BR>&nbsp;%p&nbsp;-&nbsp;service&nbsp;Port
<BR>&nbsp;%E&nbsp;-&nbsp;Error&nbsp;code
<BR>&nbsp;%C&nbsp;-&nbsp;Client&nbsp;IP
<BR>&nbsp;%c&nbsp;-&nbsp;Client&nbsp;port
<BR>&nbsp;%R&nbsp;-&nbsp;Remote&nbsp;IP
<BR>&nbsp;%r&nbsp;-&nbsp;Remote&nbsp;port
<BR>&nbsp;%n&nbsp;-&nbsp;requested&nbsp;hostname
<BR>&nbsp;%I&nbsp;-&nbsp;bytes&nbsp;In
<BR>&nbsp;%O&nbsp;-&nbsp;bytes&nbsp;Out
<BR>&nbsp;%h&nbsp;-&nbsp;Hops&nbsp;(redirections)&nbsp;count
<BR>&nbsp;%T&nbsp;-&nbsp;service&nbsp;specific&nbsp;Text
<BR>&nbsp;%N1-N2T&nbsp;-&nbsp;(N1&nbsp;and&nbsp;N2&nbsp;are&nbsp;positive&nbsp;numbers)&nbsp;-&nbsp;log&nbsp;only&nbsp;fields&nbsp;from&nbsp;N1&nbsp;thorugh&nbsp;N2&nbsp;of&nbsp;service&nbsp;specific&nbsp;text
in case of ODBC logging logformat specifies SQL statement, for exmample:
<BR>&nbsp;&nbsp;&nbsp;logformat&nbsp;&quot;-'+_Linsert&nbsp;into&nbsp;log&nbsp;(l_date,&nbsp;l_user,&nbsp;l_service,&nbsp;l_in,&nbsp;l_out,&nbsp;l_descr)&nbsp;values&nbsp;('%d-%m-%Y&nbsp;%H:%M:%S',&nbsp;'%U',&nbsp;'%N',&nbsp;%I,&nbsp;%O,&nbsp;'%T')&quot;
<B>archiver</B>
&lt;ext&gt; &lt;commandline&gt;
<BR>
Archiver to use for log files. &lt;ext&gt; is file extension produced by
archiver. Filename will be last argument to archiver, optionally you
can use %A as produced archive name and %F as filename.
<B>timeouts</B>
&lt;BYTE_SHORT&gt; &lt;BYTE_LONG&gt; &lt;STRING_SHORT&gt; &lt;STRING_LONG&gt; &lt;CONNECTION_SHORT&gt; &lt;CONNECTION_LONG&gt; &lt;DNS&gt; &lt;CHAIN&gt;
Sets timeout values
<BR>&nbsp;BYTE_SHORT&nbsp;-&nbsp;short&nbsp;timeout&nbsp;for&nbsp;single&nbsp;byte,&nbsp;is&nbsp;usually&nbsp;used&nbsp;for&nbsp;receiving&nbsp;single&nbsp;byte&nbsp;from&nbsp;stream.
<BR>&nbsp;BYTE_LONG&nbsp;-&nbsp;long&nbsp;timeout&nbsp;for&nbsp;single&nbsp;byte,&nbsp;is&nbsp;usually&nbsp;used&nbsp;for&nbsp;receiving&nbsp;first&nbsp;byte&nbsp;in&nbsp;frame&nbsp;(for&nbsp;example&nbsp;first&nbsp;byte&nbsp;in&nbsp;socks&nbsp;request).
<BR>&nbsp;STRING_SHORT&nbsp;-&nbsp;short&nbsp;timeout,&nbsp;for&nbsp;character&nbsp;string&nbsp;within&nbsp;stream&nbsp;(for&nbsp;example&nbsp;to&nbsp;wait&nbsp;between&nbsp;2&nbsp;HTTP&nbsp;headers)
<BR>&nbsp;STRING_LONG&nbsp;-&nbsp;long&nbsp;timeout,&nbsp;for&nbsp;first&nbsp;string&nbsp;in&nbsp;stream&nbsp;(for&nbsp;example&nbsp;to&nbsp;wait&nbsp;for&nbsp;HTTP&nbsp;request).
<BR>&nbsp;CONNECTION_SHORT&nbsp;-&nbsp;inactivity&nbsp;timeout&nbsp;for&nbsp;short&nbsp;connections&nbsp;(HTTP,&nbsp;POP3,&nbsp;etc).
<BR>&nbsp;CONNECTION_LONG&nbsp;-&nbsp;inactivity&nbsp;timeout&nbsp;for&nbsp;long&nbsp;connection&nbsp;(SOCKS,&nbsp;portmappers,&nbsp;etc).
<BR>&nbsp;DNS&nbsp;-&nbsp;timeout&nbsp;for&nbsp;DNS&nbsp;request&nbsp;before&nbsp;requesting&nbsp;next&nbsp;server
<BR>&nbsp;CHAIN&nbsp;-&nbsp;timeout&nbsp;for&nbsp;reading&nbsp;data&nbsp;from&nbsp;chained&nbsp;connection
<B>nserver</B>
<BR>&nbsp;&lt;ipaddr&gt;
<BR>
Nameserver to use for name resolutions. If none spcified system
or name server fails system routines for name resolution will be
used. It's better to specify nserver because gethostbyname() may
be thread unsafe.
<B>nscache</B>
&lt;cachesize&gt;
<BR>
Cache &lt;cachesize&gt; records for name resolution. Cachesize usually
should be large enougth (for example 65536).
<B>nsrecord</B>
&lt;hostname&gt; &lt;hostaddr&gt;
<B></B>
Adds static record to nscache. nscache must be enabled. If 0.0.0.0
is used as a hostaddr host will never resolve, it can be used to
blacklist something or together with
<B>dialer</B>
command to set up UDL for dialing.
<B>dialer</B>
&lt;progname&gt;
<BR>
Execute progname if external name can't be resolved.
Hint: if you use nscache, dialer may not work, because names will
be resolved through cache. In this case you can use something like
<A HREF="http://dial.right.now/">http://dial.right.now/</A> from browser to set up connection.
<B>internal</B>
&lt;ipaddr&gt;
<BR>
sets ip address of internal interface. This IP address will be used
to bind gateways. Alternatively you can use -i option for individual
gateways
<B>external</B>
&lt;ipaddr&gt;
<BR>
sets ip address of external interface. This IP address will be source
address for all connections made by proxy. Alternatively you can use
-e option to specify individual address for gateway.
<BR>&nbsp;&nbsp;&nbsp;
<B>maxconn</B>
&lt;number&gt;
<BR>
sets maximum number of simulationeous connections to each services
started after this command. Default is 100.
<B>service</B>
<BR>
(depricated) Should be specified to launch as Windows 95/98/NT/2000/XP service,
no effect for Unix. Is not reqired since 0.6, but you must re-install 3proxy
service with --remove and --install.
<B>daemon</B>
<BR>
Should be specified to close console (not required for 'service').
At least under FreeBSD 'daemon' should preceed any proxy service
and log commands to avoid sockets problem. Always place it in the beginning
of the configuration file.
<B>auth</B>
<BR>
Type of user authorization. Currently supported:
<BR>&nbsp;none&nbsp;-&nbsp;no&nbsp;authorization&nbsp;required.&nbsp;Note:&nbsp;is&nbsp;auth&nbsp;is&nbsp;none&nbsp;any&nbsp;ip&nbsp;based&nbsp;limitation,&nbsp;redirection,&nbsp;etc&nbsp;will&nbsp;not&nbsp;work.&nbsp;
<BR>&nbsp;iponly&nbsp;-&nbsp;authorization&nbsp;by&nbsp;source/destination&nbsp;IP&nbsp;and&nbsp;ports.&nbsp;Appropriate&nbsp;for&nbsp;most&nbsp;cases
<BR>&nbsp;nbname&nbsp;-&nbsp;iponly&nbsp;+&nbsp;authorization&nbsp;by&nbsp;NetBIOS&nbsp;name.&nbsp;Messanger
service should be started on user's machine. Note, that
Windows 95/98 hosts do not have messanger service by default,
WinPopup program need to be started.
NB: there is no any password check, name may be spoofed.
Think about it as about ident for Windows.
<BR>&nbsp;Q:&nbsp;Will&nbsp;ident&nbsp;authorization&nbsp;be&nbsp;implemented?
<BR>&nbsp;A:&nbsp;Yes,&nbsp;as&nbsp;soon&nbsp;as&nbsp;it&nbsp;will&nbsp;be&nbsp;required&nbsp;by&nbsp;someone.
<BR>&nbsp;strong&nbsp;-&nbsp;username/password&nbsp;authentication&nbsp;required.&nbsp;It&nbsp;will&nbsp;work&nbsp;with&nbsp;SOCKSv5,&nbsp;FTP,&nbsp;POP3&nbsp;and&nbsp;HTTP&nbsp;proxy.
<B>allow</B>
&lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
&lt;weekdayslist&gt; &lt;timeperiodslist&gt;
<BR>
<B>deny</B>
&lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
&lt;weekdayslist&gt; &lt;timeperiodslist&gt;
<BR>
Access control entries. All lists are comma-separated, no spaces are
allowed. Usernames are case sensitive (if used with authtype nbname
username must be in uppercase). Source and target lists may contain
IP addresses (W.X.Y.Z) or CIDRs (W.X.Y.Z/L). Targetportlist may
contain ports (X) or port lists (X-Y).<TT>&nbsp;&nbsp;</TT>For any field * sign means &quot;ANY&quot;<BR>
If access list is empty it's assumed to be
<BR>&nbsp;allow&nbsp;*
If access list is not empty last item in access list is assumed to be
<BR>&nbsp;deny&nbsp;*
You may want explicitly add &quot;deny *&quot; into the end of access list to prevent
HTTP proxy from requesting user's password.
Access lists are checked after user have requested any resource.
If you want 3proxy to reject connections from specific addresses
immediately without any conditions you should either bind proxy
to appropriate interface only or to use ip filters.
Operation is one of:
<BR>&nbsp;CONNECT<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>-&nbsp;establish&nbsp;outgoing&nbsp;TCP&nbsp;connection<BR>
<BR>&nbsp;BIND&nbsp;-&nbsp;bind&nbsp;TCP&nbsp;port&nbsp;for&nbsp;listening
<BR>&nbsp;UDPASSOC&nbsp;-&nbsp;make&nbsp;UDP&nbsp;association
<BR>&nbsp;ICMPASSOC&nbsp;-&nbsp;make&nbsp;ICMP&nbsp;association&nbsp;(for&nbsp;future&nbsp;use)
<BR>&nbsp;HTTP_GET&nbsp;-&nbsp;HTTP&nbsp;GET&nbsp;request
<BR>&nbsp;HTTP_PUT&nbsp;-&nbsp;HTTP&nbsp;PUT&nbsp;request
<BR>&nbsp;HTTP_POST&nbsp;-&nbsp;HTTP&nbsp;POST&nbsp;request
<BR>&nbsp;HTTP_HEAD&nbsp;-&nbsp;HTTP&nbsp;HEAD&nbsp;request
<BR>&nbsp;HTTP_CONNECT&nbsp;-&nbsp;HTTP&nbsp;CONNECT&nbsp;request
<BR>&nbsp;HTTP_OTHER&nbsp;-&nbsp;over&nbsp;HTTP&nbsp;request
<BR>&nbsp;HTTP&nbsp;-&nbsp;matches&nbsp;any&nbsp;HTTP&nbsp;request&nbsp;except&nbsp;HTTP_CONNECT
<BR>&nbsp;HTTPS&nbsp;-&nbsp;same&nbsp;as&nbsp;HTTP_CONNECT
<BR>&nbsp;FTP_GET&nbsp;-&nbsp;FTP&nbsp;get&nbsp;request
<BR>&nbsp;FTP_PUT&nbsp;-&nbsp;FTP&nbsp;put&nbsp;request
<BR>&nbsp;FTP_LIST&nbsp;-&nbsp;FTP&nbsp;list&nbsp;request
<BR>&nbsp;FTP&nbsp;-&nbsp;matches&nbsp;any&nbsp;FTP&nbsp;request
Weeksdays are week days numbers or periods (0 or 7 means Sunday, 1 is Monday,
1-5 means Monday through Friday). Timeperiodlists is a list of time
periods in HH:MM:SS-HH:MM:SS format. For example,
<BR>&nbsp;00:00:00-08:00:00,17:00:00-24:00:00
lists non-working hours.
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><BR>
<B>parent</B>
&lt;weight&gt; &lt;type&gt; &lt;ip&gt; &lt;port&gt; &lt;username&gt; &lt;password&gt;
<BR>
this command may follow &quot;allow&quot; rule. It extends last allow rule to
build proxy chain. Proxy may be grouped. Proxy inside the
group is selected randomely. If few groups are specified one proxy
is randomely picked from each group and chain of proxies is created
(that is second proxy connected through first one and so on).
Weight is used to group proxies. Weigt is a number between 1 and 1000.
Weights are summed and proxies are grouped together untill weight of
group is 1000. That is:
<BR>&nbsp;allow&nbsp;*
<BR>&nbsp;parent&nbsp;500&nbsp;socks5&nbsp;192.168.10.1&nbsp;1080
<BR>&nbsp;parent&nbsp;500&nbsp;connect&nbsp;192.168.10.1&nbsp;3128
makes 3proxy to randomely choose between 2 proxies for all outgoing
connections
<BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80
<BR>&nbsp;parent&nbsp;1000&nbsp;socks5&nbsp;192.168.10.1&nbsp;1080
<BR>&nbsp;parent&nbsp;1000&nbsp;connect&nbsp;192.168.20.1&nbsp;3128
<BR>&nbsp;parent&nbsp;300&nbsp;socks4&nbsp;192.168.30.1&nbsp;1080
<BR>&nbsp;parent&nbsp;700&nbsp;socks5&nbsp;192.168.40.1&nbsp;1080
creates chain of 3 proxies: 192.168.10.1, 192.168.20.1 and third
is (192.168.30.1 with probability of 0.3 or 192.168.40.1
with probability of 0.7) for outgoing web connections.
type is one of:
<BR>&nbsp;tcp&nbsp;-&nbsp;simply&nbsp;redirect&nbsp;connection.&nbsp;TCP&nbsp;is&nbsp;always&nbsp;last&nbsp;in&nbsp;chain.
<BR>&nbsp;http&nbsp;-&nbsp;redirect&nbsp;to&nbsp;HTTP&nbsp;proxy.&nbsp;HTTP&nbsp;is&nbsp;always&nbsp;last&nbsp;chain.
<BR>&nbsp;pop3&nbsp;-&nbsp;redirect&nbsp;to&nbsp;POP3&nbsp;proxy&nbsp;(only&nbsp;local&nbsp;redirection&nbsp;is&nbsp;supported,&nbsp;can&nbsp;not&nbsp;be
used for chaining)
<BR>&nbsp;ftp&nbsp;-&nbsp;redirect&nbsp;to&nbsp;FTP&nbsp;proxy&nbsp;(only&nbsp;local&nbsp;redirection&nbsp;is&nbsp;supported,&nbsp;can&nbsp;not&nbsp;be
used for chaining)
<BR>&nbsp;connect&nbsp;-&nbsp;parent&nbsp;is&nbsp;HTTP&nbsp;CONNECT&nbsp;method&nbsp;proxy
<BR>&nbsp;socks4&nbsp;-&nbsp;parent&nbsp;is&nbsp;SOCKSv4&nbsp;proxy
<BR>&nbsp;socks5&nbsp;-&nbsp;parent&nbsp;is&nbsp;SOCKSv5&nbsp;proxy
IP and port are ip addres and port of parent proxy server.
If IP is zero, ip is taken from original request, only port is changed.
If port is zero, it's taken from original request, only IP is changed.
If both IP and port are zero - it's a special case of local redirection,
it works only with
socks
proxy. In case of local redirection request is redirected to different service,
<B>ftppr</B>
<B>pop3p</B>
<B>proxy .</B>
Main purpose of local redirections is to have requested resource
(URL or POP3 username) logged and protocol-specific filters to be applied.
In case of local redirection ACLs are revied twice: first, by SOCKS proxy up to
redirected (HTTP, FTP or POP3) after 'parent' command. It means,
additional 'allow' command is required for redirected requests, for
example:
<BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80
<BR>&nbsp;parent&nbsp;1000&nbsp;http&nbsp;0.0.0.0&nbsp;0
<BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80&nbsp;HTTP_GET,HTTP_POST
<BR>&nbsp;socks
redirects all SOCKS requests with target port 80 to local HTTP proxy,
local HTTP proxy parses requests and allows only GET and POST requests.
Optional username and password are used to authenticate on parent
proxy. Username of '*' means username must be supplied by user.
<B>bandlimin</B>
&lt;rate&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
<BR>
<B>nobandlimin</B>
&lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
<BR>
bandlim sets bandwith limitation filter to &lt;rate&gt; bps (bits per second)
(if you want to specife bytes per second - multiply your value to 8).
bandlim rules act in a same manner as allow/deny rules except
one thing: bandwidth limiting is applied to all services, not to some
specific service.
bandlimin and nobandlimin applies to incoming traffic
bandlimout and nobandlimout applies to outgoing traffic
If tou want to ratelimit your clients with ip's 192.168.10.16/30 (4
addresses) to 57600 bps you have to specify 4 rules like
<BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.16
<BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.17
<BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.18
<BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.19
and every of you clients will have 56K channel.<TT>&nbsp;</TT>if you specify<BR>
<BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.16/30
you will have 56K channel shared between all clients.
if you want, for example, to limit all speed ecept access to POP3 you can use
<BR>&nbsp;nobandlimin&nbsp;*&nbsp;*&nbsp;*&nbsp;110
before the rest of bandlim rules.
<B>counter</B>
&lt;filename&gt; &lt;reporttype&gt; &lt;repotname&gt;
<BR>
<B>countin</B>
&lt;number&gt; &lt;type&gt; &lt;limit&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
<BR>
<B>nocountin</B>
&lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
<BR>
counter, countin, nocountin commands are used to set traffic limit
in MB for period of time (day, week or month). Filename is a path
to a special file where traffic information is permanently stored.
number is sequential number of record in this file. If number is 0
no traffic information on this counter is saved in file (that is
if proxy restarted all information is loosed) overwise it should be
unique sequential number.
Type specifies a type of counter. Type is one of:
<BR>&nbsp;D&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;daily
<BR>&nbsp;W&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;weekly
<BR>&nbsp;M&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;monthely
reporttype/repotname may be used to generate traffic reports.
Reporttype is one of D,W,M,H(hourly) and repotname specifies filename
template for reports. Report is text file with counter values in
format:
<BR>&nbsp;&lt;COUNTERNUMBER&gt;&nbsp;&lt;TRAF*4GB&gt;&nbsp;&lt;TRAF&gt;
The rest of parameters is identical to bandlim/nobandlim.
<B>users</B>
username[:pwtype:password] ...
<BR>
pwtype is one of:
<BR>&nbsp;none&nbsp;(empty)&nbsp;-&nbsp;use&nbsp;system&nbsp;authentication
<BR>&nbsp;CL&nbsp;-&nbsp;password&nbsp;is&nbsp;cleartext
<BR>&nbsp;CR&nbsp;-&nbsp;password&nbsp;is&nbsp;crypt-style&nbsp;password
<BR>&nbsp;NT&nbsp;-&nbsp;password&nbsp;is&nbsp;NT&nbsp;password&nbsp;(in&nbsp;hex)
example:
<BR>&nbsp;users&nbsp;test1:CL:password1&nbsp;&quot;test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49.&quot;
<BR>&nbsp;users&nbsp;test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
<BR>
(note: double quotes are requiered because password contains $ sign).<TT>&nbsp;&nbsp;</TT><BR>
<B>flush</B>
<BR>
empty active access list. Access list must be flushed avery time you creating
new access list for new service. For example:
<BR>&nbsp;allow&nbsp;*
<BR>&nbsp;pop3p
<BR>&nbsp;flush
<BR>&nbsp;allow&nbsp;*&nbsp;192.168.1.0/24
<BR>&nbsp;socks
sets different ACLs for
<B>pop3p</B>
and
<B>socks</B>
<B>system</B>
<BR>
execute system command
<B>pidfile</B>
&lt;filename&gt;
<BR>
write pid of current process to file. It can be used to manipulate
3proxy with signals under Unix. Currently next signals are available:
<B>setuid</B>
&lt;uid&gt;
<BR>
calls setuid(uid), uid must be numeric. Unix only.
<B>setgid</B>
&lt;gid&gt;
<BR>
calls setgid(gid), gid must be numeric. Unix only.
<B>chroot</B>
&lt;path&gt;
<BR>
calls chroot(path). Unix only.
<A NAME="lbAD">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAE">&nbsp;</A>
<H2>TRIVIA</H2>
3APA3A is pronounced as ``zaraza''.
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT><A HREF="#lbAD">SEE ALSO</A><DD>
<DT><A HREF="#lbAE">TRIVIA</A><DD>
<DT><A HREF="#lbAF">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: GMT, December 11, 2004
</BODY>
</HTML>
+160
View File
@@ -0,0 +1,160 @@
<HTML><HEAD><TITLE>Manpage of ftppr</TITLE>
</HEAD><BODY>
<H1>ftppr</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>ftppr</B>
- FTP proxy gateway service
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>ftppr </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-p</B><I>port</I>]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I></I>[<B>-h</B><I>default_ip[:port]</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>ftppr</B>
is FTP gateway service to allow internal users to access external FTP
servers.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-u</B>
<DD>
Never look for username authentication.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-h</B>
<DD>
Default destination. It's used if targed address is not specified by user.
<DT><B>-p</B>
<DD>
Port. Port proxy listens for incoming connections. Default is 21.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CLIENTS</H2>
You can use any FTP client, regardless of FTP proxy support. For client with
FTP proxy support configure
<I>internal_ip</I>
and
<I>port</I>
in FTP proxy parameters.
For clients without FTP proxy support use
<I>internal_ip</I>
and
<I>port</I>
as FTP server. Address of real FTP server must be configured as a part of
FTP username. Format for username is
<I>username</I><B>@</B><I>server</I>,
where
<I>server</I>
is address of FTP server and
<I>username</I>
is user's login on this FTP server. Login itself may contain '@' sign.
Only cleartext authentication is currently supported.
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">CLIENTS</A><DD>
<DT><A HREF="#lbAG">BUGS</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
<DT><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+155
View File
@@ -0,0 +1,155 @@
<HTML><HEAD><TITLE>Manpage of icqpr</TITLE>
</HEAD><BODY>
<H1>icqpr</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>icqpr</B>
- ICQ (AOL OSCAR) proxy
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>icqpr </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I>local_port remote_host remote_port</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>icqpr</B>
forwards ICQ connections from local to remote ICQ host. Most usual is
<B>icqpr 5190 login.icq.com 5190</B>
Also, icqpr adds UIN / AOL screen name as a username. It makes it possible
to control user's access to ICQ/AOL by UIN/screen name (use
<B>auth useronly</B>
in 3proxy).
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>ARGUMENTS</H2>
<DL COMPACT>
<DT><I>local_port</I>
<DD>
- port icqpr accepts connection
<DT><I>remote_host</I>
<DD>
- IP address of the host connection is forwarded to
<DT><I>remote_port</I>
<DD>
- remote port connection is forwarded to
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>CLIENTS</H2>
You can use any ICQ/AOL client where server address configuration is supported
or spoof login server name (e.g. login.icq.com) with IP address of proxy server
via DNS record or hosts file. Transparent redirection is also possible. Use
<I>internal_ip</I>
and
<I>local_port</I>
as a destination in client application. Connection is forwarded to
<I>remote_host</I>:<I>remote_port</I>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">ARGUMENTS</A><DD>
<DT><A HREF="#lbAG">CLIENTS</A><DD>
<DT><A HREF="#lbAH">BUGS</A><DD>
<DT><A HREF="#lbAI">SEE ALSO</A><DD>
<DT><A HREF="#lbAJ">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+154
View File
@@ -0,0 +1,154 @@
<HTML><HEAD><TITLE>Manpage of pop3p</TITLE>
</HEAD><BODY>
<H1>pop3p</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>pop3p</B>
- POP3 proxy gateway service
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pop3p </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-p</B><I>port</I>]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I></I>[<B>-h</B><I>default_ip[:port]</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>pop3p</B>
is POP3 gateway service to allow internal users to access external POP3
servers.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-u</B>
<DD>
Never look for username authentication.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-p</B>
<DD>
Port. Port proxy listens for incoming connections. Default is 110.
<DT><B>-h</B>
<DD>
Default destination. It's used if targed address is not specified by user.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CLIENTS</H2>
You can use any MUA (Mail User Agent) with POP3 support. Set client to use
<I>internal_ip</I>
and
<I>port</I>
as a POP3 server. Address of real POP3 server must be configured as a part of
POP3 username. Format for username is
<I>username</I><B>@</B><I>server</I>,
where
<I>server</I>
is address of POP3 server and
<I>username</I>
is user's login on this POP3 server. Login itself may contain '@' sign.
Only cleartext authentication is supported, because challenge-response
authentication (APOP, CRAM-MD5, etc) requires challenge from server before
we know which server to connect.
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">CLIENTS</A><DD>
<DT><A HREF="#lbAG">BUGS</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
<DT><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+147
View File
@@ -0,0 +1,147 @@
<HTML><HEAD><TITLE>Manpage of proxy</TITLE>
</HEAD><BODY>
<H1>proxy</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>proxy</B>
- HTTP proxy gateway service
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>proxy </B>[<B>-d</B>][<B>-a</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-p</B><I>port</I>]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>proxy</B>
is HTTP gateway service with HTTPS and FTP over HTTPS support.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-u</B>
<DD>
Never ask for username authentication
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-a</B>
<DD>
Anonymous. Hide information about client.
<DT><B>-a1</B>
<DD>
Anonymous. Show fake information about client.
<DT><B>-p</B>
<DD>
Port. Port proxy listens for incoming connections. Default is 3128.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CLIENTS</H2>
You should use client with HTTP proxy support or configure router to redirect
HTTP traffic to proxy (transparent proxy). Configure client to connect to
<I>internal_ip</I>
and
<I>port</I>.
HTTPS support allows to use almost any TCP based protocol. If you need to
limit clients, use
<B><A HREF="../man8/3proxy.8.html">3proxy</A></B>(8)
instead.
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">CLIENTS</A><DD>
<DT><A HREF="#lbAG">BUGS</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
<DT><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+155
View File
@@ -0,0 +1,155 @@
<HTML><HEAD><TITLE>Manpage of smtpp</TITLE>
</HEAD><BODY>
<H1>smtpp</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>smtpp</B>
- SMTP proxy gateway service
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>smtpp </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-p</B><I>port</I>]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I></I>[<B>-h</B><I>default_ip[:port]</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>smtpp</B>
is SMTP gateway service to allow internal users to access external SMTP
servers.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-u</B>
<DD>
Never look for username authentication.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-p</B>
<DD>
Port. Port proxy listens for incoming connections. Default is 25.
<DT><B>-h</B>
<DD>
Default destination. It's used if targed address is not specified by user.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CLIENTS</H2>
You can use any MUA (Mail User Agent) with SMTP authentication support.
Set client to use
<I>internal_ip</I>
and
<I>port</I>
as a SMTP server. Address of real SMTP server must be configured as a part of
SMTP username. Format for username is
<I>username</I><B>@</B><I>server</I>,
where
<I>server</I>
is address of SMTP server and
<I>username</I>
is user's login on this SMTP server. Login itself may contain '@' sign.
Only cleartext authentication is supported, because challenge-response
authentication (CRAM-MD5, SPA, etc) requires challenge from server before
we know which server to connect.
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">CLIENTS</A><DD>
<DT><A HREF="#lbAG">BUGS</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
<DT><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+148
View File
@@ -0,0 +1,148 @@
<HTML><HEAD><TITLE>Manpage of socks</TITLE>
</HEAD><BODY>
<H1>socks</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>socks</B>
- SOCKS 4/4.5/5 gateway service
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>socks </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-p</B><I>port</I>]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>socks</B>
is SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to v4 for
server side name resolution) and SOCKSv5. SOCKSv5 specification allows both
outgoing and reverse TCP connections and UDP portmapping.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-u</B>
<DD>
Never ask for username authentication
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from. External IP must be specified if you need incoming connections.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-p</B>
<DD>
Port. Port proxy listens for incoming connections. Default is 1080.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CLIENTS</H2>
You should use client with SOCKS support or use some socksification support
(for example
<I>SocksCAP</I>
or
<I>FreeCAP</I>).
Configure client to use
<I>internal_ip</I>
and
<I>port</I>.
SOCKS allows to use almost any application protocol without limitation. This
implementation also allows to open priviledged port on server (if socks has
sufficient privileges). If you need to control access use
<B><A HREF="../man8/3proxy.8.html">3proxy</A></B>(8)
instead.
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/tcppm.8.html">tcppm</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">CLIENTS</A><DD>
<DT><A HREF="#lbAG">BUGS</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
<DT><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:56 GMT, April 07, 2014
</BODY>
</HTML>
+146
View File
@@ -0,0 +1,146 @@
<HTML><HEAD><TITLE>Manpage of tcppm</TITLE>
</HEAD><BODY>
<H1>tcppm</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>tcppm</B>
- TCP port mapper
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>tcppm </B>[<B>-d</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I>local_port remote_host remote_port</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>tcppm</B>
forwards connections from local to remote TCP port
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>ARGUMENTS</H2>
<DL COMPACT>
<DT><I>local_port</I>
<DD>
- port tcppm accepts connection
<DT><I>remote_host</I>
<DD>
- IP address of the host connection is forwarded to
<DT><I>remote_port</I>
<DD>
- remote port connection is forwarded to
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>CLIENTS</H2>
Any TCP based application can be used as a client. Use
<I>internal_ip</I>
and
<I>local_port</I>
as a destination in client application. Connection is forwarded to
<I>remote_host</I>:<I>remote_port</I>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">ARGUMENTS</A><DD>
<DT><A HREF="#lbAG">CLIENTS</A><DD>
<DT><A HREF="#lbAH">BUGS</A><DD>
<DT><A HREF="#lbAI">SEE ALSO</A><DD>
<DT><A HREF="#lbAJ">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:57 GMT, April 07, 2014
</BODY>
</HTML>
+153
View File
@@ -0,0 +1,153 @@
<HTML><HEAD><TITLE>Manpage of udppm</TITLE>
</HEAD><BODY>
<H1>udppm</H1>
Section: Universal proxy server (8)<BR>Updated: July 2009<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>udppm</B>
- UDP port mapper
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pop3p </B>[<B>-ds</B>]
<I></I>[<B>-l</B><I></I>[<B></B>[<I>@</I><B></B>]<I>logfile</I><B></B>]]
<I></I>[<B>-i</B><I>internal_ip</I>]
<I></I>[<B>-e</B><I>external_ip</I>]
<I>local_port remote_host remote_port</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>udppm</B>
forwards datagrams from local to remote UDP port
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-I</B>
<DD>
Inetd mode. Standalone service only.
<DT><B>-d</B>
<DD>
Daemonise. Detach service from console and run in the background.
<DT><B>-t</B>
<DD>
Be silenT. Do not log start/stop/accept error records.
<DT><B>-e</B>
<DD>
External address. IP address of interface proxy should initiate datagrams
from.
By default system will deside which address to use in accordance
with routing table.
<DT><B>-i</B>
<DD>
Internal address. IP address proxy accepts datagrams to.
By default connection to any interface is accepted. It's usually unsafe.
<DT><B>-l</B>
<DD>
Log. By default logging is to stdout. If
<I>logfile</I>
is specified logging is to file. Under Unix, if
'<I>@</I>'
preceeds
<I>logfile</I>,
syslog is used for logging.
<DT><B>-s</B>
<DD>
Single packet. By default only one client can use udppm service, but
if -s is specified only one packet will be forwarded between client and server.
It allows to share service between multiple clients for single packet services
(for example name lookups).
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>ARGUMENTS</H2>
<DL COMPACT>
<DT><I>local_port</I>
<DD>
- port udppm accepts datagrams
<DT><I>remote_host</I>
<DD>
- IP address of the host datagrams are forwarded to
<DT><I>remote_port</I>
<DD>
- remote port datagrams are forwarded to
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>CLIENTS</H2>
Any UDP based application can be used as a client. Use
<I>internal_ip</I>
and
<I>local_port</I>
as a destination in client application. All datagrams are forwarded to
<I>remote_host</I>:<I>remote_port</I>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
Report all bugs to
<B><A HREF="mailto:3proxy@security.nnov.ru">3proxy@security.nnov.ru</A></B>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="../man8/3proxy.8.html">3proxy</A>(8), <A HREF="../man8/proxy.8.html">proxy</A>(8), <A HREF="../man8/ftppr.8.html">ftppr</A>(8), <A HREF="../man8/socks.8.html">socks</A>(8), <A HREF="../man8/pop3p.8.html">pop3p</A>(8), <A HREF="../man8/udppm.8.html">udppm</A>(8), <A HREF="../man8/syslogd.8.html">syslogd</A>(8),
<BR>
<A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHORS</H2>
3proxy is designed by 3APA3A
(<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
Vladimir Dubrovin
(<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">ARGUMENTS</A><DD>
<DT><A HREF="#lbAG">CLIENTS</A><DD>
<DT><A HREF="#lbAH">BUGS</A><DD>
<DT><A HREF="#lbAI">SEE ALSO</A><DD>
<DT><A HREF="#lbAJ">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
using the manual pages.<BR>
Time: 21:23:57 GMT, April 07, 2014
</BODY>
</HTML>
+37
View File
@@ -0,0 +1,37 @@
<h3>3proxy security considirations</h3>
</ul>
<ol>
<li>Never install 3proxy suid. If you need it to run suid write some
wrapper with fixed configuration file.
<li>Make configuration file only available to account 3proxy starts with.
<li>Under Windows NT/2000/XP/2003 if 3proxy is used as service create new
unprivileged local account without "logon locally" right. Assign this account
to 3proxy service.
<li>Under unix use chroot to jail 3proxy (make sure files included in
configuration file after 'chroot' command, if any, are available from jail)
<li>Under Unix, either start 3proxy with unprivileged account or, if you need
some privileged ports to be used by 3proxy, use setgid/setuid commands inside
3proxy.cfg immediately after last occurance of service binded to
privileged port in configuration file (setgid must preceed setuid).
<li>Allways use full paths in configuration file
<li>Try to avoid 'strong' authentication, because only cleartext
authentication method is currently available.
<li>Always specify internal and external interfaces.
<li>Always limit connections to internal network and localhost (to 127.0.0.1 and
all interfaces) with ACLs. Be carefull, because BIND command in SOCKS requies
BIND method with external interface IP address to be allowed.
<li> Always use nserver and nscache under Unix, overwise DoS attack is possible
with unreachable DNS server (because gethostbyname will block over threads).
<li>Remember, that 'nbname' authentication is not reliable and can be spoofed.
<li>Keep logs in secure location, because some confidential information from
user's request can be logged.
<li>Use -xyz+A character filtering sequences for 'logformat', especially with
ODBC logging to prevent SQL and log record injections.
<li>Immediately report all service crashes to developers
<li>Participate in code audit :)
</ol>
</ol>
<p>
<pre>$Id: securityen.html,v 1.4 2007/05/07 09:16:51 vlad Exp $</pre>
File diff suppressed because it is too large. Load diff
+99
View File
@@ -0,0 +1,99 @@
KOI8-R
Kirill Lopuchov, lopuchov at mail ru
<3proxy>
Довольно часто перед системным администратором встает задача предоставить доступ к Internet-ресурсам группе пользователей (небольшой офис, Internet-кафе). Данную задачу можно решить, настроив на Internet-шлюзе proxy-сервер, службу NAT (трансляция сетевых адресов) или раздать каждому пользователю реальный IP адрес.
Давайте рассмотрим самый простой способ подключения - установку proxy-сервера. Традиционно для этих целей применяется популярный proxy Squid, но не всегда бывает необходимость в столь тяжеловатой программе :), да и в squid отсутствуют такие иногда необходимые вещи как SOCKS4/5-сервер, TCP/UP порт-маппинг. Поэтому вторым номером хочется представить вашему вниманию PROXY-сервер, под названием "3proxy" (http://3proxy.ru/), разработанный нашим программистом из г. Нижний Новгород. Одним из главных его достоинств является компактность и высокая переносимость. Код сервера написан так, что легко компилируется как для Win9x/2000/XP так и для Linux и FreeBSD.
Сервер поддерживает следующие возможности:
HTTP(S) proxy;
FTP over HTTP proxy;
SOCKS4/5 proxy;
POP3 proxy;
TCP & UDP маппинг портов;
листы доступа к различным службам и адресам;
ограничение пропускной способности канала каждого пользователя (чтобы пользователь не съел весь канал, качая кучу файлов в несколько потоков :) );
ограничение трафика пользователя на день, неделю и месяц;
авторизацию пользователей ко всем proxy-службам по имени и паролю или по ip адресам;
ведение журналов через ODBC (по-моему, такого нет ни в одном proxy) и syslog и т. д.
К недостаткам можно отнести отсутствие кэширования информации :-|. Но в последнее время Inernet-контент становится все более динамичным (то есть не поддающийся кэшированию) и может быть для кого-то экономия в 25% трафика за счет его кэширования не будет столь критична. Для тех пользователей, кому она может оказаться критичной, автор предлагает использовать цепочку из 2-х серверов и в качестве кэша такие сервера как wwwoffle или им подобные, либо ждать появления поддержки кеша в 3proxy :)
Установка
# wget http://3proxy.ru/current/3proxy.tgz
# tar -xvzf 3proxy.tgz
# cd 3proxy
# make -f Makefile.unix
# mkdir /usr/local/3proxy
# mkdir /usr/local/3proxy/logs
# mkdir /usr/local/3proxy/stat
# cp src/3proxy /usr/local/3proxy
# touch /usr/local/3proxy/3proxy.cfg
# chown -R nobody:nogroup /usr/local/3proxy
Далее приведу небольшой пример конфигурационного файла 3proxy.cfg с
комментариями, более подробную информацию по конфигурированию можно
найти файле 3proxy.cfg.sample или в
HowTo http://3proxy.ru/howtor.asp
и FAQ http://3proxy.ru/faqr.asp
-------------3proxy.cfg-------------
# ВНИМАНИЕ !! не должны быть пробелов
# перед любыми опциями конфигурации !!
# ip-адрес DNS-сервера провайдера или локального
nserver 127.0.0.1
timeouts 1 5 30 60 180 1800 15 60
# Создаем двух пользователей vasia, petia и vova
# и назначаем им пароли 24555, 14656 и 45455 соответственно
users vasia:CL:24555
users petia:CL:14656
users vova:CL:45455
# Лог-файл со списком запросов пользователей
# будет создаваться каждый день новый
log /usr/local/3proxy/logs/3proxy.log D
logformat "%d-%m-%Y %H:%M:%S %U %C:%c %R:%r %O %I %T"
# Внешний интерфейс,
# через который будут уходить запросы от сервера
external 10.1.1.1
# ip-адрес интерфейса, на котором будут приниматься
# запросы от клиентов
internal 192.168.1.1
# Устанавливаем тип авторизации по имени и паролю
auth strong
# Разрешаем доступ к портам 80,8080-8088
allow * * * 80,8080-8088
# Расскоментировать секцию parent, если у вас есть прокси верхнего
# уровня и заменить ip, порт, имя пользователя и пароль на свои значения
# parent 1000 http 192.168.0.1 8080 username passwd
# allow *
# Запускаем службу HTTP-proxy на порту (3128) и
# (-n) c отключенной NTLM-авторизацией)
proxy -p3128 -n
# Ограничиваем толшину канала для пользователей
# vasia и petia в 20000 bps,
# а для vova 10000 bps
bandlimin 20000 vasia,petia
bandlimin 10000 vova
# Запускаем сервер от пользователя nobody
# (возможно в вашей ОС uid и gid пользователя nobody
# будут другими. Для их определения воспользуйтесь коммандой id nobody)
setgid 65534
setuid 65534
------------------------------------
После того как мы создали конфигурационный файл сервера, запускаем 3proxy командой:
/usr/local/3proxy/3proxy /usr/local/3proxy/3proxy.cfg
$Id: example1.txt,v 1.7 2007/04/20 19:58:42 vlad Exp $
+101
View File
@@ -0,0 +1,101 @@
KOI8-R
Kirill Lopuchov, lopuchov at mail ru
÷ÅÄÅÎÉÅ ÌÏÇÏ× ÓÅÒ×ÅÒÁ × SQL-ÂÁÚÅ ÉÍÅÅÔ Ó×ÏÉ ÐÒÉÅÍÕÝÅÓÔ×Á ÐÅÒÅÄ ÏÂÙÞÎÙÍÉ ÔÅËÓÔÏ×ÙÍÉ ÆÁÊÌÁÍÉ. 3proxy ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÅÄÅÎÉÅ ÌÏÇÏ× ÞÅÒÅÚ ODBC-ÍÅÎÅÄÖÅÒ × ÌÀÂÏÊ ÂÁÚÅ ÄÁÎÎÙÈ, ÉÍÅÀÝÉÈ ODBC-ÄÒÁÊ×ÅÒ. üÔÏÔ ÍÅÎÅÄÖÅÒ ÓÔÁÌ ÓÔÁÎÄÁÒÔÏÍ ÄÅ-ÆÁËÔÏ × ÓÒÅÄÅ Windows, ÞÅÇÏ, Ë ÓÏÖÁÌÅÎÉÀ, ÎÅ ÓËÁÖÅÛØ ÐÒÏ Unix. ðÏÜÔÏÍÕ ÄÁÌÅÅ ÒÁÓÓÍÏÔÒÉÍ ÎÁ ÐÒÉÍÅÒÅ FreeBSD ÎÁÓÔÒÏÊËÕ ×ÅÄÅÎÉÑ ÌÏÇÏ× × ÂÁÚÅ SQLite. üÔÁ ÂÁÚÁ ÄÁÎÎÙÈ ×ÙÂÒÁÎÁ × ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ ÐÏÔÏÍÕ, ÞÔÏ ÏÎÁ ÐÒÏÓÔÁ × ÕÓÔÁÎÏ×ËÅ É ÎÁÓÔÒÏËÅ (× ÐÒÉÎÃÉÐÅ ÎÁÓÔÒÏÊËÁ ×ÅÄÅÎÉÑ ÌÏÇÏ× × ÌÀÂÏÊ ÄÒÕÇÏÊ ÂÁÚÅ mysql ÉÌÉ postgresql ÏÔÌÉÞÁÅÔÓÑ ÔÏÌØËÏ ÎÁÓÔÒÏÊËÏÊ ÅÇÏ odbc-ÄÒÁÊ×ÅÒÁ)
õÓÔÁÎÁ×ÌÉ×ÁÅÍ SQLite
wget http://www.sqlite.org/sqlite-2.8.14.tar.gz
tar -xvzf sqlite-2.8.14.tar.gz
cd sqlite
./configure
gmake
gmake install
õÓÔÁÎÁ×ÌÉ×ÁÅÍ iODBC ÍÅÎÅÄÖÅÒ
wget http://www.iodbc.org/libiodbc-3.51.2.tar.gz
tar -xvzf libiodbc-3.51.2.tar.gz
cd libiodbc-3.51.2
./configure --disable-gui --disable-gtktest
make
make install
õÓÔÁÎÁ×ÌÉ×ÁÅÍ odbc ÄÒÁÊ×ÅÒ SQLite
wget http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.62.tar.gz
tar -xvzf sqliteodbc-0.62.tar.gz
cd sqliteodbc-0.62
./configure
åÓÌÉ Õ ×ÁÓ ÓËÒÉÐÔ configure ×ÙÄÁÌ ÏÛÉÂËÕ :
(configure: error: SQLite library too old)
ÔÏ ÅÅ ÍÏÖÎÏ ÐÏÐÒÏÂÏ×ÁÔØ ÏÂÏÊÔÉ, ×ÓÔÁ×É× (SQLITE_COMPILE=1
× ÓÔÒ. 5092 ÐÏÓÌÅ ÕÓÌÏ×ÉÑ if endif) × ÆÁÊÌÅ configure
make
make install
äÁÌÅÅ ÎÁÓÔÒÁÉ×ÁÅÍ ÚÁÐÉÓÉ ÄÌÑ iODBC ÍÅÎÅÄÖÅÒÁ ×
ÆÁÊÌÁÈ /etc/odbcinst.ini É /etc/odbc.ini
îÁÓÔÒÁÉ×ÁÅÍ odbc ÄÒÁÊ×ÅÒ
--------------/etc/odbcinst.ini-------------
[ODBC Drivers]
SQLite=Installed
[SQLite]
Driver=/usr/local/lib/libsqliteodbc.so
---------------------------------------
óÏÚÄÁÅÍ DSN ÄÌÑ ÂÁÚÙ c ÉÍÅÎÅÍ "sqlite", ËÏÔÏÒÁÑ ÂÕÄÅÔ
ÒÁÓÐÏÌÁÇÁÔØÓÑ × ËÁÔÁÌÏÇÅ: /usr/local/3proxy/logs.db
--------------/etc/odbc.ini----------------
[ODBC Data Sources]
sqlite=SQLite
[sqlite]
Driver=/usr/local/lib/libsqliteodbc.so
Description=SQLite test database
Database=/usr/local/3proxy/logs.db
# optional lock timeout in milliseconds
Timeout=2000
---------------------------------------
óÏÚÄÁÅÍ ÂÁÚÕ ÄÌÑ ÌÏÇÏ× É ÔÁÂÌÉÃÕ × ÆÏÒÍÁÔÅ (logformat
ÓÍ. ÏÐÉÓÁÎÉÅ × 3proxy.cfg.sample )
sqlite /usr/local/3proxy/logs.db
SQLite version 2.8.14
Enter ".help" for instructions
sqlite>create table log (
...> l_date char (11),
...> l_chour char (10),
...> l_user char (30),
...> l_service char (30),
...> l_in integer,
...> l_out integer,
...> l_descr char (64000),
...>);
äÏÂÁ×ÌÑÅÍ ÓÌÅÄÕÀÝÉÅ ÚÁÐÉÓÉ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ 3proxy.cfg
---------------3proxy.cfg-----------------
log &sqlite
logformat "Linsert into log ( l_date, l_chour, l_user, l_service, l_in, l_out,
l_descr)
values ('%d-%m-%Y', '%H:%M:%S', '%U', '%N', %I, %O, '%T')"
------------------------------------------
CÏÂÒÁÔØ 3proxy c ÐÏÄÄÒÅÖËÏÊ iODBC, ÄÌÑ ÜÔÏÇÏ × Makefile.unix ÐÏÍÅÎÑÔØ
CFLAGS = -Wall -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DWITH_STD_MALLOC -I/usr/local/include
LIBS = -L /usr/local/lib -lodbc
É ÄÁÔØ ËÏÍÁÎÄÙ
make clean
make -f Makefile.unix
$Id: iodbc.txt,v 1.3 2006/02/08 17:59:07 vlad Exp $
+28
View File
@@ -0,0 +1,28 @@
Eugene: Re: 3proxy 0.6 + iODBC + PostgreSQL 22.11.2007 19:04:23
Наконец-то я разобрался и запустил.
1. Я использовал пакет unixODBC.
2. /etc/unixODBC/odbc.ini
[proxy]
Description = PostgreSQL ODBC driver
Driver = PostgreSQL ODBC driver
Database = proxy
ServerName = localhost
3. /etc/unixODBC/odbcinst.ini
[PostgreSQL ODBC driver]
Description = PostgreSQL ODBC driver
Driver = /usr/local/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
4. Собирал вручную psqlodbc-08.02.0500, слитый с postgresql.org (получился psqlodbcw.so).
5. 3proxy.conf
log &proxy,logger,123
logformat "LINSERT INTO logger (ldatetime,username,userip,trafin,trafout,service,host,port,
url) VALUES ('%Y-%m-%d %H:%M:%S','%U','%C',
'%I','%O','%N',
'%n','%r','%T');"
То есть пароли и логины в odbc.ini прописывать не надо - система падает на драйвере ODBC.
Использовать libiodbc тоже не надо - система падает на libiodbc.so.
Все вышесказанное справедливо для unixODBC + psqlodbc производства postgresql.org, как с -DSAFESQL, так и без оного.
С myodbc + unixODBC проблем не наблюдалось никаких.
Шаманство, в общем ;)