mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ef18c48f1 | ||
|
|
c3871caf2a | ||
|
|
f649c7d4de | ||
|
|
0a14a3bcdb | ||
|
|
17665e1f8e | ||
|
|
bf04b9465b | ||
|
|
4e92e71349 | ||
|
|
f25c501cb4 |
No files matched your search
+6
-2
@@ -19,7 +19,9 @@ LDFLAGS = -Wall -O2 -pthread
|
|||||||
DLFLAGS = -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .ld.so
|
DLSUFFICS = .ld.so
|
||||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||||
LIBS = -lcrypto -lssl -ldl
|
#LIBS = -lcrypto -lssl -ldl
|
||||||
|
# libcrypto and libssl are required for SSLPlugin
|
||||||
|
LIBS = -ldl
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
EXESUFFICS =
|
EXESUFFICS =
|
||||||
OBJSUFFICS = .o
|
OBJSUFFICS = .o
|
||||||
@@ -29,7 +31,9 @@ REMOVECOMMAND = rm -f
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.Linux
|
MAKEFILE = Makefile.Linux
|
||||||
PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||||
|
# SSLPlugin is not built by default because of external dependencies
|
||||||
|
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
#include <sys/resource.h>
|
||||||
#ifndef NOPLUGINS
|
#ifndef NOPLUGINS
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -359,9 +360,8 @@ unsigned char * dologname (unsigned char *buf, unsigned char *name, const unsign
|
|||||||
|
|
||||||
memset(&fakecli, 0, sizeof(fakecli));
|
memset(&fakecli, 0, sizeof(fakecli));
|
||||||
dobuf2(&fakecli, buf, NULL, NULL, ts, (char *)name);
|
dobuf2(&fakecli, buf, NULL, NULL, ts, (char *)name);
|
||||||
return buf;
|
|
||||||
}
|
}
|
||||||
switch(lt){
|
else switch(lt){
|
||||||
case NONE:
|
case NONE:
|
||||||
sprintf((char *)buf, "%s", name);
|
sprintf((char *)buf, "%s", name);
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -132,8 +132,8 @@ char * proxy_stringtable[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BUFSIZE 4096
|
#define LINESIZE 4096
|
||||||
#define LINESIZE 2048
|
#define BUFSIZE (LINESIZE*2)
|
||||||
|
|
||||||
static void logurl(struct clientparam * param, char * buf, char * req, int ftp){
|
static void logurl(struct clientparam * param, char * buf, char * req, int ftp){
|
||||||
char *sb;
|
char *sb;
|
||||||
|
|||||||
+9
-5
@@ -460,22 +460,26 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
#else
|
#else
|
||||||
h = (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES )NULL, (unsigned)32768, (BEGINTHREADFUNC)srv.pf, (void *) newparam, 0, &thread);
|
h = (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES )NULL, (unsigned)32768, (BEGINTHREADFUNC)srv.pf, (void *) newparam, 0, &thread);
|
||||||
#endif
|
#endif
|
||||||
newparam->threadid = (unsigned)thread;
|
srv.childcount++;
|
||||||
if (h) {
|
if (h) {
|
||||||
srv.childcount++;
|
newparam->threadid = (unsigned)thread;
|
||||||
CloseHandle(h);
|
CloseHandle(h);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myfree(newparam);
|
sprintf((char *)buf, "_beginthreadex(): %s", _strerror(NULL));
|
||||||
|
if(!srv.silent)(*srv.logfunc)(&defparam, buf);
|
||||||
|
freeparam(newparam);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if((error = pthread_create(&thread, &pa, (PTHREADFUNC)srv.pf, (void *)newparam))){
|
|
||||||
|
error = pthread_create(&thread, &pa, (PTHREADFUNC)srv.pf, (void *)newparam);
|
||||||
|
srv.childcount++;
|
||||||
|
if(error){
|
||||||
sprintf((char *)buf, "pthread_create(): %s", strerror(error));
|
sprintf((char *)buf, "pthread_create(): %s", strerror(error));
|
||||||
if(!srv.silent)(*srv.logfunc)(&defparam, buf);
|
if(!srv.silent)(*srv.logfunc)(&defparam, buf);
|
||||||
freeparam(newparam);
|
freeparam(newparam);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
srv.childcount++;
|
|
||||||
newparam->threadid = (unsigned)thread;
|
newparam->threadid = (unsigned)thread;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
#define VERSION "3proxy-0.7.1"
|
#define VERSION "3proxy-0.7.1.2"
|
||||||
#define BUILDDATE "140628175321"
|
#define BUILDDATE "150217161415"
|
||||||
+2
-2
@@ -480,9 +480,9 @@ void * adminchild(struct clientparam* param) {
|
|||||||
"<td>MB%s</td>"
|
"<td>MB%s</td>"
|
||||||
"<td>%.3f MB</td>"
|
"<td>%.3f MB</td>"
|
||||||
"<td>%s</td>",
|
"<td>%s</td>",
|
||||||
(1024.0 * (float)cp->traflimgb) + (float)cp->traflim/1048576.0,
|
(4 * 1024.0 * (float)cp->traflimgb) + (float)cp->traflim/(1024.*1024.),
|
||||||
rotations[cp->type],
|
rotations[cp->type],
|
||||||
(1024.0 * (float)cp->trafgb) + (float)cp->traf/1048576.0,
|
(4 * 1024.0 * (float)cp->trafgb) + (float)cp->traf/(1024.*1024.),
|
||||||
cp->cleared?ctime(&cp->cleared):"never"
|
cp->cleared?ctime(&cp->cleared):"never"
|
||||||
);
|
);
|
||||||
inbuf += sprintf(buf + inbuf,
|
inbuf += sprintf(buf + inbuf,
|
||||||
|
|||||||
Reference in new issue
Block a user