mirror of
https://github.com/3proxy/3proxy.git
synced 2026-02-25 05:42:22 +08:00
Compare commits
4 Commits
66d94bfa0d
...
5e472363f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e472363f1 | ||
|
|
12c9039ea4 | ||
|
|
1a970c5c98 | ||
|
|
090baeab33 |
@ -291,7 +291,7 @@ 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
|
||||
Rotation and archiving may be set up with log, rotate ¨ archiver commands
|
||||
<pre>
|
||||
log filename LOGTYPE
|
||||
</pre>
|
||||
@ -367,12 +367,19 @@ logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
|
||||
<br>(no line breaks)
|
||||
</p>
|
||||
<p>
|
||||
If ODBC used, logformat should specify SQL command,
|
||||
If ODBC is used, logformat should specify SQL command,
|
||||
to insert record into log, for example
|
||||
<p><pre>
|
||||
logformat "-\'+_GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"</pre>
|
||||
<br>(no line breaks)
|
||||
<br>-\'+_ instructs to replace characters \ and ' with _
|
||||
</p>
|
||||
<p>
|
||||
If no log format is set, it will fall back to the default log format:
|
||||
<pre>
|
||||
logformat "G%y%m%d%H%M%S.%. %p %E %U %C:%c %R:%r %O %I %h %T"
|
||||
</pre>
|
||||
|
||||
</p>
|
||||
<li><A NAME="LOGANALIZERS">How to use log analizers with 3proxy</A>
|
||||
<p>
|
||||
@ -475,7 +482,7 @@ proxy -p8080 -i192.168.2.1
|
||||
</p>
|
||||
<li><a name="ISFTP"><i>How to setup FTP proxy</i></a></li>
|
||||
<p>
|
||||
There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP ¯à®ªá¨
|
||||
There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP ¯à®ªá¨
|
||||
(what is called FTP proxy in file managers and FTP clients). For browsers, there is no need to start additional
|
||||
proxy service, 'proxy' supports FTP over HTTP, configure 'proxy' port as an FTP proxy. For ftp clients and file
|
||||
managers use ftppr. FTP proxy supports both active and passive mode with client, but always use passive mode with FTP servers.
|
||||
@ -736,7 +743,7 @@ 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="SOCKSREDIR">Š ª ã¯à ¢«ïâì «®ª «ì묨 ¯¥à¥ ¯à ¢«¥¨ï¬¨</a>
|
||||
<li><a name="SOCKSREDIR"> ª ã¯à ¢«ïâì «®ª «ì묨 ¯¥à¥ ¯à ¢«¥¨ï¬¨</a>
|
||||
<p>
|
||||
<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.
|
||||
|
||||
22
src/conf.c
22
src/conf.c
@ -105,6 +105,10 @@ unsigned char * dologname (unsigned char *buf, unsigned char *name, const unsign
|
||||
struct tm *ts;
|
||||
|
||||
ts = localtime(&t);
|
||||
if(strlen((char *)name) >= 4096){
|
||||
*buf = 0;
|
||||
return buf;
|
||||
}
|
||||
if(strchr((char *)name, '%')){
|
||||
struct clientparam fakecli;
|
||||
|
||||
@ -905,7 +909,7 @@ struct ace * make_ace (int argc, unsigned char ** argv){
|
||||
if(argc > 0 && strcmp("*", (char *)argv[0])) {
|
||||
arg = argv[0];
|
||||
arg = (unsigned char *)strtok((char *)arg, ",");
|
||||
do {
|
||||
if(arg) do {
|
||||
if(!acl->users) {
|
||||
acl->users = userl = myalloc(sizeof(struct userlist));
|
||||
}
|
||||
@ -924,7 +928,7 @@ struct ace * make_ace (int argc, unsigned char ** argv){
|
||||
}
|
||||
if(argc > 1 && strcmp("*", (char *)argv[1])) {
|
||||
arg = (unsigned char *)strtok((char *)argv[1], ",");
|
||||
do {
|
||||
if(arg) do {
|
||||
if(!acl->src) {
|
||||
acl->src = ipl = myalloc(sizeof(struct iplist));
|
||||
}
|
||||
@ -945,7 +949,7 @@ struct ace * make_ace (int argc, unsigned char ** argv){
|
||||
}
|
||||
if(argc > 2 && strcmp("*", (char *)argv[2])) {
|
||||
arg = (unsigned char *)strtok((char *)argv[2], ",");
|
||||
do {
|
||||
if(arg) do {
|
||||
int arglen;
|
||||
unsigned char *pattern;
|
||||
struct iplist tmpip={NULL};
|
||||
@ -1002,7 +1006,7 @@ struct ace * make_ace (int argc, unsigned char ** argv){
|
||||
}
|
||||
if(argc > 3 && strcmp("*", (char *)argv[3])) {
|
||||
arg = (unsigned char *)strtok((char *)argv[3], ",");
|
||||
do {
|
||||
if(arg) do {
|
||||
if(!acl->ports) {
|
||||
acl->ports = portl = myalloc(sizeof(struct portlist));
|
||||
}
|
||||
@ -1025,7 +1029,7 @@ struct ace * make_ace (int argc, unsigned char ** argv){
|
||||
}
|
||||
if(argc > 4 && strcmp("*", (char *)argv[4])) {
|
||||
arg = (unsigned char *)strtok((char *)argv[4], ",");
|
||||
do {
|
||||
if(arg) do {
|
||||
if(!strcmp((char *)arg, "CONNECT")){
|
||||
acl->operation |= CONNECT;
|
||||
}
|
||||
@ -1682,7 +1686,7 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
|
||||
}
|
||||
switch(*str){
|
||||
case '\0':
|
||||
if(comment) return -1;
|
||||
if(comment || incbegin) return -1;
|
||||
argm[argc] = 0;
|
||||
return argc;
|
||||
case '$':
|
||||
@ -1709,14 +1713,14 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
|
||||
argc--;
|
||||
if((fd = open((char *)incbegin+1, O_RDONLY)) <= 0){
|
||||
fprintf(stderr, "Failed to open %s\n", incbegin+1);
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
if((*bufsize - *inbuf) <STRINGBUF){
|
||||
*bufsize += STRINGBUF;
|
||||
if(!(buf = myrealloc(buf, *bufsize))){
|
||||
fprintf(stderr, "Failed to allocate memory for %s\n", incbegin+1);
|
||||
close(fd);
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
len = 0;
|
||||
@ -1727,7 +1731,7 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
|
||||
if((res = read(fd, buf+*inbuf+len, STRINGBUF-(1+len))) <= 0) {
|
||||
perror((char *)incbegin+1);
|
||||
close(fd);
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
buf[*inbuf+res+len] = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user