mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 02:25:40 +08:00
plugins documentation added
This commit is contained in:
parent
8b7c95ff93
commit
e78d9f8327
94
doc/html/plugins/PCREPlugin.html
Normal file
94
doc/html/plugins/PCREPlugin.html
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
<h3>3proxy Perl Compatible Regular Expressions (PCRE) plugin</h3>
|
||||
|
||||
This filtering plugin can be used to create matching and replace
|
||||
rules with regular expressions for client's request, client and
|
||||
servers header and client and server data. It adds 3 additional
|
||||
configuration commands:
|
||||
|
||||
<pre>
|
||||
pcre TYPE FILTER_ACTION REGEXP [ACE]
|
||||
pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE]
|
||||
pcre_extend FILTER_ACTION [ACE]
|
||||
pcre_options OPTION1 [...]
|
||||
</pre>
|
||||
pcre - allows to apply some rule for matching
|
||||
<br>pcre_rewrite - in addition to 'pcre' allows to substitute substrings
|
||||
<br>pcre_extend - extends ACL of the last pcre or pcre_rewrite comand by
|
||||
adding additional ACE (like with allow/deny configuration commands).
|
||||
<br>pcre_options - allows to set matching options. Awailable options are:
|
||||
PCRE_CASELESS,
|
||||
PCRE_MULTILINE,
|
||||
PCRE_DOTALL,
|
||||
PCRE_EXTENDED,
|
||||
PCRE_ANCHORED,
|
||||
PCRE_DOLLAR_ENDONLY,
|
||||
PCRE_EXTRA,
|
||||
PCRE_NOTBOL,
|
||||
PCRE_NOTEOL,
|
||||
PCRE_UNGREEDY,
|
||||
PCRE_NOTEMPTY,
|
||||
PCRE_UTF8,
|
||||
PCRE_NO_AUTO_CAPTURE,
|
||||
PCRE_NO_UTF8_CHECK,
|
||||
PCRE_AUTO_CALLOUT,
|
||||
PCRE_PARTIAL,
|
||||
PCRE_DFA_SHORTEST,
|
||||
PCRE_DFA_RESTART,
|
||||
PCRE_FIRSTLINE,
|
||||
PCRE_DUPNAMES,
|
||||
PCRE_NEWLINE_CR,
|
||||
PCRE_NEWLINE_LF,
|
||||
PCRE_NEWLINE_CRLF,
|
||||
PCRE_NEWLINE_ANY,
|
||||
PCRE_NEWLINE_ANYCRLF,
|
||||
PCRE_BSR_ANYCRLF,
|
||||
PCRE_BSR_UNICODE
|
||||
|
||||
<ul>
|
||||
<li>TYPE - type of filtered data. May contain one or more
|
||||
(comma delimited list) values:
|
||||
<ul>
|
||||
<li>request - content of client's request e.g. HTTP GET request string.
|
||||
(known problem: changing request string doesn't change IP of the host to connect)
|
||||
<li>cliheader - content of client request headers, e.g. HTTP request header.
|
||||
<li>srvheader - content of server's reply headers, e.g. HTTP status and headers.
|
||||
<li>clidata - data received from client, e.g. HTTP POST request data
|
||||
<li>srvdata - data received from server, e.g. HTML page
|
||||
</ul>
|
||||
<li>FILTER_ACTION - action on match
|
||||
<ul>allow - allow this request without checking rest of the given type
|
||||
of the rules
|
||||
<li>deny - deny this request without checking rest of the rules
|
||||
<li>dunno - continue with the rest of rules (useful with pcre_rewrite)
|
||||
</ul>
|
||||
<li>REGEXP - PCRE (perl) regular expression. Use * if no regexp matching
|
||||
required.
|
||||
<li>REWRITE_EXPRESSION - substitution string. May contain perl-style
|
||||
substrings
|
||||
(not tested) $1, $2. $0 - means whole matched string. \r and \n may be used
|
||||
to insert new strings, string may be empty ("").
|
||||
<li>ACE - access control entry (user names, source IPs, destination IPs,
|
||||
ports, etc), absolutely identical to allow/deny/bandlimin commands.
|
||||
Regular expression is only matched if ACL matches connection data.
|
||||
Warning:
|
||||
reqular expression doesn't require authentication and can not replace
|
||||
authentication and/or allow/deny ACLs.
|
||||
</ul>
|
||||
|
||||
|
||||
<h4>Example:</h4>
|
||||
<pre>
|
||||
plugin PCREPlugin.dll pcre_plugin
|
||||
pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16
|
||||
pcre srvheader deny "Content-type: application"
|
||||
pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser
|
||||
pcre_extend deny * 192.168.0.1/16
|
||||
</pre>
|
||||
|
||||
<h4>Download:</h4>
|
||||
<ul>
|
||||
<li>Plugin is included into 3proxy 0.6 binary and source distribution
|
||||
<li>Example configuration (by Dennis Garber): <A HREF="NoPornLitest.cfg.txt">NoPornLitest.cfg</A>
|
||||
</ul>
|
||||
|
34
doc/html/plugins/SSLPlugin.html
Normal file
34
doc/html/plugins/SSLPlugin.html
Normal file
@ -0,0 +1,34 @@
|
||||
<h3>3proxy SSL/TLS plugin</h3>
|
||||
|
||||
Plugin can be used to transparently decypher SSL/TLS data. Plugin should never be used in production environment due to
|
||||
potential securiy reasons.
|
||||
|
||||
<pre>
|
||||
ssl_certcache PATH_TO_CACHE
|
||||
ssl_mitm
|
||||
ssl_nomitm
|
||||
</pre>
|
||||
ssl_certcache - path to certificates cache. For transparent spoofing cache must contain 3 files: 3proxy.pem - public
|
||||
self-signed certificates, 3proxy.key - key for public certificates, server.key - this key will be used to generates
|
||||
spoofed certificates.
|
||||
Generated certificates will be placed to the same path.
|
||||
<br>ssl_mitm - spoof certificates for services started below
|
||||
<br>ssl_nomitm - do not spoof certificates for services started below
|
||||
|
||||
|
||||
<h4>Example:</h4>
|
||||
<pre>
|
||||
plugin /path/to/SslPlugin.dll ssl_plugin
|
||||
ssl_certcache /path/to/cache/
|
||||
ssl_mitm
|
||||
proxy -p3128
|
||||
ssl_nomitm
|
||||
proxy -p3129
|
||||
</pre>
|
||||
|
||||
<h4>Download:</h4>
|
||||
<ul>
|
||||
<li>Plugin included into 3proxy 0.8
|
||||
</ul>
|
||||
|
||||
© Vladimir Dubrovin, License: BSD style
|
16
doc/html/plugins/StringsPlugin.html
Normal file
16
doc/html/plugins/StringsPlugin.html
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
<h3>3proxy strings substitution plugin</h3>
|
||||
May be used to make interface more pretty or to translate proxy server
|
||||
messages to different language. All messages are taken from proxy.c and
|
||||
moved to external text file (e.g. rus-win1251.3ps). On the moment of
|
||||
writing there are 15 sections. Sections are delimited with "[end]".
|
||||
<h4>Example:</h4>
|
||||
<pre>plugin "StringsPlugin.dll" start c:\3proxy\bin\rus-win1251.3ps
|
||||
</pre>
|
||||
|
||||
<h4>Download:</h4>
|
||||
<ul>
|
||||
<li>Plugin is included into 3proxy 0.6 binary and source distribution
|
||||
</li></ul>
|
||||
|
||||
©Kirill Lopuchov
|
52
doc/html/plugins/TrafficPlugin.html
Normal file
52
doc/html/plugins/TrafficPlugin.html
Normal file
@ -0,0 +1,52 @@
|
||||
<h3>3proxy traffic correction plugin</h3>
|
||||
3proxy logs and counts traffic on application level, while provider usually does
|
||||
it on network or link level. It's significant if you use 3proxy for billing,
|
||||
especially in case where network packets are small, e.g. network games.
|
||||
<p>
|
||||
This plugin attempts to correct 3proxy computations to approximate network or
|
||||
link level traffic by using either fixed coefficients by port number or
|
||||
attempting to predict number and sizes of network packets.
|
||||
</p><h4>Usage:</h4>
|
||||
<ol>
|
||||
<li>Extract TrafficPlugin.dll to the same folder with 3proxy executable.
|
||||
</li><li>Start plugin in 3proxy.cfg with
|
||||
<pre>plugin TrafficPlugin.dll start
|
||||
</pre>
|
||||
</li><li>Add correction rules:
|
||||
<br>
|
||||
FOR FIXED COEFFICIENTS MODE:
|
||||
<pre>trafcorrect m <service> <target port> <coefficient>
|
||||
</pre>
|
||||
where <service> - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p, * matches "any".
|
||||
<br> <target port> - target port, * matches any
|
||||
<br> <coefficient> - coefficient to multiply traffic for this port.
|
||||
<br>
|
||||
FOR PACKET HEADER PREDICTION MODE
|
||||
<pre>trafcorrect p <service> <tcp/udp> <target port> [empty packet size]
|
||||
</pre>
|
||||
tcp ot udp - transport level protocol to apply rule
|
||||
<br>
|
||||
empty packet size - average size of "empty" packet, that is sum of average network/transport headers.
|
||||
You can use network sniffer, such is Ethereal to discover it. Usually packet size
|
||||
is 42 for UDP and
|
||||
<br>Modes can be mixed.
|
||||
<br>Plugin creates a list of rules, first matching rule will be applied.
|
||||
</li></ol>
|
||||
For any mode plugin approximates traffic, logged or counted amount is not exact.
|
||||
<h4>Example:</h4>
|
||||
<pre>plugin "TrafficPlugin.dll" start
|
||||
trafcorrect m socks5 6112 4.5
|
||||
trafcorrect m socks5 * 1.1
|
||||
</pre>
|
||||
wrong usage:
|
||||
<pre>trafcorrect m socks5 * 1.1
|
||||
trafcorrect m socks5 6112 4.5
|
||||
</pre>
|
||||
second rule will never be applied.
|
||||
<h4>Download:</h4>
|
||||
<ul>
|
||||
<li>Plugin is included into 3proxy 0.6 binary and source distribution
|
||||
</li></ul>
|
||||
|
||||
©Maslov Michael aka Flexx(rus)
|
||||
|
@ -138,7 +138,7 @@ wget to automate this task.
|
||||
configuration file
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy.cfg(3), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
|
||||
kill(1), syslogd(8),
|
||||
|
@ -905,7 +905,9 @@ If Content-length (or another data length) is greater than given value, no
|
||||
data filtering will be performed thorugh filtering plugins to avoid data
|
||||
corruption and/or Content-Length chaging. Default is 1MB (1048576).
|
||||
|
||||
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -73,7 +73,7 @@ is user\'s login on this FTP server. Login itself may contain \'@\' sign.
|
||||
Only cleartext authentication is currently supported.
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -66,7 +66,7 @@ as a destination in client application. Connection is forwarded to
|
||||
.IR remote_host : remote_port
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -69,7 +69,7 @@ authentication (APOP, CRAM-MD5, etc) requires challenge from server before
|
||||
we know which server to connect.
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -64,7 +64,7 @@ limit clients, use
|
||||
instead.
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -70,7 +70,7 @@ authentication (CRAM-MD5, SPA, etc) requires challenge from server before
|
||||
we know which server to connect.
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -65,7 +65,7 @@ sufficient privileges). If you need to control access use
|
||||
instead.
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -59,7 +59,7 @@ as a destination in client application. Connection is forwarded to
|
||||
.IR remote_host : remote_port
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -65,7 +65,7 @@ as a destination in client application. All datagrams are forwarded to
|
||||
.IR remote_host : remote_port
|
||||
.SH BUGS
|
||||
Report all bugs to
|
||||
.BR 3proxy@security.nnov.ru
|
||||
.BR 3proxy@3proxy.ru
|
||||
.SH SEE ALSO
|
||||
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
|
||||
.br
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define VERSION "3proxy-0.8-pre"
|
||||
#define BUILDDATE "160113020317"
|
||||
#define BUILDDATE "160113233318"
|
||||
|
Loading…
Reference in New Issue
Block a user