3proxy.conf.3.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. <HTML><HEAD><TITLE>Manpage of 3proxy.conf</TITLE>
  2. </HEAD><BODY>
  3. <H1>3proxy.conf</H1>
  4. Section: Universal proxy server (5)<BR>Updated: December 2004<BR><A HREF="#index">Index</A>
  5. <A HREF="../index.html">Return to Main Contents</A><HR>
  6. <A NAME="lbAB">&nbsp;</A>
  7. <H2>NAME</H2>
  8. <B>3proxy.conf</B>
  9. - 3proxy configuration file
  10. <A NAME="lbAC">&nbsp;</A>
  11. <H2>DESCRIPTION</H2>
  12. Common structure:
  13. Configuration file is a text file 3proxy reads configuration from. Each line
  14. of the file is command and is executed immediately, as it was given from
  15. console. Each line of the file is treated as a blank (space or tab) separated
  16. command line. Additional space characters are ignored.
  17. Think about 3proxy as &quot;application level router&quot; with console interface.
  18. Comments:
  19. Any string beginning with space character or '#' character is comment. It's
  20. ignored. &lt;LF&gt;s are ignored. &lt;CR&gt; is end of command.
  21. Quotation:
  22. Quotation character is spaces or another special characters. To use quotation character inside
  23. quotation character must be dubbed (BASIC convention). For example to use
  24. HELLO Good practice is to quote any argument you use.
  25. File inclusion:
  26. You can include file by using $FILENAME macro (replace FILENAME with a path
  27. to file, for example $/usr/local/etc/3proxy/conf.incl or
  28. <BR>&nbsp;$&quot;c:\Program&nbsp;Files\3proxy\include.cfg&quot;&nbsp;Quotation&nbsp;is
  29. required in last example because path contains space character.
  30. For included file &lt;CR&gt; (end of line characters) is treated as space character
  31. (arguments delimiter instead of end of command delimiter).
  32. Thus, include files are only useful to store long signle-line commands
  33. (like userlist, network lists, etc).
  34. To use dollar sign somewhere in argument it must be quoted.
  35. Recursion is not allowed.
  36. Commands:
  37. <B>proxy</B>
  38. [options]
  39. <BR>
  40. <B>socks</B>
  41. [options]
  42. <BR>
  43. <B>pop3p</B>
  44. [options]
  45. <BR>
  46. <B>ftppr</B>
  47. [options]
  48. <BR>
  49. <B>admin</B>
  50. [options]
  51. <BR>
  52. <B>dnspr</B>
  53. [options]
  54. <BR>
  55. <B>tcppm</B>
  56. [options]
  57. &lt;SRCPORT&gt; &lt;DSTADDR&gt; &lt;DSTPORT&gt;
  58. <BR>
  59. <B>udppm</B>
  60. [options]
  61. &lt;SRCPORT&gt; &lt;DSTADDR&gt; &lt;DSTPORT&gt;
  62. starts gateway services
  63. <B>proxy</B>
  64. - HTTP/HTTPS proxy (default port 3128)
  65. <BR>
  66. <B>socks</B>
  67. - SOCKS 4/4.5/5 proxy (default port 1080)
  68. <BR>
  69. <B>pop3p</B>
  70. - POP3 proxy (default port 110)
  71. <BR>
  72. <B>ftppr</B>
  73. - FTP proxy (default port 21)
  74. <BR>
  75. <B>admin</B>
  76. - Web interface (default port 80)
  77. <BR>
  78. <B>dnspr</B>
  79. - caching DNS proxy (default port 53)
  80. <BR>
  81. <B>tcppm</B>
  82. - TCP portmapper
  83. <BR>
  84. <B>udppm</B>
  85. - UDP portmapper
  86. Options:
  87. <BR>
  88. <B>-pNUMBER</B>
  89. change default server port to NUMBER
  90. <BR>
  91. <B>-n</B>
  92. disable NTLM authentication (required if passwords are stored in Unix crypt format.
  93. <BR>
  94. Also, all options mentioned for
  95. <B><A HREF="../man8/proxy.8.html">proxy</A></B>(8)
  96. <B><A HREF="../man8/socks.8.html">socks</A></B>(8)
  97. <B><A HREF="../man8/pop3p.8.html">pop3p</A></B>(8)
  98. <B><A HREF="../man8/tcppm.8.html">tcppm</A></B>(8)
  99. <B><A HREF="../man8/udppm.8.html">udppm</A></B>(8)
  100. <B><A HREF="../man8/ftppr.8.html">ftppr</A></B>(8)
  101. are also supported.
  102. Portmapping services listen at SRCPORT and connect to DSTADDR:DSTPORT
  103. HTTP and SOCKS proxies are standard.
  104. POP3 proxy must be configured as POP3 server and requires username in the form of:
  105. <A HREF="mailto:pop3username@pop3server">pop3username@pop3server</A>. If POP3 proxy access must be authenticated, you can
  106. specify username as proxy_username:proxy_password:<A HREF="mailto:POP3_username@pop3server">POP3_username@pop3server</A>
  107. DNS proxy is only capable to resolve hostnames (no MX, PTR, SRV, etc) and
  108. requires nserver/nscache to be configured.
  109. FTP proxy can be used as FTP server in any FTP client or configured as FTP
  110. proxy on a client with FTP proxy support. Username format is one of
  111. <BR>&nbsp;<A HREF="mailto:FTPuser@FTPServer">FTPuser@FTPServer</A>
  112. <BR>&nbsp;FTPuser:<A HREF="mailto:FTPpassword@FTPserver">FTPpassword@FTPserver</A>
  113. <BR>&nbsp;proxyuser:proxypassword:FTPuser:<A HREF="mailto:FTPpassword@FTPserver">FTPpassword@FTPserver</A>
  114. <BR>
  115. Please note, if you use FTP client interface for FTP proxy
  116. do not add FTPpassword and FTPServer to username, because
  117. FTP client does it for you. That is, if you use 3proxy with
  118. authentication use
  119. proxyuser:proxypassword:FTPuser
  120. as FTP username, otherwise do not change original FTP user name<TT>&nbsp;</TT><BR>
  121. <B>config</B>
  122. &lt;path&gt;
  123. <BR>
  124. Path to configuration file to use on 3proxy restart or to save configuration.
  125. <B>writable</B>
  126. <BR>
  127. ReOpens configuration file for write access via Web interface,
  128. and re-reads it. Usually should be first command on config file
  129. but in combination with &quot;config&quot; it can be used anywhere to open
  130. alternate config file. Think twice before using it.
  131. <B>end</B>
  132. <BR>
  133. End of configuration
  134. <B>log</B>
  135. [[@|&amp;]logfile] [&lt;LOGTYPE&gt;]
  136. <BR>
  137. sets logfile for all gateways
  138. <BR>&nbsp;@&nbsp;-&nbsp;(for&nbsp;Unix)&nbsp;use&nbsp;syslog,&nbsp;filename&nbsp;is&nbsp;used&nbsp;as&nbsp;ident&nbsp;name
  139. <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)
  140. <BR>&nbsp;LOGTYPE&nbsp;is&nbsp;one&nbsp;of:
  141. <BR>&nbsp;&nbsp;M&nbsp;-&nbsp;Monthly
  142. <BR>&nbsp;&nbsp;W&nbsp;-&nbsp;Weekly&nbsp;(starting&nbsp;from&nbsp;Sunday)
  143. <BR>&nbsp;&nbsp;D&nbsp;-&nbsp;Daily
  144. <BR>&nbsp;&nbsp;H&nbsp;-&nbsp;Hourly
  145. if logfile is not specified logging goes to stdout. You can specify individual logging options for gateway by using
  146. -l option in gateway configuration.
  147. <B>rotate</B>
  148. &lt;n&gt;
  149. how many archived log files to keep
  150. <B>logformat</B>
  151. &lt;format&gt;
  152. Format for log record. First symbol in format must be L (local time)
  153. or G (absolute Grinwitch time).
  154. It can be preceeded with -XXX+Y where XXX is list of characters to be
  155. filtered in user input (any non-printable characters are filtered too
  156. in this case) and Y is replacement character. For example, &quot;-,%+ L&quot; in
  157. the beginning of logformat means comma and percent are replaced
  158. with space and all time based elemnts are in local time zone.
  159. You can use:
  160. <BR>&nbsp;%y&nbsp;-&nbsp;Year&nbsp;in&nbsp;2&nbsp;digit&nbsp;format
  161. <BR>&nbsp;%Y&nbsp;-&nbsp;Year&nbsp;in&nbsp;4&nbsp;digit&nbsp;format
  162. <BR>&nbsp;%m&nbsp;-&nbsp;Month&nbsp;number
  163. <BR>&nbsp;%o&nbsp;-&nbsp;Month&nbsp;abbriviature
  164. <BR>&nbsp;%d&nbsp;-&nbsp;Day
  165. <BR>&nbsp;%H&nbsp;-&nbsp;Hour
  166. <BR>&nbsp;%M&nbsp;-&nbsp;Minute
  167. <BR>&nbsp;%S&nbsp;-&nbsp;Second
  168. <BR>&nbsp;%t&nbsp;-&nbsp;Timstamp&nbsp;(in&nbsp;seconds&nbsp;since&nbsp;01-Jan-1970)
  169. <BR>&nbsp;%.&nbsp;-&nbsp;milliseconds
  170. <BR>&nbsp;%z&nbsp;-&nbsp;timeZone&nbsp;(from&nbsp;Grinvitch)
  171. <BR>&nbsp;%D&nbsp;-&nbsp;request&nbsp;duration&nbsp;(in&nbsp;milliseconds)
  172. <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.
  173. <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.
  174. <BR>&nbsp;%U&nbsp;-&nbsp;Username
  175. <BR>&nbsp;%N&nbsp;-&nbsp;service&nbsp;Name
  176. <BR>&nbsp;%p&nbsp;-&nbsp;service&nbsp;Port
  177. <BR>&nbsp;%E&nbsp;-&nbsp;Error&nbsp;code
  178. <BR>&nbsp;%C&nbsp;-&nbsp;Client&nbsp;IP
  179. <BR>&nbsp;%c&nbsp;-&nbsp;Client&nbsp;port
  180. <BR>&nbsp;%R&nbsp;-&nbsp;Remote&nbsp;IP
  181. <BR>&nbsp;%r&nbsp;-&nbsp;Remote&nbsp;port
  182. <BR>&nbsp;%n&nbsp;-&nbsp;requested&nbsp;hostname
  183. <BR>&nbsp;%I&nbsp;-&nbsp;bytes&nbsp;In
  184. <BR>&nbsp;%O&nbsp;-&nbsp;bytes&nbsp;Out
  185. <BR>&nbsp;%h&nbsp;-&nbsp;Hops&nbsp;(redirections)&nbsp;count
  186. <BR>&nbsp;%T&nbsp;-&nbsp;service&nbsp;specific&nbsp;Text
  187. <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
  188. in case of ODBC logging logformat specifies SQL statement, for exmample:
  189. <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;
  190. <B>archiver</B>
  191. &lt;ext&gt; &lt;commandline&gt;
  192. <BR>
  193. Archiver to use for log files. &lt;ext&gt; is file extension produced by
  194. archiver. Filename will be last argument to archiver, optionally you
  195. can use %A as produced archive name and %F as filename.
  196. <B>timeouts</B>
  197. &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;
  198. Sets timeout values
  199. <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.
  200. <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).
  201. <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)
  202. <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).
  203. <BR>&nbsp;CONNECTION_SHORT&nbsp;-&nbsp;inactivity&nbsp;timeout&nbsp;for&nbsp;short&nbsp;connections&nbsp;(HTTP,&nbsp;POP3,&nbsp;etc).
  204. <BR>&nbsp;CONNECTION_LONG&nbsp;-&nbsp;inactivity&nbsp;timeout&nbsp;for&nbsp;long&nbsp;connection&nbsp;(SOCKS,&nbsp;portmappers,&nbsp;etc).
  205. <BR>&nbsp;DNS&nbsp;-&nbsp;timeout&nbsp;for&nbsp;DNS&nbsp;request&nbsp;before&nbsp;requesting&nbsp;next&nbsp;server
  206. <BR>&nbsp;CHAIN&nbsp;-&nbsp;timeout&nbsp;for&nbsp;reading&nbsp;data&nbsp;from&nbsp;chained&nbsp;connection
  207. <B>nserver</B>
  208. <BR>&nbsp;&lt;ipaddr&gt;
  209. <BR>
  210. Nameserver to use for name resolutions. If none spcified system
  211. or name server fails system routines for name resolution will be
  212. used. It's better to specify nserver because gethostbyname() may
  213. be thread unsafe.
  214. <B>nscache</B>
  215. &lt;cachesize&gt;
  216. <BR>
  217. Cache &lt;cachesize&gt; records for name resolution. Cachesize usually
  218. should be large enougth (for example 65536).
  219. <B>nsrecord</B>
  220. &lt;hostname&gt; &lt;hostaddr&gt;
  221. <B></B>
  222. Adds static record to nscache. nscache must be enabled. If 0.0.0.0
  223. is used as a hostaddr host will never resolve, it can be used to
  224. blacklist something or together with
  225. <B>dialer</B>
  226. command to set up UDL for dialing.
  227. <B>dialer</B>
  228. &lt;progname&gt;
  229. <BR>
  230. Execute progname if external name can't be resolved.
  231. Hint: if you use nscache, dialer may not work, because names will
  232. be resolved through cache. In this case you can use something like
  233. <A HREF="http://dial.right.now/">http://dial.right.now/</A> from browser to set up connection.
  234. <B>internal</B>
  235. &lt;ipaddr&gt;
  236. <BR>
  237. sets ip address of internal interface. This IP address will be used
  238. to bind gateways. Alternatively you can use -i option for individual
  239. gateways
  240. <B>external</B>
  241. &lt;ipaddr&gt;
  242. <BR>
  243. sets ip address of external interface. This IP address will be source
  244. address for all connections made by proxy. Alternatively you can use
  245. -e option to specify individual address for gateway.
  246. <BR>&nbsp;&nbsp;&nbsp;
  247. <B>maxconn</B>
  248. &lt;number&gt;
  249. <BR>
  250. sets maximum number of simulationeous connections to each services
  251. started after this command. Default is 100.
  252. <B>service</B>
  253. <BR>
  254. (depricated) Should be specified to launch as Windows 95/98/NT/2000/XP service,
  255. no effect for Unix. Is not reqired since 0.6, but you must re-install 3proxy
  256. service with --remove and --install.
  257. <B>daemon</B>
  258. <BR>
  259. Should be specified to close console (not required for 'service').
  260. At least under FreeBSD 'daemon' should preceed any proxy service
  261. and log commands to avoid sockets problem. Always place it in the beginning
  262. of the configuration file.
  263. <B>auth</B>
  264. <BR>
  265. Type of user authorization. Currently supported:
  266. <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;
  267. <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
  268. <BR>&nbsp;nbname&nbsp;-&nbsp;iponly&nbsp;+&nbsp;authorization&nbsp;by&nbsp;NetBIOS&nbsp;name.&nbsp;Messanger
  269. service should be started on user's machine. Note, that
  270. Windows 95/98 hosts do not have messanger service by default,
  271. WinPopup program need to be started.
  272. NB: there is no any password check, name may be spoofed.
  273. Think about it as about ident for Windows.
  274. <BR>&nbsp;Q:&nbsp;Will&nbsp;ident&nbsp;authorization&nbsp;be&nbsp;implemented?
  275. <BR>&nbsp;A:&nbsp;Yes,&nbsp;as&nbsp;soon&nbsp;as&nbsp;it&nbsp;will&nbsp;be&nbsp;required&nbsp;by&nbsp;someone.
  276. <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.
  277. <B>allow</B>
  278. &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  279. &lt;weekdayslist&gt; &lt;timeperiodslist&gt;
  280. <BR>
  281. <B>deny</B>
  282. &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  283. &lt;weekdayslist&gt; &lt;timeperiodslist&gt;
  284. <BR>
  285. Access control entries. All lists are comma-separated, no spaces are
  286. allowed. Usernames are case sensitive (if used with authtype nbname
  287. username must be in uppercase). Source and target lists may contain
  288. IP addresses (W.X.Y.Z) or CIDRs (W.X.Y.Z/L). Targetportlist may
  289. contain ports (X) or port lists (X-Y).<TT>&nbsp;&nbsp;</TT>For any field * sign means &quot;ANY&quot;<BR>
  290. If access list is empty it's assumed to be
  291. <BR>&nbsp;allow&nbsp;*
  292. If access list is not empty last item in access list is assumed to be
  293. <BR>&nbsp;deny&nbsp;*
  294. You may want explicitly add &quot;deny *&quot; into the end of access list to prevent
  295. HTTP proxy from requesting user's password.
  296. Access lists are checked after user have requested any resource.
  297. If you want 3proxy to reject connections from specific addresses
  298. immediately without any conditions you should either bind proxy
  299. to appropriate interface only or to use ip filters.
  300. Operation is one of:
  301. <BR>&nbsp;CONNECT<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>-&nbsp;establish&nbsp;outgoing&nbsp;TCP&nbsp;connection<BR>
  302. <BR>&nbsp;BIND&nbsp;-&nbsp;bind&nbsp;TCP&nbsp;port&nbsp;for&nbsp;listening
  303. <BR>&nbsp;UDPASSOC&nbsp;-&nbsp;make&nbsp;UDP&nbsp;association
  304. <BR>&nbsp;ICMPASSOC&nbsp;-&nbsp;make&nbsp;ICMP&nbsp;association&nbsp;(for&nbsp;future&nbsp;use)
  305. <BR>&nbsp;HTTP_GET&nbsp;-&nbsp;HTTP&nbsp;GET&nbsp;request
  306. <BR>&nbsp;HTTP_PUT&nbsp;-&nbsp;HTTP&nbsp;PUT&nbsp;request
  307. <BR>&nbsp;HTTP_POST&nbsp;-&nbsp;HTTP&nbsp;POST&nbsp;request
  308. <BR>&nbsp;HTTP_HEAD&nbsp;-&nbsp;HTTP&nbsp;HEAD&nbsp;request
  309. <BR>&nbsp;HTTP_CONNECT&nbsp;-&nbsp;HTTP&nbsp;CONNECT&nbsp;request
  310. <BR>&nbsp;HTTP_OTHER&nbsp;-&nbsp;over&nbsp;HTTP&nbsp;request
  311. <BR>&nbsp;HTTP&nbsp;-&nbsp;matches&nbsp;any&nbsp;HTTP&nbsp;request&nbsp;except&nbsp;HTTP_CONNECT
  312. <BR>&nbsp;HTTPS&nbsp;-&nbsp;same&nbsp;as&nbsp;HTTP_CONNECT
  313. <BR>&nbsp;FTP_GET&nbsp;-&nbsp;FTP&nbsp;get&nbsp;request
  314. <BR>&nbsp;FTP_PUT&nbsp;-&nbsp;FTP&nbsp;put&nbsp;request
  315. <BR>&nbsp;FTP_LIST&nbsp;-&nbsp;FTP&nbsp;list&nbsp;request
  316. <BR>&nbsp;FTP&nbsp;-&nbsp;matches&nbsp;any&nbsp;FTP&nbsp;request
  317. Weeksdays are week days numbers or periods (0 or 7 means Sunday, 1 is Monday,
  318. 1-5 means Monday through Friday). Timeperiodlists is a list of time
  319. periods in HH:MM:SS-HH:MM:SS format. For example,
  320. <BR>&nbsp;00:00:00-08:00:00,17:00:00-24:00:00
  321. lists non-working hours.
  322. <TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><BR>
  323. <B>parent</B>
  324. &lt;weight&gt; &lt;type&gt; &lt;ip&gt; &lt;port&gt; &lt;username&gt; &lt;password&gt;
  325. <BR>
  326. this command may follow &quot;allow&quot; rule. It extends last allow rule to
  327. build proxy chain. Proxy may be grouped. Proxy inside the
  328. group is selected randomely. If few groups are specified one proxy
  329. is randomely picked from each group and chain of proxies is created
  330. (that is second proxy connected through first one and so on).
  331. Weight is used to group proxies. Weigt is a number between 1 and 1000.
  332. Weights are summed and proxies are grouped together untill weight of
  333. group is 1000. That is:
  334. <BR>&nbsp;allow&nbsp;*
  335. <BR>&nbsp;parent&nbsp;500&nbsp;socks5&nbsp;192.168.10.1&nbsp;1080
  336. <BR>&nbsp;parent&nbsp;500&nbsp;connect&nbsp;192.168.10.1&nbsp;3128
  337. makes 3proxy to randomely choose between 2 proxies for all outgoing
  338. connections
  339. <BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80
  340. <BR>&nbsp;parent&nbsp;1000&nbsp;socks5&nbsp;192.168.10.1&nbsp;1080
  341. <BR>&nbsp;parent&nbsp;1000&nbsp;connect&nbsp;192.168.20.1&nbsp;3128
  342. <BR>&nbsp;parent&nbsp;300&nbsp;socks4&nbsp;192.168.30.1&nbsp;1080
  343. <BR>&nbsp;parent&nbsp;700&nbsp;socks5&nbsp;192.168.40.1&nbsp;1080
  344. creates chain of 3 proxies: 192.168.10.1, 192.168.20.1 and third
  345. is (192.168.30.1 with probability of 0.3 or 192.168.40.1
  346. with probability of 0.7) for outgoing web connections.
  347. type is one of:
  348. <BR>&nbsp;tcp&nbsp;-&nbsp;simply&nbsp;redirect&nbsp;connection.&nbsp;TCP&nbsp;is&nbsp;always&nbsp;last&nbsp;in&nbsp;chain.
  349. <BR>&nbsp;http&nbsp;-&nbsp;redirect&nbsp;to&nbsp;HTTP&nbsp;proxy.&nbsp;HTTP&nbsp;is&nbsp;always&nbsp;last&nbsp;chain.
  350. <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
  351. used for chaining)
  352. <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
  353. used for chaining)
  354. <BR>&nbsp;connect&nbsp;-&nbsp;parent&nbsp;is&nbsp;HTTP&nbsp;CONNECT&nbsp;method&nbsp;proxy
  355. <BR>&nbsp;socks4&nbsp;-&nbsp;parent&nbsp;is&nbsp;SOCKSv4&nbsp;proxy
  356. <BR>&nbsp;socks5&nbsp;-&nbsp;parent&nbsp;is&nbsp;SOCKSv5&nbsp;proxy
  357. IP and port are ip addres and port of parent proxy server.
  358. If IP is zero, ip is taken from original request, only port is changed.
  359. If port is zero, it's taken from original request, only IP is changed.
  360. If both IP and port are zero - it's a special case of local redirection,
  361. it works only with
  362. socks
  363. proxy. In case of local redirection request is redirected to different service,
  364. <B>ftppr</B>
  365. <B>pop3p</B>
  366. <B>proxy .</B>
  367. Main purpose of local redirections is to have requested resource
  368. (URL or POP3 username) logged and protocol-specific filters to be applied.
  369. In case of local redirection ACLs are revied twice: first, by SOCKS proxy up to
  370. redirected (HTTP, FTP or POP3) after 'parent' command. It means,
  371. additional 'allow' command is required for redirected requests, for
  372. example:
  373. <BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80
  374. <BR>&nbsp;parent&nbsp;1000&nbsp;http&nbsp;0.0.0.0&nbsp;0
  375. <BR>&nbsp;allow&nbsp;*&nbsp;*&nbsp;*&nbsp;80&nbsp;HTTP_GET,HTTP_POST
  376. <BR>&nbsp;socks
  377. redirects all SOCKS requests with target port 80 to local HTTP proxy,
  378. local HTTP proxy parses requests and allows only GET and POST requests.
  379. Optional username and password are used to authenticate on parent
  380. proxy. Username of '*' means username must be supplied by user.
  381. <B>bandlimin</B>
  382. &lt;rate&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  383. <BR>
  384. <B>nobandlimin</B>
  385. &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  386. <BR>
  387. bandlim sets bandwith limitation filter to &lt;rate&gt; bps (bits per second)
  388. (if you want to specife bytes per second - multiply your value to 8).
  389. bandlim rules act in a same manner as allow/deny rules except
  390. one thing: bandwidth limiting is applied to all services, not to some
  391. specific service.
  392. bandlimin and nobandlimin applies to incoming traffic
  393. bandlimout and nobandlimout applies to outgoing traffic
  394. If tou want to ratelimit your clients with ip's 192.168.10.16/30 (4
  395. addresses) to 57600 bps you have to specify 4 rules like
  396. <BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.16
  397. <BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.17
  398. <BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.18
  399. <BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.19
  400. and every of you clients will have 56K channel.<TT>&nbsp;</TT>if you specify<BR>
  401. <BR>&nbsp;bandlimin&nbsp;57600&nbsp;*&nbsp;192.168.10.16/30
  402. you will have 56K channel shared between all clients.
  403. if you want, for example, to limit all speed ecept access to POP3 you can use
  404. <BR>&nbsp;nobandlimin&nbsp;*&nbsp;*&nbsp;*&nbsp;110
  405. before the rest of bandlim rules.
  406. <B>counter</B>
  407. &lt;filename&gt; &lt;reporttype&gt; &lt;repotname&gt;
  408. <BR>
  409. <B>countin</B>
  410. &lt;number&gt; &lt;type&gt; &lt;limit&gt; &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  411. <BR>
  412. <B>nocountin</B>
  413. &lt;userlist&gt; &lt;sourcelist&gt; &lt;targetlist&gt; &lt;targetportlist&gt; &lt;operationlist&gt;
  414. <BR>
  415. counter, countin, nocountin commands are used to set traffic limit
  416. in MB for period of time (day, week or month). Filename is a path
  417. to a special file where traffic information is permanently stored.
  418. number is sequential number of record in this file. If number is 0
  419. no traffic information on this counter is saved in file (that is
  420. if proxy restarted all information is loosed) overwise it should be
  421. unique sequential number.
  422. Type specifies a type of counter. Type is one of:
  423. <BR>&nbsp;D&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;daily
  424. <BR>&nbsp;W&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;weekly
  425. <BR>&nbsp;M&nbsp;-&nbsp;counter&nbsp;is&nbsp;resetted&nbsp;monthely
  426. reporttype/repotname may be used to generate traffic reports.
  427. Reporttype is one of D,W,M,H(hourly) and repotname specifies filename
  428. template for reports. Report is text file with counter values in
  429. format:
  430. <BR>&nbsp;&lt;COUNTERNUMBER&gt;&nbsp;&lt;TRAF*4GB&gt;&nbsp;&lt;TRAF&gt;
  431. The rest of parameters is identical to bandlim/nobandlim.
  432. <B>users</B>
  433. username[:pwtype:password] ...
  434. <BR>
  435. pwtype is one of:
  436. <BR>&nbsp;none&nbsp;(empty)&nbsp;-&nbsp;use&nbsp;system&nbsp;authentication
  437. <BR>&nbsp;CL&nbsp;-&nbsp;password&nbsp;is&nbsp;cleartext
  438. <BR>&nbsp;CR&nbsp;-&nbsp;password&nbsp;is&nbsp;crypt-style&nbsp;password
  439. <BR>&nbsp;NT&nbsp;-&nbsp;password&nbsp;is&nbsp;NT&nbsp;password&nbsp;(in&nbsp;hex)
  440. example:
  441. <BR>&nbsp;users&nbsp;test1:CL:password1&nbsp;&quot;test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49.&quot;
  442. <BR>&nbsp;users&nbsp;test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
  443. <BR>
  444. (note: double quotes are requiered because password contains $ sign).<TT>&nbsp;&nbsp;</TT><BR>
  445. <B>flush</B>
  446. <BR>
  447. empty active access list. Access list must be flushed avery time you creating
  448. new access list for new service. For example:
  449. <BR>&nbsp;allow&nbsp;*
  450. <BR>&nbsp;pop3p
  451. <BR>&nbsp;flush
  452. <BR>&nbsp;allow&nbsp;*&nbsp;192.168.1.0/24
  453. <BR>&nbsp;socks
  454. sets different ACLs for
  455. <B>pop3p</B>
  456. and
  457. <B>socks</B>
  458. <B>system</B>
  459. <BR>
  460. execute system command
  461. <B>pidfile</B>
  462. &lt;filename&gt;
  463. <BR>
  464. write pid of current process to file. It can be used to manipulate
  465. 3proxy with signals under Unix. Currently next signals are available:
  466. <B>setuid</B>
  467. &lt;uid&gt;
  468. <BR>
  469. calls setuid(uid), uid must be numeric. Unix only.
  470. <B>setgid</B>
  471. &lt;gid&gt;
  472. <BR>
  473. calls setgid(gid), gid must be numeric. Unix only.
  474. <B>chroot</B>
  475. &lt;path&gt;
  476. <BR>
  477. calls chroot(path). Unix only.
  478. <A NAME="lbAD">&nbsp;</A>
  479. <H2>SEE ALSO</H2>
  480. <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),
  481. <BR>
  482. <A HREF="http://3proxy.ru/">http://3proxy.ru/</A>
  483. <A NAME="lbAE">&nbsp;</A>
  484. <H2>TRIVIA</H2>
  485. 3APA3A is pronounced as ``zaraza''.
  486. <A NAME="lbAF">&nbsp;</A>
  487. <H2>AUTHORS</H2>
  488. 3proxy is designed by 3APA3A
  489. (<I><A HREF="mailto:3APA3A@security.nnov.ru">3APA3A@security.nnov.ru</A></I>),
  490. Vladimir Dubrovin
  491. (<I><A HREF="mailto:vlad@sandy.ru">vlad@sandy.ru</A></I>)
  492. <P>
  493. <HR>
  494. <A NAME="index">&nbsp;</A><H2>Index</H2>
  495. <DL>
  496. <DT><A HREF="#lbAB">NAME</A><DD>
  497. <DT><A HREF="#lbAC">DESCRIPTION</A><DD>
  498. <DT><A HREF="#lbAD">SEE ALSO</A><DD>
  499. <DT><A HREF="#lbAE">TRIVIA</A><DD>
  500. <DT><A HREF="#lbAF">AUTHORS</A><DD>
  501. </DL>
  502. <HR>
  503. This document was created by
  504. using the manual pages.<BR>
  505. Time: GMT, December 11, 2004
  506. </BODY>
  507. </HTML>