From 1404c63e10a0ac7e6a789945796c9f856eb807c1 Mon Sep 17 00:00:00 2001
From: z3APA3A <3APA3A@3proxy.ru>
Date: Sun, 28 Feb 2016 13:40:25 +0300
Subject: [PATCH 1/4] add index.html to repro
---
.gitignore | 1 -
doc/html/index.html | 18 ++++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 doc/html/index.html
diff --git a/.gitignore b/.gitignore
index bde1eb6..3d7d005 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,7 +34,6 @@ src/dighosts
*.dSYM
doc/html/man3/
doc/html/man8/
-doc/html/index.html
*.var
verfile.sh
Makefile
diff --git a/doc/html/index.html b/doc/html/index.html
new file mode 100644
index 0000000..51183a9
--- /dev/null
+++ b/doc/html/index.html
@@ -0,0 +1,18 @@
+
3proxy documentation3proxy documentation
+Security recommendations
+How To (English, very incomplete)
+How To (Russian)
+FAQ (English)
+FAQ (Russian)
+Man pages:
+
3proxy.8
+
ftppr.8
+
icqpr.8
+
pop3p.8
+
proxy.8
+
smtpp.8
+
socks.8
+
tcppm.8
+
udppm.8
+
3proxy.cfg.3
+
From 10a79faa32d5f0547d7605bd0c43572655aae55b Mon Sep 17 00:00:00 2001
From: z3APA3A <3APA3A@3proxy.ru>
Date: Sun, 28 Feb 2016 15:10:38 +0300
Subject: [PATCH 2/4] publish as devel
---
3proxy.rc | 8 ++++----
src/version.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/3proxy.rc b/3proxy.rc
index ce5d8ae..062c625 100644
--- a/3proxy.rc
+++ b/3proxy.rc
@@ -2,8 +2,8 @@
1 VERSIONINFO
-FILEVERSION 0,8,4,0
-PRODUCTVERSION 0,8,4,0
+FILEVERSION 0,9,0,0
+PRODUCTVERSION 0,9,0,0
FILETYPE 1
FILESUBTYPE 0x0L
BEGIN
@@ -14,12 +14,12 @@ BEGIN
VALUE "Comments", "3proxy - tiny proxy server, http://3proxy.ru/\0"
VALUE "CompanyName", "Vladimir Dubrovin\0"
VALUE "FileDescription", "3proxy - tiny proxy server\0"
- VALUE "FileVersion", "0.8.4\0"
+ VALUE "FileVersion", "0.9-devel-" BUILDDATE "\0"
VALUE "InternalName", "3proxy\0"
VALUE "LegalCopyright", "Copyright (C) 2002-2016 Vladimir Dubrovin\0"
VALUE "OriginalFilename", "3proxy.exe\0"
VALUE "ProductName", "3proxy\0"
- VALUE "ProductVersion", "0.8.4\0"
+ VALUE "ProductVersion", "0.9-devel-" BUILDDATE "\0"
END
END
BLOCK "VarFileInfo"
diff --git a/src/version.h b/src/version.h
index 61891c6..fef05bd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,2 +1,2 @@
-#define VERSION "3proxy-0.8.4"
-#define BUILDDATE "160222003547"
+#define VERSION "3proxy-0.9-devel"
+#define BUILDDATE "160228150442"
From 75a7d5bb9e18f06e180dccfa954017de33c23f75 Mon Sep 17 00:00:00 2001
From: z3APA3A <3APA3A@3proxy.ru>
Date: Wed, 2 Mar 2016 19:00:01 +0300
Subject: [PATCH 3/4] Remove SSLPlugin and PamAuth from default Linux makefile
---
Makefile.Linux | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile.Linux b/Makefile.Linux
index 409faaf..ac100bf 100644
--- a/Makefile.Linux
+++ b/Makefile.Linux
@@ -18,7 +18,6 @@ LDFLAGS = -O2 -pthread
DLFLAGS = -shared
DLSUFFICS = .ld.so
# -lpthreads may be reuqired on some platforms instead of -pthreads
-LIBS = -lcrypto -lssl -ldl
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o
@@ -30,7 +29,12 @@ REMOVECOMMAND = rm -f
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.Linux
-PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
+# PamAuth requires libpam, you may require pam-devel package to be installed
+# SSLPlugin requires -lcrypto -lssl
+#LIBS = -lcrypto -lssl -ldl
+LIBS = -ldl
+#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
+PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
include Makefile.inc
From 58a64924ddff9e6e1c9d8d0faa876af0449695d4 Mon Sep 17 00:00:00 2001
From: z3APA3A <3APA3A@3proxy.ru>
Date: Wed, 2 Mar 2016 19:00:28 +0300
Subject: [PATCH 4/4] log_mutex used prior to initialization
---
src/3proxy.c | 1 +
src/proxy.h | 1 -
src/proxymain.c | 7 +------
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/3proxy.c b/src/3proxy.c
index 5e5f66c..8675503 100644
--- a/src/3proxy.c
+++ b/src/3proxy.c
@@ -515,6 +515,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
pthread_mutex_init(&hash_mutex, NULL);
pthread_mutex_init(&tc_mutex, NULL);
pthread_mutex_init(&pwl_mutex, NULL);
+ pthread_mutex_init(&log_mutex, NULL);
freeconf(&conf);
res = readconfig(fp);
diff --git a/src/proxy.h b/src/proxy.h
index fa0a25c..3c93658 100644
--- a/src/proxy.h
+++ b/src/proxy.h
@@ -314,7 +314,6 @@ extern pthread_mutex_t hash_mutex;
extern pthread_mutex_t tc_mutex;
extern pthread_mutex_t pwl_mutex;
extern pthread_mutex_t log_mutex;
-
extern struct datatype datatypes[64];
extern struct commands commandhandlers[];
diff --git a/src/proxymain.c b/src/proxymain.c
index d409d9b..d809b81 100644
--- a/src/proxymain.c
+++ b/src/proxymain.c
@@ -9,7 +9,6 @@
#include "proxy.h"
pthread_mutex_t log_mutex;
-int logmutexinit = 0;
#define param ((struct clientparam *) p)
#ifdef _WIN32
@@ -180,11 +179,6 @@ int MODULEMAINFUNC (int argc, char** argv){
#endif
#endif
- if(!logmutexinit){
- pthread_mutex_init(&log_mutex, NULL);
- logmutexinit = 1;
- }
-
srvinit(&srv, &defparam);
srv.pf = childdef.pf;
isudp = childdef.isudp;
@@ -202,6 +196,7 @@ int MODULEMAINFUNC (int argc, char** argv){
}
#else
srv.needuser = 0;
+ pthread_mutex_init(&log_mutex, NULL);
#endif
for (i=1; i