Vladimir Dubrovin
f18a751f89
define IPV6_BOUND_IF if not defined (for legacy MacOS 10.x)
2026-07-17 15:07:11 +03:00
Vladimir Dubrovin
de5acb2abd
Do not use getrandom for glibc < 2.25
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-06 11:41:12 +03:00
Vladimir Dubrovin
905e3d3152
support IPv6 with NOSTDRESOLVE
2026-05-27 17:03:17 +03:00
Vladimir Dubrovin
7c08432a70
do not use FD_SETSIZE on Windows
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-22 20:16:56 +03:00
Vladimir Dubrovin
05c4832c6c
Minor cleanups
2026-05-13 23:21:13 +03:00
Vladimir Dubrovin
b1d21cbdca
Copyright update
2026-05-08 18:07:08 +03:00
Vladimir Dubrovin
830b2d39d1
Use standard malloc functions
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-04 18:50:02 +03:00
Vladimir Dubrovin
4068a6955f
Fix UDP parent for SOCKSv5
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-02 00:00:45 +03:00
Vladimir Dubrovin
b1ac46da79
Remove linux futext implementation
Build Win32 3proxy-lite with Watcom / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win32 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win-arm64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-28 18:06:54 +03:00
Vladimir Dubrovin
ada24a98ec
Use semaphore/mutex insted of pipe for threads sync
2026-04-28 14:00:15 +03:00
Vladimir Dubrovin
f01c8bfee9
Code cleanup
2026-04-27 19:58:34 +03:00
Vladimir Dubrovin
878a432481
Support unix socket for parent and tcppm; abstract (fileless) unix sockets for linux support
...
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
Use unix:/path/to/socket, e.g.
tcppm 1234 unix:/path/to/socket 1234
Under linux abstract sockets are supported with '@' prefix, e.g.
parent 1000 http unix:@virtual.3proxy.socket 1111
Destination port numbers are not used in tcppm/parent, but you must specify any positive value to match the syntaxis.
2026-04-12 19:18:15 +03:00
Vladimir Dubrovin
2d6eeff5f3
FIx typos, update documentation
2026-04-12 13:58:42 +03:00
Vladimir Dubrovin
c206349ee2
Support unix sockets for internal and -i
...
Example configuration:
log
auto -iunix:/path/to/3proxy.sock
test with
curl --unix-socket /path/to/3proxy.sock https://3proxy.ru
2026-04-12 00:30:35 +03:00
Vladimir Dubrovin
238ed094dd
Support building without standard resolvers (NOSTDRESOLVE)
...
build from stra
2026-04-11 12:22:38 +03:00
Vladimir Dubrovin
483542b914
Use uint32_t/uint16_t instead of unsigned long / unsigned short where required
2026-04-08 21:13:18 +03:00
Vladimir Dubrovin
758c290092
Fix CONNECT_TO usage
2026-04-08 19:21:30 +03:00
Vladimir Dubrovin
7299bcc0e2
Move timeouts from conf
2026-04-08 19:21:29 +03:00
Vladimir Dubrovin
128386723a
Fix potential use-after-free on filters, add SSL_shutdown in SSLPlugin
2026-04-08 19:21:27 +03:00
Vladimir Dubrovin
8d8ee23385
ssl_client_mode added, code cleanup
...
ssl_client_mode
0 (default) - handshake immediately after connect() (with first parent or with destination if there is no parent)
1 - handshake with destination server (handshake after connection via parents is established)
2 - handshake after data channel is established (e.g. after CONNECT)
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin
d67a052aa8
Fixed: invalid config value initializers
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin
5355af3112
Fix: WSAPoll fail in some Windows versions after e525ce913e
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin
5c7cc3c9b2
Fixed: Failed connect may result in success response on some Windows versions
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin
2508b89d96
Avoid sleep on service thread sync
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin
375e3a74d0
call local socket function
2024-02-18 19:41:45 +03:00
Vladimir Dubrovin
d162ad5c38
Fix windows issues
2024-02-17 18:53:58 +03:00
Vladimir Dubrovin
8198db8617
adding state to socket functions
2024-02-17 17:31:25 +03:00
Vladimir Dubrovin
20a929ca53
Add per-service sockfuncs
2024-02-17 12:57:36 +03:00
Vladimir Dubrovin
13979b5df4
Allow hostnames in parent
2023-04-26 15:05:47 +03:00
Daniel Winzen
cc0fd518bd
Incorporate feedback from z3APA3A
2022-11-08 15:42:04 +01:00
Daniel Winzen
9a6908e623
Add backlog config option
2022-11-08 15:04:19 +01:00
Vladimir Dubrovin
c98621aeef
Always select between IPV6_BOUND_IF and IP_BOUND_IF
2022-06-29 10:35:17 +03:00
Vladimir Dubrovin
3dc698eccd
Fix compilation issues
2022-06-29 10:18:36 +03:00
Vladimir Dubrovin
c1beceb24b
Support IP_BOUND_IF on MacOS
2022-06-28 12:50:48 +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
7e681bbacd
Update common.c
...
Process failed connect more correcly
2022-04-07 20:19:49 +03:00
z3apa3a
e1b4e50242
Copyright update
2021-07-02 11:50:33 +03:00
z3apa3a
bad85a3d51
Support IPv6 subnets in parent extip
2021-04-21 20:39:57 +03:00
z3apa3a
5f550c9107
change code for getpeername() error
2021-04-21 16:36:34 +03:00
z3APA3A
cbe0c2f511
parentretries command added
2021-01-19 14:40:18 +03:00
z3APA3A
29f8867a9e
fix the compilation warning
2020-12-02 11:13:55 +03:00
z3APA3A
c1c5875356
better memory allocation errors handling, countall/nocountall corrected
2020-11-03 02:05:18 +03:00
z3APA3A
624c3e6ae1
correct IPv6 parsing where hostname is expected
2020-10-16 22:51:02 +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
3dd1969657
Move logging to log.c
2020-10-07 19:03:59 +03:00
z3APA3A
1fd759d327
Correct typo (name resolution could fail on some platforms)
2020-08-07 12:14:03 +03:00
z3APA3A
8c511a19e9
Do not resolve hostname to IP on ACL destination
2020-08-06 17:56:28 +03:00
z3APA3A
859713d10f
Fail if can not bind to device
2020-06-17 16:05:23 +03:00
z3APA3A
930d9823ea
Use futex instead of pthread_mutex on Linux
2018-12-28 18:49:45 +03:00
z3APA3A
eb09ae7c58
Support socket options for connback sockets and connection timeouts
2018-05-05 17:16:51 +03:00
z3APA3A
a42bb38d76
Use WSAPoll on Windows (except lite version)
2018-04-21 23:57:42 +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
ff91a6fe72
connlim / noconnlim commands added to support connection / connectio rate limits
2018-01-12 19:09:42 +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
b17b36cbce
Add support to bind to interface (-Di / -Do) via SO_BINDTODEVICE
2017-08-14 18:22:15 +03:00
z3APA3A
b4043e944c
Unify RADIUS code for logging
2017-06-25 18:40:26 +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
e2884b182a
Add timeout for connect in all modules
2016-12-23 00:56:16 +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
f709255d62
Copyrights cleaned, authradius.c added
2016-12-20 15:47:02 +03:00
z3apa3a
1ab549036c
Changed -a / -s options handling for 'anonymous' after last commit
2016-12-19 03:19:17 +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
6426ed0c1a
fix %i logging
2016-06-07 15:39:14 +03:00
z3APA3A
84664a203b
support %i in loformat
2016-06-06 17:54:23 +03:00
z3APA3A
f347b37770
support port number in 'nserver' / 'authnserver'
2016-05-18 00:05:23 +03:00
z3APA3A
8cdf341d0e
workaround for broken getsockname() in FTP proxy
2016-05-14 00:09:51 +03:00
Vladimir Dubrovin
9bfae5faaa
force / no force commands added
2016-04-02 11:43:25 +03:00
z3APA3A
6cac541e33
fix broken extip functionality
2016-03-30 19:16:12 +03:00
z3APA3A
eeb2d78fb1
re-authenticate user on
2016-03-28 17:49:27 +03:00
z3APA3A
5d0504cd33
Always reset bind sa on connect
2016-03-04 13:44:53 +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
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
Vladimir Dubrovin
9ddc1fb874
fix *nix warnings
2016-02-18 17:01:18 +03:00
z3APA3A
43a36ec813
Warnings cleanup
2016-02-18 16:43:37 +03:00
z3APA3A
3b8e7741b3
Compilation warnings cleanup
2016-02-16 15:29:51 +03:00
z3APA3A
5fc1d81e5c
add stack size configuration
...
'stacksize' command and -S configuration option added
2016-02-11 16:16:44 +03:00
z3APA3A
6713530fda
log_mutex init moved to proxymain
2016-02-05 19:04:16 +03:00
z3APA3A
13a7d6be11
Replace memcpy with assignment where appropriate
2016-02-05 18:31:17 +03:00
z3APA3A
3cc9796583
Support for 'extip' and 'smtp' parent types added
2016-02-05 01:52:45 +03:00
z3APA3A
fec0da52af
fixed: use SASIZE() instead of sizeof() in connect() for FreeBSD compatibility
2016-01-25 14:49:17 +03:00
z3APA3A
375a2c9f6e
Do not use SO_REUSEADDR by default
...
to avoid misbehavior in some glibc versions
2016-01-23 18:43:30 +03:00
z3APA3A
4af5f2fde7
Use SASIZE() instead of sizeof() in bind() for FreeBSD compatibility
2016-01-22 15:59:40 +03:00
z3APA3A
75c63d2de6
add support for -u2 in socks
2016-01-15 15:29:57 +03:00
z3APA3A
bef5b6f473
minor logging correction
2016-01-06 22:06:33 +03:00
z3APA3A
889c5caa1f
typo in logsyslog()
2016-01-03 19:57:51 +03:00
z3APA3A
b56702e670
Increase static bufer
2015-12-27 19:44:21 +03:00
z3APA3A
7df2461a26
Unify logging (make it always blocking in exchange for memory)
2015-12-27 19:27:17 +03:00
z3APA3A
fa2679555e
print IPv6 address in []
2015-12-21 13:40:30 +03:00
z3APA3A
40f9430623
Force use of IPv6 translated address instead of IPv4 with -6
2015-12-07 22:58:31 +03:00
z3APA3A
bd37ffa2f7
Race conditions fixed on config reload
...
Race conditions on logging and name resolution
2015-12-04 00:59:52 +03:00
z3APA3A
74772de341
Fixed handling of [] IPv6 addresses in hostnames
2015-11-29 12:38:16 +03:00