Commit Graph

56 Commits

Author SHA1 Message Date
Vladimir Dubrovin
2966836dfa Fixed: CONNECT does not work in standalone 'proxy' binary
Some checks failed
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2025-08-05 17:39:11 +03:00
Vladimir Dubrovin
7aad0205e1 Remove legacy NTLMv1 code
Some checks failed
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2025-03-17 19:44:48 +03:00
Vladimir Dubrovin
6387bed4f2 Replace strcpy with memmove for overlapping regions 2024-12-20 14:38:58 +03:00
Vladimir Dubrovin
375e3a74d0 call local socket function 2024-02-18 19:41:45 +03:00
Vladimir Dubrovin
8198db8617 adding state to socket functions 2024-02-17 17:31:25 +03:00
Vladimir Dubrovin
55d1bbe155 Grace delay feature added
`proxy -g8000,3,10`

First parameter is average read size we want to keep, second parameter is
minimal number of packets in the same direction to apply algorythm,
last value is delay added after polling and prior to reading data.
An example above adds 10 millisecond delay before reading data if average
polling size is below 8000 bytes and 3 read operations are made in the same
direction. It's specially usefule with splice. `logdump 1 1` is useful
to see how grace delays work, choose delay value to avoid filling the read
pipe/buffer (typically 64K) but keep the request sizes close to chosen average
on large file upload/download.
2022-05-19 18:51:02 +03:00
Vladimir Dubrovin
d20e76bbc9 FIX: SSLPlugin with http proxy 2022-05-19 11:49:19 +03:00
Vladimir Dubrovin
468124f55c Fix SSLPlugin with HTTP proxy 2022-05-18 18:14:24 +03:00
z3apa3a
e1b4e50242 Copyright update 2021-07-02 11:50:33 +03:00
z3apa3a
36f16fb899 Better connection error handling in 'proxy' 2021-04-21 17:35:17 +03:00
z3APA3A
05bc297ea7 Fixed SSLPlugin handling 2020-11-19 23:22:15 +03:00
z3APA3A
d2dcf4bb69 better dat filters handling 2020-11-19 02:30:19 +03:00
z3APA3A
eb829b062b Major code refactoring
- sockmapping rewritten from stratch to minimilse polling. poll() is now
only called if blocking is actually expected, splice pipes are now
polled if splice fails, buffers flushing is much more accurate.
- logging code moved to separate files
- signal masks added to client threads to prevent unneeded interruptions
- bandwidth limitation will not delay the thread after client or server
shutdown
2020-10-09 15:42:34 +03:00
z3APA3A
cc6ec2445c Do not overwrite connection for HTTP "upgade" 2020-08-18 18:43:22 +03:00
z3APA3A
9996856698 Send Basic vs basic for Basic HTTP auth to deal with reportedly broken implementation 2019-10-16 11:29:07 +03:00
z3APA3A
5ee553e9a9 Correct: do not log 98/99 as an error 2019-01-20 17:52:00 +03:00
z3APA3A
eed6e2962e Do not log events 98 and 99 as errors 2019-01-20 17:33:35 +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
8b548dccc7 Remove "Proxy-Connection" headers as depricated 2018-02-17 18:14:13 +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
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
1ab549036c Changed -a / -s options handling for 'anonymous' after last commit 2016-12-19 03:19:17 +03:00
z3APA3A
88263ebde9 Return valid error code for name resolution problem in 'proxy' 2016-09-07 18:50:21 +03:00
z3APA3A
cd35215532 support -u2 for proxy 2016-05-28 00:24:26 +03:00
z3APA3A
6cac541e33 fix broken extip functionality 2016-03-30 19:16:12 +03:00
z3APA3A
dcec2cadaa support external username / password up to 128 octets 2016-03-10 17:05:56 +03:00
z3APA3A
e2351034e6 Change encoding to utf-8 in strings 2016-02-22 22:43:22 +03:00
z3APA3A
f8a7266bdf Handle malformed HTTP headers without \r 2016-02-19 20:47:56 +03:00
z3APA3A
3b8e7741b3 Compilation warnings cleanup 2016-02-16 15:29:51 +03:00
z3APA3A
d6f29ac6df reset transparent flag on keep-alive connection 2016-01-23 17:16:49 +03:00
z3APA3A
75c63d2de6 add support for -u2 in socks 2016-01-15 15:29:57 +03:00
z3APA3A
4ab2da228b Typo with Forwarded: header corrected in proxy.c 2015-11-09 17:05:31 +03:00
z3APA3A
f1beddc85a optimize Forwarded: generation 2015-10-16 18:03:08 +03:00
z3APA3A
3c6eef6bb0 Add Forwarded: header instead of X-Forwarded-For and Via
Add Forwarded: header instead of X-Forwarded-For and Via in HTTP proxy.
proxy -a3 changes to old behavior.
2015-10-16 17:14:01 +03:00
z3APA3A
4ca8988831 Fix FTP over HTTP authentication request parsing 2015-09-01 16:24:40 +03:00
z3APA3A
3198f1614f Fix FTP over HTTP authentication
Send WWW-Authenticate instead of Proxy-Authenticate
2015-09-01 15:24:03 +03:00
z3APA3A
59cc68e8dd Move FTP login prompt in proxy to common section 2015-08-31 22:01:31 +03:00
z3APA3A
8e6d8b3314 increase max address length in X-Forwarded-For 2015-05-04 17:33:30 +03:00
z3APA3A
252d481299 allow larger request size in HTTP proxy
allow larger request size in HTTP proxy & correctly nullify request
buffer
2015-05-04 17:27:24 +03:00
User
5787633665 increasing length of proxy username specified in config 2015-03-29 14:29:50 +03:00
z3APA3A
e37a7f48d7 Older CVS comments removed 2014-12-13 23:20:00 +03:00
z3APA3A
f70e4adf47 IPv6 bugfixes 2014-11-03 21:25:06 +03:00
z3APA3A
c7310a2060 initial partial patches for IPv6 client support 2014-10-19 21:54:24 +04:00
z3APA3A
7ca32fc940 overlapped memcpy replaced with memmove 2014-06-11 00:57:18 +04:00
Vladimir Dubrovin
a30d5d51a5 IPv6 server side code
+ IPv6 server side support
!!! Auth need to be fixed
2014-05-12 01:10:58 +04:00
Vladimir Dubrovin
ccf606fd9e ntoa changed to ntop 2014-05-12 01:10:53 +04:00
Vladimir Dubrovin
7897b009a1 intport removed, SA macro added 2014-05-12 01:10:47 +04:00
Vladimir Dubrovin
bc7ca3af09 intip changed to intsa
intip changed to intsa for IPv6 use
2014-05-12 01:10:42 +04:00
Vladimir Dubrovin
cb7d48c9c5 Merge remote-tracking branch 'origin/master' into devel 2014-04-15 02:15:08 +04:00