Commit Graph

418 Commits

Author SHA1 Message Date
z3APA3A
f35f0a0608 Print counters traffic in megabytes in admin 2018-04-27 01:53:10 +03:00
z3APA3A
12b5ad143f correct trafic accounting in spliced map 2018-04-27 01:52:08 +03:00
z3APA3A
836fffddbe Include openssl/applink.c in windows plugin DLL 2018-04-25 14:38:32 +03:00
z3APA3A
1af6e65fba Fix getting group id by groupname 2018-04-24 19:21:35 +03:00
z3APA3A
acc64b03fd Fix recently broken admin -s 2018-04-23 13:49:39 +03:00
z3APA3A
0f9a9d6e37 Fix redirection to http in lite version 2018-04-23 02:34:36 +03:00
Vladimir Dubrovin
b7c667a682 Bugfixes for previous commit 2018-04-23 02:00:53 +03:00
Vladimir Dubrovin
97b97a5664 Typo corrected 2018-04-23 02:00:34 +03:00
z3APA3A
531e0707cf Simplify splicemap 2018-04-23 02:00:19 +03:00
z3APA3A
b3abf80a50 slicedmap - replace usleep with poll, remove SPLICE_F_MOVE
use poll instead of usleep (to get rid of potential blocking in future)
remove SPLICE_F_MOVE
2018-04-22 23:23:22 +03:00
z3APA3A
fd588949c9 remove unneeded check 2018-04-22 22:44:06 +03:00
z3APA3A
0b0de0d2ee cleaunup signed/unsigned mismatch 2018-04-22 21:57:17 +03:00
z3APA3A
d971601316 Rmove more icqpr related things 2018-04-22 21:46:18 +03:00
z3APA3A
24127196ce Remove ICQPR because OSCAR is outdated 2018-04-22 21:46:00 +03:00
z3APA3A
0425cbbdb5 corre usesplice setting 2018-04-22 20:30:16 +03:00
z3APA3A
d2705df891 Use splice by default if no filteers set
-s0 to disable splice
2018-04-22 20:03:04 +03:00
z3APA3A
a4bc89dc8f Fixed recently introduced logging bug
Logging could stop after configuration reload, introduced with
50277692f4
2018-04-22 01:12:54 +03:00
z3APA3A
a42bb38d76 Use WSAPoll on Windows (except lite version) 2018-04-21 23:57:42 +03:00
z3APA3A
78e180a054 fixed: race condition on service stop / restart
Do not close -l file descriptor while there are alive childrent
2018-04-21 17:25:01 +03:00
z3APA3A
de21bd0f6a potential memory leak fixed + TCP_CORK support
potential memleak fixed in very unlikely configuration
TCP_CORK used to prevent sending request apart of headers
2018-04-21 17:05:36 +03:00
z3APA3A
39be30ba5d Simplify socket options printing
+ add supported options to 3proxy help message
2018-04-21 17:02:20 +03:00
z3APA3A
e2906f1219 pass version thorugh building environment 2018-04-21 03:26:49 +03:00
z3APA3A
b76b3b49fa rename static buffer 2018-04-21 01:45:09 +03:00
z3APA3A
83441eebc7 Move log buffer to stack
Move log bufer to stack and remove mutex
2018-04-21 01:37:31 +03:00
z3APA3A
e469e9e369 Increase default stacksize 2018-04-21 01:29:15 +03:00
z3APA3A
d1b527b523 Minor logging changes 2018-04-21 01:24:18 +03:00
z3APA3A
50277692f4 Replace fclose+fopen with freopen where possible 2018-04-21 00:30:02 +03:00
z3APA3A
6c3a5db52f Get rid of pstdint.h 2018-04-20 19:32:49 +03:00
z3APA3A
5149996b20 Added support for username/groupname
Added support for username/groupname to seuid, setgid, chroot.
2018-04-17 18:46:01 +03:00
z3APA3A
be5aa53106 Allow transparent client proxy with 'parent 1000 extip 0.0.0.0' 2018-04-15 00:28:59 +03:00
z3APA3A
25028ed1b8 support IP_ socket options 2018-04-14 23:52:38 +03:00
z3APA3A
a0ae9ee6fa Removing unneeded checks 2018-04-06 17:45:42 +03:00
z3APA3A
7423cd0112 Clearing LdapPlugin compilation issues 2018-04-06 17:45:18 +03:00
z3APA3A
dc55d2b724 UDP portmap doesn't resolve hostname in UDP packet 2018-03-06 20:01:03 +03:00
z3APA3A
22ac04576f Change SSLv23_*_method to TLS_*_method for OpenSSL 1.1 2018-02-17 18:14:59 +03:00
z3APA3A
8b548dccc7 Remove "Proxy-Connection" headers as depricated 2018-02-17 18:14:13 +03:00
z3APA3A
6e240defdb typo in conf.c leads to infinite loop on some commands 2018-01-25 17:20:36 +03:00
z3APA3A
ff91a6fe72 connlim / noconnlim commands added to support connection / connectio rate limits 2018-01-12 19:09:42 +03:00
z3APA3A
2d1720c15f Move RADIUS related code to #ifndef NORADIUS 2017-12-22 18:53:50 +03:00
z3APA3A
4a553de100 RADIUS accounting added (not optimized yet) 2017-12-19 01:22:07 +03:00
z3APA3A
0bda7f332e Move sys/timeb.h to Win32 section. 2017-11-24 12:41:01 +03:00
z3APA3A
d60d00b7b6 Switch to preprocessor macro for version 2017-11-07 21:56:03 +03:00
z3APA3A
6e715df9e1 Fix IPv4/IPv6 addresses in webadmin 2017-11-07 21:53:04 +03:00
z3APA3A
2a781c4a9d Fix: TransparentPlugin for *BSD ipfw 2017-11-06 18:41:36 +03:00
z3APA3A
18e41cfbe9 add hostname logging to tcppm 2017-11-06 17:18:32 +03:00
z3APA3A
930a959779 Do not use SAISNULL in plugin 2017-10-30 18:20:14 +03:00
z3APA3A
ff1a560547 Add NULLADDR to prevent dynamic linkage error under Linux 2017-10-30 18:10:25 +03:00
z3APA3A
4bb706d140 Use parsehostname in TransparentPlugin 2017-10-30 13:43:53 +03:00
z3APA3A
2c8bf28065 Remove static to prevent race conditions 2017-10-18 17:07:12 +03:00
z3APA3A
8c372572fc Add check for nul address 2017-10-17 18:25:35 +03:00
z3APA3A
18c1ce0a22 Support for transparent / notransparent commands added 2017-10-17 18:00:09 +03:00
z3APA3A
b99fa7aaa4 Simplify transparent + add support for BSD PF/IPF 2017-10-17 17:07:35 +03:00
z3APA3A
105522b24e Fix: recursion detection was not working 2017-10-17 15:19:47 +03:00
z3APA3A
8e2a87421c Fix: %n terminated log string on IPv6 address 2017-10-10 18:21:34 +03:00
z3APA3A
984efe193b Prevent deadlock on thread creation error 2017-09-25 17:14:13 +03:00
z3APA3A
2554f06759 pthread_attr_destroy added to prevent memory leak on config reload 2017-09-13 22:05:38 +03:00
z3APA3A
ff9c94f616 Fix: invalid reverse check for dnsresolve 2017-09-08 15:53:42 +03:00
z3APA3A
8c0dc7d8c9 Change -Do option to -De (external) 2017-09-06 19:19:36 +03:00
z3APA3A
b033b150b1 change strdup to mystrdup 2017-08-16 12:08:48 +03:00
z3APA3A
b17b36cbce Add support to bind to interface (-Di / -Do) via SO_BINDTODEVICE 2017-08-14 18:22:15 +03:00
z3APA3A
6010190940 fix: do not fail external with "0.0.0.0" with NOIPV6 (lite version) 2017-07-19 19:23:55 +03:00
z3APA3A
d9e118e754 Change EPSV reply code to 229 2017-06-28 12:33:08 +03:00
z3APA3A
481b9e389f EPSV support for ftppr 2017-06-27 23:28:17 +03:00
z3APA3A
305f01acb5 closecoket() is used instead of so._closesocket 2017-06-26 16:46:26 +03:00
z3APA3A
b4043e944c Unify RADIUS code for logging 2017-06-25 18:40:26 +03:00
z3APA3A
2983575952 banlimits for old connection may stop functioning on configuration reload 2017-06-25 18:37:19 +03:00
z3APA3A
1996b11451 Fix - sometime request may go to parent proxy where it shouldn't 2017-06-25 18:33:28 +03:00
z3APA3A
e75b329e62 Fix ACL copy for last patch 2017-03-07 15:06:22 +03:00
z3APA3A
4251322aad Support hostnames for chained socks5+/socks4+/connect+ requests 2017-03-07 01:19:04 +03:00
z3APA3A
d40e5d458c FIX: tcppm may not work with parent proxy 2017-02-02 00:36:59 +03:00
z3apa3a
34443d6515 Add netinet/tcp.h to includes to support TCP socket options on *nix. 2016-12-25 03:33:15 +03:00
z3APA3A
cfc10e9efd Support for few more socket options 2016-12-25 03:22:52 +03:00
z3APA3A
c1beee44ef Add support for -os, -oc, -ol
-ocOPTIONS, -osOPTIONS, -olOPTIONS - options for client (oc), server
(os) or listening (ol) socket
e.g.
proxy -ocTCP_NODELAY,SO_KEEPALIVE,SO_DONTROUTE
2016-12-25 02:46:30 +03:00
z3APA3A
2ed83b0d6e set TCP_NODELAY for DNS resolution over TCP 2016-12-25 01:28:16 +03:00
z3APA3A
68deec5bcd Update PCRE version 2016-12-24 01:48:52 +03:00
z3APA3A
e2884b182a Add timeout for connect in all modules 2016-12-23 00:56:16 +03:00
z3APA3A
3c9ff54ae8 SSL_Plugin: switch to SHA-256 signature 2016-12-22 19:16:50 +03:00
z3APA3A
16f094168a Correct EINPROGRESS for Windows 2016-12-22 17:46:06 +03:00
z3apa3a
42ca640769 Corrected connect() timeout on *nix 2016-12-22 17:31:17 +03:00
z3APA3A
d1d86ed9b3 implement timeout on connect()
STRING_S timeout is used (15 sec by default)
2016-12-22 17:11:44 +03:00
z3APA3A
c5f8a8e139 Add support for Reply-Message (may be used to send code with Auth-Reject). 2016-12-21 01:33:34 +03:00
z3APA3A
7b4a34f6fc Support for Framed-IP-Address / Framed-IPv6-Address in RADIUS server's reply 2016-12-21 00:30:05 +03:00
z3APA3A
bfe7e89bd0 RADIUS authentication corrected and tested 2016-12-20 23:38:06 +03:00
z3APA3A
e7433d633c 'radius' and 'auth radius' support added (not tested yet)
Example:
radius secret 192.168.0.1 192.168.0.2
authcache ip,user
auth cache radius
2016-12-20 19:50:50 +03:00
z3apa3a
5cb3947c45 radauth.c: implements RADIUS authentication for 3proxy 2016-12-20 18:39:06 +03:00
z3APA3A
f709255d62 Copyrights cleaned, authradius.c added 2016-12-20 15:47:02 +03:00
z3apa3a
d159c57e1f Add splice() support on Linux to proxy, socks, ftppt, smtpp, pop3p
usage example:
proxy -s
proxy -s2
-s - enable splice() for sockets mapping to avoid data to be copied to user space
-s2 - enable splice() and attempt to free user space buffer ASAP
2016-12-19 22:07:34 +03:00
z3APA3A
34876b7616 put usesplice within #ifdef WITHSPLICE 2016-12-19 13:01:34 +03:00
z3apa3a
1ab549036c Changed -a / -s options handling for 'anonymous' after last commit 2016-12-19 03:19:17 +03:00
z3apa3a
6696b35d74 Added -s option support for proxying with splice() for Liux
(without copying network data to
userspace). Currently only for tcppm.
2016-12-19 02:56:23 +03:00
z3APA3A
945c30c5ee Use pragma aux to export valid names from DLL in Watcom 2016-12-12 19:49:58 +03:00
z3APA3A
a9fb0ea969 Correct previous resolver patch 2016-12-12 12:38:33 +03:00
z3APA3A
afbc27eac4 Correct resolver to handle non-compressed answers 2016-12-11 03:25:18 +03:00
z3APA3A
953c7efafc Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel 2016-12-10 03:56:20 +03:00
z3APA3A
c650d32206 Compatibility with Watcom's DLL exports for plugins 2016-12-10 03:56:11 +03:00
Vladimir Dubrovin
88af9d6050 handle IPv6/name bind reply from parent 2016-11-20 22:24:04 +03:00
z3APA3A
88263ebde9 Return valid error code for name resolution problem in 'proxy' 2016-09-07 18:50:21 +03:00
z3APA3A
a8f8a4d624 'if' is not required 2016-09-07 18:35:01 +03:00
z3APA3A
9890823664 fix signess warning 2016-09-04 15:33:20 +03:00
z3APA3A
880255093a minor compilers compatibility issues 2016-09-04 15:11:15 +03:00
z3APA3A
4e96a66093 fix authentication via reverse name 2016-09-04 15:10:45 +03:00
z3APA3A
e2b406f27b Addition al fix for Linux (glibc?) specific daemon problem 2016-08-23 18:36:18 +03:00
z3APA3A
b242d6df8c Fix daemonize in *nix 2016-08-23 14:19:27 +03:00
z3APA3A
4e4f71712d Fix: 'extip' may fail with 9 error code 2016-08-16 15:21:02 +03:00
z3APA3A
6426ed0c1a fix %i logging 2016-06-07 15:39:14 +03:00
z3APA3A
cdc4210a0a Fix '%i' logging 2016-06-07 14:16:55 +03:00
z3APA3A
7742b08ec5 Revert "Delay service exit until new configuration is loaded"
This reverts commit 05f39246bf.
2016-06-07 14:16:17 +03:00
z3APA3A
05f39246bf Delay service exit until new configuration is loaded 2016-06-06 18:01:51 +03:00
z3APA3A
84664a203b support %i in loformat 2016-06-06 17:54:23 +03:00
z3APA3A
cd35215532 support -u2 for proxy 2016-05-28 00:24:26 +03:00
z3APA3A
f347b37770 support port number in 'nserver' / 'authnserver' 2016-05-18 00:05:23 +03:00
z3APA3A
fbcdcf3d7b Correct IP matching in cache auth 2016-05-17 23:27:10 +03:00
z3APA3A
8cdf341d0e workaround for broken getsockname() in FTP proxy 2016-05-14 00:09:51 +03:00
z3APA3A
ccbc94e06b Revert "pam_auth; lock only pam_start"
This reverts commit 556fea670e.
2016-05-11 22:05:45 +03:00
z3APA3A
556fea670e pam_auth; lock only pam_start 2016-05-11 20:51:14 +03:00
z3APA3A
32ff114787 Revert "pam_auth: Authenticate all users in single session"
This reverts commit 438a5bac9b.
2016-05-11 20:49:39 +03:00
z3APA3A
438a5bac9b pam_auth: Authenticate all users in single session 2016-05-11 19:56:40 +03:00
z3APA3A
4cb43b438f Use mutex with pam auth, because pam is not thread safe 2016-05-11 19:03:16 +03:00
z3APA3A
cfa4d11027 Do not fail connection with 333 error on configuration reload 2016-04-26 18:50:57 +03:00
z3APA3A
8b1c12005f avoid type mismatch in ?: operator 2016-04-08 15:08:18 +03:00
z3APA3A
3c8c866ac1 Fix counters time check for different platforms 2016-04-08 14:53:15 +03:00
z3APA3A
d3f9d80b65 Resolve races on log buffer without mutex 2016-04-05 19:12:18 +03:00
z3APA3A
1d162abec3 Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel 2016-04-04 13:43:30 +03:00
z3APA3A
d6f72a51fe fix race condition on 'log' command processing 2016-04-04 13:43:08 +03:00
Vladimir Dubrovin
e210f24194 fix for noforce 2016-04-02 12:00:53 +03:00
Vladimir Dubrovin
9bfae5faaa force / no force commands added 2016-04-02 11:43:25 +03:00
Vladimir Dubrovin
2fed299b9d warning fix 2016-04-02 11:22:33 +03:00
z3APA3A
6cac541e33 fix broken extip functionality 2016-03-30 19:16:12 +03:00
z3APA3A
938b1d1aab re-authenticate connection on configuration change 2016-03-28 17:57:37 +03:00
z3APA3A
eeb2d78fb1 re-authenticate user on 2016-03-28 17:49:27 +03:00
z3APA3A
dcec2cadaa support external username / password up to 128 octets 2016-03-10 17:05:56 +03:00
z3APA3A
f67c9a39f1 Use setreuid/setregid instead of setuid / setgid 2016-03-09 18:28:52 +03:00
z3APA3A
a44a32c484 Do not fail for zero address on SOCKSv5 BIND/UDPASSOC 2016-03-08 13:28:29 +03:00
z3APA3A
b513584fdb More distinct error codes for SOCKS 2016-03-08 12:43:07 +03:00
z3APA3A
5d0504cd33 Always reset bind sa on connect 2016-03-04 13:44:53 +03:00
z3APA3A
58a64924dd log_mutex used prior to initialization 2016-03-02 19:00:28 +03:00
z3APA3A
10a79faa32 publish as devel 2016-02-28 15:10:38 +03:00
z3APA3A
6db42f70e9 fix compilation warnings in PamAuth 2016-02-26 13:15:34 +03:00
z3APA3A
e2351034e6 Change encoding to utf-8 in strings 2016-02-22 22:43:22 +03:00
z3APA3A
57f1140734 Changes in makefiles to support LDAP plugin compilation 2016-02-22 21:46:32 +03:00
z3APA3A
c96d415020 Defer SSL init to first command in ssl_plugin 2016-02-22 21:14:17 +03:00
z3APA3A
604cc22d16 mark as 0.8.4 2016-02-22 00:53:10 +03:00
z3APA3A
01857354c8 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-02-22 00:22:01 +03:00
z3APA3A
021a8928bf Avoid windows compilation warnings 2016-02-22 00:18:45 +03:00
z3APA3A
cf3bae0f6b Revert "additional memset for hint on retry"
This reverts commit bb206869de.
2016-02-22 00:14:54 +03:00
z3APA3A
bb206869de additional memset for hint on retry 2016-02-20 15:45:44 +03:00
z3APA3A
5c5f4e258f Increase default stack size for *nix 2016-02-20 09:11:03 +03:00
z3APA3A
f8a7266bdf Handle malformed HTTP headers without \r 2016-02-19 20:47:56 +03:00
z3APA3A
ad9b0046d9 Fix thread init bug introduced 2016-02-19 20:21:16 +03:00
z3APA3A
b40e8fae4c increase stack size for FreeBSD 2016-02-19 19:44:38 +03:00