From 0f43f992ac43c3d46bd25504dd52077ed7b062ad Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 3 Apr 2026 11:26:30 +0300 Subject: [PATCH] rollback changes in SSLPlugin makefile --- .github/workflows/c-cpp.yml | 6 +++--- Makefile.FreeBSD | 3 ++- Makefile.Linux | 1 + Makefile.msvc | 3 ++- Makefile.msvc64 | 5 +++-- Makefile.msvcARM64 | 2 +- Makefile.openwrt-mips | 3 +++ Makefile.unix | 1 + Makefile.win | 1 + src/plugins/SSLPlugin/Makefile.inc | 2 +- 10 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 4bd9ceb..64879dc 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -73,9 +73,9 @@ jobs: dir /S "c:\program files\openssl\lib\" dir "c:\vcpkg\installed\x64-windows\lib" mkdir bin64 - set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib" + set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT" nmake /F Makefile.msvc64 nmake /F Makefile.msvc64 clean env: - CFLAGS: '-I "c:/program files/openssl/include" -I "c:/vcpkg/installed/x64-windows/include"' - + LIBS: '/LIBPATH:"c:/program files/openssl/lib/VC/x64/MT"' + CFLAGS: '-I "c:/program files/openssl/include"' diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD index 3854b3a..49c6bae 100644 --- a/Makefile.FreeBSD +++ b/Makefile.FreeBSD @@ -15,8 +15,8 @@ LDFLAGS += -pthread -fno-strict-aliasing # -ldl or -lld may be required for some platforms DCFLAGS ?= -fPIC DLFLAGS ?= -shared -LIBS ?= DLSUFFICS = .so +LIBS ?= LIBSPREFIX = -l LIBSSUFFIX = LNOUT = -o @@ -32,6 +32,7 @@ MAKEFILE = Makefile.FreeBSD PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) diff --git a/Makefile.Linux b/Makefile.Linux index 7681b4f..732c0f2 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -38,6 +38,7 @@ LIBS ?= -ldl PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre2-8 -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) diff --git a/Makefile.msvc b/Makefile.msvc index 7d8a63e..5affb31 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -14,7 +14,8 @@ LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386 DLFLAGS = /DLL DLSUFFICS = .dll -LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib +LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib +LIBSOLD = libeay32MT.lib ssleay32MT.lib LIBSPREFIX = LIBSSUFFIX = .lib LIBEXT = .lib diff --git a/Makefile.msvc64 b/Makefile.msvc64 index dc8a00a..3d2fbe1 100644 --- a/Makefile.msvc64 +++ b/Makefile.msvc64 @@ -16,7 +16,8 @@ LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64 DLFLAGS = /DLL DLSUFFICS = .dll -LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib $(LIBS) +LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib $(LIBS) +LIBSOLD = libeay32.lib ssleay32.lib LIBSPREFIX = LIBSSUFFIX = .lib LIBEXT = .lib @@ -30,7 +31,7 @@ TYPECOMMAND = type COMPATLIBS = VERFILE = 3proxy.res $(VERFILE) VERSIONDEP = 3proxy.res $(VERSIONDEP) -PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin +PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin AFTERCLEAN = del src\*.res include Makefile.inc diff --git a/Makefile.msvcARM64 b/Makefile.msvcARM64 index bda64bc..a892c0d 100644 --- a/Makefile.msvcARM64 +++ b/Makefile.msvcARM64 @@ -14,7 +14,7 @@ LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:arm64 DLFLAGS = /DLL DLSUFFICS = .dll -LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib +LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib libcrypto.lib libssl.lib LIBSOLD = LIBSPREFIX = LIBSSUFFIX = .lib diff --git a/Makefile.openwrt-mips b/Makefile.openwrt-mips index 2181bb2..0cbe8f0 100644 --- a/Makefile.openwrt-mips +++ b/Makefile.openwrt-mips @@ -31,11 +31,14 @@ TYPECOMMAND = cat COMPATLIBS = MAKEFILE = Makefile.openwrt-mips # 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 TransparentPlugin OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre2-8 -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) diff --git a/Makefile.unix b/Makefile.unix index 7b2415b..6082a79 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -36,6 +36,7 @@ MAKEFILE = Makefile.unix PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) diff --git a/Makefile.win b/Makefile.win index a7fa6b5..65ec8af 100644 --- a/Makefile.win +++ b/Makefile.win @@ -38,6 +38,7 @@ AFTERCLEAN = (find . -type f -name "*.o" -delete && find . -type f -name "*.res" ifndef OPENSSL_CHECK OPENSSL_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d '\\\\' | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl PLUGINS += SSLPlugin endif PAM_CHECK = $(shell echo "\#include \\n int main(){return 0;}" | tr -d '\\\\' | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) diff --git a/src/plugins/SSLPlugin/Makefile.inc b/src/plugins/SSLPlugin/Makefile.inc index 5f2717e..1afc984 100644 --- a/src/plugins/SSLPlugin/Makefile.inc +++ b/src/plugins/SSLPlugin/Makefile.inc @@ -10,5 +10,5 @@ my_ssl$(OBJSUFFICS): my_ssl.c $(BUILDDIR)SSLPlugin$(DLSUFFICS): ssl_plugin$(OBJSUFFICS) my_ssl$(OBJSUFFICS) - $(LN) $(LNOUT)../../$(BUILDDIR)SSLPlugin$(DLSUFFICS) $(LDFLAGS) $(DLFLAGS) ssl_plugin$(OBJSUFFICS) my_ssl$(OBJSUFFICS) $(LIBSPREFIX)crypto$(LIBSSUFFIX) $(LIBSPREFIX)ssl$(LIBSSUFFIX) + $(LN) $(LNOUT)../../$(BUILDDIR)SSLPlugin$(DLSUFFICS) $(LDFLAGS) $(DLFLAGS) ssl_plugin$(OBJSUFFICS) my_ssl$(OBJSUFFICS) $(LIBS) \ No newline at end of file