mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-13 00:10:11 +08:00
Compare commits
1 Commits
251c6061a5
...
f631d8888e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f631d8888e |
68
.github/workflows/c-cpp.yml
vendored
68
.github/workflows/c-cpp.yml
vendored
@ -23,56 +23,34 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: configure
|
# - name: configure
|
||||||
# run: ./configure
|
# run: ./configure
|
||||||
|
- name: ln Linux
|
||||||
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
|
run: ln -s Makefile.Linux Makefile
|
||||||
- name: Linux libraries
|
- name: Linux libraries
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
run: sudo apt install libssl-dev libpam-dev libpcre3 libpcre3-dev
|
run: sudo apt install libssl-dev libpam-dev libpcre3 libpcre3-dev
|
||||||
- name: make Ubuntu
|
- name: Mac libraries
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
if: ${{ startsWith(matrix.target, 'macos') }}
|
||||||
run: make -f Makefile.Linux
|
run: brew install pcre
|
||||||
|
- name: ln Mac
|
||||||
|
if: ${{ startsWith(matrix.target, 'macos') }}
|
||||||
|
run: ln -s Makefile.FreeBSD Makefile
|
||||||
|
- name: Mac variables
|
||||||
|
if: ${{ startsWith(matrix.target, 'macos') }}
|
||||||
|
run: echo "LDFLAGS=-L/usr/local/lib -L/opt/homebrew/lib -L/usr/local/opt/openssl/lib -L/opt/homebrew/opt/openssl/lib" >> $GITHUB_ENV && echo "CFLAGS=-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include" >> $GITHUB_ENV
|
||||||
|
- 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/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib" && set && dir "C:/mingw64/bin" && dir "C:/" && dir "C:/msys64/ucrt64/bin"'
|
||||||
|
- name: make
|
||||||
|
run: make
|
||||||
- name: mkdir
|
- name: mkdir
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
run: mkdir ~/3proxy
|
run: mkdir ~/3proxy
|
||||||
- name: make install
|
- name: make install
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
run: make -f Makefile.Linux DESTDIR=~/3proxy install
|
run: make DESTDIR=~/3proxy install
|
||||||
- name: make clean Linux
|
- name: make clean
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
run: make clean
|
||||||
run: make -f Makefile.Linux clean
|
|
||||||
- name: Mac libraries
|
|
||||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
|
||||||
run: brew install pcre
|
|
||||||
- name: make MacOS
|
|
||||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
|
||||||
run: make -f Makefile.FreeBSD
|
|
||||||
env:
|
|
||||||
LDFLAGS: "-L/usr/local/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl/lib"
|
|
||||||
CFLAGS: "-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include"
|
|
||||||
- name: make clean MacOS
|
|
||||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
|
||||||
run: make -f Makefile.FreeBSD clean
|
|
||||||
- name: make Windows
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
run: make -f Makefile.win
|
|
||||||
env:
|
|
||||||
LIBS: '-L "c:/program files/openssl/lib/VC/x64/MT"'
|
|
||||||
CFLAGS: '-I "c:/program files/openssl/include"'
|
|
||||||
- name: make clean Windows
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
run: make -f Makefile.win clean
|
|
||||||
- name: Add msbuild to PATH
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
uses: microsoft/setup-msbuild@v3
|
|
||||||
- name: make Windows MSVC
|
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
||||||
D:
|
|
||||||
cd "D:/a/3proxy/3proxy"
|
|
||||||
mkdir bin64
|
|
||||||
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT"
|
|
||||||
nmake /F Makefile.msvc64
|
|
||||||
nmake /F Makefile.msvc64 clean
|
|
||||||
env:
|
|
||||||
LIBS: '/LIBPATH:"c:/program files/openssl/lib/VC/x64/MT"'
|
|
||||||
CFLAGS: '-I "c:/program files/openssl/include"'
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -259,4 +259,3 @@ pip-log.txt
|
|||||||
|
|
||||||
#Mr Developer
|
#Mr Developer
|
||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
CLAUDE.md
|
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
|
|
||||||
CFLAGS := -c -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
|
CFLAGS += -c -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN ?= ${CC}
|
LN ?= ${CC}
|
||||||
LDFLAGS += -pthread -fno-strict-aliasing
|
LDFLAGS += -pthread -fno-strict-aliasing
|
||||||
# -lpthreads may be reuiured on some platforms instead of -pthreads
|
# -lpthreads may be reuiured on some platforms instead of -pthreads
|
||||||
# -ldl or -lld may be required for some platforms
|
# -ldl or -lld may be required for some platforms
|
||||||
DCFLAGS ?= -fPIC
|
DCFLAGS = -fPIC
|
||||||
DLFLAGS ?= -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .so
|
DLSUFFICS = .so
|
||||||
LIBS ?=
|
LIBS ?=
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
|
|||||||
@ -8,14 +8,14 @@
|
|||||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC ?= gcc
|
CC = gcc
|
||||||
|
|
||||||
CFLAGS := -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER $(CFLAGS)
|
CFLAGS = -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN ?= ${CC}
|
LN = $(CC)
|
||||||
DCFLAGS ?=
|
DCFLAGS =
|
||||||
LDFLAGS ?= -fPIC -O2 -fno-strict-aliasing -pthread
|
LDFLAGS = -fPIC -O2 -fno-strict-aliasing -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
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
|
|||||||
@ -10,13 +10,13 @@ MAKEFILE = Makefile.msvc64
|
|||||||
|
|
||||||
BUILDDIR = ../bin64/
|
BUILDDIR = ../bin64/
|
||||||
CC = cl
|
CC = cl
|
||||||
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "WITH_SSL" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE) $(CFLAGS)
|
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "WITH_SSL" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE)
|
||||||
COUT = /Fo
|
COUT = /Fo
|
||||||
LN = link
|
LN = link
|
||||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64
|
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64
|
||||||
DLFLAGS = /DLL
|
DLFLAGS = /DLL
|
||||||
DLSUFFICS = .dll
|
DLSUFFICS = .dll
|
||||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib $(LIBS)
|
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib
|
||||||
LIBSOLD = libeay32.lib ssleay32.lib
|
LIBSOLD = libeay32.lib ssleay32.lib
|
||||||
LIBSPREFIX =
|
LIBSPREFIX =
|
||||||
LIBSSUFFIX = .lib
|
LIBSSUFFIX = .lib
|
||||||
@ -31,7 +31,7 @@ TYPECOMMAND = type
|
|||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
VERFILE = 3proxy.res $(VERFILE)
|
VERFILE = 3proxy.res $(VERFILE)
|
||||||
VERSIONDEP = 3proxy.res $(VERSIONDEP)
|
VERSIONDEP = 3proxy.res $(VERSIONDEP)
|
||||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin
|
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin
|
||||||
AFTERCLEAN = del src\*.res
|
AFTERCLEAN = del src\*.res
|
||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|||||||
@ -8,21 +8,21 @@
|
|||||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC ?= gcc
|
CC = gcc
|
||||||
|
|
||||||
# you may need -L/usr/pkg/lib for older NetBSD versions
|
# you may need -L/usr/pkg/lib for older NetBSD versions
|
||||||
CFLAGS := -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
|
CFLAGS = -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN ?= $(CC)
|
LN = $(CC)
|
||||||
LDFLAGS ?= -O2 -fno-strict-aliasing -pthread
|
LDFLAGS = -O2 -fno-strict-aliasing -pthread
|
||||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||||
# -ldl or -lld may be required for some platforms
|
# -ldl or -lld may be required for some platforms
|
||||||
DCFLAGS ?= -fPIC
|
DCFLAGS = -fPIC
|
||||||
DLFLAGS ?= -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS ?= .ld.so
|
DLSUFFICS = .ld.so
|
||||||
LIBS ?=
|
LIBS ?=
|
||||||
LIBSPREFIX ?= -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX ?=
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
EXESUFFICS =
|
EXESUFFICS =
|
||||||
OBJSUFFICS = .o
|
OBJSUFFICS = .o
|
||||||
|
|||||||
29
Makefile.win
29
Makefile.win
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC ?= gcc
|
CC = gcc
|
||||||
CFLAGS := -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL $(CFLAGS)
|
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN ?= $(CC)
|
LN = gcc
|
||||||
LDFLAGS ?= -O2 -s -mthreads
|
LDFLAGS = -O2 -s -mthreads
|
||||||
DLFLAGS ?= -shared
|
DLFLAGS = -shared
|
||||||
DLSUFFICS = .dll
|
DLSUFFICS = .dll
|
||||||
LIBS := -lws2_32 -lodbc32 -ladvapi32 -luser32 $(LIBS)
|
LIBS = -lws2_32 -lodbc32 -ladvapi32 -luser32 -lcrypto -lssl
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
@ -28,28 +28,13 @@ REMOVECOMMAND = rm -f
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.win
|
MAKEFILE = Makefile.win
|
||||||
PLUGINS := utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
|
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin SSLPLugin PCREPlugin
|
||||||
VERFILE := 3proxyres.o $(VERFILE)
|
VERFILE := 3proxyres.o $(VERFILE)
|
||||||
VERSION := $(VERSION)
|
VERSION := $(VERSION)
|
||||||
VERSIONDEP := 3proxyres.o $(VERSIONDEP)
|
VERSIONDEP := 3proxyres.o $(VERSIONDEP)
|
||||||
BUILDDATE := $(BUILDDATE)
|
BUILDDATE := $(BUILDDATE)
|
||||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find . -type f -name "*.res" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
AFTERCLEAN = (find . -type f -name "*.o" -delete && find . -type f -name "*.res" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||||
|
|
||||||
OPENSSL_CHECK = $(shell echo "#include <openssl/ssl.h>\\n int main(){return 0;}" | 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 "#include <pcre.h>\\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
|
|
||||||
ifeq ($(PCRE_CHECK), true)
|
|
||||||
PLUGINS += PCREPlugin
|
|
||||||
endif
|
|
||||||
PAM_CHECK = $(shell echo "#include <security/pam_appl.h>\\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false)
|
|
||||||
ifeq ($(PAM_CHECK), true)
|
|
||||||
PLUGINS += PamAuth
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
3proxyres.o:
|
3proxyres.o:
|
||||||
|
|||||||
@ -13,6 +13,9 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifdef WITH_SSL
|
||||||
|
#include <openssl/applink.c>
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
114
src/common.c
114
src/common.c
@ -92,85 +92,49 @@ char *rotations[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int timeouts[12] = {
|
|
||||||
1, /* SINGLEBYTE_S */
|
|
||||||
5, /* SINGLEBYTE_L */
|
|
||||||
30, /* STRING_S */
|
|
||||||
60, /* STRING_L */
|
|
||||||
180, /* CONNECTION_S */
|
|
||||||
1800, /* CONNECTION_L */
|
|
||||||
15, /* DNS_TO */
|
|
||||||
60, /* CHAIN_TO */
|
|
||||||
15, /* CONNECT_TO */
|
|
||||||
5, /* CONNBACK_TO */
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
struct extparam conf = {
|
struct extparam conf = {
|
||||||
.threadinit = {0, 0},
|
{0, 0}, /* threadinit */
|
||||||
.timeouts = timeouts,
|
{1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0}, /* timeouts */
|
||||||
.acl = NULL,
|
NULL, /* struct ace * acl; */
|
||||||
.conffile = NULL,
|
NULL, /* char * conffile; */
|
||||||
.bandlimiter = NULL,
|
NULL, NULL, /* struct bandlim * bandlimiter, *bandlimiterout; */
|
||||||
.bandlimiterout = NULL,
|
NULL, /* struct connlim * connlimiter; */
|
||||||
.connlimiter = NULL,
|
NULL, /* struct trafcount * trafcounter; */
|
||||||
.trafcounter = NULL,
|
NULL, /* struct srvparam *services; */
|
||||||
.services = NULL,
|
0, /* int stacksize, */
|
||||||
.stacksize = 0,
|
-1, 0, 0, 0, 0, /* counterd, haveerror, rotate, paused, archiverc, */
|
||||||
.counterd = -1,
|
0, 500, 0, 0, 0, 0, 0, 0, 2, /* demon, maxchild, backlog, needreload, timetoexit, version, noforce, bandlimver, parentretries; */
|
||||||
.haveerror = 0,
|
6, 600, /* int authcachetype, authcachetime; */
|
||||||
.rotate = 0,
|
1048576, /* int filtermaxsize; */
|
||||||
.paused = 0,
|
0, 0, 0, /* int gracetraf, gracenum, gracedelay */
|
||||||
.archiverc = 0,
|
0, /* int maxseg */
|
||||||
.demon = 0,
|
NULL, NULL, /* unsigned char *logname, **archiver; */
|
||||||
.maxchild = 500,
|
NONE, NONE, /* ROTATION logtype, countertype; */
|
||||||
.backlog = 0,
|
NULL, /* char * counterfile; */
|
||||||
.needreload = 0,
|
|
||||||
.timetoexit = 0,
|
|
||||||
.version = 0,
|
|
||||||
.noforce = 0,
|
|
||||||
.bandlimver = 0,
|
|
||||||
.parentretries = 2,
|
|
||||||
.authcachetype = 6,
|
|
||||||
.authcachetime = 600,
|
|
||||||
.filtermaxsize = 1048576,
|
|
||||||
.gracetraf = 0,
|
|
||||||
.gracenum = 0,
|
|
||||||
.gracedelay = 0,
|
|
||||||
.maxseg = 0,
|
|
||||||
.logname = NULL,
|
|
||||||
.archiver = NULL,
|
|
||||||
.logtype = NONE,
|
|
||||||
.countertype = NONE,
|
|
||||||
.counterfile = NULL,
|
|
||||||
#ifndef NOIPV6
|
#ifndef NOIPV6
|
||||||
.intsa = {AF_INET},
|
{AF_INET},
|
||||||
.extsa6 = {AF_INET6},
|
{AF_INET6},
|
||||||
.extsa = {AF_INET},
|
{AF_INET},
|
||||||
#else
|
#else
|
||||||
.intsa = {AF_INET},
|
{AF_INET},
|
||||||
.extsa = {AF_INET},
|
{AF_INET},
|
||||||
#endif
|
#endif
|
||||||
.pwl = NULL,
|
NULL,
|
||||||
.authenticate = NULL,
|
NULL,
|
||||||
.authfunc = doconnect,
|
doconnect,
|
||||||
.logfunc = lognone,
|
lognone,
|
||||||
.bandlimfunc = NULL,
|
NULL,
|
||||||
.trafcountfunc = NULL,
|
NULL,
|
||||||
.logtarget = NULL,
|
NULL, NULL,
|
||||||
.logformat = NULL,
|
NULL,
|
||||||
.fmon = NULL,
|
NULL,
|
||||||
.filters = NULL,
|
NULL,
|
||||||
.authfuncs = NULL,
|
NULL,
|
||||||
.stdlog = NULL,
|
NULL,
|
||||||
.demanddialprog = NULL,
|
NULL,
|
||||||
.stringtable = NULL,
|
(time_t)0, (time_t)0,
|
||||||
.logtime = (time_t)0,
|
0,0,
|
||||||
.time = (time_t)0,
|
'@',
|
||||||
.logdumpsrv = 0,
|
|
||||||
.logdumpcli = 0,
|
|
||||||
.delimchar = '@',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int numservers=0;
|
int numservers=0;
|
||||||
|
|||||||
@ -200,12 +200,12 @@ void mylogfunc(struct clientparam * param, const unsigned char * pz) {
|
|||||||
#endif
|
#endif
|
||||||
rule++;
|
rule++;
|
||||||
if (((g_s == param->service) && (port == myhtons(*SAPORT(¶m->sinsr)))) ||
|
if (((g_s == param->service) && (port == myhtons(*SAPORT(¶m->sinsr)))) ||
|
||||||
( ((starttrafcorrect->con_type == UDP) &&
|
( ((starttrafcorrect->type == UDP) &&
|
||||||
((param->operation == UDPASSOC)||
|
((param->operation == UDPASSOC)||
|
||||||
(param->operation == DNSRESOLVE)||
|
(param->operation == DNSRESOLVE)||
|
||||||
(param->operation == BIND)||
|
(param->operation == BIND)||
|
||||||
(param->operation == ICMPASSOC))
|
(param->operation == ICMPASSOC))
|
||||||
)||(starttrafcorrect->con_type == TCP))) /* TCP support */
|
)||(starttrafcorrect->type == TCP))) /* TCP support */
|
||||||
{
|
{
|
||||||
/* ôèëüòð ïîäîø¸ë. ìîæíî èçìåíÿòü çíà÷åíèå òðàôôèêà
|
/* ôèëüòð ïîäîø¸ë. ìîæíî èçìåíÿòü çíà÷åíèå òðàôôèêà
|
||||||
äîìíîæàåì íà ÷èñëî */
|
äîìíîæàåì íà ÷èñëî */
|
||||||
|
|||||||
@ -154,8 +154,6 @@ extern int timetoexit;
|
|||||||
|
|
||||||
extern struct extparam conf;
|
extern struct extparam conf;
|
||||||
|
|
||||||
extern int timeouts[12];
|
|
||||||
|
|
||||||
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
||||||
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
||||||
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||||
|
|||||||
@ -643,7 +643,7 @@ struct extparam {
|
|||||||
#else
|
#else
|
||||||
int threadinit[2];
|
int threadinit[2];
|
||||||
#endif
|
#endif
|
||||||
int *timeouts;
|
int timeouts[12];
|
||||||
struct ace * acl;
|
struct ace * acl;
|
||||||
char * conffile;
|
char * conffile;
|
||||||
struct bandlim * bandlimiter, *bandlimiterout;
|
struct bandlim * bandlimiter, *bandlimiterout;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user