Documentation update + add SQL example to git

This commit is contained in:
z3APA3A 2016-02-22 23:08:31 +03:00
parent 68e8530f85
commit 19643f0d66
6 changed files with 115 additions and 5 deletions

1
.gitignore vendored
View File

@ -156,7 +156,6 @@ csx
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*

53
cfg/sql/3proxy.cfg.sample Normal file
View File

@ -0,0 +1,53 @@
# By Mark Dreuband
nserver 10.1.2.1
nscache 65536
# we can grab wpad file from provider and feed it to dighosts
# to build list of free networks
# system "c:\3proxy\dighosts.exe -m http://wpad.security.nnov.ru/wpad.dat c:\3proxy\freenetworks.net"
service
internal 192.168.1.1
external 10.1.1.1
dnspr
log &3proxylog,root
#log c:\3proxy\logs\proxy.log D
#logformat "Linsert into log (timestamp, username, service, clientip, remoteip, remoteport, bytesin, bytesout,request,error) values (
#logformat "%t '%U' '%N' '%C' '%R' %r %I %O '%T' %E"
logformat "-\'+_Linsert into log (time, bytesin, bytesout, username, url, host, port, service) values ('%Y-%m-%d %H:%M:%S', %I, %O, '%U', '%T', '%n', %r, '%N');"
archiver zip c:\3proxy\zip.exe -m -qq %A %F
rotate 50
auth strong
users temp:CL:password root:CL:password
# access free networks directly
allow * * $c:\3proxy\freenetworks.net
# redirect web traffic for non-free networks to provider's proxy
allow * * * 80
parent 1000 http 10.1.2.5 3128
# allow rest of traffic
allow *
proxy
flush
auth iponly
allow *
pop3p
tcppm 25 mail.security.nnov.ru 25
flush
# redirect port 80 traffic via SOCKS server to local HTTP proxy to
# have URLs logged
allow * * * 80
parent 1000 http 0.0.0.0 0
allow *
socks
#daemon

56
cfg/sql/create.sql Normal file
View File

@ -0,0 +1,56 @@
# Connection: localhost
# Host: 127.0.0.1
# Saved: 2004-04-09 18:53:52
#
# Host: 127.0.0.1
# Database: 3proxy
# Table: 'log'
#
CREATE TABLE `log` (
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`bytesin` int(11) NOT NULL default '0',
`bytesout` int(11) NOT NULL default '0',
`username` varchar(20) NOT NULL default '',
`service` varchar(7) NOT NULL default '',
`host` varchar(100) NOT NULL default '',
`port` int(11) NOT NULL default '0',
`url` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
CREATE TABLE `services` (
`startport` int(11) NOT NULL default '0',
`endport` int(11) NOT NULL default '0',
`service` varchar(100) NOT NULL default '',
`description` varchar(100) NOT NULL default ''
) TYPE=MyISAM;
CREATE TABLE `timelimit` (
`datefrom` datetime NOT NULL default '0000-00-00 00:00:00',
`dateto` datetime NOT NULL default '0000-00-00 00:00:00'
) TYPE=MyISAM;
INSERT INTO services (80, 80, NULL, 'Access to Web Server');
INSERT INTO services (443, 443, NULL, 'Secure Access to Web Server');
INSERT INTO services (3128, 3128, NULL, 'Access to Web server via external Proxy');
INSERT INTO services (1080, 1080, NULL, 'Access to external SOCKS server');
INSERT INTO services (5190, 5190, NULL, 'Access to ICQ');
INSERT INTO services (6666, 6668, NULL, 'Access to IRC');
INSERT INTO services (119, 119, NULL, 'Access to news server');
INSERT INTO services (25, 25, NULL, 'Sent Mail');
INSERT INTO services (0, 0, 'POP3P', 'Received Mail');
INSERT INTO services (0, 0, 'SMTPP', 'Sent Mail');
INSERT INTO services (0, 0, 'TCPPM', 'Access to external server via TCP');
INSERT INTO services (0, 0, 'UDPPM', 'Access to external server via UDP');
INSERT INTO services (0, 0, 'PROXY', 'Access to external server via Proxy');
INSERT INTO services (0, 0, 'FTPPR', 'Access to external server via FTP Proxy');
INSERT INTO services (0, 0, 'ICQPR', 'Access to external server via ICQ Proxy');
INSERT INTO services (0, 0, 'SOCKS4', 'Access to external server via Socks v4');
INSERT INTO services (0, 0, 'SOCKS5', 'Access to external server via Socks v5');
INSERT INTO services (0, 0, 'DNSPR', 'Name resolution');
INSERT INTO services (0, 0, NULL, 'Unknown');

BIN
cfg/sql/report.xls Normal file

Binary file not shown.

View File

@ -287,10 +287,10 @@ logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
<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>
<p><pre>
logformat "-\'+_GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"</pre>
<br>(no line breaks)
<br>-\'+_ instructs to replace characters \ and ' with _
</p>
<li><A NAME="LOGANALIZERS">How to use log analizers with 3proxy</A>
<p>

View File

@ -304,7 +304,9 @@
При использовании ODBC, logformat должен задавать формат SQL команды,
которую необходимо дать для внесения записи в журнал, например:
<pre>
logformat "GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"</pre>
logformat "-\'+_GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"</pre>
префикс -\'+_ указывает, что символы \ и ' следует заменить на _ .
</p>
<li><a name="LOGANALIZERS"><i>Как использовать лог-анализаторы с 3proxy</i></a>
<p>