mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-12 16:00:11 +08:00
Compare commits
33 Commits
f631d8888e
...
251c6061a5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
251c6061a5 | ||
|
|
5cb42abbb3 | ||
|
|
46be1fb96c | ||
|
|
a5c81e4a29 | ||
|
|
d19a412b11 | ||
|
|
cf045b3bea | ||
|
|
8efaee2651 | ||
|
|
3189a6a93e | ||
|
|
da0aebe31c | ||
|
|
ecc8d98f88 | ||
|
|
7fb1dc4f65 | ||
|
|
6bbf528a20 | ||
|
|
cc2a6ecc4a | ||
|
|
772da8837a | ||
|
|
d790e11ac6 | ||
|
|
74cdf66786 | ||
|
|
cbbe4d999e | ||
|
|
ac1a667a50 | ||
|
|
83229aa69e | ||
|
|
71f35a78ec | ||
|
|
2df68ddb33 | ||
|
|
81f573ddec | ||
|
|
584f75278b | ||
|
|
4fa2c07dd1 | ||
|
|
e058b56b27 | ||
|
|
7f31a30f00 | ||
|
|
9ea553d44f | ||
|
|
d823d8e712 | ||
|
|
6f2b1a00b6 | ||
|
|
27b4c69dd9 | ||
|
|
637d5e5539 | ||
|
|
ec164ffe81 | ||
|
|
e3e13af922 |
68
.github/workflows/c-cpp.yml
vendored
68
.github/workflows/c-cpp.yml
vendored
@ -23,34 +23,56 @@ 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: Mac libraries
|
- name: make Ubuntu
|
||||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
run: brew install pcre
|
run: make -f Makefile.Linux
|
||||||
- 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 DESTDIR=~/3proxy install
|
run: make -f Makefile.Linux DESTDIR=~/3proxy install
|
||||||
- name: make clean
|
- name: make clean Linux
|
||||||
run: make clean
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
|
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,3 +259,4 @@ 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 := -c -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
|
||||||
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 := -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)
|
||||||
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 = /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)
|
||||||
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 = 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
|
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 PCREPlugin
|
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin
|
||||||
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 := -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
|
||||||
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 := -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL $(CFLAGS)
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN = gcc
|
LN ?= $(CC)
|
||||||
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 -luser32 $(LIBS)
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
@ -28,13 +28,28 @@ REMOVECOMMAND = rm -f
|
|||||||
TYPECOMMAND = cat
|
TYPECOMMAND = cat
|
||||||
COMPATLIBS =
|
COMPATLIBS =
|
||||||
MAKEFILE = Makefile.win
|
MAKEFILE = Makefile.win
|
||||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin SSLPLugin PCREPlugin
|
PLUGINS := utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
|
||||||
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:
|
||||||
|
|||||||
2
README
2
README
@ -12,7 +12,7 @@ Devel branch - 3proxy 10 (don't use it)
|
|||||||
https://github.com/z3APA3A/3proxy/releases
|
https://github.com/z3APA3A/3proxy/releases
|
||||||
|
|
||||||
Docker images:
|
Docker images:
|
||||||
https://hub.docker.com/repository/docker/3proxy/3proxy
|
https://hub.docker.com/r/3proxy/3proxy
|
||||||
Archive of old versions: https://github.com/z3APA3A/3proxy-archive
|
Archive of old versions: https://github.com/z3APA3A/3proxy-archive
|
||||||
|
|
||||||
* Documentation
|
* Documentation
|
||||||
|
|||||||
@ -13,9 +13,6 @@
|
|||||||
#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,49 +92,85 @@ 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 = {
|
||||||
{0, 0}, /* threadinit */
|
.threadinit = {0, 0},
|
||||||
{1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0}, /* timeouts */
|
.timeouts = timeouts,
|
||||||
NULL, /* struct ace * acl; */
|
.acl = NULL,
|
||||||
NULL, /* char * conffile; */
|
.conffile = NULL,
|
||||||
NULL, NULL, /* struct bandlim * bandlimiter, *bandlimiterout; */
|
.bandlimiter = NULL,
|
||||||
NULL, /* struct connlim * connlimiter; */
|
.bandlimiterout = NULL,
|
||||||
NULL, /* struct trafcount * trafcounter; */
|
.connlimiter = NULL,
|
||||||
NULL, /* struct srvparam *services; */
|
.trafcounter = NULL,
|
||||||
0, /* int stacksize, */
|
.services = NULL,
|
||||||
-1, 0, 0, 0, 0, /* counterd, haveerror, rotate, paused, archiverc, */
|
.stacksize = 0,
|
||||||
0, 500, 0, 0, 0, 0, 0, 0, 2, /* demon, maxchild, backlog, needreload, timetoexit, version, noforce, bandlimver, parentretries; */
|
.counterd = -1,
|
||||||
6, 600, /* int authcachetype, authcachetime; */
|
.haveerror = 0,
|
||||||
1048576, /* int filtermaxsize; */
|
.rotate = 0,
|
||||||
0, 0, 0, /* int gracetraf, gracenum, gracedelay */
|
.paused = 0,
|
||||||
0, /* int maxseg */
|
.archiverc = 0,
|
||||||
NULL, NULL, /* unsigned char *logname, **archiver; */
|
.demon = 0,
|
||||||
NONE, NONE, /* ROTATION logtype, countertype; */
|
.maxchild = 500,
|
||||||
NULL, /* char * counterfile; */
|
.backlog = 0,
|
||||||
|
.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
|
||||||
{AF_INET},
|
.intsa = {AF_INET},
|
||||||
{AF_INET6},
|
.extsa6 = {AF_INET6},
|
||||||
{AF_INET},
|
.extsa = {AF_INET},
|
||||||
#else
|
#else
|
||||||
{AF_INET},
|
.intsa = {AF_INET},
|
||||||
{AF_INET},
|
.extsa = {AF_INET},
|
||||||
#endif
|
#endif
|
||||||
NULL,
|
.pwl = NULL,
|
||||||
NULL,
|
.authenticate = NULL,
|
||||||
doconnect,
|
.authfunc = doconnect,
|
||||||
lognone,
|
.logfunc = lognone,
|
||||||
NULL,
|
.bandlimfunc = NULL,
|
||||||
NULL,
|
.trafcountfunc = NULL,
|
||||||
NULL, NULL,
|
.logtarget = NULL,
|
||||||
NULL,
|
.logformat = NULL,
|
||||||
NULL,
|
.fmon = NULL,
|
||||||
NULL,
|
.filters = NULL,
|
||||||
NULL,
|
.authfuncs = NULL,
|
||||||
NULL,
|
.stdlog = NULL,
|
||||||
NULL,
|
.demanddialprog = NULL,
|
||||||
(time_t)0, (time_t)0,
|
.stringtable = NULL,
|
||||||
0,0,
|
.logtime = (time_t)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->type == UDP) &&
|
( ((starttrafcorrect->con_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->type == TCP))) /* TCP support */
|
)||(starttrafcorrect->con_type == TCP))) /* TCP support */
|
||||||
{
|
{
|
||||||
/* ôèëüòð ïîäîø¸ë. ìîæíî èçìåíÿòü çíà÷åíèå òðàôôèêà
|
/* ôèëüòð ïîäîø¸ë. ìîæíî èçìåíÿòü çíà÷åíèå òðàôôèêà
|
||||||
äîìíîæàåì íà ÷èñëî */
|
äîìíîæàåì íà ÷èñëî */
|
||||||
|
|||||||
@ -154,6 +154,8 @@ 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[12];
|
int *timeouts;
|
||||||
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