mirror of
https://github.com/3proxy/3proxy.git
synced 2025-04-22 04:02:08 +08:00
Compare commits
No commits in common. "eaf66dc8d174263169bb69c58129feb48e402343" and "d80889474b623da83a183bb9e5fcc094e8508498" have entirely different histories.
eaf66dc8d1
...
d80889474b
50
.github/workflows/c-cpp.yml
vendored
50
.github/workflows/c-cpp.yml
vendored
@ -1,50 +0,0 @@
|
|||||||
name: C/C++ CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp.yml' ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp.yml' ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
name: "${{ matrix.target }}"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target:
|
|
||||||
- ubuntu-latest
|
|
||||||
- ubuntu-24.04-arm
|
|
||||||
- macos-15
|
|
||||||
- windows-2022
|
|
||||||
runs-on: ${{ matrix.target }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# - name: configure
|
|
||||||
# run: ./configure
|
|
||||||
- name: ln Linux
|
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
|
||||||
run: ln -s Makefile.Linux Makefile
|
|
||||||
- name: ln Mac
|
|
||||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
|
||||||
run: ln -s Makefile.FreeBSD Makefile
|
|
||||||
- name: ln Windows
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
run: copy Makefile.win Makefile
|
|
||||||
- name: dirs Windows
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win'
|
|
||||||
- name: SSLPlugin Linux
|
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
|
||||||
run: 'echo PLUGINS := $(PLUGINS) SSLPlugin >>Makefile & echo LIBS := $(LIBS) -lcrypto -lssl >>Makefile'
|
|
||||||
- name: make
|
|
||||||
run: make
|
|
||||||
- name: mkdir
|
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
|
||||||
run: mkdir ~/3proxy
|
|
||||||
- name: make install
|
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
|
||||||
run: make DESTDIR=~/3proxy install
|
|
||||||
- name: make clean
|
|
||||||
run: make clean
|
|
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC = clang
|
CC = clang
|
||||||
CFLAGS = -O2 -fno-strict-aliasing -c -pthread -DWITH_STD_MALLOC -DWITH_WSAPOLL
|
CFLAGS = -O2 -fno-strict-aliasing -c -pthread -static -DWITH_STD_MALLOC -DNOIPV6
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN = $(CC)
|
LN = $(CC)
|
||||||
LDFLAGS = -O2 -fno-strict-aliasing -s
|
LDFLAGS = -O2 -fno-strict-aliasing -static -s
|
||||||
DLFLAGS = -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .dll
|
DLSUFFICS = .dll
|
||||||
LIBS = -lws2_32 -lodbc32 -ladvapi32 -luser32 -lcrypto -lssl
|
LIBS = -lws2_32 -lodbc32 -ladvapi32
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
@ -28,11 +28,10 @@ REMOVECOMMAND = rm -f
|
|||||||
AFTERCLEAN = find src/ -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete
|
AFTERCLEAN = find src/ -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete
|
||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.llvm
|
MAKEFILE = Makefile.win
|
||||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin SSLPlugin
|
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
allplugins:
|
allplugins:
|
||||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.o &&cd ..\..)
|
||||||
|
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL
|
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DNOIPV6 -DNORADIUS
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN = gcc
|
LN = gcc
|
||||||
LDFLAGS = -O2 -s -mthreads
|
LDFLAGS = -O2 -s -mthreads
|
||||||
DLFLAGS = -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .dll
|
DLSUFFICS = .dll
|
||||||
LIBS = -lws2_32 -lodbc32 -ladvapi32 -luser32 -lcrypto -lssl
|
LIBS = -lws2_32 -lodbc32 -ladvapi32
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
@ -28,10 +28,9 @@ REMOVECOMMAND = rm -f
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.win
|
MAKEFILE = Makefile.win
|
||||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin SSLPLugin
|
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
allplugins:
|
allplugins:
|
||||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
|
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "../../structures.h"
|
#include "../../structures.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define PCRE_STATIC
|
|
||||||
#include "pcre.h"
|
#include "pcre.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../structures.h"
|
#include "../../structures.h"
|
||||||
|
#include <openssl/rsa.h> /* SSLeay stuff */
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
@ -438,14 +439,18 @@ static void* ssl_filter_open(void * idata, struct srvparam * srv){
|
|||||||
if(sc->client_cipher_list)SSL_CTX_set_cipher_list(sc->srv_ctx, sc->client_cipher_list);
|
if(sc->client_cipher_list)SSL_CTX_set_cipher_list(sc->srv_ctx, sc->client_cipher_list);
|
||||||
if(sc->client_ciphersuites)SSL_CTX_set_ciphersuites(sc->srv_ctx, sc->client_ciphersuites);
|
if(sc->client_ciphersuites)SSL_CTX_set_ciphersuites(sc->srv_ctx, sc->client_ciphersuites);
|
||||||
if(sc->client_verify){
|
if(sc->client_verify){
|
||||||
if(sc->client_ca_file || sc->client_ca_dir){
|
if(sc->client_ca_file && sc->client_ca_dir){
|
||||||
SSL_CTX_load_verify_locations(sc->srv_ctx, sc->client_ca_file, sc->client_ca_dir);
|
SSL_CTX_load_verify_locations(sc->srv_ctx, sc->client_ca_file, sc->client_ca_dir);
|
||||||
}
|
}
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
else if(sc->client_ca_file){
|
||||||
|
SSL_CTX_load_verify_file(sc->srv_ctx, sc->client_ca_file);
|
||||||
|
}
|
||||||
|
else if(sc->client_ca_dir){
|
||||||
|
SSL_CTX_load_verify_dir(sc->srv_ctx, sc->client_ca_dir);
|
||||||
|
}
|
||||||
else if(sc->client_ca_store){
|
else if(sc->client_ca_store){
|
||||||
SSL_CTX_load_verify_store(sc->srv_ctx, sc->client_ca_store);
|
SSL_CTX_load_verify_store(sc->srv_ctx, sc->client_ca_store);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
SSL_CTX_set_default_verify_paths(sc->srv_ctx);
|
SSL_CTX_set_default_verify_paths(sc->srv_ctx);
|
||||||
SSL_CTX_set_verify(sc->srv_ctx, SSL_VERIFY_PEER, verify_callback);
|
SSL_CTX_set_verify(sc->srv_ctx, SSL_VERIFY_PEER, verify_callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user