Compare commits

..
605 Commits
Author SHA1 Message Date
Vladimir Dubrovin a2641cb103 Push as 0.9.6 2026-04-11 13:06:43 +03:00
Vladimir Dubrovin 98f8ec1464 Dockerfiles updates:
- Build distroless from scratch
- Static linking with NOSTDRESOLVE for minimal
- SSLPlugin is supported in full, including chroot configuration
- No need to specify full path for plugins

chroot provides no additional security due to distroless, but is still supported for compatiblity reasons. Plugins, including SSL should work in chroot configuration. --read-only is recommended, no tmp directories are required.
2026-04-11 12:47:22 +03:00
Vladimir Dubrovin 238ed094dd Support building without standard resolvers (NOSTDRESOLVE)
build from stra
2026-04-11 12:22:38 +03:00
Vladimir Dubrovin c853ea5b9e More accurate libraries detection in Makefiles 2026-04-11 12:21:07 +03:00
Vladimir Dubrovin 825563ad85 Detailed warnings for 'plugin' command errors 2026-04-10 19:30:22 +03:00
Vladimir Dubrovin 0c8be907e9 -Ne / -Ni options added to specify external / internal NAT address
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-04-10 15:01:43 +03:00
Vladimir Dubrovin 840dd5dbdf Update Makefile.Linux 2026-04-10 13:14:00 +03:00
Vladimir Dubrovin 71d676eb58 Update workflows and builds
RPM/DEB build aarch64 / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
RPM/DEB build armhf / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
RPM/DEB build x86-64 / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
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
2026-04-09 17:53:27 +03:00
Vladimir Dubrovin 8cb8be1be8 Fix warnings 2026-04-08 21:13:45 +03:00
Vladimir Dubrovin 0381461495 Use PRI/SCN modifiers where possible 2026-04-08 21:13:31 +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 855c04d8f6 Uodate build environment 2026-04-08 21:12:51 +03:00
ilya ab852c6860 docs: fix Docker link in README (#1193) 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin a54b773fac scripts/debian moved to debian 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 4d7d2cab6e keep HTML mans 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 05e5fbe274 fix debian files 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin de40d1839d Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin d8161e94b5 Update year 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 30c3764c90 change config example 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin ceb4912172 howto update 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin ce104a5b3c Update README 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin d8d3d8cc1b Use syslog for non-chroot configuration, support MacOS launchd 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 44c86236cd add rc.d script 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 3ee78a3195 Use non-chroot configuration in cmake; remove older script 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 9b06edb4f6 Howto update 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 9d314a5fba Howto update 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin be40871276 Update 3proxy.cfg.3 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 35993dfaaf SSLPlugin documentation updated 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 3d9d76fcf5 Update documentation 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin c6eddc69a1 remove unsued variables 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 758c290092 Fix CONNECT_TO usage 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 1a753da70d Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 2e534c7794 Add cmake environment 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 237fa15e36 Fix external libraries 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 6f1bb65841 Update workflows and makefiles (11 commits squashed) 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 238b314c90 switch PCREPlugin to PCRE2 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin e12b061148 Use pcre/pam in Dockerfile.full 2026-04-08 19:21:29 +03:00
BDBSAlive6one6 5e92822900 fix(PamAuth): добавлен вызов pam_acct_mgmt(), исправлен pam_start() (#1203)
Добавлен вызов pam_acct_mgmt() после pam_authenticate() для проверки
прав доступа на уровне PAM (HBAC, истечение пароля, блокировка учётки)
Исправлена передача реального username в pam_start() вместо '3proxy@'

---

Added pam_acct_mgmt() call after pam_authenticate() to enable PAM
account checks (HBAC, password expiration, account lockout).
Fixed pam_start() to pass actual username instead of hardcoded '3proxy@'
Tested with FreeIPA 4.12 + SSSD Rocky Linux 9
2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 0252f4978c Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 7299bcc0e2 Move timeouts from conf 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 416e30ed0d Update .gitignore 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 7c25c23325 Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin c34d29b7dd Do not use applink.c 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 1d515af787 Update workflows and makefiles (16 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 499c4240ad Fix TrafficPlugin 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin 23b9e698e0 Update workflows and makefiles (15 commits squashed) 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin a5fce1a2f6 compile PCRE on Windows 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin c05023ab6d Correct SSL functions for Windows 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 1e8130cae8 Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 28724187fb Use external PCRE library 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 35db214b78 Use external PCRE library 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 1ba0008055 Update workflows and makefiles (6 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 92f170fca2 Fix warning 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 71c58e0c77 Update workflows and makefiles (2 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 00d2ecbc31 Use 64 bit arithmetics for rate limits 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 662603f9d8 Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 8292ec21a7 remove SSL_shutdown 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin ef318bff67 Use quit shutdown for SSL to prevent races 2026-04-08 19:21:27 +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 acc6db59a3 SNI break (DPI bypass) added
-s option to tlspr (or tls type redirect), requires TCP_NODELAY to be set

auth iponly
allow *
parent 1000 tls 0.0.0.0 0
allow *
proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 251660940e Fixed: crash on invalid configuration file 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7e4504997e Fixed: memory corruptions on config parsing 2026-04-08 19:21:26 +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 7e47d5bd92 ssl_client_alpn added 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7fce892391 Use SSL_connect / SSL_accept in non-blocking mode 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 23551e53bf Fixed: allow ssl server and client on the same service 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 35406e6b61 client_sni command added; do not send hostname from request as SNI in SSL client configuration 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 26534e9cbd Close SSL on shutdown 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 2cd0a34fd5 maxseg / TCP_MAXSEG support added 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 7d04915d3d Update workflows and makefiles (3 commits squashed) 2026-04-08 19:21:26 +03:00
Alexey Suslov 280c7c8976 Fix HTTPS proxy for HTTPS addresses (#1175) 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin bc7e9b2ac6 Fix: -P option for tlspr 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
Sertonix 2cfad638a7 Update workflows and makefiles (11 commits squashed) 2026-04-08 19:21:26 +03:00
bipface cfc9c30bd2 Fix missing semicolons in debian postinst script (#1158)
These missing semicolons cause some errors to be printed during installation, such as: `Failed to stop bin-systemctl.mount: Unit bin-systemctl.mount not loaded.`
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 7b4e8b6d6b Fixed: ssl_server_cert doesn't read full certificate chain 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin e945890613 Fixed: CONNECT does not work in standalone 'proxy' binary 2026-04-08 19:21:25 +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 6e55af7f48 Fixed: invalid timeout in socksendto / sockrecvfrom 2026-04-08 19:21:25 +03:00
danyhm 4ec2226d3e Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 8d744e16fb Convert PAMAUTH.TXT to UTF-8 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin af25cb460f Fixed service name detection for auto / tlspr 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 09a3ddeeac SOCKSTRACE fixed 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 66bdd86c6b ssl_server_verify, ssl_server_ca_dir, ssl_server_ca_store added, ssl_server / ssl_client aliases added to ssl_serv / ssl_cli 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin b624da443a ssl_noserv fixed, ssl_cli/ssl_nocli/ssl_client_cert/ssl_client_key added 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 3c51af3737 Remove legacy NTLMv1 code 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 7e7a0d4336 Support HAProxy proxy v1 protocol
Added:
-H option - expect HAProxy proxy v1 header, e.g. `proxy -H`

parent ha type - send HAProxy proxy v1 header (must be last in redirection), e.g.

allow *
parent 1000 ha
parent 1000 proxy 1.2.3.4 3128
socks
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin e373d84717 Support tlspr in auto 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 68ff2373b4 Update workflows and makefiles (10 commits squashed) 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 8d58e2618e make compatible with openssl 1.x 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 1bfa64303a rsa.h not required 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 81224b6708 Use PCRE_STATIC pcre_plugin.c 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 6944a012d9 use PCRE_STATIC 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 7652a9bba1 Update workflows and makefiles (7 commits squashed) 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin cb368e0792 Update README 2026-04-08 19:21:23 +03:00
Vladimir Dubrovin e20584cb2e Update README 2026-04-08 19:21:23 +03:00
z3apa3a f23fc4fc44 mention https:// proxy in README 2025-03-10 00:51:43 +03:00
z3apa3a 3668634781 Update readme for 0.9.5 2025-03-10 00:46:46 +03:00
Vladimir Dubrovin 46a230ebd3 Merge branch 'master' of https://github.com/3proxy/3proxy 2025-03-10 00:37:18 +03:00
z3apa3a e8e1bdfbf1 switch windows / arm to DLL version of OpenSSL 2025-03-10 00:36:05 +03:00
Vladimir Dubrovin a5f1f08b60 Use non-static openssl libs for windows arm64 2025-03-09 20:55:23 +03:00
z3apa3a 926ef71ba0 Fix Makefile.Linux 2025-03-09 19:51:17 +03:00
z3apa3a bc92819572 Fix tlspr for compatibility with older compileres 2025-03-09 19:16:35 +03:00
z3apa3a a76dd93e86 Add tlspr to install section 2025-03-09 18:38:04 +03:00
z3apa3a 2900b80d88 Prepare for 0.9.5 release 2025-03-09 17:29:17 +03:00
z3apa3a d7b0061626 Fix ssl_plugin for windows building 2025-03-09 17:26:50 +03:00
z3apa3a 74134db09e Fix ssl_plugin for Windows 2025-03-09 17:22:18 +03:00
Vladimir Dubrovin 878025598b tlspr (SNI proxy) documented 2025-03-09 15:03:06 +03:00
Vladimir Dubrovin 6387bed4f2 Replace strcpy with memmove for overlapping regions 2024-12-20 14:38:58 +03:00
Vladimir Dubrovin cb6a4166b7 Use -fPIC instead of -fPIE 2024-09-11 18:34:40 +03:00
Vladimir Dubrovin cf6946cc8b Fix: IPv6 address may be invalid on some plafrorms for SOCKSv5 UDP ASSOCIATE 2024-07-18 12:50:59 +03:00
Vladimir Dubrovin ab8db00b1f Fix type for ssl_poll 2024-06-04 19:26:34 +03:00
Vladimir Dubrovin 94dfa195db char * / unsigned char * conversions fixed 2024-05-31 19:53:28 +03:00
Vladimir Dubrovin fb4ab5d07f Remove accidentely added binary 2024-05-20 13:44:50 +03:00
Vladimir Dubrovin 57f11d8a0f Add tlspr binary to git ignore 2024-05-20 13:41:55 +03:00
Vladimir Dubrovin 013d4bc333 tlspr (SNI proxy) implemented
Options -cN - level of TLS check
default - allow non-TLS traffic
1 - require TLS, only check client HELLO packet
2 - require TLS, check both client and server HELLO
3 - require TLS, check server send certificate (not compatible with TLS 1.3)
4 - require mutual TLS, check server send certificate request and client sends certificate (not compatible with TLS 1.3)
-P - default port

examples:

1.
tlspr -p1443 -P443 -c1
(port 1443 may be used to redirect traffic to destination port 143). SNI is used to find destination host

2.
allow * * * 80
parent 1000 http 0.0.0.0 0
allow * * * * CONNECT
parent 1000 tls 0.0.0.0 0
deny * * some.not.allowed.host
allow *
socks

attempts to take destination hostname from SNI in SOCKS
2024-05-20 13:01:38 +03:00
Vladimir Dubrovin 29ef226b3c Обновлена документация 2024-03-10 17:01:54 +03:00
Vladimir Dubrovin d347f0a058 More TLS commands added, ssl_srvkey / ssl_srvfile renamed
ssl_server_cert - certificate for SSL server (rename from ssl_srvkey)
ssl_server_key - key for ssl_server_cert of generated mirm certificate (renamed from ssl_srvkey)
ssl_server_ca_file - CA file for mitm
ssl_server_ca_key - key for mitm CA
ssl_client_ca_file, ssl_client_ca_dir, ssl_client_ca_store - locations for root CAs used with ssl_client_verify for TLS client
ssl_certcache is not optional, if ssl_server_ca_file / ssl_server_ca_key are configured
2024-03-10 16:20:42 +03:00
Vladimir Dubrovin a316622a85 Added multiple TLS configuration parameters for SSLPlugin
ssl_client_ciphersuites - TLS client ciphers for TLS 1.3, e.g. ssl_client_ciphersuites TLS_AES_128_GCM_SHA256
ssl_server_ciphersuites - TLS server ciphers for TLS 1.3
ssl_client_cipher_list - TLS client ciphers for TLS 1.2 and below , e.g. ssl_client_cipher_list ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
ssl_server_cipher_list - TLS server ciphers for TLS 1.2 and below
ssl_client_min_proto_version - TLS client min TLS version (e.g. TLSv1.2)
ssl_server_min_proto_version - TLS server min TLS version (e.g. TLSv1.2)
ssl_client_max_proto_version - TLS client max TLS version (e.g. TLSv1.2)
ssl_server_max_proto_version - TLS server max TLS version (e.g. TLSv1.2)
ssl_client_verify - verify certificate for upstream server in TLS client functionality
ssl_client_no_verify - do not verify certificate for upstream server in TLS client functionality (default)
2024-03-10 13:36:40 +03:00
Vladimir Dubrovin d87241c487 Keep TLS server context 2024-03-09 18:37:44 +03:00
Vladimir Dubrovin 144af547fb Keep TLS client context between requests 2024-03-09 16:23:03 +03:00
Vladimir Dubrovin 35d1de6f5e Ffix use-after-free in freeparam 2024-02-22 17:30:50 +03:00
Vladimir Dubrovin a592f07783 Update SSLPlugin documentation 2024-02-19 00:13:08 +03:00
Vladimir Dubrovin 161cbbd452 fix crash on insufficient memory 2024-02-18 23:54:31 +03:00
Vladimir Dubrovin 067fdd7f95 support ssl_serv / ssl_noserv commands
example:
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_srvcert path_to_cert
ssl_srvkey path_to_key
ssl_serv
proxy -p33128
ssl_noserv
proxy -p3128
2024-02-18 23:42:09 +03:00
Vladimir Dubrovin d77e528847 minor fixes 2024-02-18 20:18:31 +03:00
Vladimir Dubrovin 2b4d8e67e4 Do not store CA cert subject 2024-02-18 19:53:35 +03:00
Vladimir Dubrovin 375e3a74d0 call local socket function 2024-02-18 19:41:45 +03:00
Vladimir Dubrovin 6dc145b16b initial commit to TLS refactoring 2024-02-18 19:07:09 +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 d83c1f47f8 Rollback commit in the wrong branch 2024-02-17 13:18:14 +03:00
Vladimir Dubrovin 20a929ca53 Add per-service sockfuncs 2024-02-17 12:57:36 +03:00
Vladimir Dubrovin a80bef9ecf Merge pull request #978 from tautschnig/fix-decls
Fix plugin declarations of hashindex and nametohash
2023-10-11 17:00:48 +03:00
Michael Tautschnig 687ebafb1b Fix plugin declarations of hashindex and nametohash
Plugins using these would fail to provide the required arguments.
2023-10-11 10:00:47 +00:00
Vladimir Dubrovin 5e2b2a399e clean up warnings 2023-07-13 15:29:26 +03:00
Vladimir Dubrovin 5f341806b7 Deadloc on traffcount fixed 2023-07-13 13:13:36 +03:00
Vladimir Dubrovin 00513a7d28 eliminate redundant code in previous fix 2023-07-12 17:21:46 +03:00
Vladimir Dubrovin dc7e098e6b Support request filters for SOCKS, support broken BIND request from some clients 2023-07-12 15:55:50 +03:00
Vladimir Dubrovin 8b57982a09 Fix FreeBSD install 2023-06-10 12:22:59 +03:00
Vladimir Dubrovin cebb45c095 Fix FreeBSD install secrion 2023-06-01 11:42:16 +03:00
Vladimir Dubrovin 13979b5df4 Allow hostnames in parent 2023-04-26 15:05:47 +03:00
Vladimir Dubrovin 782878b5b4 Fix github links 2023-04-26 15:04:24 +03:00
Vladimir Dubrovin 6532163f01 Fix connlim issues 2023-04-26 15:04:00 +03:00
Vladimir Dubrovin 862405bdfd set linger close to setsockopt 2022-12-23 17:58:15 +03:00
Vladimir Dubrovin c716c67da2 Merge pull request #840 from DanWin/increase-listen-backlog
Add backlog configuration
2022-11-08 19:51:40 +03:00
Daniel Winzen b94e1fc01f Few more changes 2022-11-08 16:02:47 +01: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
Daniel Winzen 65e57a251d Clarify use of maxconn in man page 2022-11-08 13:25:05 +01:00
Daniel Winzen 25c375a78a Increase backlog of listening sockets to match maxconn 2022-11-03 23:24:25 +01:00
Vladimir Dubrovin a22e2be77b Merge pull request #838 from DanWin/linux-tcp-fastopen
Add support for TCP_FASTOPEN_CONNECT and TCP_FASTOPEN socket options
2022-11-02 10:57:40 +03:00
Daniel Winzen 8a160dd188 Add support for TCP_FASTOPEN_CONNECT and TCP_FASTOPEN socket options (linux) 2022-11-01 20:11:26 +01:00
Vladimir Dubrovin fb56b7d307 "auto" command added 2022-10-18 17:58:52 +03:00
Vladimir Dubrovin 5165a4d5bd prevent use-after-free in smtpp 2022-08-31 14:34:48 +03:00
Vladimir Dubrovin bac19c9ae6 Close service only after config mutex unlocked on reload 2022-08-12 19:18:52 +03: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 4ad05d1565 add handleredirect() to symbols 2022-06-24 10:44:28 +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 8a8622b30f FIX: SSLPlugin for tcppm 2022-05-19 15:42:18 +03:00
Vladimir Dubrovin 1cf169b7ae FIX: SSLPlugin with SOCKS 2022-05-19 13:26:52 +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
Vladimir Dubrovin 17f07f2053 Update udppm.c 2022-04-25 16:45:49 +03:00
Vladimir Dubrovin 6d77141ecc Update socks.c 2022-04-25 13:09:55 +03:00
Vladimir Dubrovin 7e681bbacd Update common.c
Process failed connect more correcly
2022-04-07 20:19:49 +03:00
Vladimir Dubrovin 266e62644c Fix RADIUS Login-Service/Login-TCP-Port length 2022-02-22 15:45:23 +03:00
Vladimir Dubrovin f53b0eb985 fix invalid length in previous commit 2021-11-25 12:21:06 +03:00
Vladimir Dubrovin bd1dcacf73 Fix domain name reply processing on connect request for parent proxy 2021-11-24 22:53:14 +03:00
Vladimir Dubrovin e1448b9eb1 connlim error code corrected (should return 10) 2021-11-24 18:22:04 +03:00
Vladimir Dubrovin 70b14394b0 Change minumum DNS cache time to 1 sec 2021-10-30 13:43:20 +03:00
Vladimir Dubrovin 6c1b711fc9 do not ignore Makefile from plugins 2021-10-29 19:26:20 +03:00
Vladimir Dubrovin 34c4162cea Update Makefile.FreeBSD 2021-10-29 19:25:58 +03:00
Vladimir Dubrovin 461fae12e7 set logfunc after configuration reload 2021-10-29 19:12:03 +03:00
Vladimir Dubrovin e8203ac3a5 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-10-29 18:56:25 +03:00
Vladimir Dubrovin beaa8777bb Add RuntimeDirectory for systemd 2021-10-29 18:56:23 +03:00
Vladimir Dubrovin 9254688d07 Merge pull request #684 from victor-rds/arm_docker
Add support to Docker images for ARM platforms
2021-10-29 17:43:56 +03:00
Vladimir Dubrovin daa2b74354 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-10-21 19:57:06 +03:00
Vladimir Dubrovin bec6e589fb extNat implemented incorrectly, removing current support 2021-10-21 19:57:02 +03:00
Vladimir Dubrovin f9347c2f8b Allow all-zero IP and port for BIND and UDP ASSOC 2021-10-21 19:56:09 +03:00
Victor R. Santos 0d47a1eee3 Update Dockerfiles, fix builds on ARM plaforms
- Add support to ARM64, ARM/v7 and ARM/v6 devices
- Remove hardcoded "/lib/x86_64-linux-gnu" path
- Move libdl.so.* to a common location
- Format code to keep consistency between dockerfiles
2021-10-04 16:41:44 -03:00
Vladimir Dubrovin 58cf0d8def do not create pid file in default configuration 2021-10-01 15:56:56 +03:00
z3apa3a 5fa261e91e Send accounting start packet if log radius is enabled 2021-07-02 18:38:21 +03:00
z3apa3a b15d5bf681 Commit as 0.9.4 2021-07-02 12:01:43 +03:00
z3apa3a e1b4e50242 Copyright update 2021-07-02 11:50:33 +03:00
z3apa3a 346880eb2e debian files 2021-07-01 19:59:57 +03:00
z3apa3a e607c8b5d0 remove icqpr references from specs 2021-07-01 19:58:12 +03:00
z3apa3a 1fca6ada82 Use self-built openssl for Windows 2021-07-01 19:55:20 +03:00
z3apa3a d7eb9fb82f better error handling on splice() 2021-05-18 11:34:57 +03:00
z3apa3a 1bd6eff0e6 Update sockmap.c 2021-05-17 18:12:50 +03:00
z3apa3a e642100271 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-05-15 18:42:30 +03:00
z3apa3a aac5c9fff9 More accurate error handling on socket mapping 2021-05-15 18:42:17 +03:00
Vladimir Dubrovin e235ada0de Make SSLPlugin to compile under *nix 2021-05-11 13:53:41 +03:00
Vladimir Dubrovin 7335bc2fb6 Do not change error code >10 on redirection 2021-04-29 14:01:07 +03:00
z3apa3a 3f4c267a25 Use logic operation instead of binary where appropriate 2021-04-22 17:59:10 +03:00
z3apa3a 6279e86086 Do not terminate connection on POLLHUP if there is a data to read 2021-04-22 16:59:07 +03:00
z3apa3a cc2979ee5b use uint16 instead of char 2021-04-22 11:26:18 +03:00
z3apa3a bad85a3d51 Support IPv6 subnets in parent extip 2021-04-21 20:39:57 +03:00
z3apa3a 36f16fb899 Better connection error handling in 'proxy' 2021-04-21 17:35:17 +03:00
z3apa3a 5f550c9107 change code for getpeername() error 2021-04-21 16:36:34 +03:00
z3apa3a 47c1640223 remove icqpr man 2021-04-15 17:52:24 +03:00
Vladimir Dubrovin 681182b1e5 Fix: '-' sign incorrectly parsed in hostname ACL, bandlim race condition on configuration reload 2021-04-15 12:26:34 +03:00
Vladimir Dubrovin 9fae0082a3 Change clean command for BSD 2021-01-22 18:17:09 +03:00
z3APA3A c30065256f Use so._closesocket instead of socket (compilation issues on non-Windows) 2021-01-20 17:55:09 +03:00
z3APA3A cbe0c2f511 parentretries command added 2021-01-19 14:40:18 +03:00
z3APA3A 1f2bdd7b80 Update version.h
version year update
2021-01-19 14:37:36 +03:00
z3APA3A 0c902525e5 commit as 0.9.3 2020-12-03 21:14:59 +03:00
z3APA3A 129d26475e Fixed: counters incorectly shown in webadmin, contall/nocountall are not applied 2020-12-02 20:08:03 +03:00
z3APA3A 29f8867a9e fix the compilation warning 2020-12-02 11:13:55 +03:00
z3APA3A 252c4cb36b set 1 for release in specs 2020-12-01 18:20:13 +03:00
z3APA3A 07603ceea7 & is not required for systemd 2020-12-01 11:19:43 +03:00
z3APA3A 8ec14c131d Do not fail on clean 2020-11-29 14:00:19 +03:00
z3APA3A 1225dbced7 hostname (%n) may by incomlete in log on long record 2020-11-29 12:47:58 +03:00
z3APA3A 3cd9bdffcb Update README for docker images 2020-11-28 03:18:11 +03:00
z3APA3A 336a4acd46 Update dockerfiles 2020-11-28 02:45:36 +03:00
z3APA3A c5abe51e26 fix adding proxy account 2020-11-27 19:36:21 +03:00
z3APA3A 31062bdc3c Create Dockerfile.minimal 2020-11-27 15:49:13 +03:00
z3APA3A 8943099dfb extip parent type documented 2020-11-27 15:48:59 +03:00
z3APA3A 09f007e741 http supported in parent name resolution 2020-11-25 17:09:54 +03:00
z3APA3A 4487fd4a73 typo corrected 2020-11-25 17:06:06 +03:00
z3APA3A 5498a79115 add builddate (if defined) to rc 2020-11-24 20:43:30 +03:00
z3APA3A 9c7fc9fddc correct clean 2020-11-24 20:05:49 +03:00
z3APA3A 4d63f957c2 Fix for connect back 2020-11-23 18:58:33 +03:00
z3APA3A 828e00e668 correct afterclean 2020-11-22 02:15:42 +03:00
z3APA3A 3ba16310c5 del res files in afterclean 2020-11-22 02:15:24 +03:00
z3APA3A 7aaa9c18dd build rc file from res 2020-11-22 02:14:53 +03:00
z3APA3A 72923879a3 Make rc file non-version specific 2020-11-21 18:36:39 +03:00
z3APA3A b1cc2c7c70 Label as 0.9.2 2020-11-21 11:27:43 +03:00
z3APA3A d88c927ba9 allow overwrite CC for linking 2020-11-20 14:19:47 +03:00
z3APA3A cf58e62baa rm makefile on clean 2020-11-20 13:49:17 +03:00
z3APA3A daf4a56665 Remove .o and binaries after clean 2020-11-20 13:30:38 +03:00
z3APA3A 05bc297ea7 Fixed SSLPlugin handling 2020-11-19 23:22:15 +03:00
z3APA3A 7ea9ec89be update changelog and spec for 0.9.2 2020-11-19 10:39:37 +03:00
z3APA3A f23b6b0d96 export pcre_options 2020-11-19 02:52:47 +03:00
z3APA3A d2dcf4bb69 better dat filters handling 2020-11-19 02:30:19 +03:00
z3APA3A 1ff0fabf15 switching version to 0.9.2 2020-11-18 18:45:32 +03:00
z3APA3A e013cc2ab8 remove unneeded fseek 2020-11-18 17:55:23 +03:00
z3APA3A 99a744abda Few bugfixes 2020-11-18 16:10:07 +03:00
z3APA3A 062d60e9d6 README updated 2020-11-17 12:45:44 +03:00
z3APA3A b777ffec66 RH man handling is arch dependant 2020-11-13 21:00:28 +03:00
z3APA3A 8a2050e7fa remove FAQ from index 2020-11-13 19:58:55 +03:00
z3APA3A 9fbb88238e support cross building 2020-11-13 19:50:39 +03:00
z3APA3A 36f8cde2fb remove unused float variable 2020-11-13 11:39:13 +03:00
z3APA3A f64cd475af Do not set sigmask for thread in standalone service 2020-11-13 11:01:14 +03:00
z3APA3A a29d2ab66b readme update 2020-11-13 03:20:37 +03:00
z3APA3A fd1b7ce2a2 Commit as 0.9.1 2020-11-13 02:56:03 +03:00
z3APA3A e0ccb34c10 Add LimitNOFILE/LimitNPROC for systemd 2020-11-13 02:09:43 +03:00
z3APA3A ba29f38959 update gitignore 2020-11-13 02:09:26 +03:00
z3APA3A a6dfc81e98 debian files corrected 2020-11-12 17:43:18 +03:00
z3APA3A fe05526472 do not ingore changelog 2020-11-12 16:30:05 +03:00
z3APA3A a6445334e2 initial implementation of debian building rules 2020-11-12 16:24:00 +03:00
z3APA3A e5db29d1cb spec file added for rpm build 2020-11-12 03:20:15 +03:00
z3APA3A 7bf7de53b2 start 3proxy without daemon to keep pid 2020-11-12 03:00:34 +03:00
z3APA3A 312c40359c make Makefile.Linux more suitable for packaging + support systemd 2020-11-12 01:57:25 +03:00
z3APA3A 021314d6f5 Fix bandlim handling 2020-11-11 17:40:46 +03:00
z3APA3A ff67464aa1 Do not fail users without argument 2020-11-11 17:35:06 +03:00
z3APA3A c113f236e4 FAQ moved to HowTo 2020-11-10 14:40:44 +03:00
z3APA3A 596dee0c5b typo corrected 2020-11-05 17:43:03 +03:00
z3APA3A 32d5dc05c3 More accurate bandlim hangling 2020-11-05 16:09:13 +03:00
z3APA3A 3a31da9b3d fixed error in previous commit 2020-11-03 14:48:55 +03:00
z3APA3A 9356db8de6 Minor memory handling changes 2020-11-03 13:39:56 +03:00
z3APA3A dbbbe59ef2 Fix acl copy / auth copy out-of-memory error 2020-11-03 11:16:04 +03:00
z3APA3A c1c5875356 better memory allocation errors handling, countall/nocountall corrected 2020-11-03 02:05:18 +03:00
z3APA3A b81089f22e More correct handling of insufficient memory 2020-11-02 18:59:13 +03:00
z3APA3A ee0eac51d6 Remove RDHUP processing
Do not actually need it, may lead to connection closed before all data
read
2020-11-02 16:10:04 +03:00
z3APA3A 6ecb4993fd readme update 2020-10-31 02:31:18 +03:00
z3APA3A 285a7e6765 Commit as 0.9.0 2020-10-22 11:38:44 +03:00
z3APA3A b2f82ed04f More accurate conditions in sockmap's main event loop 2020-10-19 13:11:44 +03:00
z3APA3A 01ec2f12d5 fail portmapping if name can not be resolved 2020-10-16 23:13:07 +03:00
z3APA3A 624c3e6ae1 correct IPv6 parsing where hostname is expected 2020-10-16 22:51:02 +03:00
z3APA3A 0d713dacc1 README updated 2020-10-16 02:35:01 +03:00
z3APA3A 582f9d7be4 Minor documentation update 2020-10-15 18:39:47 +03:00
z3APA3A 3f2659cb0f Use MAXFAILATTEMPT to limit socket failuers 2020-10-15 16:44:32 +03:00
z3APA3A aeb0f4caa5 Better handle socket closing 2020-10-15 16:27:39 +03:00
z3APA3A 22555b58ec Do not sigmask main thread for standalone services 2020-10-15 16:00:43 +03:00
z3APA3A 5448329c8a Document RADIUS support 2020-10-15 12:25:33 +03:00
z3APA3A a8b000b7f1 Allow to specify binding address for RADIUS 2020-10-15 12:21:46 +03:00
z3APA3A edaee895e6 Merged from devel as 0.9.0-rc 2020-10-15 02:16:20 +03:00
z3APA3A 47f1bbc8d7 Merge branch 'master' into devel 2020-10-15 01:49:04 +03:00
z3APA3A c9097154c6 ignore version 2020-10-15 01:38:13 +03:00
z3APA3A 9f6a8460ac limit failed mapping attempts to 13 2020-10-15 01:17:10 +03:00
z3APA3A 637cb2e76d adding guard for polling loop to prevent CPU exhastion in the case of system misbihavior 2020-10-14 18:58:52 +03:00
z3APA3A 47affa0add Correct returning 98 code from socksmap 2020-10-14 16:15:11 +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 b6629850e5 Revert "index file re-generated"
This reverts commit e3840d2258.
2020-10-07 11:50:51 +03:00
z3APA3A e3840d2258 index file re-generated 2020-10-07 11:42:01 +03:00
z3APA3A 8c92470124 countall, nocountall -N options are documented 2020-10-07 11:35:51 +03:00
z3APA3A 024c0fb749 countall, nocountall, -N options are documented 2020-10-07 11:35:20 +03:00
z3APA3A ebd7b34159 -N(NAT_address) option added for socks 2020-10-07 11:21:01 +03:00
z3APA3A d0725163d1 countall / nocountall ssupport added 2020-10-06 14:29:08 +03:00
z3APA3A cc6ec2445c Do not overwrite connection for HTTP "upgade" 2020-08-18 18:43:22 +03:00
z3APA3A 1075370594 Don't terminate connection on datagram sending issue in SOCKSv5 UDP ASSOCIATE 2020-08-08 13:56:34 +03:00
z3APA3A 1fd759d327 Correct typo (name resolution could fail on some platforms) 2020-08-07 12:14:03 +03:00
z3APA3A dd75eaa35e Link with -fPIE for Linux 2020-08-07 11:20:29 +03:00
z3APA3A c30b4637a5 Do not resolve hostname to IP on ACL destination 2020-08-06 17:57:50 +03:00
z3APA3A 8c511a19e9 Do not resolve hostname to IP on ACL destination 2020-08-06 17:56:28 +03:00
z3APA3A 35153001ed Use -fPIC instead of -fpic 2020-08-06 16:19:55 +03:00
z3APA3A 3b5fa46e27 Change Proxy-authorization to Proxy-Authorization for compatiblity with RFC ignorant upstreams 2020-07-02 18:34:37 +03:00
z3APA3A 19eef46d7e Compile error in last commit corrected 2020-06-23 11:17:32 +03:00
z3APA3A c532958b9f Do not cache external port 2020-06-17 16:14:34 +03:00
z3APA3A 936724f4f7 documentation updated for authcachtype 2020-06-17 16:14:23 +03:00
z3APA3A 1e7e94d7ac corrected 'acl' and 'ext' cach types added with previous commit
acl - allows to bind cache entry to ACL to prevent caching
authentication for different services
ext - allows to cache external address
both options are useful with RADIUS
2020-06-17 16:09:28 +03:00
z3APA3A 859713d10f Fail if can not bind to device 2020-06-17 16:05:23 +03:00
z3APA3A 9eac5c13a8 Correct wildcard hostname compare and make it case-insensitve where possible 2020-04-11 11:34:08 +03:00
z3APA3A 041134007d Correct ip/network/hostname parsing in ACLs 2020-04-11 09:58:47 +03:00
z3APA3A 37c380f4f7 Documentation example corrected 2019-12-04 17:56:06 +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 22cf9254c5 rename memory functions in pluginlink 2019-09-03 20:46:47 +03:00
z3APA3A e7e7d2fddf "limit" support in authcache to bind sessions to ip 2019-08-21 15:20:43 +03:00
z3APA3A 336b411ea2 do not use "my" prefix for memory functions in pluginlink 2019-08-19 12:35:36 +03:00
z3APA3A cb217d79c1 Fix: IPv6 support in TransparentPlugin 2019-08-13 12:38:03 +03:00
z3APA3A 8ad8a9ccd2 Remove unsupported "myalloc" code 2019-08-13 12:36:55 +03:00
z3APA3A 70ed1233fb Remove outdated LastFRipper plugin 2019-08-13 12:35:47 +03:00
z3APA3A 5471e0faf4 attempt to support IPv6 in netfilter transparent redirection 2019-08-12 14:11:08 +03:00
z3APA3A e85b064b52 Commit as 0.8.13 2019-08-01 17:54:28 +03:00
z3APA3A 9f6c0b5b8d Fix: $ is ignored in the begginning of quoted line 2019-08-01 16:54:40 +03:00
z3APA3A 3b67dc8447 Fix: out-of-bounds write and few more bugs in 'admin' configuration upload 2019-08-01 16:49:26 +03:00
z3APA3A bf4ef2284b Fix: out-of-bounds write and few more bugs in 'admin' configuration upload 2019-08-01 16:46:22 +03:00
z3APA3A 19203381db documentation update 2019-08-01 16:44:30 +03:00
z3APA3A 4e2d4d56ac Do not add admin user by default 2019-08-01 16:43:56 +03:00
z3APA3A a905d00008 documentation update 2019-06-26 16:52:55 +03:00
z3APA3A 38a1ab80bc minor changes 2019-06-20 11:19:58 +03:00
z3APA3A 43b4c893ad Minor documentation updates 2019-06-20 11:18:13 +03:00
z3APA3A 96c28c6cba man update 2019-03-25 18:01:14 +03:00
z3APA3A 189b227853 typo in Makefile.Linux corrected 2019-03-05 15:03:24 +03:00
z3APA3A d89134be33 minor doc update 2019-03-05 15:02:04 +03:00
z3APA3A 3a1f8c2328 typo corrected 2019-02-22 17:16:36 +03:00
z3APA3A 158bacc087 Highload documentation update 2019-02-22 17:05:22 +03:00
z3APA3A b88d07a1a7 Minor make install changes 2019-02-21 17:44:11 +03:00
z3APA3A e07054e8d0 minor man update 2019-02-21 17:41:54 +03:00
z3APA3A 536c8327ff Minor man updates 2019-02-14 18:35:12 +03:00
z3APA3A 0565cf050b Linux installation: do not allow proxy account to write to chrooted config dir 2019-02-08 12:34:44 +03:00
z3APA3A ac429c8d52 minor README correction 2019-01-28 18:05:48 +03:00
z3APA3A 09507a2fe9 prevent warnings in proxymain 2019-01-25 23:40:35 +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 76b040bfb8 minor man update 2019-01-17 17:31:15 +03:00
z3APA3A 941baaa311 minor man update 2019-01-17 17:24:42 +03:00
z3APA3A 92fbb0d2f5 More minor documentation updates 2019-01-17 12:26:38 +03:00
z3APA3A 1c7ce8744c Minor doc update 2019-01-17 12:08:25 +03:00
z3APA3A 02d52e89e9 Fix: config change may stop log rotation 2019-01-15 11:51:10 +03:00
z3APA3A d7373be071 Revert "Fixed: logrotation may stop after config change"
This reverts commit ede4aee619.
2019-01-14 20:14:08 +03:00
z3APA3A ede4aee619 Fixed: logrotation may stop after config change 2019-01-14 18:02:16 +03:00
z3APA3A 8af9ea8de8 back to non-blockin splice on sending 2019-01-11 23:26:52 +03:00
z3APA3A 603ab8187f make spliced sockmap more reliable 2019-01-11 23:10:39 +03:00
z3APA3A 953959efab print file descriptors 2019-01-11 19:38:34 +03:00
z3APA3A 480f999d21 Add _GNU_SOURCE to compile options for Linux 2019-01-11 19:17:44 +03:00
z3APA3A 03efdc451b Add POLLRDHUP support to spliced sockmap 2019-01-11 19:12:03 +03:00
z3APA3A 54e9f9cedd Highload docs correction 2019-01-11 19:11:31 +03:00
z3APA3A 930d9823ea Use futex instead of pthread_mutex on Linux 2018-12-28 18:49:45 +03:00
z3APA3A 6fe36b01d1 Fixed: admin always starts with -s under Linux 2018-12-28 12:45:52 +03:00
z3APA3A dec10d4edd Add rundir creation to linux start script 2018-12-28 12:45:15 +03:00
z3APA3A 37cebe08af Disable strict aliasing and add stripping for MIPS cross compile example makefile 2018-12-07 14:26:11 +03:00
z3APA3A 3f2e621902 Correct socket polling on mapping 2018-12-06 00:32:37 +03:00
z3APA3A b7e3a85e88 Use non-blocking splice only on write to socket
to prevent race condition data is not copied to the pipe yet
2018-12-05 23:41:37 +03:00
z3APA3A 79ea433caf Can go to 100% CPU if one side have closed connection 2018-12-05 21:44:59 +03:00
z3APA3A a0591c9786 Fix: $ is ignored in the begginning of quoted line 2018-12-05 14:21:03 +03:00
z3APA3A cc503ba925 Add IPv6 hostname question to FAQ 2018-07-04 00:56:33 +03:00
z3APA3A 68823c2921 Fix sockets option parsing 2018-05-25 18:19:19 +03:00
z3APA3A 46be58ab1d Add filename to XML data 2018-05-22 19:15:31 +03:00
z3APA3A 3d9ac1e1fb Flush splice pipe on socket close 2018-05-12 01:19:11 +03:00
z3APA3A 68fed46ea0 fix 'radius' is not applied correctly on configuration reload 2018-05-11 16:23:05 +03:00
z3APA3A 92b3dd8638 Use overloadable poll 2018-05-05 20:07:59 +03:00
z3APA3A d8b5900be6 Update Makefile.BSD 2018-05-05 20:07:26 +03:00
z3APA3A 20fa72bd42 Add connback timeouts / improve logging 2018-05-05 19:59:37 +03:00
z3APA3A eb09ae7c58 Support socket options for connback sockets and connection timeouts 2018-05-05 17:16:51 +03:00
z3APA3A b8127257f9 Remove pstdin.h 2018-05-01 18:30:04 +03:00
z3APA3A a5f7222a19 minor README correction 2018-04-28 18:27:45 +03:00
z3APA3A b56c294c01 Update highload.html with splice() requirements 2018-04-28 01:56:13 +03:00
z3APA3A b583e423c8 Install plugins to /usr/local/3proxy/libexec 2018-04-27 22:18:26 +03:00
z3APA3A 951304e18e Send Connection instead of Proxy-Connection to parent proxy 2018-04-27 22:17:37 +03:00
z3APA3A 0376e54196 simlify sockgetline 2018-04-27 19:23:20 +03:00
z3APA3A 572a5b3c34 Fixed: socks fails on 1-character username or password 2018-04-27 15:09:18 +03:00
z3APA3A 9bd81a18b9 Use native OpenSSL 1.0 static build for Windows 2018-04-27 01:54:28 +03:00
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 73438cc378 use useradd in make install 2018-04-25 17:30:10 +03:00
z3APA3A f860ea9e54 Install chrooted configuration with make install on linux 2018-04-25 17:14:03 +03:00
z3APA3A 836fffddbe Include openssl/applink.c in windows plugin DLL 2018-04-25 14:38:32 +03:00
z3APA3A 4a9b924064 Readme update 2018-04-25 02:53:40 +03:00
z3APA3A 4fce1f41b5 update readme 2018-04-25 02:52:31 +03:00
z3APA3A 46630a9b1b move installation to beginning 2018-04-25 02:51:18 +03:00
z3APA3A 52ec3738d8 README update 2018-04-25 02:47:25 +03:00
z3APA3A 775530e28e Correct make install and installation scripts for Linux 2018-04-25 02:40:11 +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
z3APA3A 8d36bb6453 Correct install scripts to take binaries from bin/ 2018-04-23 02:24:24 +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 db485dd4c4 Build binaries in bin folder 2018-04-21 22:39:55 +03:00
z3APA3A 93e410cd7a Merge remote-tracking branch 'refs/remotes/origin/devel-epoll' into devel 2018-04-21 22:36:57 +03:00
Vladimir Dubrovin 819d63caad Create binaries in bin 2018-04-21 22:34:18 +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 098b6194df Update copyright 2018-04-21 00:30:16 +03:00
z3APA3A 50277692f4 Replace fclose+fopen with freopen where possible 2018-04-21 00:30:02 +03:00
z3APA3A 819d61f5b6 3proxy.rc - add builddate to version 2018-04-20 22:44:29 +03:00
z3APA3A 63fdeb4bff MSVC ARM Makefile added 2018-04-20 21:56:04 +03:00
z3APA3A 6c3a5db52f Get rid of pstdint.h 2018-04-20 19:32:49 +03:00
z3APA3A d07500687c Commit as 0.8.12 2018-04-18 22:48:45 +03:00
z3APA3A 439373abd3 Example corrected 2018-04-18 19:36:05 +03:00
z3APA3A 8afad700f8 force / noforce commands description added 2018-04-18 19:33:31 +03:00
z3APA3A a8b79d5df5 add hostname logging to tcppm 2018-04-18 19:28:37 +03:00
z3APA3A 10a8febb0d Fix IPv4/IPv6 addresses in webadmin 2018-04-18 19:27:14 +03:00
z3APA3A 747828d3ab Move sys/timeb.h to Win32 section. 2018-04-18 19:26:27 +03:00
z3APA3A 9b8e6b33c7 UDP portmap doesn't resolve hostname in UDP packet 2018-04-18 19:23:34 +03:00
z3APA3A 05b23a840e resolving conflicts 2018-04-18 19:23:07 +03:00
z3APA3A 5c9bb58a81 Clearing LdapPlugin compilation issues 2018-04-18 19:22:43 +03:00
z3APA3A f8557187cd Conflic resolve 2018-04-18 19:19:05 +03:00
z3APA3A 23623a22ff -fno-strict-aliasing added to gcc options 2018-04-18 19:18:02 +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 68e05d54d7 -fno-strict-aliasing added to gcc options 2018-04-16 19:35:11 +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 95f79e6f02 Transparent plugin documentation updated 2018-04-15 00:05:59 +03:00
z3APA3A 25028ed1b8 support IP_ socket options 2018-04-14 23:52:38 +03:00
z3APA3A 93357d8157 Add openwrt makefile example 2018-04-14 23:52:23 +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 19d047dcbe Proxy-Connection is long time depricated, use only Connection 2018-01-26 15:42:12 +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 e076fff33c Example corrected 2018-01-09 15:59:14 +03:00
z3APA3A 2d1720c15f Move RADIUS related code to #ifndef NORADIUS 2017-12-22 18:53:50 +03:00
z3APA3A 9ac7503c4e README update 2017-12-22 18:53:04 +03:00
z3APA3A a816ed2343 force/noforce description usage 2017-12-19 01:22:25 +03:00
z3APA3A 4a553de100 RADIUS accounting added (not optimized yet) 2017-12-19 01:22:07 +03:00
z3APA3A 8702a4c7ab force / noforce commands description added 2017-12-14 14:20:44 +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 acb248c035 Remove external CFLAGS from Makefile.FreeBSD 2017-11-06 18:34:24 +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 7ba3e25813 correct makefile for FreeBSD 2017-10-30 17:29:03 +03:00
z3APA3A 4bb706d140 Use parsehostname in TransparentPlugin 2017-10-30 13:43:53 +03:00
z3APA3A 215171ad46 Publish as 0.8.11 2017-10-19 18:08:41 +03:00
z3APA3A c20a04b752 change strdup to mystrdup 2017-10-19 17:54:31 +03:00
z3APA3A 3f859fdb11 Change log location in demo scripts 2017-10-19 17:53:32 +03:00
z3APA3A 556681a829 Change EPSV reply code to 229 2017-10-19 17:49:27 +03:00
z3APA3A ee0bb55c06 EPSV support for ftppr 2017-10-19 17:49:03 +03:00
z3APA3A 2c0bc19f75 Remove static to prevent race conditions 2017-10-19 17:38:28 +03:00
z3APA3A 286aa51e78 Fix: recursion detection was not working 2017-10-19 17:31:30 +03:00
z3APA3A 145eb580e4 Fix: %n terminated log string on IPv6 address 2017-10-19 17:31:12 +03:00
z3APA3A 46211c26d2 Prevent deadlock on thread creation error 2017-10-19 17:30:47 +03:00
z3APA3A e0262c23b0 pthread_attr_destroy added to prevent memory leak on config reload 2017-10-19 17:30:22 +03:00
z3APA3A 7f80f4f958 Fix: invalid reverse check for dnsresolve 2017-10-19 17:29:30 +03:00
z3APA3A 6a54b37181 fix: do not fail external with "0.0.0.0" with NOIPV6 (lite version) 2017-10-19 17:28:42 +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 41b7b03db2 updated to highload doc 2017-10-10 18:21:50 +03:00
z3APA3A 8e2a87421c Fix: %n terminated log string on IPv6 address 2017-10-10 18:21:34 +03:00
z3APA3A b3b76fe682 RADIUS example added 2017-10-08 23:35:39 +03:00
z3APA3A 695bfc89ac High load documentation update 2017-10-08 23:20:52 +03:00
z3APA3A 2fd9f945c8 SO_PORTSCALABILITY documented 2017-10-06 21:50:52 +03:00
z3APA3A 6bbe4181fc update to high load documentation 2017-10-06 21:39:28 +03:00
z3APA3A 29b834cf56 update for highload documentation 2017-10-06 21:17:15 +03:00
z3APA3A e588dce959 update highload documentation 2017-10-06 20:40:07 +03:00
z3APA3A 2f5265bee6 highload documentation updated 2017-10-06 18:38:27 +03:00
z3APA3A 4d3062c62a highload documentation added 2017-10-06 18:13:26 +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 9b4ab2e126 readme updated 2017-08-15 16:26:47 +03:00
z3APA3A 8d5bc73643 readme updated 2017-08-15 12:30:09 +03:00
z3APA3A ea44750268 readme updated 2017-08-15 12:28:46 +03:00
z3APA3A 55c294ac24 README updated 2017-08-15 12:27:06 +03:00
z3APA3A 41ae455ee2 man updated for socket options 2017-08-14 19:46:26 +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 177fbb1117 Change log location in demo scripts 2017-06-27 13:56:36 +03:00
z3APA3A 7a23f84001 Readding files to change line endings - adding 2017-06-27 11:59:01 +03:00
z3APA3A b118fa6c8f Readding files to change line endings - removing 2017-06-27 11:58:42 +03:00
z3APA3A 305f01acb5 closecoket() is used instead of so._closesocket 2017-06-26 16:46:26 +03:00
z3APA3A 372e5625c3 remove dighosts from Makefiles 2017-06-25 19:54:29 +03:00
z3APA3A c0bb608acc publish as 0.8.10 2017-06-25 19:12:56 +03:00
z3APA3A 4631335aca Fix - sometime request may go to parent proxy where it shouldn't 2017-06-25 18:42:39 +03:00
z3APA3A 94c58b3db4 banlimits for old connection may stop functioning on configuration reload 2017-06-25 18:42:17 +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 883784dcc3 add .gitignore to bin to make it syncing 2017-03-08 00:43:24 +03:00
z3APA3A 21ce72dcf0 add /bin 2017-03-08 00:34:57 +03:00
z3APA3A b51465a8d4 remove bin from .gitignore 2017-03-08 00:27:01 +03:00
z3APA3A 513fc1aa20 leave /bin directory 2017-03-08 00:12:24 +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 4e4c090373 Add Makefile.FreeBSD 2017-02-04 16:54:07 +03:00
z3APA3A d75dcf0b54 Publish as 0.8.9 2017-02-02 01:19:10 +03:00
z3APA3A 28581b1738 FIX: tcppm may not work with parent proxy 2017-02-02 01:08:29 +03:00
z3APA3A d40e5d458c FIX: tcppm may not work with parent proxy 2017-02-02 00:36:59 +03:00
Vladimir Dubrovin dbdeaa337c Merge pull request #135 from johny-bravo/patch-1
Fix 3proxy.pid file check in scripts/rc.d/proxy.sh
2017-01-22 17:14:24 +04:00
johny-bravo 256319bd06 Fix 3proxy.pid file check 2017-01-22 14:55:19 +03:00
z3APA3A 2049886dcf 3proxy-linux-install.sh corrected for location in scripts/ 2016-12-29 16:24:39 +03:00
z3APA3A 1b12f365ba Debian / Ubuntu install script by Evgeniy Solovyev 2016-12-29 14:27:20 +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 d3395cf649 Commit as 0.8.8 2016-12-13 01:19:55 +03:00
z3APA3A 7b48714993 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-12-13 01:15:09 +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
Vladimir Dubrovin 9c8e18f0b5 Merge pull request #99 from alexndlm/patch-1
Update Makefile.Linux
2016-09-21 22:20:34 +04:00
alexndlm 0f695a4248 Update Makefile.Linux 2016-09-19 23:37: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 0b2afa1ba7 switch to 0.8.7 2016-09-04 16:30:40 +03:00
z3APA3A 80b9e18588 Commit as 0.8.7 2016-09-04 16:19:53 +03:00
z3APA3A 63bafa5a62 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-09-04 16:16:29 +03:00
z3APA3A fd29e887c3 add optimization to watcom makefile 2016-09-04 15:49:04 +03:00
z3APA3A ec9d556707 Add makefile for OpenWatcom 2.0 2016-09-04 15:33:38 +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 8e820b28c0 Documentation correction 2016-05-11 19:02:51 +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 ac13a75721 publish as 0.8.6 2016-03-07 16:54:55 +03:00
z3APA3A f74da31fb3 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-03-04 13:45:46 +03:00
z3APA3A 5d0504cd33 Always reset bind sa on connect 2016-03-04 13:44:53 +03:00
217 changed files with 22086 additions and 39434 deletions

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
name: RPM/DEB build aarch64
on:
push:
branches: [ "master", "test-ci" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-arm64.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-24.04-arm
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- name: env
run: |
pwd
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
- name: echo env
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
- name: Linux libraries
run: |
sudo apt update
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
- name: configure rpm env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
cd ~/rpmbuild/SPECS
rpmbuild -ba 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
- name: Get artifact arp
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
path: "*.deb"
+104
View File
@@ -0,0 +1,104 @@
name: RPM/DEB build armhf
on:
push:
branches: [ "master", "test-ci" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-latest
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- name: env
run: |
pwd
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
- name: Linux libraries
run: |
sudo apt update
sudo dpkg --add-architecture armhf
echo "Types: deb" > ~/ubuntu.sources
echo "URIs: http://archive.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
echo "Suites: noble noble-updates noble-backports" >> ~/ubuntu.sources
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
echo "Architectures: amd64" >> ~/ubuntu.sources
echo "" >> ~/ubuntu.sources
echo "Types: deb" >> ~/ubuntu.sources
echo "URIs: http://security.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
echo "Suites: noble-security" >> ~/ubuntu.sources
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
echo "Architectures: amd64" >> ~/ubuntu.sources
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
echo "" >> ~/ubuntu.sources
echo "Types: deb" >>~/ubuntu.sources
echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/ubuntu.sources
echo "Suites: noble noble-updates" >>~/ubuntu.sources
echo "Components: main restricted universe multiverse" >>~/ubuntu.sources
echo "Architectures: armhf" >>~/ubuntu.sources
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
sudo apt update
sudo apt install libssl3t64:armhf openssl:armhf libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf build-essential debhelper
- name: configure rpm env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
cd ~/rpmbuild/SPECS
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
export PATH=$PATH
CC=arm-linux-gnueabihf-gcc
export CC=$CC
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
rpmbuild -ba --define "PAMLIB pam0g" --define "_arch arm" --define "cross yes" --target=arm-linux-gnueabi 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
- name: Get artifact
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
export PATH=$PATH
CC=arm-linux-gnueabihf-gcc
export CC=$CC
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
- name: Get artifact deb
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-arm.deb"
path: "*.deb"
+72
View File
@@ -0,0 +1,72 @@
name: RPM/DEB build x86-64
on:
push:
branches: [ "master", "test-ci" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-x86-64.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-latest
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- name: env
run: |
pwd
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
- name: echo env
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
- name: Linux libraries
run: |
sudo apt update
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
- name: configure rpm/deb env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
cd ~/rpmbuild/SPECS
rpmbuild -ba 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
- name: Get artifact rpm
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
path: "*.deb"
+70
View File
@@ -0,0 +1,70 @@
name: Build Win32 3proxy-lite with Watcom
on:
push:
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-watcom.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: Setup Open Watcom
uses: open-watcom/setup-watcom@v0
- name: set date
run: |
$NOW = Get-Date -Format "yyMMddHHmmss"
echo "now: $NOW"
$RELEASE = Get-Content -Path "RELEASE" -Raw
echo "release: $RELEASE"
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: make Watcom
shell: cmd
run: |
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
nmake /F Makefile.watcom
- name: make dist dir
shell: cmd
run: |
mkdir dist
mkdir dist\3proxy
mkdir dist\3proxy\bin
mkdir dist\3proxy\cfg
mkdir dist\3proxy\cfg\sql
mkdir dist\3proxy\doc
mkdir dist\3proxy\doc\ru
mkdir dist\3proxy\doc\html
mkdir dist\3proxy\doc\html\plugins
mkdir dist\3proxy\doc\html\man3
mkdir dist\3proxy\doc\html\man8
mkdir dist\3proxy\doc\devel
copy bin\3proxy.exe dist\3proxy\bin\
copy bin\*.dll dist\3proxy\bin\
copy bin\mycrypt.exe dist\3proxy\bin\
copy cfg\*.* dist\3proxy\cfg\
copy cfg\sql\*.* dist\3proxy\cfg\sql\
copy doc\ru\*.* dist\3proxy\doc\ru\
copy doc\html\*.* dist\3proxy\doc\html\
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
copy doc\html\man3\*.* dist\3proxy\doc\html\man3\
copy doc\devel\*.rtf dist\3proxy\doc\devel\
copy copying dist\3proxy\
copy authors dist\3proxy\
copy README dist\3proxy\
copy rus.3ps dist\3proxy\
- name: Get artifact
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-lite"
path: dist/
+76
View File
@@ -0,0 +1,76 @@
name: Build Win32 3proxy with MSVC
on:
push:
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-win32.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: set date
run: |
$NOW = Get-Date -Format "yyMMddHHmmss"
$RELEASE = Get-Content -Path "RELEASE" -Raw
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: install packages
run: vcpkg install pcre2:x86-windows-static openssl:x86-windows-static
- name: Add msbuild to PATH
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\vcvars32.bat"
D:
cd "D:/a/3proxy/3proxy"
set "LIB=%LIB%;c:/vcpkg/installed/x86-windows-static/lib"
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x86-windows-static/include"
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
nmake /F Makefile.msvc
- name: make dist dir
shell: cmd
run: |
mkdir dist
mkdir dist\3proxy
mkdir dist\3proxy\bin
mkdir dist\3proxy\cfg
mkdir dist\3proxy\cfg\sql
mkdir dist\3proxy\doc
mkdir dist\3proxy\doc\ru
mkdir dist\3proxy\doc\html
mkdir dist\3proxy\doc\html\plugins
mkdir dist\3proxy\doc\html\man3
mkdir dist\3proxy\doc\html\man8
mkdir dist\3proxy\doc\devel
copy bin\3proxy.exe dist\3proxy\bin\
copy bin\*.dll dist\3proxy\bin\
copy bin\mycrypt.exe dist\3proxy\bin\
copy cfg\*.* dist\3proxy\cfg\
copy cfg\sql\*.* dist\3proxy\cfg\sql\
copy doc\ru\*.* dist\3proxy\doc\ru\
copy doc\html\*.* dist\3proxy\doc\html\
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
copy doc\html\man3\*.* dist\3proxy\doc\html\man3\
copy doc\devel\*.rtf dist\3proxy\doc\devel\
copy copying dist\3proxy\
copy authors dist\3proxy\
copy README dist\3proxy\
copy rus.3ps dist\3proxy\
- name: Get artifact
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}"
path: dist/
+78
View File
@@ -0,0 +1,78 @@
name: Build Win64 3proxy with MSVC
on:
push:
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-win64.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: set date
run: |
$NOW = Get-Date -Format "yyMMddHHmmss"
$RELEASE = Get-Content -Path "RELEASE" -Raw
echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: install packages
run: vcpkg install pcre2:x64-windows-static openssl:x64-windows-static
- name: Add msbuild to PATH
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"
set "LIB=%LIB%;c:/vcpkg/installed/x64-windows-static/lib"
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows-static/include"
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
echo %NOW% / %RELEASE% / %BUILDDATE% / %VERSION%
nmake /F Makefile.msvc
- name: make dist dir
shell: cmd
run: |
mkdir dist
mkdir dist\3proxy
mkdir dist\3proxy\bin64
mkdir dist\3proxy\cfg
mkdir dist\3proxy\cfg\sql
mkdir dist\3proxy\doc
mkdir dist\3proxy\doc\ru
mkdir dist\3proxy\doc\html
mkdir dist\3proxy\doc\html\plugins
mkdir dist\3proxy\doc\html\man3
mkdir dist\3proxy\doc\html\man8
mkdir dist\3proxy\doc\devel
copy bin\3proxy.exe dist\3proxy\bin64\
copy bin\*.dll dist\3proxy\bin64\
copy bin\mycrypt.exe dist\3proxy\bin64\
copy cfg\*.* dist\3proxy\cfg\
copy cfg\sql\*.* dist\3proxy\cfg\sql\
copy doc\ru\*.* dist\3proxy\doc\ru\
copy doc\html\*.* dist\3proxy\doc\html\
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
copy doc\html\man3\*.* dist\3proxy\doc\html\man3\
copy doc\devel\*.rtf dist\3proxy\doc\devel\
copy copying dist\3proxy\
copy authors dist\3proxy\
copy README dist\3proxy\
copy rus.3ps dist\3proxy\
- name: Get artifact
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-x64"
path: dist/
+76
View File
@@ -0,0 +1,76 @@
name: Build Win-arm64 3proxy with MSVC
on:
push:
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-winarm64.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: set date
run: |
$NOW = Get-Date -Format "yyMMddHHmmss"
$RELEASE = Get-Content -Path "RELEASE" -Raw
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: install packages
run: vcpkg install pcre2:arm64-windows-static openssl:arm64-windows-static
- name: Add msbuild to PATH
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\vcvarsx86_arm64.bat"
D:
cd "D:/a/3proxy/3proxy"
set "LIB=%LIB%;c:/vcpkg/installed/arm64-windows-static/lib"
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/arm64-windows-static/include"
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
nmake /F Makefile.msvc
- name: make dist dir
shell: cmd
run: |
mkdir dist
mkdir dist\3proxy
mkdir dist\3proxy\bin64
mkdir dist\3proxy\cfg
mkdir dist\3proxy\cfg\sql
mkdir dist\3proxy\doc
mkdir dist\3proxy\doc\ru
mkdir dist\3proxy\doc\html
mkdir dist\3proxy\doc\html\plugins
mkdir dist\3proxy\doc\html\man3
mkdir dist\3proxy\doc\html\man8
mkdir dist\3proxy\doc\devel
copy bin\3proxy.exe dist\3proxy\bin64\
copy bin\*.dll dist\3proxy\bin64\
copy bin\mycrypt.exe dist\3proxy\bin64\
copy cfg\*.* dist\3proxy\cfg\
copy cfg\sql\*.* dist\3proxy\cfg\sql\
copy doc\ru\*.* dist\3proxy\doc\ru\
copy doc\html\*.* dist\3proxy\doc\html\
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
copy doc\html\man3\*.* dist\3proxy\doc\html\man3\
copy doc\devel\*.rtf dist\3proxy\doc\devel\
copy copying dist\3proxy\
copy authors dist\3proxy\
copy README dist\3proxy\
copy rus.3ps dist\3proxy\
- name: Get artifact
uses: actions/upload-artifact@v6
with:
name: "3proxy-${{ env.RELEASE }}-arm64"
path: dist/
+34
View File
@@ -0,0 +1,34 @@
name: C/C++ CI Linux
on:
push:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
pull_request:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-latest
- ubuntu-24.04-arm
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: Linux libraries
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: sudo apt install libssl-dev libpam-dev libpcre2-dev
- name: make
run: make -f Makefile.Linux
- name: mkdir
run: mkdir ~/3proxy
- name: make install
run: make -f Makefile.Linux DESTDIR=~/3proxy install
- name: make clean Linux
run: make -f Makefile.Linux clean
+31
View File
@@ -0,0 +1,31 @@
name: C/C++ CI MacOS
on:
push:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
pull_request:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- macos-15
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: Mac libraries
run: brew install pcre2
- name: make 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
run: make -f Makefile.FreeBSD clean
+41
View File
@@ -0,0 +1,41 @@
name: C/C++ CI Windows
on:
push:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
pull_request:
branches: [ "master" ]
paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- name: install Windows libraries
run: vcpkg install pcre2:x64-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-openssl
- name: make Windows
run: make -f Makefile.win
env:
LDFLAGS: '-L "c:/msys64/mingw64/lib"'
CFLAGS: '-I "c:/msys64/mingw64/include"'
- name: make clean Windows
run: make -f Makefile.win clean
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: make Windows MSVC
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
D:
cd "D:/a/3proxy/3proxy"
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
nmake /F Makefile.msvc
nmake /F Makefile.msvc clean
+57
View File
@@ -0,0 +1,57 @@
name: C/C++ CI cmake
on:
push:
branches: [ "master" ]
paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
pull_request:
branches: [ "master" ]
paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-15
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
# - name: configure
# run: ./configure
- name: Linux libraries
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: sudo apt install libssl-dev libpam-dev libpcre2-dev
- name: Mac libraries
if: ${{ startsWith(matrix.target, 'macos') }}
run: brew install pcre2
- name: install Windows libraries
if: ${{ startsWith(matrix.target, 'windows') }}
run: vcpkg install pcre2:x64-windows
- name: make with CMake POSIX
if: ${{ ! startsWith(matrix.target, 'windows') }}
run: |
mkdir build
cd build
cmake ..
cmake --build .
mkdir ~/3proxy
DESTDIR=~/3proxy cmake --install .
cd .. && rm -rf build/
- name: make with CMake Win
if: ${{ startsWith(matrix.target, 'windows') }}
shell: cmd
run: |
mkdir build
cd build
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
cmake ..
dir
cmake --build .
cd ..
rmdir /s /q build
+23 -6
View File
@@ -5,7 +5,23 @@
*.pydevproject
.project
.metadata
bin/
*.exe
*.dll
*.exp
*.lib
*.key
*.pem
*.so
bin/3proxy
bin/proxy
bin/socks
bin/tcppm
bin/udppm
bin/pop3p
bin/smtpp
bin/ftppr
bin/mycrypt
bin/tlspr
bin64/
dll/
tmp/
@@ -15,8 +31,12 @@ tmp/
*.swp
*.o
*.idb
*.err
res
version.c
version
version.sh
buildlinux.sh
3proxy.res
src/3proxy
@@ -32,12 +52,9 @@ src/mycrypt
src/dighosts
*.ld.so
*.dSYM
doc/html/man3/
doc/html/man8/
*.var
verfile.sh
Makefile
Changelog
/Makefile
copytgz.sh
*~.nib
local.properties
@@ -76,7 +93,6 @@ local.properties
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
@@ -241,3 +257,4 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
CLAUDE.md
+656
View File
@@ -0,0 +1,656 @@
#
# 3proxy CMake build system
#
cmake_minimum_required(VERSION 3.16)
# Read version from RELEASE file
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/RELEASE" PROJECT_VERSION LIMIT_COUNT 1)
project(3proxy
VERSION ${PROJECT_VERSION}
LANGUAGES C
DESCRIPTION "3proxy - tiny free proxy server"
)
# Include GNUInstallDirs for standard installation directories
include(GNUInstallDirs)
# Add cmake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Detect compiler
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
set(COMPILER_IS_CLANG TRUE)
if(WIN32 AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
set(COMPILER_IS_CLANG_CL TRUE)
else()
set(COMPILER_IS_CLANG_CL FALSE)
endif()
else()
set(COMPILER_IS_CLANG FALSE)
set(COMPILER_IS_CLANG_CL FALSE)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(COMPILER_IS_GCC TRUE)
else()
set(COMPILER_IS_GCC FALSE)
endif()
if(MSVC AND NOT COMPILER_IS_CLANG_CL)
set(COMPILER_IS_MSVC TRUE)
else()
set(COMPILER_IS_MSVC FALSE)
endif()
# Options
option(3PROXY_BUILD_SHARED "Build shared libraries for plugins" ON)
option(3PROXY_USE_OPENSSL "Enable OpenSSL/SSLPlugin" ON)
option(3PROXY_USE_PCRE2 "Enable PCRE2/PCREPlugin" ON)
option(3PROXY_USE_PAM "Enable PAM/PamAuth" ON)
option(3PROXY_USE_ODBC "Enable ODBC support (Unix only, always ON on Windows)" OFF)
option(3PROXY_USE_SPLICE "Use Linux splice() for zero-copy (Linux only)" ON)
option(3PROXY_USE_POLL "Use poll() instead of select() (Unix only)" ON)
option(3PROXY_USE_WSAPOLL "Use WSAPoll instead of select() (Windows only)" ON)
option(3PROXY_USE_NETFILTER "Enable Linux netfilter support (Linux only)" ON)
# Output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Find threads library (cross-platform pthread equivalent)
find_package(Threads REQUIRED)
# Set default build type if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
# Platform-independent position independent code for shared libraries
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Platform detection and configuration
if(WIN32)
# Windows-specific configuration
add_compile_definitions(
WIN32
_WIN32
_MBCS
_CONSOLE
)
if(COMPILER_IS_MSVC)
# MSVC-specific settings
add_compile_definitions(
MSVC
WITH_SSL
)
# Use static runtime library
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# MSVC compiler options
add_compile_options(
/W3 # Warning level 3
/GS # Buffer security check
/GA # Optimize for Windows applications
/GF # Enable string pooling
)
# Optimization flags per build type
set(CMAKE_C_FLAGS_RELEASE "/O2")
elseif(COMPILER_IS_CLANG_CL)
# clang-cl (Clang with MSVC frontend)
add_compile_definitions(
MSVC
WITH_SSL
)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_compile_options(
-W3
-fno-strict-aliasing
)
elseif(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
# Clang or GCC on Windows (MinGW-like)
add_compile_definitions(WITH_STD_MALLOC)
add_compile_options(-fno-strict-aliasing)
elseif(WATCOM)
# OpenWatcom-specific flags
add_compile_definitions(
WATCOM
MSVC
NOIPV6
NODEBUG
NORADIUS
)
endif()
# Windows libraries
set(WINDOWS_LIBS ws2_32 advapi32 user32 kernel32 gdi32 crypt32)
# Windows plugins (always built)
set(DEFAULT_PLUGINS
utf8tocp1251
WindowsAuthentication
TrafficPlugin
StringsPlugin
FilePlugin
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Linux-specific configuration
add_compile_definitions(
_GNU_SOURCE
GETHOSTBYNAME_R
_THREAD_SAFE
_REENTRANT
)
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
# Clang/GCC on Linux
add_compile_options(-fno-strict-aliasing)
endif()
if(3PROXY_USE_SPLICE)
add_compile_definitions(WITHSPLICE)
endif()
if(3PROXY_USE_NETFILTER)
add_compile_definitions(WITH_NETFILTER)
endif()
set(DEFAULT_PLUGINS
StringsPlugin
TrafficPlugin
TransparentPlugin
)
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Darwin|OpenBSD|NetBSD")
# BSD/macOS-specific configuration
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# macOS-specific
add_compile_definitions(_DARWIN_UNLIMITED_SELECT)
endif()
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
add_compile_options(-fno-strict-aliasing)
endif()
set(DEFAULT_PLUGINS
StringsPlugin
TrafficPlugin
TransparentPlugin
)
else()
# Generic Unix configuration
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
add_compile_options(-fno-strict-aliasing)
endif()
set(DEFAULT_PLUGINS
StringsPlugin
TrafficPlugin
TransparentPlugin
)
endif()
# Common definitions
if(WIN32)
# Windows: use WSAPOLL
if(3PROXY_USE_WSAPOLL)
add_compile_definitions(WITH_WSAPOLL)
else()
add_compile_definitions(FD_SETSIZE=4096)
endif()
else()
# Unix: use poll
if(3PROXY_USE_POLL)
add_compile_definitions(WITH_POLL)
else()
add_compile_definitions(FD_SETSIZE=4096)
endif()
endif()
# Find dependencies
# OpenSSL
set(OPENSSL_FOUND FALSE)
if(3PROXY_USE_OPENSSL)
find_package(OpenSSL QUIET)
if(OpenSSL_FOUND)
set(OPENSSL_FOUND TRUE)
add_compile_definitions(WITH_SSL)
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
else()
message(STATUS "OpenSSL not found, SSLPlugin will not be built")
endif()
endif()
# PCRE2
set(PCRE2_FOUND FALSE)
if(3PROXY_USE_PCRE2)
find_package(PCRE2 QUIET)
if(PCRE2_FOUND)
message(STATUS "PCRE2 found: ${PCRE2_VERSION}")
else()
message(STATUS "PCRE2 not found, PCREPlugin will not be built")
endif()
endif()
# PAM (Unix only)
set(PAM_FOUND FALSE)
if(3PROXY_USE_PAM AND NOT WIN32)
find_package(PAM QUIET)
if(PAM_FOUND)
message(STATUS "PAM found")
else()
message(STATUS "PAM not found, PamAuth will not be built")
endif()
endif()
# ODBC (always enabled on Windows)
set(ODBC_FOUND FALSE)
if(WIN32 OR 3PROXY_USE_ODBC)
find_package(ODBC QUIET)
if(ODBC_FOUND)
message(STATUS "ODBC found")
else()
message(STATUS "ODBC not found, building without ODBC support")
endif()
endif()
# Set NOODBC if ODBC is not found
if(NOT ODBC_FOUND)
add_compile_definitions(NOODBC)
endif()
# Source files for 3proxy core
set(3PROXY_CORE_SOURCES
src/3proxy.c
src/auth.c
src/authradius.c
src/conf.c
src/datatypes.c
src/plugins.c
src/stringtable.c
)
# MD4/MD5 sources for mycrypt
set(MD_SOURCES
src/libs/md4.c
src/libs/md5.c
)
# ============================================================================
# Object libraries for common sources (shared between executables)
# ============================================================================
# Common object library (sockmap, sockgetchar, common, log)
add_library(common_obj OBJECT
src/sockmap.c
src/sockgetchar.c
src/common.c
src/log.c
)
target_include_directories(common_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# base64 object library
add_library(base64_obj OBJECT src/base64.c)
target_include_directories(base64_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# ============================================================================
# Object libraries for 3proxy (compiled WITHOUT WITHMAIN)
# These are used by the main 3proxy executable
# ============================================================================
# Server modules object library (without WITHMAIN)
add_library(srv_modules OBJECT
src/proxy.c
src/pop3p.c
src/smtpp.c
src/ftppr.c
src/tcppm.c
src/tlspr.c
src/auto.c
src/socks.c
src/webadmin.c
src/udppm.c
src/dnspr.c
)
target_include_directories(srv_modules PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
# mainfunc object (proxymain.c compiled with MODULEMAINFUNC=mainfunc for 3proxy)
add_library(mainfunc OBJECT src/proxymain.c)
target_include_directories(mainfunc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_compile_definitions(mainfunc PRIVATE MODULEMAINFUNC=mainfunc)
# ftp object (used only by 3proxy and ftppr)
add_library(ftp_obj OBJECT src/ftp.c)
target_include_directories(ftp_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# mycrypt object for 3proxy (without WITHMAIN)
add_library(mycrypt_obj OBJECT src/mycrypt.c)
target_include_directories(mycrypt_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# ============================================================================
# Main 3proxy executable
# Uses srv_* object files (without WITHMAIN)
# ============================================================================
add_executable(3proxy
${3PROXY_CORE_SOURCES}
${MD_SOURCES}
$<TARGET_OBJECTS:srv_modules>
$<TARGET_OBJECTS:mainfunc>
$<TARGET_OBJECTS:common_obj>
$<TARGET_OBJECTS:base64_obj>
$<TARGET_OBJECTS:ftp_obj>
$<TARGET_OBJECTS:mycrypt_obj>
)
target_include_directories(3proxy PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/libs
)
target_link_libraries(3proxy PRIVATE Threads::Threads)
if(ODBC_FOUND)
if(TARGET ODBC::ODBC)
target_link_libraries(3proxy PRIVATE ODBC::ODBC)
else()
target_link_libraries(3proxy PRIVATE ${ODBC_LIBRARIES})
endif()
endif()
if(WIN32)
target_link_libraries(3proxy PRIVATE ${WINDOWS_LIBS})
if(OpenSSL_FOUND)
target_link_libraries(3proxy PRIVATE OpenSSL::SSL OpenSSL::Crypto)
endif()
if(COMPILER_IS_MSVC AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3proxy.rc)
target_sources(3proxy PRIVATE 3proxy.rc)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(3proxy PRIVATE dl)
if(OpenSSL_FOUND)
target_link_libraries(3proxy PRIVATE OpenSSL::SSL OpenSSL::Crypto)
endif()
endif()
# Build mycrypt utility
add_executable(mycrypt
src/mycrypt.c
${MD_SOURCES}
$<TARGET_OBJECTS:base64_obj>
)
target_compile_definitions(mycrypt PRIVATE WITHMAIN)
target_include_directories(mycrypt PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/libs
)
target_link_libraries(mycrypt PRIVATE Threads::Threads)
# Build standalone proxy executables
foreach(PROXY_NAME proxy socks pop3p smtpp ftppr tcppm udppm tlspr)
if(PROXY_NAME STREQUAL "ftppr" OR PROXY_NAME STREQUAL "proxy")
# ftppr and proxy use ftp_obj
add_executable(${PROXY_NAME}
src/${PROXY_NAME}.c
$<TARGET_OBJECTS:common_obj>
$<TARGET_OBJECTS:ftp_obj>
)
else()
add_executable(${PROXY_NAME}
src/${PROXY_NAME}.c
$<TARGET_OBJECTS:common_obj>
)
endif()
target_include_directories(${PROXY_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_compile_definitions(${PROXY_NAME} PRIVATE
WITHMAIN
NOPORTMAP
)
target_link_libraries(${PROXY_NAME} PRIVATE Threads::Threads)
if(PROXY_NAME STREQUAL "proxy")
target_compile_definitions(${PROXY_NAME} PRIVATE ANONYMOUS)
endif()
if(PROXY_NAME STREQUAL "tcppm" OR PROXY_NAME STREQUAL "udppm" OR PROXY_NAME STREQUAL "tlspr")
target_compile_definitions(${PROXY_NAME} PRIVATE PORTMAP)
endif()
if(WIN32)
target_link_libraries(${PROXY_NAME} PRIVATE ${WINDOWS_LIBS})
endif()
if(PROXY_NAME STREQUAL "proxy" OR PROXY_NAME STREQUAL "smtpp")
target_sources(${PROXY_NAME} PRIVATE $<TARGET_OBJECTS:base64_obj>)
endif()
endforeach()
# Plugin output directory
set(PLUGIN_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
if(WIN32)
set(PLUGIN_SUFFIX ".dll")
else()
set(PLUGIN_SUFFIX ".ld.so")
endif()
# Include plugin definitions
include(cmake/plugins.cmake)
# Build plugins
foreach(PLUGIN ${DEFAULT_PLUGINS})
add_subdirectory(src/plugins/${PLUGIN})
endforeach()
if(OPENSSL_FOUND)
add_subdirectory(src/plugins/SSLPlugin)
endif()
if(PCRE2_FOUND)
add_subdirectory(src/plugins/PCREPlugin)
endif()
if(PAM_FOUND)
add_subdirectory(src/plugins/PamAuth)
endif()
# Build full list of plugins to be built
set(ALL_PLUGINS ${DEFAULT_PLUGINS})
if(OPENSSL_FOUND)
list(APPEND ALL_PLUGINS SSLPlugin)
endif()
if(PCRE2_FOUND)
list(APPEND ALL_PLUGINS PCREPlugin)
endif()
if(PAM_FOUND)
list(APPEND ALL_PLUGINS PamAuth)
endif()
# Installation rules
install(TARGETS 3proxy mycrypt proxy socks pop3p smtpp ftppr tcppm udppm tlspr
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# Install plugins
file(GLOB PLUGINFILES "${PLUGIN_OUTPUT_DIR}/*${PLUGIN_SUFFIX}")
if(WIN32)
install(FILES
${PLUGINFILES}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
else()
install(FILES
${PLUGINFILES}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
)
endif()
# Install configuration files
if(NOT WIN32)
install(FILES scripts/3proxy.cfg DESTINATION /etc/3proxy)
install(FILES scripts/add3proxyuser.sh DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
# Install service files (systemd, launchd, init.d, or rc.d)
if(NOT WIN32)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# macOS - install launchd plist
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/org.3proxy.3proxy.plist.in
${CMAKE_CURRENT_BINARY_DIR}/org.3proxy.3proxy.plist
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.3proxy.3proxy.plist
DESTINATION /Library/LaunchDaemons
)
message(STATUS " launchd: YES (/Library/LaunchDaemons)")
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|OpenBSD|NetBSD")
# BSD - install rc.d script
set(RCD_DIR "/usr/local/etc/rc.d")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/rc.d/3proxy.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.rc
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.rc
DESTINATION ${RCD_DIR}
RENAME 3proxy
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
message(STATUS " rc.d: YES (${RCD_DIR})")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Linux - check for systemd
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(SYSTEMD QUIET systemd)
endif()
if(SYSTEMD_FOUND)
# systemd is available - install systemd service
# Get systemd unit directory
pkg_get_variable(SYSTEMD_UNIT_DIR systemd systemdsystemunitdir)
if(NOT SYSTEMD_UNIT_DIR)
# Fallback to common location
set(SYSTEMD_UNIT_DIR "/lib/systemd/system")
endif()
# Configure and install systemd service file
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/3proxy.service.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
DESTINATION ${SYSTEMD_UNIT_DIR}
)
# Install tmpfiles.d configuration for runtime directory
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/3proxy.tmpfiles.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.conf
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.conf
DESTINATION /usr/lib/tmpfiles.d
)
message(STATUS " systemd: YES (${SYSTEMD_UNIT_DIR})")
else()
# No systemd - install init.d script
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/init.d/3proxy.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
DESTINATION /etc/init.d
RENAME 3proxy
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
message(STATUS " systemd: NO (using init.d)")
endif()
else()
# Other Unix - install init.d script
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/init.d/3proxy.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
DESTINATION /etc/init.d
RENAME 3proxy
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
message(STATUS " init.d: YES (/etc/init.d)")
endif()
# Create proxy user and group during installation
install(FILES scripts/postinstall.sh
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(CODE "
execute_process(
COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/postinstall.sh
RESULT_VARIABLE POSTINSTALL_RESULT
)
")
endif()
# Install man pages
if(NOT WIN32)
file(GLOB MAN3_FILES "${CMAKE_CURRENT_SOURCE_DIR}/man/*.3")
file(GLOB MAN8_FILES "${CMAKE_CURRENT_SOURCE_DIR}/man/*.8")
install(FILES ${MAN3_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
install(FILES ${MAN8_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
endif()
# Summary
message(STATUS "")
message(STATUS "3proxy configuration summary:")
message(STATUS " Version: ${PROJECT_VERSION}")
message(STATUS " Platform: ${CMAKE_SYSTEM_NAME}")
message(STATUS " Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "")
message(STATUS " Options:")
message(STATUS " BUILD_SHARED: ${3PROXY_BUILD_SHARED}")
message(STATUS " USE_OPENSSL: ${3PROXY_USE_OPENSSL}")
message(STATUS " USE_PCRE2: ${3PROXY_USE_PCRE2}")
message(STATUS " USE_PAM: ${3PROXY_USE_PAM}")
message(STATUS " USE_ODBC: ${3PROXY_USE_ODBC}")
message(STATUS " USE_POLL: ${3PROXY_USE_POLL}")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(STATUS " USE_SPLICE: ${3PROXY_USE_SPLICE}")
message(STATUS " USE_NETFILTER: ${3PROXY_USE_NETFILTER}")
endif()
if(WIN32)
message(STATUS " USE_WSAPOLL: ${3PROXY_USE_WSAPOLL}")
endif()
message(STATUS "")
message(STATUS " Libraries found:")
message(STATUS " OpenSSL: ${OPENSSL_FOUND}")
message(STATUS " PCRE2: ${PCRE2_FOUND}")
message(STATUS " PAM: ${PAM_FOUND}")
message(STATUS " ODBC: ${ODBC_FOUND}")
message(STATUS "")
message(STATUS " Plugins to build: ${ALL_PLUGINS}")
message(STATUS "")
+66
View File
@@ -0,0 +1,66 @@
# 3proxy.full is fully functional 3proxy build based on busybox:glibc
#
# Example are for podman, for docker change 'podman' to 'docker'
#
#to build:
# podman build -f Dockerfile.full -t 3proxy.full .
#to run:
#
# echo nserver 8.8.8.8 >/path/to/local/config/directory/3proxy.cfg
# echo proxy -p3129 >>/path/to/local/config/directory/3proxy.cfg
# podman run --read-only -p 3129:3129 -v /path/to/local/config/directory:/etc/3proxy -name 3proxy.full 3proxy.full
#
# use "log" without pathname in config to log to stdout.
# plugins are located in /usr/local/3proxy/libexec (/libexec for chroot config)
# symlinked as /lib and /lib64 in both root and chroot configurations, so no need
# to specify full path to plugin. SSLPlugin is supported.
#
# Since 0.9.6 image is distroless, no reason to use chroot, chroot
# configuration is supported for compatility only.
FROM docker.io/gcc AS buildenv
COPY . 3proxy
RUN cd 3proxy &&\
apt --assume-yes update && apt --assume-yes install libssl-dev libpcre2-dev &&\
make -f Makefile.Linux &&\
strip bin/3proxy &&\
mkdir /dist &&\
mkdir /dist/etc &&\
mkdir /dist/etc/3proxy &&\
mkdir /dist/bin &&\
mkdir /dist/usr &&\
mkdir /dist/usr/local &&\
mkdir /dist/usr/local/3proxy &&\
mkdir /dist/usr/local/3proxy/libexec &&\
mkdir /dist/usr/local/3proxy/conf &&\
cp bin/3proxy /dist/bin &&\
cp bin/*.so /dist/usr/local/3proxy/libexec &&\
cp scripts/3proxy.cfg.inchroot /dist/etc/3proxy/3proxy.cfg
RUN cd /dist &&\
ln -s /usr/local/3proxy/libexec lib64 &&\
ln -s /usr/local/3proxy/libexec lib &&\
ln -s /usr/local/3proxy/libexec usr/lib &&\
ln -s /usr/local/3proxy/libexec usr/lib64 &&\
ln -s /usr/local/3proxy/libexec /dist/usr/local/3proxy/libexec/`gcc -dumpmachine` &&\
cp /lib64/ld-*.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libc.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libdl.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libcrypto.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libssl.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libpcre2-8.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libz.so.* /dist/usr/local/3proxy/libexec &&\
cp "/lib/`gcc -dumpmachine`"/libzstd.so.* /dist/usr/local/3proxy/libexec
RUN cd /dist/usr/local/3proxy/ &&\
ln -s libexec lib &&\
ln -s libexec lib64 &&\
mkdir usr
RUN cd /dist/usr/local/3proxy/usr &&\
ln -s ../libexec lib &&\
ln -s ../libexec lib64 &&\
strip /dist/usr/local/3proxy/libexec/*.so &&\
ls -lR /dist
FROM scratch
COPY --from=buildenv /dist /
CMD ["/bin/3proxy", "/etc/3proxy/3proxy.cfg"]
+38
View File
@@ -0,0 +1,38 @@
# dockerfile for "interactive" minimal 3proxy execution, no configuration mounting is required, configuration
# is accepted from stdin. Use "end" command to indicate the end of configuration. Use "log" for stdout logging.
#
# Examples are for podman. For docker change 'podman' to 'docker'.
#
# This is busybox based docker with only 3proxy static executable.
#
# Limitations for minimal version:
# no support for plugins, IPv6, RADIUS, system resolver.
# 'nserver' or 'fakeresolve' are mandatory in configuration.
#
# Build:
#
# podman build -f Dockerfile.minimal -t 3proxy.minimal .
#
# Run example:
#
# podman run --read-only -i -p 3129:3129 --name 3proxy 3proxy.minimal
#or
# podman start -ai 3proxy
#<nserver 8.8.8.8
#<nscache 65535
#<log
#<proxy -p3129
#<end
#
FROM docker.io/gcc AS buildenv
COPY . 3proxy
RUN cd 3proxy &&\
export "LDFLAGS=-static" &&\
export "CFLAGS=-DNOPLUGINS -DNORADIUS -DNOIPV6 -DNOODBC -DNOCRYPT -DNOSTDRESOLVE" &&\
make -f Makefile.Linux PLUGINS= LIBS= &&\
strip bin/3proxy
FROM scratch
COPY --from=buildenv 3proxy/bin/3proxy /bin/3proxy
CMD ["/bin/3proxy"]
+63
View File
@@ -0,0 +1,63 @@
#
# 3 proxy Makefile for GCC/Unix
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR = ../bin/
CC ?= cc
CFLAGS := -c -fno-strict-aliasing -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
COUT = -o
LN ?= ${CC}
LDFLAGS += -pthread -fno-strict-aliasing
# -lpthreads may be reuiured on some platforms instead of -pthreads
# -ldl or -lld may be required for some platforms
DCFLAGS ?= -fPIC
DLFLAGS ?= -shared
DLSUFFICS = .so
LIBS ?=
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -perm +111 -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.FreeBSD
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += -l crypto -l ssl
PLUGINS += SSLPlugin
endif
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && 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;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
PLUGINS += PamAuth
endif
include Makefile.inc
install: all
if [ ! -d "/usr/local/3proxy/bin" ]; then mkdir -p /usr/local/3proxy/bin/; fi
install bin/3proxy /usr/local/3proxy/bin/3proxy
install bin/mycrypt /usr/local/3proxy/bin/mycrypt
install scripts/rc.d/3proxy /usr/local/etc/rc.d/3proxy
install scripts/add3proxyuser.sh /usr/local/3proxy/bin/
if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then /usr/local/3proxy/3proxy.cfg already exists ; else install scripts/3proxy.cfg /usr/local/etc/3proxy/; fi
if [ ! -d /var/log/3proxy/ ]; then mkdir /var/log/3proxy/; fi
touch /usr/local/3proxy/passwd
touch /usr/local/3proxy/counters
touch /usr/local/3proxy/bandlimiters
echo Run /usr/local/3proxy/bin/add3proxyuser.sh to add \'admin\' user
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
+89 -38
View File
@@ -1,21 +1,18 @@
#
# 3 proxy Makefile for GCC/Linux/Cygwin
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# remove -DNOODBC from CFLAGS and add -lodbc to LIBS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR =
CC = gcc
BUILDDIR = ../bin/
CC ?= gcc
CFLAGS = -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
CFLAGS := -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER $(CFLAGS)
COUT = -o
LN = gcc
DCFLAGS = -fpic
LDFLAGS = -O2 -pthread
DLFLAGS = -shared
LN ?= ${CC}
DCFLAGS ?=
LDFLAGS := -fPIC -O2 -fno-strict-aliasing -pthread $(LDFLAGS)
DLFLAGS ?= -shared
DLSUFFICS = .ld.so
# -lpthreads may be reuqired on some platforms instead of -pthreads
LIBSPREFIX = -l
@@ -26,70 +23,106 @@ OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.Linux
# PamAuth requires libpam, you may require pam-devel package to be installed
# SSLPlugin requires -lcrypto -lssl
#LIBS = -lcrypto -lssl -ldl
LIBS = -ldl
LIBS ?= -ldl
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += -l crypto -l ssl
PLUGINS += SSLPlugin
endif
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && 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;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
PLUGINS += PamAuth
endif
include Makefile.inc
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
DESTDIR =
prefix = /usr/local
prefix =
exec_prefix = $(prefix)
man_prefix = $(prefix)/share
man_prefix = /usr/share
chroot_prefix = /usr/local
INSTALL = /usr/bin/install
INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_OBJS = src/3proxy \
src/dighosts \
src/ftppr \
src/mycrypt \
src/pop3p \
src/proxy \
src/socks \
src/tcppm \
src/udppm
INSTALL_OBJS = bin/3proxy \
bin/ftppr \
bin/mycrypt \
bin/pop3p \
bin/proxy \
bin/socks \
bin/tcppm \
bin/udppm \
bin/tlspr
INSTALL_CFG_OBJS = scripts/3proxy.cfg \
scripts/add3proxyuser.sh
INSTALL_CFG_DEST = config
INSTALL_CFG = scripts/3proxy.cfg.chroot
INSTALL_CFG_INCHROOT = scripts/3proxy.cfg.inchroot
INSTALL_CFG_OBJS = scripts/add3proxyuser.sh
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
INSTALL_CFG_OBJS2 = counters bandlimiters
INSTALL_INITD_SCRIPT = scripts/init.d/3proxy.sh
INSTALL_SYSTEMD_SCRIPT = scripts/3proxy.service
CHROOTDIR = $(DESTDIR)$(chroot_prefix)/3proxy
CHROOTREL = ../..$(chroot_prefix)/3proxy
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
BINDIR = $(DESTDIR)$(exec_prefix)/bin
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
ETCDIR = $(DESTDIR)/etc/3proxy
INITDDIR = $(DESTDIR)/etc/init.d
RUNBASE = $(DESTDIR)/var/run
RUNDIR = $(RUNBASE)/3proxy
LOGBASE = $(DESTDIR)/var/log
LOGDIR = $(LOGBASE)/3proxy
INSTALL_CFG_DEST = $(ETCDIR)/conf
SYSTEMDDIR = $(DESTDIR)/usr/lib/systemd/system/
install-bin:
$(INSTALL_BIN) -d $(BINDIR)
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
$(INSTALL_BIN) -s bin/*.ld.so $(CHROOTDIR)/libexec
install-etc-dir:
$(INSTALL_BIN) -d $(ETCDIR)
install-etc-default-config:
if [ -f $(ETCDIR)/$(INSTALL_CFG_DEST) ]; then \
: ; \
else \
$(INSTALL_DATA) $(INSTALL_CFG_OBJS) $(ETCDIR)/$(INSTALL_CFG_DEST) \
install-chroot-dir:
$(INSTALL_BIN) -d $(CHROOTDIR)
$(INSTALL_BIN) -d $(CHROOTDIR)/conf
$(INSTALL_BIN) -d $(CHROOTDIR)/logs
$(INSTALL_BIN) -d $(CHROOTDIR)/count
$(INSTALL_BIN) -d $(CHROOTDIR)/libexec
chmod -R o-rwx $(CHROOTDIR)
install-etc-default-config: install-chroot-dir
if [ ! -d $(INSTALL_CFG_DEST) ]; then \
ln -s $(CHROOTREL)/conf $(INSTALL_CFG_DEST); \
$(INSTALL_BIN) $(INSTALL_CFG) $(ETCDIR)/3proxy.cfg; \
$(INSTALL_BIN) $(INSTALL_CFG_OBJS) $(INSTALL_CFG_DEST); \
$(INSTALL_BIN) $(INSTALL_CFG_INCHROOT) $(INSTALL_CFG_DEST)/3proxy.cfg; \
fi
install-etc: install-etc-dir
install-etc: install-etc-dir install-etc-default-config
for file in $(INSTALL_CFG_OBJS2); \
do \
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
touch $(INSTALL_CFG_DEST)/$$file; chmod 0600 $(INSTALL_CFG_DEST)/$$file; \
done;
install-man:
@@ -98,5 +131,23 @@ install-man:
$(INSTALL_DATA) man/*.3 $(MANDIR3)
$(INSTALL_DATA) man/*.8 $(MANDIR8)
install: install-bin install-etc install-man
install-init:
$(INSTALL_BIN) -d $(INITDDIR)
$(INSTALL_BIN) $(INSTALL_INITD_SCRIPT) $(INITDDIR)/3proxy
$(INSTALL_BIN) -d $(SYSTEMDDIR)
$(INSTALL_DATA) $(INSTALL_SYSTEMD_SCRIPT) $(SYSTEMDDIR)
install-run:
$(INSTALL_BIN) -d $(RUNDIR)
install-log:
$(INSTALL_BIN) -d $(LOGBASE)
@if [ ! -d $(LOGDIR) ]; then \
ln -s $(CHROOTREL)/logs $(LOGDIR);\
fi
install: install-chroot-dir install-bin install-etc install-log install-man install-run install-init
@if [ "$(DESTDIR)" = "" ]; then \
sh debian/preinst; \
sh debian/postinst; \
fi
+6 -7
View File
@@ -1,19 +1,17 @@
#
# 3 proxy Makefile for Solaris/SunCC
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR =
BUILDDIR = ../bin/
CC = cc
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL
COUT = -o ./
LN = cc
LN = $(CC)
LDFLAGS = -xO3
DCFLAGS = -fpic
DCFLAGS = -fPIC
DLFLAGS = -shared
DLSUFFICS = .ld.so
LIBS = -lpthread -lsocket -lnsl -lresolv -ldl
@@ -25,10 +23,11 @@ OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.Solaris
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin
PLUGINS = StringsPlugin TrafficPlugin
include Makefile.inc
+6 -7
View File
@@ -1,20 +1,18 @@
#
# 3 proxy Makefile for Solaris/gcc
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR =
BUILDDIR = ../bin/
CC = gcc
CFLAGS = -O3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
CFLAGS = -O2 -fno-strict-aliasing -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL
COUT = -o ./
LN = gcc
LN = $(CC)
LDFLAGS = -O3
DCFLAGS = -fpic
DCFLAGS = -fPIC
DLFLAGS = -shared
DLSUFFICS = .ld.so
LIBS = -lpthread -lsocket -lnsl -lresolv -ldl
@@ -26,10 +24,11 @@ OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.Solaris-gcc
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin
PLUGINS = StringsPlugin TrafficPlugin
include Makefile.inc
+1 -3
View File
@@ -1,12 +1,10 @@
#
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
#
# You can try to add /D "WITH_STD_MALLOC" to CFLAGS to use standard malloc
# libraries
BUILDDIR = ../bin/
CC = cl
CFLAGS = /FD /MDd /nologo /W3 /ZI /Wp64 /GS /Gs /RTCsu /EHs- /GA /GF /DEBUG /D "WITH_STD_MALLOC" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /c
CFLAGS = /FD /MDd /nologo /W3 /ZI /Wp64 /GS /Gs /RTCsu /EHs- /GA /GF /DEBUG /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /c
COUT = /Fo
LN = link
LDFLAGS = /nologo /subsystem:console /machine:I386 /DEBUG
+4 -3
View File
@@ -3,10 +3,11 @@
#
all:
$(TYPECOMMAND) $(MAKEFILE) > src/Makefile.var
@$(TYPECOMMAND) $(MAKEFILE) > src/Makefile.var
@cd src && $(MAKE)
clean:
@$(REMOVECOMMAND) *$(OBJSUFFICS) $(COMPFILES)
@cd src && $(MAKE) clean
@cd src && $(REMOVECOMMAND) *$(OBJSUFFICS) $(COMPFILES) && cd ..
@$(AFTERCLEAN)
-33
View File
@@ -1,33 +0,0 @@
#
# 3 proxy Makefile for Intel C compiler for Windows (for both make and nmake)
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
BUILDDIR = ../bin/
CC = icl
CFLAGS = /nologo /MD /W3 /G6 /GX /O2 /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /YX /FD /c
COUT = /Fo
LN = xilink
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib
DLFLAGS = /DLL
DLSUFFICS = .dll
LNOUT = /out:
EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb
REMOVECOMMAND = del 2>NUL
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.intl
PLUGINS = WindowsAuthentication TrafficPlugin PCREPlugin
include Makefile.inc
allplugins:
for /D %%i in ($(PLUGINS)) do (copy Makefile Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
-36
View File
@@ -1,36 +0,0 @@
#
# 3 proxy Makefile for GCC/windows
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support
BUILDDIR = ../bin/
CC = clang
CFLAGS = -O2 -c -pthread -static -DWITH_STD_MALLOC -DNOIPV6
COUT = -o
LN = clang
LDFLAGS = -O2 -static -s
DLFLAGS = -shared
DLSUFFICS = .dll
LIBS = -lws2_32 -lodbc32 -ladvapi32
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o
EXESUFFICS = .exe
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *.tmp
REMOVECOMMAND = rm -f
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.win
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
include Makefile.inc
allplugins:
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.o &&cd ..\..)
+12 -14
View File
@@ -1,21 +1,20 @@
#
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
BUILDDIR = ../bin/
CC = cl
CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c
VERSION = $(VERSION)
BUILDDATE = $(BUILDDATE)
CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "WITH_SSL" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c $(BUILDDATE) $(VERSION)
COUT = /Fo
LN = link
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
LDFLAGS = /nologo /subsystem:console /incremental:no
DLFLAGS = /DLL
DLSUFFICS = .dll
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib libeay32MT.lib ssleay32MT.lib
LIBSOLD = libeay32MT.lib ssleay32MT.lib
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib
LIBSPREFIX =
LIBSSUFFIX = .lib
LIBEXT = .lib
@@ -24,20 +23,19 @@ EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb
REMOVECOMMAND = del 2>NUL >NUL
REMOVECOMMAND = del
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.msvc
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin SSLPlugin
VERFILE = $(VERFILE)
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin
VERFILE = 3proxy.res $(VERFILE)
VERSIONDEP = 3proxy.res $(VERSIONDEP)
AFTERCLEAN = if exist src\*.res (del src\*.res) && if exist src\*.err (del src\*.err)
include Makefile.inc
../3proxy.res:
rc /fo../3proxy.res ../3proxy.rc
3proxyres.obj: ../3proxy.res
cvtres /out:3proxyres.obj /MACHINE:I386 ../3proxy.res
3proxy.res:
rc 3proxy.rc
allplugins:
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
-51
View File
@@ -1,51 +0,0 @@
#
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
BUILDDIR = ../bin64/
CC = cl
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c
COUT = /Fo
LN = link
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64
DLFLAGS = /DLL
DLSUFFICS = .dll
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib libeay32MT.lib ssleay32MT.lib
LIBSOLD = libeay32MT.lib ssleay32MT.lib
LIBSPREFIX =
LIBSSUFFIX = .lib
LIBEXT = .lib
LNOUT = /out:
EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb
REMOVECOMMAND = del 2>NUL >NUL
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.msvc64
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin SSLPlugin
VERFILE = $(VERFILE)
#../3proxy.res:
# rc /fo../3proxy.res ../3proxy.rc
#3proxyres.obj: ../3proxy.res
# cvtres /out:3proxyres.obj /MACHINE:X64 ../3proxy.res
include Makefile.inc
../3proxy.res:
rc /fo../3proxy.res ../3proxy.rc
3proxyres.obj: ../3proxy.res
cvtres /out:3proxyres.obj /machine:x64 ../3proxy.res
allplugins:
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
-35
View File
@@ -1,35 +0,0 @@
#
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
BUILDDIR = ../bin/
CC = cl
CFLAGS = /DARM /D "NOODBC" /nologo /MT /W3 /Wp64 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "_WINCE" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c
COUT = /Fo
LN = link
LDFLAGS = /nologo /subsystem:console /incremental:no
DLFLAGS = /DLL
DLSUFFICS = .dll
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib
LIBEXT = .lib
LNOUT = /out:
EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb
REMOVECOMMAND = del 2>NUL >NUL
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.msvc
PLUGINS = WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
include Makefile.inc
allplugins:
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
+113
View File
@@ -0,0 +1,113 @@
#
# 3 proxy Makefile for GCC/Linux/Cygwin
#
#
# remove -DNOODBC from CFLAGS and add -lodbc to LIBS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR = ../bin/
CC = mips-openwrt-linux-gcc
CFLAGS ?= -g -O2 -fno-strict-aliasing -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER
COUT = -o
LN = $(CC)
DCFLAGS = -fPIC
LDFLAGS ?= -O2 -fno-strict-aliasing -pthread -s
DLFLAGS = -shared
DLSUFFICS = .ld.so
# -lpthreads may be reuqired on some platforms instead of -pthreads
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.openwrt-mips
# PamAuth requires libpam, you may require pam-devel package to be installed
# SSLPlugin requires -lcrypto -lssl
#LIBS = -lcrypto -lssl -ldl
LIBS ?= -ldl
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | 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 "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre2-8 -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;}" | tr -d \\\\ | 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
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
DESTDIR =
prefix = /usr/local
exec_prefix = $(prefix)
man_prefix = $(prefix)/share
INSTALL = /usr/bin/install
INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_OBJS = src/3proxy \
src/ftppr \
src/mycrypt \
src/pop3p \
src/proxy \
src/socks \
src/tcppm \
src/udppm
INSTALL_CFG_OBJS = scripts/3proxy.cfg \
scripts/add3proxyuser.sh
INSTALL_CFG_DEST = config
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
BINDIR = $(DESTDIR)$(exec_prefix)/bin
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
install-bin:
$(INSTALL_BIN) -d $(BINDIR)
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
install-etc-dir:
$(INSTALL_BIN) -d $(ETCDIR)
install-etc-default-config:
if [ -f $(ETCDIR)/$(INSTALL_CFG_DEST) ]; then \
: ; \
else \
$(INSTALL_DATA) $(INSTALL_CFG_OBJS) $(ETCDIR)/$(INSTALL_CFG_DEST) \
fi
install-etc: install-etc-dir
for file in $(INSTALL_CFG_OBJS2); \
do \
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
done;
install-man:
$(INSTALL_BIN) -d $(MANDIR3)
$(INSTALL_BIN) -d $(MANDIR8)
$(INSTALL_DATA) man/*.3 $(MANDIR3)
$(INSTALL_DATA) man/*.8 $(MANDIR8)
install: install-bin install-etc install-man
+37 -31
View File
@@ -1,59 +1,65 @@
#
# 3 proxy Makefile for GCC/Unix
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR =
CC = gcc
BUILDDIR = ../bin/
CC ?= gcc
# you may need -L/usr/pkg/lib for older NetBSD versions
CFLAGS = -g -O2 -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 -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
COUT = -o
LN = gcc
LDFLAGS = -O2 -pthread
LN ?= $(CC)
LDFLAGS ?= -O2 -fno-strict-aliasing -pthread
# -lpthreads may be reuqired on some platforms instead of -pthreads
# -ldl or -lld may be required for some platforms
DCFLAGS = -fpic
DLFLAGS = -shared
DLSUFFICS = .ld.so
LIBS =
LIBSPREFIX = -l
LIBSSUFFIX =
DCFLAGS ?= -fPIC
DLFLAGS ?= -shared
DLSUFFICS ?= .ld.so
LIBS ?=
LIBSPREFIX ?= -l
LIBSSUFFIX ?=
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.unix
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin PamAuth
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += -l crypto -l ssl
PLUGINS += SSLPlugin
endif
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && 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;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
PLUGINS += PamAuth
endif
include Makefile.inc
install: all
if [ ! -d /usr/local/etc/3proxy/bin ]; then mkdir -p /usr/local/etc/3proxy/bin/; fi
install src/3proxy /usr/local/etc/3proxy/bin/3proxy
install src/mycrypt /usr/local/etc/3proxy/bin/mycrypt
install scripts/rc.d/proxy.sh /usr/local/etc/rc.d/proxy.sh
install scripts/add3proxyuser.sh /usr/local/etc/3proxy/bin/
if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then
echo /usr/local/etc/3proxy/3proxy.cfg already exists
else
install scripts/3proxy.cfg /usr/local/etc/3proxy/
if [ ! -d /var/log/3proxy/ ]; then
mkdir /var/log/3proxy/
fi
touch /usr/local/etc/3proxy/passwd
touch /usr/local/etc/3proxy/counters
touch /usr/local/etc/3proxy/bandlimiters
echo Run /usr/local/etc/3proxy/bin/add3proxyuser.sh to add \'admin\' user
fi
if [ ! -d "/usr/local/3proxy/bin" ]; then mkdir -p /usr/local/3proxy/bin/; fi
install bin/3proxy /usr/local/3proxy/bin/3proxy
install bin/mycrypt /usr/local/3proxy/bin/mycrypt
install scripts/rc.d/3proxy /usr/local/etc/rc.d/3proxy
install scripts/add3proxyuser.sh /usr/local/3proxy/bin/
if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then /usr/local/3proxy/3proxy.cfg already exists ; else install scripts/3proxy.cfg /usr/local/etc/3proxy/; fi
if [ ! -d /var/log/3proxy/ ]; then mkdir /var/log/3proxy/; fi
touch /usr/local/3proxy/passwd
touch /usr/local/3proxy/counters
touch /usr/local/3proxy/bandlimiters
echo Run /usr/local/3proxy/bin/add3proxyuser.sh to add \'admin\' user
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
-60
View File
@@ -1,60 +0,0 @@
DESTDIR =
prefix = /usr/local
exec_prefix = $(prefix)
man_prefix = $(prefix)/share
INSTALL = /usr/bin/install
INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_OBJS = src/3proxy \
src/dighosts \
src/ftppr \
src/mycrypt \
src/pop3p \
src/proxy \
src/socks \
src/tcppm \
src/udppm \
scripts/add3proxyuser.sh
INSTALL_CFG_OBJS = scripts/3proxy.cfg
INSTALL_CFG_DEST = config
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
BINDIR = $(DESTDIR)$(exec_prefix)/bin
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
install-bin:
$(INSTALL_BIN) -d $(BINDIR)
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
install-etc-dir:
$(INSTALL_BIN) -d $(ETCDIR)
install-etc-default-config:
if [ -f $(ETCDIR)/$(INSTALL_CFG_DEST) ]; then \
: ; \
else \
$(INSTALL_DATA) $(INSTALL_CFG_OBJS) $(ETCDIR)/$(INSTALL_CFG_DEST) \
fi
install-etc: install-etc-dir
for file in $(INSTALL_CFG_OBJS2); \
do \
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
done;
install-man:
$(INSTALL_BIN) -d $(MANDIR1)
$(INSTALL_BIN) -d $(MANDIR3)
$(INSTALL_BIN) -d $(MANDIR8)
$(INSTALL_DATA) man/*.1 $(MANDIR1)
$(INSTALL_DATA) man/*.3 $(MANDIR3)
$(INSTALL_DATA) man/*.8 $(MANDIR8)
install: install-bin install-etc install-man
+64
View File
@@ -0,0 +1,64 @@
#
# 3 proxy Makefile for Open Watcom 2
#
#
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
BUILDDIR = ../bin/
CC = cl
CFLAGS = /nologo /Ox /MT /D "NOIPV6" /D "NODEBUG" /D "NOODBC" /D "NORADIUS" /D"WATCOM" /D "MSVC" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRId64=\"I64d\"" /D "PRIu64=\"I64u\"" /D "SCNu64=\"I64u\"" /D "SCNx64=\"I64x\"" /D "SCNd64=\"I64d\"" /D "PRIx64=\"I64x\"" /c $(VERSION) $(BUILDDATE)
COUT = /Fo
LN = link
LDFLAGS = /nologo /subsystem:console /incremental:no
DLFLAGS = /DLL
DLSUFFICS = .dll
LIBS = ws2_32.lib advapi32.lib user32.lib kernel32.lib
LIBSOLD = libeay32MT.lib ssleay32MT.lib
LIBSPREFIX =
LIBSSUFFIX = .lib
LIBEXT = .lib
LNOUT = /out:
EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb *.err
REMOVECOMMAND = del 2>NUL >NUL
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.watcom
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
VERFILE = $(VERFILE)
VERSION = $(VERSION)
VERSIONDEP = 3proxy.res $(VERSIONDEP)
BUILDDATE = $(BUILDDATE)
include Makefile.inc
3proxy.res:
rc 3proxy.rc
allplugins:
copy Makefile plugins\utf8tocp1251
copy Makefile.var plugins\utf8tocp1251
cd plugins\utf8tocp1251
nmake
del *.obj *.idb
cd ../../
copy Makefile plugins\WindowsAuthentication
copy Makefile.var plugins\WindowsAuthentication
cd plugins\WindowsAuthentication
nmake
del *.obj *.idb
cd ../../
copy Makefile plugins\TrafficPlugin
copy Makefile.var plugins\TrafficPlugin
cd plugins\TrafficPlugin
nmake
del *.obj *.idb
cd ../../
copy Makefile plugins\StringsPlugin
copy Makefile.var plugins\StringsPlugin
cd plugins\StringsPlugin
nmake
del *.obj *.idb
cd ../../
+34 -11
View File
@@ -1,24 +1,22 @@
#
# 3 proxy Makefile for GCC/windows
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support
BUILDDIR = ../bin/
CC = gcc
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DNOIPV6
CC ?= gcc
CFLAGS := -O2 -s -c -mthreads -DWITH_WSAPOLL $(CFLAGS)
COUT = -o
LN = gcc
LDFLAGS = -O2 -s -mthreads
DLFLAGS = -shared
LN ?= $(CC)
LDFLAGS := -O2 -s -mthreads $(LDFLAGS)
DLFLAGS ?= -shared
DLSUFFICS = .dll
LIBS = -lws2_32 -lodbc32 -ladvapi32
LIBS := -lws2_32 -lodbc32 -ladvapi32 -luser32 $(LIBS)
LIBSPREFIX = -l
LIBSSUFFIX =
LIBSSUFFIX =
LNOUT = -o
EXESUFFICS = .exe
OBJSUFFICS = .o
@@ -28,9 +26,34 @@ REMOVECOMMAND = rm -f
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.win
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
PLUGINS := utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
VERFILE := 3proxyres.o $(VERFILE)
VERSION := $(VERSION)
VERSIONDEP := 3proxyres.o $(VERSIONDEP)
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
ifndef OPENSSL_CHECK
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | 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
PAM_CHECK = $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d '\\\\' | 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
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n#include <pcre2.h>\\n int main(){return 0;}" | tr -d '\\\\' | cc -x c $(CFLAGS) $(LDFLAGS) -lpcre2-8 -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
PLUGINS += PCREPlugin
endif
endif
include Makefile.inc
3proxyres.o:
windres 3proxy.rc -o 3proxyres.o
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
-34
View File
@@ -1,34 +0,0 @@
#
# 3 proxy Makefile for GCC/windows
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
#
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# library support
BUILDDIR = ../bin/
CC = /opt/cegcc/arm-wince-cegcc/bin/gcc
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DNOODBC -D_WINCE -D_WIN32 -D__USE_W32_SOCKETS
COUT = -o
LN = /opt/cegcc/arm-wince-cegcc/bin/gcc
LDFLAGS = -O2 -s -mthreads
DLFLAGS = -shared
DLSUFFICS = .dll
LIBS = -lws2
LNOUT = -o
EXESUFFICS = .exe
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *.tmp
REMOVECOMMAND = rm -f
TYPECOMMAND = more
COMPATLIBS =
MAKEFILE = Makefile.winCE
PLUGINS = TrafficPlugin StringsPlugin PCREPlugin
include Makefile.inc
allplugins:
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
+155 -46
View File
@@ -1,86 +1,200 @@
/*
3APA3A 3proxy tiny proxy server
(c) 2002-2016 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>
# 3APA3A 3proxy tiny proxy server
(c) 2002-2025 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.org>
please read License Agreement
*/
Please read doc/html/index.html and man pages.
Branches:
Master (stable) branch - 3proxy 0.9
Devel branch - 3proxy 10 (don't use it)
* Download
Binaries and sources for released (master) versions (Windows, Linux):
https://github.com/z3APA3A/3proxy/releases
Docker images:
https://hub.docker.com/r/3proxy/3proxy
Archive of old versions: https://github.com/z3APA3A/3proxy-archive
* Documentation
Documentation (man pages and HTML) available with download, on https://3proxy.org/
and in github wiki https://github.com/3proxy/3proxy/wiki
* Windows installation
3proxy [path_to_config_file] --install
installs and starts proxy as Windows service
(config file should be located in the same directory or may be optionally specified)
3proxy --remove
removes the service (should be stopped before via
'net stop 3proxy').
* To build in Linux
With Makefile:
git clone https://github.com/z3apa3a/3proxy
cd 3proxy
ln -s Makefile.Linux Makefile
make
sudo make install
Default configuration (for Linux/Unix):
3proxy uses 2 configuration files:
/etc/3proxy/3proxy.cfg (before-chroot). This configuration file is executed before chroot and should not be modified.
/usr/local/3proxy/conf/3proxy.cfg symlinked from /etc/3proxy/conf/3proxy.cfg (after-chroot) is a main configuration file. Modify this file, if required.
All paths in /usr/local/3proxy/conf/3proxy.cfg are relative to chroot directory (/usr/local/3proxy). For future versions it's planned to move
3proxy chroot direcory to /var.
Log files are created in /usr/local/3proxy/logs symlinked from /var/log/3proxy.
By default, socks is started on 0.0.0.0:1080 and proxy on 0.0.0.0:3128 with basic auth, no users are added by default.
use /etc/3proxy/conf/add3proxyuser.sh script to add users.
usage: /etc/3proxy/conf/add3proxyuser.sh username password [day_limit] [bandwidth]
day_limit - traffic limit in MB per day
bandwidth - bandwith in bits per second 1048576 = 1Mbps
or modify /etc/3proxy/conf/ files directly.
With CMake:
git clone https://github.com/z3apa3a/3proxy
cd 3proxy
mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .
CMake does not use chroot configuration, config file is /etc/3proxy/3proxy.cfg
* For MacOS X / FreeBSD / *BSD
With Makefile:
git clone https://github.com/z3apa3a/3proxy
cd 3proxy
ln -s Makefile.FreeBSD Makefile
make
(binaries are in bin/ directory)
With CMake (recommended):
git clone https://github.com/z3apa3a/3proxy
cd 3proxy
mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .
This installs binaries to /usr/local/bin/, configuration to /etc/3proxy/,
plugins to /usr/local/lib/3proxy/, rc scripts to rc.d for BSD and launchd plist to /Library/LaunchDaemons/ for MacOS.
Service management on macOS:
# Load and start service
sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist
# Stop service
sudo launchctl stop org.3proxy.3proxy
# Start service
sudo launchctl start org.3proxy.3proxy
# Unload and disable service
sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist
Features:
1. General
+ IPv6 support for incoming and outgoing connection,
can be used as a proxy between IPv4 and IPv6 networks
in either direction.
+ HTTP/1.1 Proxy with keep-alive client and server support,
transparent proxy support.
+ Anonymous and random client emulation HTTP proxy mode
+ HTTPS (CONNECT) proxy (compatible with HTTP/2 / SPDY)
+ Anonymous and random client IP emulation for HTTP proxy mode
+ FTP over HTTP support.
+ DNS caching with built-in resolver
+ HTTPS (CONNECT) proxy
+ DNS proxy
+ DNS over TCP support, redirecting DNS traffic via parent
proxy
+ SOCKSv4/4.5 Proxy
+ SOCKSv5 Proxy
+ UDP and bind support for SOCKSv5 (fully compatible with
+ SOCKSv5 UDP and BIND support (fully compatible with
SocksCAP/FreeCAP for UDP)
+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP, ICQ
+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP
+ SNI proxy (based on TLS hostname)
+ TLS (SSL) server - may be used as https:// type proxy
+ POP3 Proxy
+ FTP proxy
+ DNS proxy
+ TCP port mapper
+ UDP port mapper
+ TCP port mapper (port forwarding)
+ UDP port mapper (port forwarding)
+ SMTP proxy
+ ICQ/AOL proxy
+ Threaded application (no child process).
+ Web administration and statistics
+ Plugins for functionality extension
+ Native 64 bit application for 64 bit OS, including 64-bit editions of
Windows.
+ IPv6 support
+ Native 32/64 bit application
2. Proxy chaining and network connections
+ Can be used as a bridge between client and different proxy type
(e.g. convert incoming HTTP proxy request from client to SOCKSv5
request to parent server).
+ Connect back proxy support to bypass firewalls
+ Parent proxy support for any type of incoming connection
+ Username/password authentication for parent proxy(s).
+ HTTPS/SOCKS4/SOCKS5 and redirection parent support
+ HTTPS/SOCKS4/SOCKS5 and ip/port redirection parent support
+ Random parent selection
+ Chain building (multihop proxing)
+ Load balancing between few network connections by choosing network
interface
3. Logging
+ turnable log format compatible with any log parser
+ tuneable log format compatible with any log parser
+ stdout logging
+ file logging
+ syslog logging (Unix)
+ ODBC logging
+ log file rotation (hourly, daily, weekly, monthly)
+ automatic log file comperssion with external archiver (for files)
+ automatic removal of older log files
+ RADIUS accounting
+ log file rotation
+ automatic log file processing with external archiver (for files)
+ Character filtering for log files
+ different log files for different servces are supported
4. Access control
+ ACL-driven Access control by username, source IP,
destination IP/hostname, destination port and destination action
(POST, PUT, GET, etc), weekday and daytime.
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) bandwith limitation for incoming and (!)outgoing trafic.
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) traffic limitation per day, week or month for incoming and
(!) outgoing traffic
+ User authentication by DNS hostname
+ ACL-driven traffic limitation per day, week or month for incoming and
outgoing traffic
+ Connection limitation and ratelimting
+ User authentication by username / password
+ Access control by username, source IP, destination IP, destination
port and destination action (POST, PUT, GET, etc), weekday and daytime.
+ RADIUS Authentication and Authorization
+ User authentication by DNS hostname
+ Authentication cache with possibility to limit user to single IP address
+ Access control by username/password for SOCKSv5 and HTTP/HTTPS/FTP
+ Cleartext or encrypted (crypt/MD5 or NT) passwords.
+ Connection redirection
+ Access control by requested action (CONNECT/BIND,
HTTP GET/POST/PUT/HEAD/OTHER).
+ NTLM (v1 only) authentication for HTTP proxy access
+ All access control entries now support weekday and time limitations
+ Hostnames and * templates are supported instead of IP address
5. Extensions
+ Regular expression filtering (with PCRE) via PCREPlugin
currently HTTP traffic only for URLs, HTTP headers and HTTP data.
+ Authentication with Windows username/password (cleartext only!)
+ Regular expression filtering (with PCRE2) via PCREPlugin
+ Authentication with Windows username/password (cleartext only)
+ SSL/TLS decryptions with certificate spoofing
+ NAT support under Linux
+ Transparent redirection support for Linux and *BSD
6. Configuration
+ support for configuration files
+ support for includes in configuration files
+ interface binding
+ socket options
+ running as daemon process
+ utility for automated networks list building
+ configuration reload on any file change
@@ -88,7 +202,7 @@ Please read doc/html/index.html and man pages.
+ support for chroot
+ support for setgid
+ support for setuid
+ support for signals
+ support for signals (SIGUSR1 to reload configuration)
Windows
+ support --install as service
+ support --remove as service
@@ -100,6 +214,7 @@ Please read doc/html/index.html and man pages.
+ support --remove as service
6. Compilation
+ MSVC (static)
+ OpenWatcom (static)
+ Intel Windows Compiler (msvcrt.dll)
+ Windows/gcc (msvcrt.dll)
+ Cygwin/gcc (cygwin.dll)
@@ -115,13 +230,10 @@ Please read doc/html/index.html and man pages.
executable or service (supports installation and removal).
It uses config file to read it's configuration (see
3proxy.cfg.sample for details).
--install installs and starts proxy as Windows service
(config file should be located in the same directory)
--remove removes the service (should be stopped before via
'net stop 3proxy').
3proxy.exe is all-in-one, it doesn't require all others .exe
to work.
See 3proxy.cfg.sample for examples, see man 3proxy.cfg
proxy HTTP proxy server, binds to port 3128
ftppr FTP proxy server, binds to port 21
socks SOCKS 4/5 proxy server, binds to port 1080
@@ -131,19 +243,17 @@ pop3p POP3 proxy server, binds to port 110. You must specify
POP3 username as username@target.host.ip[:port]
port is 110 by default.
Exmple: in Username configuration for you e-mail reader
set someuser@pop.somehost.ru, to obtains mail for someuser
set someuser@pop.example.org, to obtains mail for someuser
from pop.somehost.ru via proxy.
smtpp SMTP proxy server, binds to port 25. You must specify
SMTP username as username@target.host.ip[:port]
port is 25 by default.
Exmple: in Username configuration for you e-mail reader
set someuser@mail.somehost.ru, to send mail as someuser
set someuser@mail.example.org, to send mail as someuser
via mail.somehost.ru via proxy.
icqpr ICQ/AIM proxy. Maps some TCP port to TCP port of ICQ
server and performs packets translation. Example:
icqpr 5190 login.icq.com 5190
tcppm TCP port mapping. Maps some TCP port on local machine to
TCP port on remote host.
tlspr TLS proxy (SNI proxy) - sniffs hostname from TLS handshake
udppm UDP port mapping. Maps some UDP port on local machine to
UDP port on remote machine. Only one user simulationeously
can use UDP mapping, so it cann't be used for public service
@@ -157,11 +267,10 @@ mycrypt Program to obtain crypted password fro cleartext. Supports
produces NT password
mycrypt salt password
produces MD5/crypt password with salt "salt".
dighosts Utility for building networks list from web page.
Run utility with --help option for command line reference.
Latest version is available from http://3proxy.ru/
Latest version is available from https://3proxy.org/
Want to donate the project? http://3proxy.ru/donations/
Want to donate the project? https://3proxy.org/donations/
+1
View File
@@ -0,0 +1 @@
0.9.6
-106
View File
@@ -1,106 +0,0 @@
08/04/2014 3[APA3A]tiny proxy 0.7
Features:
1. General
+ HTTP/1.1 Proxy with keep-alive client and server support,
transparent proxy support.
+ Anonymous and random client emulation HTTP proxy mode
+ FTP over HTTP support.
+ DNS caching with built-in resolver
+ HTTPS (CONNECT) proxy
+ SOCKSv4/4.5 Proxy
+ SOCKSv5 Proxy
+ UDP and bind support for SOCKSv5 (fully compatible with
SocksCAP/FreeCAP for UDP)
+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP, ICQ
+ POP3 Proxy
+ FTP proxy
+ DNS proxy
+ TCP port mapper
+ UDP port mapper
+ SMTP proxy
+ ICQ/AOL proxy
+ MSN proxy
+ Threaded application (no child process).
+ Web administration and statistics
+ Plugins for functionality extension
+ Native 64 bit application for 64 bit OS, including 64-bit editions of
Windows XP, Vista, 2003, 2008.
2. Proxy chaining and network connections
+ Parent proxy support for any type of incoming connection
+ Username/password authentication for parent proxy(s).
+ HTTPS/SOCKS4/SOCKS5 and redirection parent support
+ Random parent selection
+ Chain building (multihop proxing)
+ Load balancing between few network connections by choosing network
interface
3. Logging
+ turnable log format compatible with any log parser
+ stdout logging
+ file logging
+ syslog logging (Unix)
+ ODBC logging (Windows and Unix)
+ log file rotation (hourly, daily, weekly, monthly)
+ automatic log file comperssion with external archiver (for files)
+ automatic removal of older log files
+ Character filtering for log files
+ different log files for different servces are supported
4. Access control
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) bandwith limitation for incoming and (!)outgoing trafic.
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) traffic limitation per day, week or month for incoming and
(!) outgoing traffic
+ User authorization by NetBIOS messanger name
+ Access control by username, source IP, destination IP, destination
port and destination action (POST, PUT, GET, etc), weekday and daytime.
+ Access control by username/password for SOCKSv5 and HTTP/HTTPS/FTP
+ Cleartext or encrypted (crypt/MD5 or NT) passwords.
+ Connection redirection
+ Access control by requested action (CONNECT/BIND,
HTTP GET/POST/PUT/HEAD/OTHER).
+ NTLM (v1 only) authentication for HTTP proxy access
+ All access control entries now support weekday and time limitations
+ Hostnames and * templates are supported instead of IP address
5. Extensions
+ Regular expression filtering (with PCRE) via PCREPlugin
currently HTTP traffic only for URLs, HTTP headers and HTTP data.
+ Authentication with Windows username/password (cleartext only!)
6. Configuration
+ support for configuration files
+ support for includes in configuration files
+ interface binding
+ running as daemon process
+ utility for automated networks list building
+ configuration reload on any file change
Unix
+ support for chroot
+ support for setgid
+ support for setuid
+ support for signals
Windows NT/2K/XP/2K3
+ support --install as service
+ support --remove as service
+ support for service START, STOP, PAUSE and CONTINUE commands (on
PAUSE no new connection accepted, but active connections still in
progress, on CONTINUE configuration is reloaded)
Windows 95/98/ME
+ support --install as service
+ support --remove as service
6. Compilation
+ MSVC (static)
+ Intel Windows Compiler (msvcrt.dll)
+ Windows/gcc (msvcrt.dll)
+ Cygwin/gcc (cygwin.dll)
+ Unix/gcc
+ Unix/ccc
+ Solaris
+ Mac OS X, iPhone OS
Planned for future (0.8) release:
- SSL handling / SSL decryption by certificate spoofing
- NAT support under *nix
- Addon antiviral, HTTP cache filters modules, authentication
modules for different protocols (RADIUS, PAM etc).
+1 -1
View File
@@ -1 +1 @@
(c) 2002-2014 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>
(c) 2002-2025 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.org>
+2
View File
@@ -0,0 +1,2 @@
*.cfg
*.old
+19 -19
View File
@@ -37,7 +37,7 @@ users 3APA3A:CL:3apa3a "test:CR:$1$qwer$CHFTUFGqkjue9HyhcMHEe1"
service
# service is required under NT if you want 3proxy to start as service
#log /usr/local/etc/3proxy/logs/3proxy.log D
#log /var/log/3proxy/log D
log c:\3proxy\logs\3proxy.log D
# log allows to specify log file location and rotation, D means logfile
# is created daily
@@ -137,14 +137,6 @@ dnspr
# this is just an alternative form fo giving external and internal address
# allows you to read this addresses from files
auth strong
# We want to protect internal interface
deny * * 127.0.0.1,192.168.1.1
# and llow HTTP and HTTPS traffic.
allow * * * 80-88,8080-8088 HTTP
allow * * * 443,8443 HTTPS
proxy -n
auth none
# pop3p will be used without any authentication. It's bad choice
# because it's possible to use pop3p to access any port
@@ -160,16 +152,6 @@ tcppm 25 mail.my.provider 25
# It's very userfull for services like DNS but not for some massive services
# like multimedia streams or online games.
auth strong
flush
allow 3APA3A,test
maxconn 20
socks
# for socks we will use password authentication and different access control -
# we flush previously configured ACL list and create new one to allow users
# test and 3APA3A to connect from any location
auth strong
flush
internal 127.0.0.1
@@ -199,3 +181,21 @@ admin
# now we needn't any root rights. We can chroot and setgid/setuid.
auth strong
flush
# We want to protect internal interface
deny * * 127.0.0.1,192.168.1.1
# and llow HTTP and HTTPS traffic.
allow * * * 80-88,8080-8088 HTTP
allow * * * 443,8443 HTTPS
proxy -n
flush
allow 3APA3A,test
maxconn 20
socks
# for socks we will use password authentication and different access control -
# we flush previously configured ACL list and create new one to allow users
# test and 3APA3A to connect from any location
+63
View File
@@ -0,0 +1,63 @@
# FindODBC.cmake
#
# Find the ODBC library
#
# This module defines:
# ODBC_FOUND - whether the ODBC library was found
# ODBC_INCLUDE_DIRS - the ODBC include directories
# ODBC_LIBRARIES - the ODBC libraries
# Try pkg-config first
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(PC_ODBC QUIET odbc)
endif()
# Find include directory
find_path(ODBC_INCLUDE_DIR
NAMES sql.h
HINTS
${PC_ODBC_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
# Find library
if(WIN32)
# On Windows, ODBC is typically available as odbc32
find_library(ODBC_LIBRARY
NAMES odbc32
HINTS
${PC_ODBC_LIBRARY_DIRS}
)
else()
# On Unix, look for odbc
find_library(ODBC_LIBRARY
NAMES odbc iodbc
HINTS
${PC_ODBC_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
/usr/lib/x86_64-linux-gnu
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ODBC
REQUIRED_VARS ODBC_LIBRARY ODBC_INCLUDE_DIR
)
if(ODBC_FOUND)
set(ODBC_LIBRARIES ${ODBC_LIBRARY})
set(ODBC_INCLUDE_DIRS ${ODBC_INCLUDE_DIR})
if(NOT TARGET ODBC::ODBC)
add_library(ODBC::ODBC UNKNOWN IMPORTED)
set_target_properties(ODBC::ODBC PROPERTIES
IMPORTED_LOCATION "${ODBC_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ODBC_INCLUDE_DIR}"
)
endif()
endif()
mark_as_advanced(ODBC_INCLUDE_DIR ODBC_LIBRARY)
+45
View File
@@ -0,0 +1,45 @@
# FindPAM.cmake
#
# Find the PAM library
#
# This module defines:
# PAM_FOUND - whether the PAM library was found
# PAM_INCLUDE_DIRS - the PAM include directories
# PAM_LIBRARIES - the PAM libraries
# Find include directory
find_path(PAM_INCLUDE_DIR
NAMES security/pam_appl.h pam/pam_appl.h
HINTS
/usr/include
/usr/local/include
)
# Find library
find_library(PAM_LIBRARY
NAMES pam
HINTS
/usr/lib
/usr/local/lib
/usr/lib/x86_64-linux-gnu
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PAM
REQUIRED_VARS PAM_LIBRARY PAM_INCLUDE_DIR
)
if(PAM_FOUND)
set(PAM_LIBRARIES ${PAM_LIBRARY})
set(PAM_INCLUDE_DIRS ${PAM_INCLUDE_DIR})
if(NOT TARGET PAM::PAM)
add_library(PAM::PAM UNKNOWN IMPORTED)
set_target_properties(PAM::PAM PROPERTIES
IMPORTED_LOCATION "${PAM_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PAM_INCLUDE_DIR}"
)
endif()
endif()
mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY)
+69
View File
@@ -0,0 +1,69 @@
# FindPCRE2.cmake
#
# Find the PCRE2 library
#
# This module defines:
# PCRE2_FOUND - whether the PCRE2 library was found
# PCRE2_INCLUDE_DIRS - the PCRE2 include directories
# PCRE2_LIBRARIES - the PCRE2 libraries
# PCRE2_VERSION - the PCRE2 version
# Try pkg-config first
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(PC_PCRE2 QUIET libpcre2-8)
endif()
# Find include directory
find_path(PCRE2_INCLUDE_DIR
NAMES pcre2.h
HINTS
${PC_PCRE2_INCLUDE_DIRS}
/usr/include
/usr/local/include
PATH_SUFFIXES
pcre2
)
# Find library
find_library(PCRE2_LIBRARY
NAMES pcre2-8 pcre2-8d pcre2
HINTS
${PC_PCRE2_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)
# Extract version from header
if(PCRE2_INCLUDE_DIR AND EXISTS "${PCRE2_INCLUDE_DIR}/pcre2.h")
file(STRINGS "${PCRE2_INCLUDE_DIR}/pcre2.h" PCRE2_VERSION_MAJOR_LINE
REGEX "^#define[ \t]+PCRE2_MAJOR[ \t]+[0-9]+")
file(STRINGS "${PCRE2_INCLUDE_DIR}/pcre2.h" PCRE2_VERSION_MINOR_LINE
REGEX "^#define[ \t]+PCRE2_MINOR[ \t]+[0-9]+")
string(REGEX REPLACE "^#define[ \t]+PCRE2_MAJOR[ \t]+([0-9]+)" "\\1"
PCRE2_VERSION_MAJOR "${PCRE2_VERSION_MAJOR_LINE}")
string(REGEX REPLACE "^#define[ \t]+PCRE2_MINOR[ \t]+([0-9]+)" "\\1"
PCRE2_VERSION_MINOR "${PCRE2_VERSION_MINOR_LINE}")
set(PCRE2_VERSION "${PCRE2_VERSION_MAJOR}.${PCRE2_VERSION_MINOR}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCRE2
REQUIRED_VARS PCRE2_LIBRARY PCRE2_INCLUDE_DIR
VERSION_VAR PCRE2_VERSION
)
if(PCRE2_FOUND)
set(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
if(NOT TARGET PCRE2::PCRE2)
add_library(PCRE2::PCRE2 UNKNOWN IMPORTED)
set_target_properties(PCRE2::PCRE2 PROPERTIES
IMPORTED_LOCATION "${PCRE2_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
)
endif()
endif()
mark_as_advanced(PCRE2_INCLUDE_DIR PCRE2_LIBRARY)
+52
View File
@@ -0,0 +1,52 @@
#
# 3proxy plugin definitions
#
# This file defines functions for building plugins
#
# Function to add a plugin with dependencies
function(add_3proxy_plugin PLUGIN_NAME)
set(options "")
set(oneValueArgs "")
set(multiValueArgs SOURCES LIBRARIES INCLUDE_DIRS COMPILE_DEFINITIONS LINK_OPTIONS)
cmake_parse_arguments(PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(WIN32)
set(PLUGIN_SUFFIX ".dll")
else()
set(PLUGIN_SUFFIX ".ld.so")
endif()
add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES})
set_target_properties(${PLUGIN_NAME} PROPERTIES
PREFIX ""
SUFFIX ${PLUGIN_SUFFIX}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
# Always link with Threads
target_link_libraries(${PLUGIN_NAME} PRIVATE Threads::Threads)
if(PLUGIN_LIBRARIES)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${PLUGIN_LIBRARIES})
endif()
if(PLUGIN_INCLUDE_DIRS)
target_include_directories(${PLUGIN_NAME} PRIVATE ${PLUGIN_INCLUDE_DIRS})
endif()
if(PLUGIN_COMPILE_DEFINITIONS)
target_compile_definitions(${PLUGIN_NAME} PRIVATE ${PLUGIN_COMPILE_DEFINITIONS})
endif()
if(PLUGIN_LINK_OPTIONS)
set_target_properties(${PLUGIN_NAME} PROPERTIES LINK_OPTIONS "${PLUGIN_LINK_OPTIONS}")
endif()
target_include_directories(${PLUGIN_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/src
)
endfunction()
+8 -12
View File
@@ -1,12 +1,8 @@
3proxy 0.7 Public License Agreement
3proxy 0.9 Public License Agreement
(c) 2000-2014 by 3APA3A (3APA3A@security.nnov.ru)
(c) 2000-2014 by SecurityVulns.com (http://3proxy.ru/)
(c) 2000-2014 by Vladimir Dubrovin (vlad@sandy.ru)
This software uses:
RSA Data Security, Inc. MD4 Message-Digest Algorithm
RSA Data Security, Inc. MD5 Message-Digest Algorithm
(c) 2000-2025 by 3APA3A (3APA3A@3proxy.ru)
(c) 2000-2025 by 3proxy.org (https://3proxy.org/)
(c) 2000-2025 by Vladimir Dubrovin (vlad@3proxy.org)
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -39,23 +35,23 @@ are met (BSD style license):
Instead of this license, you can also use and redistribute this software under
terms of compatible license, including:
1. Apache License, Version 2.0
1. Apache License, Version 2.0 or (at your option) any later version
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
2. GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
You may obtain a copy of the License at
http://www.gnu.org/licenses/gpl.txt
https://www.gnu.org/licenses/gpl.txt
3. GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
You may obtain a copy of the License at
http://www.gnu.org/licenses/lgpl.txt
https://www.gnu.org/licenses/lgpl.txt
+10
View File
@@ -0,0 +1,10 @@
man/3proxy.8
man/3proxy.cfg.3
man/ftppr.8
man/pop3p.8
man/tlspr.8
man/proxy.8
man/smtpp.8
man/socks.8
man/tcppm.8
man/udppm.8
+30
View File
@@ -0,0 +1,30 @@
3proxy (0.9.6-1) buster; urgency=medium
*3proxy 0.9.6 initial build
-- z3APA3A <3apa3a@3proxy.org> Sat, 11 Apr 2026 13:03:32 +0300
3proxy (0.9.5-1) buster; urgency=medium
*3proxy 0.9.5 initial build
-- z3APA3A <3apa3a@3proxy.org> Sun, 09 Mar 2025 15:55:48 +0300
3proxy (0.9.4-1) buster; urgency=medium
*3proxy 0.9.4 initial build
-- z3APA3A <3apa3a@3proxy.org> Fri, 02 Jul 2021 00:47:00 +0300
3proxy (0.9.3-1) buster; urgency=medium
*3proxy 0.9.3 initial build
-- z3APA3A <3apa3a@3proxy.org> Thu, 03 Dec 2020 21:13:58 +0300
3proxy (0.9.2-1) buster; urgency=medium
*3proxy 0.9.2 initial build
-- z3APA3A <3apa3a@3proxy.org> Thu, 19 Nov 2020 19:19:19 +0300
+1
View File
@@ -0,0 +1 @@
9
View File
Whitespace-only changes.
+18
View File
@@ -0,0 +1,18 @@
Source: 3proxy
Maintainer: z3APA3A <3apa3a@3proxy.org>
Section: net
Priority: optional
Standards-Version: 4.0.0
Build-Depends: debhelper (>=10)
Homepage: https://3proxy.org/
Vcs-Git: https://github.com/z3APA3A/3proxy
Vcs-Browser: https://github.com/z3APA3A/3proxy
Package: 3proxy
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: tiny free proxy server
3Proxy tiny free proxy server is really tiny freeware proxy servers set.
It includes HTTP proxy with HTTPS and FTP support, SOCKSv4/SOCKSv4.5/SOCKSv5 proxy (socks/socks.exe), POP3 proxy, SMTP proxy, FTP proxy, caching DNS proxy, TCP and UDP portmappers.
You can use every proxy as a standalone program (socks, proxy, tcppm, udppm, pop3p) or use combined program (3proxy). Combined proxy additionally supports features like access control, bandwidth limiting, limiting daily/weekly/monthly traffic amount, proxy chaining, log rotation, syslog and ODBC logging, etc.
It's created to be small, simple and yet very functional.
+20
View File
@@ -0,0 +1,20 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: 3proxy
Upstream-Contact: 3proxy@3proxy.org
Source: https://3proxy.org/
Files: *
Copyright: 2000-2020 3APA3A, Vladimir Dubrovin, 3proxy.org
License: BSD-3-clause or Apache or GPL-2+ or LGPL-2+
Files: src/libs/md*.*
Copyright: 1990,1991,1992 RSA Data Security, Inc
License: public-domain
Files: src/libs/regex.*
Copyright: Henry Spencer
License: public-domain
Files: src/libs/smbdes.c
Copyright: Andrew Tridgell 1998
License: GPL-2+
+29
View File
@@ -0,0 +1,29 @@
if /bin/systemctl >/dev/null 2>&1; then \
/usr/sbin/update-rc.d 3proxy disable || true; \
/usr/sbin/chkconfig 3proxy off || true; \
/bin/systemctl enable 3proxy.service; \
elif [ -x /usr/sbin/update-rc.d ]; then \
/usr/sbin/update-rc.d 3proxy defaults; \
/usr/sbin/update-rc.d 3proxy enable; \
elif [ -x /usr/sbin/chkconfig ]; then \
/usr/sbin/chkconfig 3proxy on; \
fi
echo ""
echo 3proxy installed.
if /bin/systemctl >/dev/null 2>&1; then \
/bin/systemctl stop 3proxy.service ;\
/bin/systemctl start 3proxy.service ;\
echo use ;\
echo " "systemctl start 3proxy.service ;\
echo to start proxy ;\
echo " "systemctl stop 3proxy.service ;\
echo to stop proxy ;\
elif [ -x /usr/sbin/service ]; then \
/usr/sbin/service 3proxy stop || true;\
/usr/sbin/service 3proxy start || true;\
echo " "service 3proxy start ;\
echo to start proxy ;\
echo " "service 3proxy stop ;\
echo to stop proxy ;\
fi
+4
View File
@@ -0,0 +1,4 @@
if [ -x /usr/sbin/useradd ]; then \
/usr/bin/getent group proxy >/dev/null || (/usr/sbin/groupadd -f -r proxy || true); \
/usr/bin/getent passwd proxy >/dev/null || (/usr/sbin/useradd -Mr -s /bin/false -g proxy -c 3proxy proxy || true); \
fi
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_clean:
find src/ -type f -name "*.o" -delete
find src/ -type f -name "Makefile.var" -delete
find bin/ -type f -executable -delete
+1
View File
@@ -0,0 +1 @@
3.0 (quilt)
+1 -162
View File
@@ -1,163 +1,2 @@
<h3>Why ... doesn't work?</h3>
<p><i>Q: Why does nothing work?</i></p>
A: Valid configuration file is required.
<p><i>Q: Why restrictions (redirections, limits, etc) do not work?</i></p>
A: Most probable reasons: 'auth none' or no auth is used. For any ACL based feature one of 'iponly', 'nbname' or 'strong' auths required. Sequence of commands may be invalid. Commands are executed one-by-one and 'proxy', 'tcppm', 'socks' or another service commands must follow valid configuration. Invalid sequence of ACLs. First matching ACL is used (except of internal redirections, see below). If ACL contains at least one records last record is assumed to be 'deny *'.
<p><i>Q: Why doesn't 3proxy work as service under Windows?</i></p>
Possible reasons:
<ul>
<li>'service' command absents in configuration file. Command is required for
3proxy.exe to behave as system service in 3proxy 0.5.2 and prior.
<li>there are relative paths in configuration file for included files,
log files, etc. Always use absolute paths. For example
$"c:\3proxy\networks.local" instead of $networks.local. For debugging remove
'service' and 'daemon', log to stdout an try to execute 3proxy from command
line from some different directory (for example from disk root).
<li>SYSTEM account doesn't have access to executable file, configuration files,
log files, etc.
<li>configuration files is not located in default path (3proxy.cfg in same
location with 3proxy.exe). For alternative configuration file location use
<pre>
3proxy --install full_path_to_configuration_file
</pre>
<li>user has no rights to install or start service
<li>service is already installed and/or started
</ul>
<p><A NAME="INTEXT"><i>Q: Why doesn't internal and external commands work as expected</i></A></li></p>
A: Check your expectations first.
Both internal and external IPs are IPs of the host running 3proxy itself.
This configuration option is usefull in situation 3proxy is running on the
border host with 2 (or more) connections: e.g. LAN and WAN with different IPs
<pre>
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
^+-------------+^
| |
Internal IP External IP
</pre>
If 3proxy is used on the host with single connection, both internal and
external are usually same IP.
<br>Internal should exist and be UP on the moment 3proxy is started and
should never be disconnected/DOWN. If this interface is periodically
disconnected (e.g. direct link between 2 hosts), do not specify internal
address or use 0.0.0.0 instead. In this case, if you have 2 or more
interfaces you must use firewall (preferably) or 3proxy ACLs to avoid open
proxy situation.
<br>
External IP (if specified) must exist in the momet 3proxy
serves client request. If external interface is no specified (or 0.0.0.0),
system select external IP. It may be possible to access resources of internal
network, to prevent this use ACLs. In addition, SOCKSv5 will not support BIND
operation, required for incoming connections (this operation is quite rarely
implemented in SOCKSv5 clients and usually is not required). In case of
dynamic address, do not specify external or use external 0.0.0.0 or, if
external address is required, create a script to determine current external
IP and save it to file, and use external "$path_to_file" with "monitor" command
to automatically reload configuration on address change.
<p><i>Q: Why doesn't ODBC loggind work?</i></p>
A: Check you use system DSN.
Check SQL request is valid.
The best way to check is to make file or stdout logging, get SQL request from log file or console and execute this request manually.
Under Unix, you may also want to adjust 'stacksize' parameter.
<p><i>Q: Why proxy crash on request processing?</a></i></p>
<i>A:</i> default stacksize may be insufficient, if some non-default plugins
are used (e.g. PAM and ODBC on Linux) or if compiled on some platforms with
invalid system defined values (few versionds of FreeBSD on amd64).
Problem can be resolved with 'stacksize' command or '-S' option starting 3proxy 0.8.4.
<p><i>Q: Why doesn't APOP/CRAM-MD5 authentication work with POP3 proxy?</i></p>
A: Any Challenge-response authentication require challenge to be transmitted from server. Pop3p doesn't know which server to use before authentication, it makes it impossible to obtain challenge. You can encrypt your POP3 communications with TLS (i.e. stunnel) or IPSec.
<h3>Redirection to local proxy</h3>
<p><i>Q: What is it for?</i></p>
A: To have control based on request and to have URLs and another protocol specific parameters to be logged.
<p><i>Q: What are restrictions?</i></p>
A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends username, but not password), for SOCKSv5 only cleartext password authentication is supported.
<p><i>Q: What are advantages?</i></p>
A: You need only to setup SOCKS proxy in browser settings. You can use socksifier, i.e. FreeCAP or SocksCAP with application which is not proxy aware.
<p><i>Q: How to setup?</i></p>
A: You should specify parent proxy with IP of 0.0.0.0 and port 0. Examples:
<pre>
auth iponly
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
allow * * * 80,8080-8088
#redirect ports 80 and 8080-8088 to local HTTP proxy
#Second allow is required, because ACLs are checked
#twice: first time by socks and second by http proxy.
allow * * * 21,2121
parent 1000 ftp 0.0.0.0 0
allow * * * 21,2121
#redirect ports 21 and 2121 to local
#ftp proxy
allow *
#allow rest of connections directly
socks
#now let socks server to start
</pre>
<p><i>Q: How it affects different ACL rules?</i></p>
A: After local redirections rules are applied again to protocol-level request. Redirection rule itself is skipped. It makes it possible to redirect request again on the external proxy depending on request itself.
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
#redirect http traffic to internal proxy
allow * * $c:\3proxy\local.nets 80,8080-8088
#allow direct access to local.nets networks
allow * * * 80,8080-8088
parent 1000 http proxy.3proxy.ru 3128
#use parent caching proxy for rest of the networks
allow *
#allow direct connections for rest of socks
#requests
</pre>
<h3>Can I ...?</h3>
<p><i>Q: Is it possible to resolve names through parent proxy?</i></p>
A: Yes, use 'proxy', 'connect+', 'socks4+' or 'socks5+' as parent proxy type.
3proxy itself requires name resolutions for ACL checks, so, if it's impossible
to resolve names from 3proxy host, use
<pre>
fakeresolve
</pre>
command. Fakeresolve resolves any name to 127.0.0.2.
<p><i>Q: Can I use 3proxy as FTP proxy?</i></p>
A: There are two kinds of FTP proxy supported: FTP over HTTP support (known as FTP proxy inside Internet Explorer, Mozilla and another browsers) and real FTP proxy (usable in Far and different FTP clients). Both are supported in 3proxy: first one as a part of HTTP 'proxy' and second one as 'ftppr'.
<p><i>Q: Can I bind any 3proxy service to non-default port?</i></p>
A: proxy -p8080
<h3>Why so ...?</h3>
<p><i>Q: Why traffic accounting is incomplete? It differs for what my provider (or another accounting application) shows to me?</i></p>
A: 3proxy accounts protocol level traffic. Provider counts channel or IP-level traffic with network and transport headers. In additions, 3proxy doesn't counts DNS resolutions, pings, floods, scans, etc. It makes approx. 10% of difference. That's why you should have 15% reserve if you use 3proxy to limit your traffic. If difference with your provider is significantly above 10% you should look for traffic avoiding proxy server, for example connections through NAT, traffic originated from the host with proxy installed, traffic from server applications, etc.
<p><i>Q: Why configuration is so difficult and non-intuitive?</i></p>
A: Configuration format is created in a way it's easy to parse and matches to internal 3proxy structures. In addition, there are some older things left for compatibility to be cleaned in 3proxy release. And last, I think it's easy and intuitive.
<p><i>Q: Why the code is so difficult and non-intuitive?</i></p>
A: First, I'm not programmer. Second, 3proxy was 'proof of concept' in reply for some conference post. Request was to write proxy server in 100 lines of code. First version of 3proxy had less, with HTTP and SOCKS support and portmappers. Third, there are peoples who want to use 3proxy code in trojans. I don't want to help them. Fourth, the aim is to support different platforms. It's well known - the worse code is, the better it compiles.
<p><i>Q: Why do you use insecure strcpy, sprintf, etc?</i></p>
A: Why not? I try to use insecure function in secure manner. You're welcome to look for vulnerabilities.
<H2><A href="howtoe.html">See HowTo:</a></H2>
+2 -288
View File
@@ -1,288 +1,2 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3APA3A 3proxy tiny proxy server Frequently Asked Questions (FAQ)
<ul>
<li><a href="#TROUBLE">Почему не работает...</a></li>
<ul>
<li><a href="#NOTHING">Q: Почему ничего не работает?</a></li>
<li><a href="#LIMITS">Q: Почему не работают ограничения доступа (перенаправления, ограничения по скорости, трафику и т.д.)?</a></li>
<li><a href="#SERVICE">Q: Почему 3proxy не запускается как служба?</a></li>
<li><a href="#INTEXT">Q: Почему не получается указать internal и external?</a></li>
<li><a href="#ODBC">Q: Почему не работает ведение журналов в ODBC?</a></li>
<li><a href="#CHAP">Q: Почему не поддерживаются APOP и CRAM-MD5 в POP3 прокси?</a></li>
<li><a href="#CRASH">Q: Почему прокси крэшится при обработке запроса?</a></li>
</ul>
<li><a href="#SOCKSREDIR">Перенаправление socks соединений в локальный прокси</a></li>
<ul>
<li><a href="#REDIR">Q: Для чего это надо?</a></li>
<li><a href="#REDIRLIMIT">Q: Какие недостатки?</a></li>
<li><a href="#REDIRADV">Q: Какие преимущества?</a></li>
<li><a href="#REDIRHOW">Q: Как настраивается?</a></li>
<li><a href="#REDIINTER">Q: Как взаимодействует с другими правилами в ACL?</a></li>
</ul>
<li><a href="#ISIT">А есть ли...</a></li>
<ul>
<li><a href="#NAMES">Можно ли разрешать имена на родительском прокси?</a></li>
<li><a href="#ISFTP">Существует ли сейчас поддержка FTP прокси в продукте?</a></li>
<li><a href="#PORT">Каким образом можно прибиндить сервисы на свой порт, к примеру, HTTP прокси к 8080, а не 3128 как по-умолчанию?</a></li>
<li><a href="#BANDLIM">Как ограничить ширину канала?</a></li>
</ul>
<li><a href="#BRRR">Почему так криво...</a></li>
<ul>
<li><a href="#TRAF">Почему так криво считается трафик? Не совпадает с ...</a></li>
<li><a href="#CONFIG">Почему такая кривая конфигурация и ничерта не понятно?</a></li>
<li><a href="#CODE">Почему так криво написан код?</a>
<li><a href="#UNSAFE">Почему так много strcpy, sprintf и т.д., это ж дыры!</a>
</ul>
</ul>
<hr>
<li><b><a name="TROUBLE">Почему не работает...<a></b></li>
<ul>
<li><a name="NOTHING"><i>Q: Почему ничего не работает?</i></a></li>
<p>
<i>A:</i> Потому что для работы нужен правильный файл конфигурации.
</p>
<li><a name="LIMITS"><i>Q: Почему не работают ограничения доступа (перенаправления, ограничения по скорости,
трафику и т.д.)?</i></a></li>
<p>
<i>A:</i> Обычные ошибки - использование auth none (для работы любых
функций, основанных на ACL, требуется auth iponly, nbname или strong),
нарушение порядка ввода команд (команды выполняются последовательно,
запуск сервиса proxy, socks, tcppm и т.д. должен осуществляться после
того, как указана его конфигурация), неправильный порядок записей в ACL
(записи просматриваются последовательно до первой, удовлетворяющей
критериям). Если в ACL имеется хотя бы одна запись, то считается, что
последняя запись в ACL - это неявная deny *.
</p>
<li><a name="SERVICE"><i>Q: Почему 3proxy не запускается как служба?</i></a></li>
<p>
<i>A:</i> Наиболее вероятные причины:
<ul>
<li>Отсутствие команды service в файле конфигурации - команда необходима в 3proxy 0.5.2 и более ранних, чтобы 3proxy вел себя как системная служба Windows
<li>Использование относительных (неполных) путей файлов в файле конфигурации
При использовании файлов журналов, файлов вставок ($filename) используйте
полные пути, например, $"c:\3proxy\include files\networks.local". Тоже самое
относится к файлам журналов и любым другим.
Для отладки лучше запускать 3proxy с ведением журнала на стандартный вывод.
Не забудьте в таком случае отключить daemon и service в файле конфигурации.
Для чистоты эксперимента запускать 3proxy из коммандной строки в таком случае
следует, находясь в другой папке.
<li>Отсутствие у системной записи прав на доступ к исполняемому файлу, каким-либо файлам конфигурации, журнала и т.п.
<li>Отсутствие файла конфигурации по стандартному расположению -
3proxy.cfg в одном каталоге с исполняемым файлом. Если файл расположен по
другому пути, необходимо использовать команду
<pre>
3proxy --install path_to_configuration_file</pre>
<li>Отсутствие у пользователя прав на установку или запуск службы
<li>Служба уже установлена или запущена
</ul>
</p>
<li><a name="INTEXT"><i>Q: Почему не получается указать internal и external?</i></a></li></li>
<p>
<i>A:</i> Убедитесь, что выправильно понимаете что такое internal и external адреса.
Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy.
Эта опция конфигурации необходима в классической ситуации, когда 3proxy
установлен на граничном компьютере с двумя (или более) подключениями:
<pre>
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
^+-------------+^
| |
Internal IP External IP</pre>
Если 3proxy работает на хосте с одним интерфейсом, то его адрес будет и
internal и external.
<br>Интерфейс с адресом internal должен существовать и быть рабочим на момент
запуска 3proxy, и не должен отключаться. Если internal интерфейс
периодически отключается, то не следует его указывать, или можно указать адрес
0.0.0.0. При этом прокси будет принимать запросы на всех интерфейсах, поэтому
при наличии нескольких интерфейсов для ограничения доступа следует использовать
фаервол или хотя бы ACL.
</p>
<p>
Интерфейс с адресом external, если он указан, должен быть рабочим на момент
получения запроса клиента. При отсутствии external или адресе 0.0.0.0 внешний
адрес будет выбираться системой при установке соединения. При этом, может быть
возможность доступа через прокси к ресурсам локальной сети, поэтому для
предотвращения несанкционированного доступа следует использовать ACL. Кроме
того, могут быть проблемы с приемом входящих соединений через SOCKSv5
(SOCKSv5 используется в клиентах исключительно редко).
В случае, если адрес динамический, можно либо не
указывать external, либо использовать адрес 0.0.0.0, либо, если необходима
поддержка входящих соединений в SOCKSv5, использовать скрипт,
который будет получать текущий адрес и сохранять его в файл, который будет
отслуживаться через команду monitor.
</p>
<li><a name="ODBC"><i>Q: Почему не работает ведение журналов в ODBC?</i></a></li>
<p>
<i>A:</i> Убедитесь, что используется системный, а не
пользовательский DSN. Убедитесь, что выполняется правильный SQL запрос. Наиболее
распространенная проблема связана с отсутствием кавычек или неправильным
форматом данных. Самый простой способ - сделать ведение журнала в файл или
на стандартный вывод, просмотреть выдаваемые SQL запросы и попробовать
дать такой запрос вручную.
</p>
<li><a name="CHAP"><i>Q: Почему не поддерживаются APOP и CRAM-MD5 в POP3 прокси?</i></a></li>
<p>
<i>A:</i> Любая challenge-response аутентификация, к которым относятся APOP
и CRAM-MD5, требует, чтобы со стороны сервера был передан уникальный challenge.
До начала аутентификации POP3 прокси не знает, к какому серверу следует
подключаться для получения Challenge, поэтому challenge-response в принципе
невозможен. Защитить соединение можно с помощью TLS (например, stunnel) или
IPSec.
</p>
<li><a name="#CRASH"><i>Q: Почему прокси крэшится при обработке запроса?</a></i></li>
<p>
<i>A:</i> Возможно, недостаточен размер стека потока по-умолчанию, это может
быть при использовани каких-либо сторонних плагинов (PAM, ODBC) или на
некоторых платформах (некоторые версии FreeBSD на amd64). Можно решить
проблему с помощью опции 'stacksize' или '-S', поддерживаемых в 0.8.4 и выше.
</p>
</ul>
<hr>
<li><b><a name="SOCKSREDIR">Перенаправление socks соединений в локальный прокси</a></b></li>
<ul>
<li><a name="REDIR"><i>Q: Для чего это надо?</i></a></li>
<p>
<i>A:</i> Чтобы иметь в логах URL запросов, если пользователь SOCKS пользуется
Web, FTP или POP3.
</p>
<li><a name="REDIRLIMIT"><i>Q: Какие недостатки?</i></a></li>
<p>
<i>A:</i> Перенапраление невозможно для web-серверов или FTP, висящих на
нестандартных портах, для SOCKSv4 не поддрживается авторизация с
паролем (IE поддерживает только SOCKSv4), но при этом IE передает
имя пользователя по SOCKSv4 (имя, с которым пользователь вошел в систему).
Для SOCKSv5 не поддерживается NTLM авторизация, пароли передаются в открытом
тексте.
</p>
<li><a name="REDIRADV"><i>Q: Какие преимущества?</i></a></li>
<p>
<i>A:</i> Достаточно в настройках IE только указать адрес SOCKS прокси. В
больших сетях можно для этого использовать WPAD (автоматическое
обнаружение прокси). В 3proxy достаточно запускать только одну службу
(socks). Если используется только Internet Explorer, то можно
автоматически получать имя пользователя в логах, не запрашивая
логин/пароль.
</p>
<li><a name="REDIRHOW"><i>Q: Как настраивается?</i></a></li>
<p>
<i>A:</i> Указывается parent http proxy со специальным адресом 0.0.0.0 и портом
0. Пример:
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
allow * * * 80,8080-8088
#перенаправить соединения по портам 80 и 8080-8088 в локальный
#http прокси. Вторая команда allow необходима, т.к. контроль доступа
#осуществляется 2 раза - на уровне socks и на уровне HTTP прокси
allow * * * 21,2121
parent 1000 ftp 0.0.0.0 0
allow * * * 21,2121
#перенаправить соединения по портам 21 и 2121 в локальный
#ftp прокси
allow *
#пустить все соединения напрямую
socks</pre>
</p>
<li><a name="REDIINTER"><i>Q: Как взаимодействует с другими правилами в ACL?</i></a></li>
<p>
<i>A:</i> После внутреннего перенаправления правила рассматриваются еще раз за
исключением самого правила с перенаправлением (т.е. обработка правил не
прекращается). Это позволяет сделать дальнейшие перенаправления на
внешний прокси. По этой же причине локальное перенаправление не должно
быть последним правилом (т.е. должно быть еще хотя бы правило allow,
чтобы разрешить внешние соединения через HTTP прокси).
Например,
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
#перенаправить во внутренний прокси
allow * * $c:\3proxy\local.nets 80,8080-8088
#разрешить прямой web-доступ к сетям из local.nets
allow * * * 80,8080-8088
parent 1000 http proxy.3proxy.ru 3128
#все остальные веб-запросы перенаправить на внешний прокси-сервер
allow *
#разрешить socks-запросы по другим портам</pre>
</p>
</ul>
<hr>
<li><b><a name="ISIT">А есть ли...</a></b></li>
<ul>
<li><a name="NAMES"><i>Q: Можно ли разрешать имена на родительском прокси?</i></a></li>
<p>
<i>A:</i> Можно. Для этого надо использовать тип родительского прокси http,
connect+, socks4+ и socks5+. Однако, при это надо помнить, что самому 3proxy
требуется разрешение имени для управления ACL. Поэтому, если с прокси-хоста
не работают разрешения имени, необходимо в конфигурации дать команду
<pre>
fakeresolve</pre>
которая разрешает любое имя в адрес 127.0.0.2.
</p>
<li><a name="ISFTP"><i>Q: Существует ли сейчас поддержка FTP прокси в продукте?</i></a></li>
<p>
Есть поддержка как FTP через HTTP (то, что называется FTP прокси в Internet
Explorer, Netscape, Opera) так и настоящего FTP прокси (то, что называется
FTP proxy в FAR и FTP клиентах).
</p>
<li><a name="PORT"><i>Q: Каким образом можно прибиндить сервисы на свой порт, к примеру, HTTP прокси к 8080, а не 3128 как по-умолчанию?</i></a></li>
<p>
А:
<pre>
proxy -p8080</pre>
</p>
<li><a name="BANDLIM"><i>Q: Как ограничить ширину канала?</i></a></li>
<p>
<i>A:</i> Читайте HowTo <a href="http://3proxy.ru/howtor.asp#BANDLIM">http://3proxy.ru/howtor.asp#BANDLIM</a>
</p>
</ul>
<hr>
<li><b><a name="BRRR">Почему так криво...</a></b></li>
<ul>
<li><a name="TRAF"><i>Q: Почему так криво считается трафик? Не совпадает с ...</i></a></li>
<p>
<i>A:</i> Следует учитывать, что 3proxy считает трафик только на прикладном уровне и
только проходящий через прокси-сервер. Провайдеры и другие средства учета
трафика считают трафик на сетевом уровне, что уже дает расхождение порядка 10%
за счет информации из заголовков пакетов. Кроме того, часть трафика, как
минимум DNS-разрешения, различный флудовый трафик и т.д. идут мимо прокси.
Уровень "шумового" трафика в Internet сейчас составляет порядка 50KB/день на
каждый реальный IP адрес, но может сильно варьироваться в зависимости от сети,
наличия открытых портов, реакции на ping-запросы и текущего уровня вирусной
активности. По этим причинам, если 3proxy используется чтобы не "выжрать"
трафик, выделенный провайдером, всегда следует делать некий запас порядка
15%.
</p>
<p>
Если на одной с 3proxy машине имеются какие-либо сервисы или
работает пользователь, то их трафик не проходит через proxy-сервер и так же
не будет учтен. Если где-то есть NAT, то клиенты, выходящие через NAT мимо
прокси, так же останутся неучтенными. Если расхождение с провайдером превышает
10% - нужно искать причину именно в этом.
</p>
<li><a name="CONFIG"><i>Q: Почему такая кривая конфигурация и ничерта не понятно?</i></a></li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, до выхода релиза (т.е. версии 1.0) я буду изо
всех сил добиваться совместимости конфигурации между версиями. Во-вторых,
конфигурация сделана так, чтобы ее можно было легко разбирать программно.
В-третьих, все там понятно. При желании. Если знать как все работает.
</p>
<li><a name="CODE"><i>Q: Почему так криво написан код?</i></a></li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, я не программист. Во-вторых, 3proxy изначально
писался на коленке (в отет на &quot;слабо&quot; в одной из конференций). Никто
не мог предположить, что им кто-то реально будет пользоваться. В-третьих, у многих
возникает желание разобраться в коде 3proxy чтобы внедрить его в какой-нибудь
троян. Очень не хочется облегчать эту задачу. В-четвертых, мне надо добиться
компиляции кода в как можно большем числе систем. Замечено, что чем кривее код в
C, тем он лучше переносится.
</p>
<li><a name="UNSAFE"><i>Q: Почему так много strcpy, sprintf и т.д., это ж дыры!</i></a><li>
<p>
<i>A:</i> Есть несколько причин. Во-первых, несмотря на дурной тон использования этих
функций, они наиболее совместимы между разными системами и компиляторами.
Во-вторых, само по себе их использование не означает присутствие дыры, если их
параметры должным образом контролируются. Найдете дыру - обязательно сообщите.
В третьих, может быть я уберу их перед конечным релизом, чтобы никого не
пугать.
</p>
</ul>
<H2><A href="howtoe.html">См. HowTo</a></H2>
+300
View File
@@ -0,0 +1,300 @@
<h3>Optimizing 3proxy for High Load</h3>
<p>Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product. The main reason is the "one connection - one thread" model 3proxy uses. 3proxy is known to work with over 200,000 connections under proper configuration, but use it in a production environment under high loads at your own risk and do not expect too much.
<p>Precaution 2: This documentation is incomplete and insufficient. High loads may require very specific system tuning including, but not limited to, specific or customized kernels, builds, settings, sysctls, options, etc. All of this is not covered by this documentation.
<h4>Configuring 'maxconn'</h4>
The number of simultaneous connections per service is limited by the 'maxconn' option.
The default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn'
to a higher value. Under this configuration:
<pre>
maxconn 1000
proxy -p3129
proxy -p3128
socks
</pre>
maxconn for every service is 1000, and there are 3 services running
(2 proxy and 1 socks), so for all services there can be up to 3000
simultaneous connections to 3proxy.
<p>Avoid setting 'maxconn' to an arbitrarily high value; it should be carefully
chosen to protect the system and proxy from resource exhaustion. Setting maxconn
above available resources can lead to denial of service conditions.
<h4>Understanding Resource Requirements</h4>
Each running service requires:
<ul>
<li>1 thread (process)
<li>1 socket (file descriptor)
<li>1 stack memory segment + some heap memory, ~64K-128K depending on the system
</ul>
Each connected client requires:
<ul>
<li>1 thread (process)
<li>2 sockets (file descriptors). For FTP, 4 sockets are required.
<br>Under Linux since 0.9, splice() is used. It's much more efficient but requires
<br>2 sockets (file descriptors) + 2 pipes (file descriptors) = 4 file descriptors.
<br>For FTP with splice(), 4 sockets and 2 pipes are required.
<br>Up to 128K (up to 256K in the case of splice()) of kernel buffer memory. This is the theoretical maximum; actual numbers depend on connection quality and traffic amount.
<br>1 additional socket (file descriptor) during name resolution for non-cached names
<br>1 additional socket during authentication or logging for RADIUS authentication or logging.
<li>1 ephemeral port (3 ephemeral ports for FTP connections).
<li>1 stack memory segment of ~32K-128K depending on the system + at least 16K and up to a few MB (for 'proxy' and 'ftppr') of heap memory. If you are short on memory, prefer 'socks' over 'proxy' and 'ftppr'.
<li>Many system buffers, especially in the case of slow network connections.
</ul>
Also, additional resources like system buffers are required for network activity.
<h4>Setting ulimits</h4>
Hard and soft ulimits must be set above calculated requirements. Under Linux, you can
check the limits of a running process with
<pre>
cat /proc/PID/limits
</pre>
where PID is the process ID.
Validate that ulimits match your expectations, especially if you run 3proxy under a dedicated account
by adding, e.g.:
<pre>
system "ulimit -Ha >>/tmp/3proxy.ulim.hard"
system "ulimit -Sa >>/tmp/3proxy.ulim.soft"
</pre>
at the beginning (before the first service is started) and at the end of the config file.
Perform both a hard restart (i.e., kill and start the 3proxy process) and a soft restart
by sending SIGUSR1 to the 3proxy process; check that the ulimits recorded to files match your
expectations. In systemd-based distros (e.g., latest Debian/Ubuntu), changing limits.conf
is not enough; limits must be adjusted in the systemd configuration, e.g., by setting:
<pre>
DefaultLimitDATA=infinity
DefaultLimitSTACK=infinity
DefaultLimitCORE=infinity
DefaultLimitRSS=infinity
DefaultLimitNOFILE=102400
DefaultLimitAS=infinity
DefaultLimitNPROC=10240
DefaultLimitMEMLOCK=infinity
</pre>
in user.conf / system.conf
<h4>Extending System Limitations</h4>
Check the manuals/documentation for your system's limitations, e.g., the system-wide limit for the number of open files
(fs.file-max in Linux). You may need to change sysctls or even rebuild the kernel from source.
<p>
To help with socket-based system-dependent settings, since 0.9-devel, 3proxy supports different
socket options which can be set via the -ol option for the listening socket, -oc for the proxy-to-client
socket, and -os for the proxy-to-server socket. Example:
<pre>
proxy -olSO_REUSEADDR,SO_REUSEPORT -ocTCP_TIMESTAMPS,TCP_NODELAY -osTCP_NODELAY
</pre>
Available options are system-dependent.
<h4>Using 3proxy in a Virtual Environment</h4>
If 3proxy is used in a VPS environment, there can be additional limitations.
For example, kernel resources, system CPU usage, and IOCTLs can be limited differently, and this can become a bottleneck.
Since 0.9-devel, 3proxy uses splice() by default on Linux. splice() prevents network traffic from being copied from
kernel space to the 3proxy process and generally increases throughput, especially in the case of high-volume traffic. This is especially
true for virtual environments (it can improve throughput up to 10 times) unless there are additional kernel limitations.
Since some work is moved to the kernel, it requires up to 2 times more kernel resources in terms of CPU, memory, and IOCTLs.
If your hosting additionally limits kernel resources (you can see this as nearly 100% CPU usage without any real CPU activity for
any application performing IOCTLs), use the -s0 option to disable splice() usage for a given service, e.g.:
<pre>
socks -s0
</pre>
<h4>Extending the Ephemeral Port Range</h4>
Check the ephemeral port range for your system and extend it to the number of
ports required.
The ephemeral range is always limited to the maximum number of ports (64K). To extend the
number of outgoing connections above this limit, extending the ephemeral port range
is not enough; you need additional actions:
<ol>
<li> Configure multiple outgoing IPs
<li> Make sure 3proxy is configured to use a different outgoing IP by either setting
the external IP via RADIUS:
<pre>
radius secret 1.2.3.4
auth radius
proxy
</pre>
or by using multiple services with different external
interfaces, for example:
<pre>
allow user1,user11,user111
proxy -p1111 -e1.1.1.1
flush
allow user2,user22,user222
proxy -p2222 -e2.2.2.2
flush
allow user3,user33,user333
proxy -p3333 -e3.3.3.3
flush
allow user4,user44,user444
proxy -p4444 -e4.4.4.4
flush
</pre>
or via "parent extip" rotation,
e.g.:
<pre>
allow user1,user11,user111
parent 1000 extip 1.1.1.1 0
allow user2,user22,user222
parent 1000 extip 2.2.2.2 0
allow user3,user33,user333
parent 1000 extip 3.3.3.3 0
allow user4,user44,user444
parent 1000 extip 4.4.4.4 0
proxy
</pre>
or
<pre>
allow *
parent 250 extip 1.1.1.1 0
parent 250 extip 2.2.2.2 0
parent 250 extip 3.3.3.3 0
parent 250 extip 4.4.4.4 0
socks
</pre>
<pre>
</pre>
Under the latest Linux versions, you can also start multiple services with different
external addresses on a single port with SO_REUSEPORT on the listening socket to
evenly distribute incoming connections between outgoing interfaces:
<pre>
socks -olSO_REUSEPORT -p3128 -e 1.1.1.1
socks -olSO_REUSEPORT -p3128 -e 2.2.2.2
socks -olSO_REUSEPORT -p3128 -e 3.3.3.3
socks -olSO_REUSEPORT -p3128 -e 4.4.4.4
</pre>
For web browsing, the last two examples are not recommended because the same client can get
a different external address for different requests; you should choose the external
interface with user-based rules instead.
<li> You may need additional system-dependent actions to use the same port on different IPs,
usually by adding the SO_REUSEADDR (SO_PORT_SCALABILITY for Windows) socket option to
the external socket. This option can be set (since 0.9-devel) with the -os option:
<pre>
proxy -p3128 -e1.2.3.4 -osSO_REUSEADDR
</pre>
The behavior for SO_REUSEADDR and SO_REUSEPORT is different between different systems,
even between different kernel versions, and can lead to unexpected results.
The specifics are described <a href="https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t">here</a>.
Use these options only if actually required and if you fully understand the possible
consequences. For example, SO_REUSEPORT can help establish more connections than the
number of client ports available, but it can also lead to situations where connections
randomly fail due to IP+port pair collisions if the remote or local system
doesn't support this trick.
</ol>
<h4>Setting Stack Size</h4>
'stacksize' is a size added to all stack allocations and can be both positive and
negative. Stack is required for function calls. 3proxy itself doesn't require a large
stack, but it can be required if some
poorly written libc, 3rd party libraries, or system functions are called. There is known
dirty code in Unix ODBC
implementations and built-in DNS resolvers, especially in the case of IPv6 and a large
number of interfaces. Under most 64-bit systems, extending stacksize will lead
to additional memory space usage but does not require actual committed memory,
so you can increase stacksize to a relatively large value (e.g., 1024000) without
the need to add additional physical memory,
but it's system/libc dependent and requires additional testing under your
installation. Don't forget about memory-related ulimits.
<p>For 32-bit systems, address space can be a bottleneck you should consider. If
you're short on address space, you can try using a negative stack size.
<h4>Known System Issues</h4>
There are known race condition issues in the Linux/glibc resolver. The probability
of a race condition arises under configuration with IPv6, a large number of interfaces
or IP addresses, or with resolvers configured. In this case, install a local recursor and
use 3proxy's built-in resolver (nserver / nscache / nscache6).
<h4>Do Not Use Public Resolvers</h4>
Public resolvers like those from Google have rate limits. For a large number of
requests, install a local caching recursor (ISC bind named, PowerDNS recursor, etc).
<h4>Avoid Large Lists</h4>
Currently, 3proxy is not optimized to use large ACLs, user lists, etc. All lists
are processed linearly. In the devel version, you can use RADIUS authentication to avoid
user lists and ACLs in 3proxy itself. Also, RADIUS allows you to easily set an outgoing IP
on a per-user basis or implement more sophisticated logic.
RADIUS is a new beta feature; test it before using it in production.
<h4>Avoid Changing Configuration Too Often</h4>
Every configuration reload requires additional resources. Do not make frequent
changes, such as user addition/deletion via configuration; use alternative
authentication methods instead, like RADIUS.
<h4>Consider Using 'noforce'</h4>
The 'force' behavior (default) re-authenticates all connections after
configuration reload; it may be resource-consuming with a large number of
connections. Consider adding the 'noforce' command before services are started
to prevent connection re-authentication.
<h4>Do Not Monitor Configuration Files Directly</h4>
Using a configuration file directly in 'monitor' can lead to a race condition where
the configuration is reloaded while the file is being written.
To avoid race conditions:
<ol>
<li> Update config files only if there is no lock file
<li> Create a lock file when the 3proxy configuration is updated, e.g., with
"touch /some/path/3proxy/3proxy.lck". If you generate config files
asynchronously, e.g., by a user's request via web, you should consider
implementing existence checking and file creation as an atomic operation.
<li> Add
<pre>
system "rm /some/path/3proxy/3proxy.lck"
</pre>
at the end of the config file to remove it after the configuration is successfully loaded
<li> Use a dedicated version file to monitor, e.g.:
<pre>
monitor "/some/path/3proxy/3proxy.ver"
</pre>
<li> After the config is updated, change the version file for 3proxy to reload the configuration,
e.g., with "touch /some/path/3proxy/3proxy.ver".
</ol>
<h4>Use TCP_NODELAY to Speed Up Connections with Small Amounts of Data</h4>
If most requests require an exchange with a small amount of data in both directions
without the need for bandwidth, e.g., messengers or small web requests,
you can eliminate Nagle's algorithm delay with the TCP_NODELAY flag. Usage example:
<pre>
proxy -osTCP_NODELAY -ocTCP_NODELAY
</pre>
sets TCP_NODELAY for client (oc) and server (os) connections.
<p>Do not use TCP_NODELAY on slow connections with high delays when
connection bandwidth is a bottleneck.
<h4>Use Splice to Speed Up Large Data Amount Transfers</h4>
splice() allows copying data between connections without copying to the process
address space. It can speed up the proxy on high-bandwidth connections if most
connections require large data transfers. Splice is enabled by default on Linux
since 0.9; "-s0" disables splice usage. Example:
<pre>
proxy -s0
</pre>
Splice is only available on Linux. Splice requires more system buffers and file descriptors
and produces more IOCTLs but reduces process memory and overall CPU usage.
Disable splice if there are a lot of short-lived connections with no bandwidth
requirements.
<p>Use splice only on high-speed connections (e.g., 10GbE) when the processor, memory speed, or
system bus are bottlenecks.
<p>TCP_NODELAY and splice are not contrary to each other and should be combined on
high-speed connections.
<h4>Add Grace Delay to Reduce System Calls</h4>
<pre>proxy -g8000,3,10</pre>
The first parameter is the average read size we want to keep, the second parameter is
the minimal number of packets in the same direction to apply the algorithm,
and the last value is the delay added after polling and prior to reading data.
The example above adds a 10-millisecond delay before reading data if the average
polling size is below 8000 bytes and 3 read operations have been made in the same
direction. It's especially useful with splice. <pre>logdump 1 1</pre> is useful
to see how grace delays work; choose a delay value to avoid filling the read
pipe/buffer (typically 64K) but keep the request sizes close to the chosen average
on large file uploads/downloads.
+861 -372
View File
File diff suppressed because it is too large. Load diff
+640 -131
View File
@@ -1,42 +1,53 @@
3APA3A 3proxy tiny proxy server HowTo
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3APA3A 3proxy tiny proxy server HowTo
<br>В стадии разработки
<ul>
<li><a href="#COMPILE">Компиляция</a>
<ul>
<li><a href="#MSVC">Как скомпилировать 3proxy Visual C++</a>
<li><a href="#INTL">Как скомпилировать 3proxy Intel C Compiler под Windows</a>
<li><a href="#GCCWIN">Как скомпилировать 3proxy GCC под Windows</a>
<li><a href="#CMAKE">Как скомпилировать 3proxy с помощью CMake</a>
<li><a href="#GCCUNIX">Как скомпилировать 3proxy GCC под Unix/Linux</a>
<li><a href="#CCCUNIX">Как скомпилировать 3proxy Compaq C Compiler под Unix/Linux</a>
</ul>
<li><a href="#INSTALL">Установка и удаление 3proxy</a>
<ul>
<li><a href="#INSTNT">Как установить/удалить 3proxy под Windows 95/98/ME/NT/2000/XP как службу</a>
<li><a href="#INST95">Как установить/удалить 3proxy под Windows 95/98/ME</a>
<li><a href="#INSTNT">Как установить/удалить 3proxy под Windows NT/2000/XP/2003 как службу</a>
<li><a href="#INSTUNIX">Как установить/удалить 3proxy под Unix/Linux</a>
<li><a href="#INSTMACOS">Как установить/удалить 3proxy под macOS</a>
<li><a href="#INSTDOCKER">Как использовать 3proxy с Docker</a>
</ul>
<li><a href="#SERVER">Конфигурация сервера</a>
<ul>
<li><a href="#NOTHING">Как заставить 3proxy запускаться</a></li>
<li><a href="#LIMITS">Как заставить ограничения (по ширине канала, трафику, ACL и. т.п.) работать</a></li>
<li><a href="#SERVICE">Как заставить 3proxy запускаться как службу</a></li>
<li><a href="#INTEXT">Как разобраться с internal и external</a></li>
<li><a href="#ODBC">Как починить ведение журналов в ODBC?</a></li>
<li><a href="#IPV6">Как заставить IPv6 работать</a></li>
<li><a href="#CRASH">Как сделать чтобы 3proxy не крешился</a></li>
<li><a href="#SAMPLE">Как посмотреть пример файла конфигурации</a>
<li><a href="#LOGGING">Как настроить ведение журнала</a>
<li><a href="#LOGFORMAT">Как настроить формат журнала</a>
<li><a href="#LOGANALIZERS">Как использовать лог-анализаторы с 3proxy</a>
<li><a href="#LAUNCH">Как запустить конкретную службу (HTTP, SOCKS и т.д)</a>
<li><a href="#BIND">Как повесить службу на определенный интерфейс или порт</a>
<li><a href="#NAMES">Как разрешать имена на родительском прокси?</a></li>
<li><a href="#ISFTP">Как настроить FTP прокси?</a></li>
<li><a href="#TLSPR">Как настроить SNI proxy (tlspr)</a></li>
<li><a href="#SSLPLUGIN">Как настроить TLS/SSL с помощью SSLPlugin (https прокси, mTLS)</a></li>
<li><a href="#CERTIFICATES">Как создать CA и сертификаты для SSLPlugin</a></li>
<li><a href="#AUTH">Как ограничить доступ к службе</a>
<li><a href="#USERS">Как создать список пользователей</a>
<li><a href="#ACL">Как ограничить доступ пользователей к ресурсам</a>
<li><a href="#REDIR">Как управлять перенаправлениями</a>
<li><a href="#SOCKSREDIR">Как управлять локальными перенаправлениями</a>
<li><a href="#ROUNDROBIN">Как организовать балансировку между несколькими каналами</a>
<li><a href="#CHAIN">Как составлять цепочки прокси</a>
<li><a href="#BANDLIM">Как ограничивать скорости приема</a>
<li><a href="#TRAFLIM">Как ограничивать объем принимаемого трафика</a>
<li><a href="#NETLIST">Как строить списки сетей</a>
<li><a href="#TRAF">Как пофиксить некорректный подсчет трафика</a></li>
<li><a href="#NSCACHING">Как управлять разрешением имен и кэшированием DNS</a>
<li><a href="#IPV6">Как использовать IPv6</a>
<li><a href="#CONNBACK">Как использовать connect back</a>
<li><a href="#DEMANDDIAL">Как устанавливать соединение по требованию</a>
</ul>
<li><a href="#CLIENT">Конфигурация и настройка клиентов</a>
<ul>
@@ -62,64 +73,67 @@
<ul>
<li><a name="MSVC"><i>Как скомпилировать 3proxy Visual C++</i></a>
<p>
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip).
Используйте команду nmake /f Makefile.msvc.
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip) или используйте git.
<pre>
nmake /f Makefile.msvc
</pre>
Исполняемые файлы будут помещены в каталог <code>bin/</code>.
</p>
<li><a name="INTL"><i>Как скомпилировать 3proxy Intel C Compiler под Windows</i></a>
<li><a name="CMAKE"><i>Как скомпилировать 3proxy с помощью CMake</i></a>
<p>
См. <a href="#MSVC">Как скомпилировать 3proxy Visual C++</a>.
Используйте Makefile.intl вместо Makefile.msvc
</p>
<li><a name="GCCWIN"><i>Как скомпилировать 3proxy GCC под Windows</i></a></li>
<p>
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip или, при наличии
Cygwin, tar -xzf 3proxy.tgz).
Используйте команду make -f Makefile.win. Если по каким-то причинам вы хотите использовать
библиотеку POSIX-эмуляции CygWin - используйте make -f Makefile.unix.
При использовании CygWin, функции, специфичные для Windows (такие, как запуск в
качестве службы) будут недоступны.
CMake предоставляет кроссплатформенную систему сборки. Работает на Windows (MSVC, MinGW), Linux, macOS и BSD.
<br>Базовые шаги сборки:
<pre>
mkdir build
cd build
cmake ..
cmake --build .</pre>
На Windows с Visual Studio можно также сгенерировать файл решения:
<pre>
cmake -G "Visual Studio 17 2022" -A x64 ..
cmake --build . --config Release</pre>
Опциональные функции можно включить через параметры cmake:
<pre>
cmake -D3PROXY_USE_OPENSSL=ON -D3PROXY_USE_PCRE2=ON ..</pre>
Доступные опции: 3PROXY_USE_OPENSSL, 3PROXY_USE_PCRE2, 3PROXY_USE_PAM, 3PROXY_USE_ODBC.
<br>Исполняемые файлы будут помещены в каталог <code>build/bin/</code>.
</p>
<li><a name="GCCUNIX"><i>Как скомпилировать 3proxy GCC под Unix/Linux</i></a></li>
<p>
Используйте make -f Makefile.unix. Должен использоваться GNU make, на
некоторых системах необходимо использовать gmake вместо make. Под Linux
необходимо использовать Makefile.Linux, под Solaris - Makefile.Solaris-* (в
зависимости от используемого компилятора). Компиляция проверена в FreeBSD/i386,
OpenBSD/i386, NetBSD/i386, RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC,
Solaris 10, но должно собираться в любых версиях *BSD/Linux/Solaris.
В других системах может потребоваться модификация make-файла и/или исходных текстов.
Для компиляции с поддержкой ODBC необходимо убрать -DNOODBC из флагов
компиляции и добавить -lodbc (или другую ODBC-библиотеку) к флагам линковщика.
</p>
<li><a name="CCCUNIX"><i>Как скомпилировать 3proxy Compaq C Compiler под Unix/Linux</i></a></li>
<p>
Используйте make -f Makefile.ccc. Компиляция проверена в RH Linux 7.1/Alpha.
В других системах может потребоваться модификация файла и/или исходных текстов.
Для Linux используйте:
<pre>
ln -sf Makefile.Linux Makefile
make</pre>
Для FreeBSD используйте:
<pre>
ln -sf Makefile.FreeBSD Makefile
make</pre>
Для других Unix-подобных систем используйте Makefile.unix. На BSD-производных системах
убедитесь, что используете GNU make; иногда он называется gmake вместо make.
<br>Компиляция проверена на FreeBSD, NetBSD, OpenBSD, Linux, Solaris и macOS.
<br>Для поддержки ODBC необходимо установить Unix ODBC, убрать -DNOODBC из флагов
компиляции и добавить ODBC-библиотеку к флагам линковщика.
<br>Исполняемые файлы будут помещены в каталог <code>bin/</code>.
</p>
</ul>
<hr>
<li><a name="INSTALL"><b>Установка и удаление 3proxy</b></a>
<p>
<ul>
<li><a name="INSTNT"><i>Как установить/удалить 3proxy под Windows 95/98/ME/NT/2000/XP/2003 как службу</i></a>
<li><a name="INSTNT"><i>Как установить/удалить 3proxy под Windows NT/2000/XP/2003 как службу</i></a>
<p>
Извлеките файлы из архива 3proxy.zip в любой каталог
Извлеките файлы из архива 3proxy.zip в любой каталог
(например, c:\Program Files\3proxy). Если необходимо, создайте каталог для
хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в
каталоге 3proxy (см. раздел <a href="#SERVER">Конфигурация сервера</a>).
Если используется версия более ранняя, чем 0.6, добавьте строку
<pre>
service</pre>
в файл 3proxy.cfg. Откройте командную строку (cmd.exe).
Откройте командную строку (cmd.exe).
Перейдите в каталог с 3proxy и дайте команду 3proxy.exe --install:
<pre>
D:\>C:
C:\>cd C:\Program Files\3proxy
C:\Program Files\3proxy>3proxy.exe --install</pre>
Сервис должен быть установлен и запущен. Если сервис не запускается,
проверьте содержимое файла журнала,
попробуйте удалить строку service из 3proxy.cfg, запустить 3proxy.exe вручную
и проанализировать сообщения об ошибках.
попробуйте запустить 3proxy.exe вручную и проанализировать сообщения об ошибках.
</p><p>
Для удаления 3proxy необходимо остановить сервис и дать
команду 3proxy.exe --remove:
@@ -129,49 +143,211 @@
C:\Program Files\3proxy>net stop 3proxy
C:\Program Files\3proxy>3proxy.exe --remove</pre>
после чего каталог 3proxy можно удалить.
<p>
Установка в качестве системной службы под Windows 9x поддерживается с версии 0.5
</p>
<li><a name="INST95"><i>Как установить/удалить 3proxy под Windows 95/98/ME</i></a>
<p>
Извлеките файлы из архива 3proxy.zip в любой каталог
(например, c:\Program Files\3proxy). Если необходимо, создайте каталог для
хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в
каталоге 3proxy (См. раздел <a href="#SERVER">Конфигурация сервера</a>).
В файле конфигурации удалите строку
<pre>
service</pre>
и добавьте строку
<pre>
daemon</pre>
Создайте ярлык для 3proxy.exe и поместите его в автозагрузку либо с помощью
редактора реестра regedit.exe добавьте в разделе
<br>HKLM\Software\Microsoft\Windows\CurrentVersion\Run</br>
строковый параметр
<br>3proxy = "c:\Program Files\3proxy.exe" "C:\Program Files\3proxy.cfg"<br>
Использование кавычек при наличии в пути пробела обязательно.
Перезагрузитесь.
Если сервер не запускается,
проверьте содержимое файла журнала,
попробуйте удалить строку daemon из 3proxy.cfg, запустить 3proxy.exe вручную
и проанализировать сообщения об ошибках.
</p>
<li><a name="INSTUNIX"><i>Как установить/удалить 3proxy под Unix/Linux</i></a>
<p>
Скомпилируйте 3proxy (см. раздел <a href="#COMPILE">Компиляция</a>). Скопируйте
исполняемые файлы в подходящий каталог (например, /usr/local/3proxy/sbin для
серверных приложений или /usr/local/3proxy/bin для клиентских утилит).
Создайте файл /usr/local/etc/3proxy.cfg.
(См. раздел <a href="#SERVER">Конфигурация сервера</a>).
Изменить расположение файла конфигурации можно, задав параметр при вызове
3proxy или изменив путь в файле 3proxy.c до компиляции.
Добавьте вызов 3proxy в скрипты начальной инициализации.
<b>С помощью Makefile:</b>
<br>Скомпилируйте 3proxy (см. раздел <a href="#COMPILE">Компиляция</a>), затем выполните:
<pre>
sudo make install</pre>
Это установит исполняемые файлы в <code>/usr/local/3proxy/sbin/</code>,
конфигурацию в <code>/etc/3proxy/</code> и настроит chroot-каталоги.
Файл конфигурации по умолчанию: <code>/etc/3proxy/3proxy.cfg</code>.
</p>
<p>
<b>С помощью CMake:</b>
<pre>
mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .</pre>
</p>
<p>
<b>С помощью готовых пакетов из GitHub:</b>
<br>Скачайте .deb или .rpm пакеты со страницы <a href="https://github.com/3proxy/3proxy/releases">GitHub Releases</a>.
<br>Для Debian/Ubuntu:
<pre>
sudo dpkg -i 3proxy_*.deb</pre>
Для RHEL/CentOS/Fedora:
<pre>
sudo rpm -i 3proxy-*.rpm</pre>
</p>
<p>
Добавьте 3proxy в скрипты автозапуска или используйте systemd:
<pre>
sudo systemctl enable 3proxy
sudo systemctl start 3proxy</pre>
</p>
<li><a name="INSTMACOS"><i>Как установить/удалить 3proxy под macOS</i></a>
<p>
<b>С помощью CMake (рекомендуется):</b>
<pre>
mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .</pre>
Это установит:
<ul>
<li>Исполняемые файлы в <code>/usr/local/bin/</code></li>
<li>Конфигурацию в <code>/etc/3proxy/</code></li>
<li>Плагины в <code>/usr/local/lib/3proxy/</code></li>
<li>Launchd plist в <code>/Library/LaunchDaemons/org.3proxy.3proxy.plist</code></li>
</ul>
</p>
<p>
<b>С помощью Makefile:</b>
<pre>
ln -sf Makefile.FreeBSD Makefile
make
sudo make install</pre>
Это установит исполняемые файлы в <code>/usr/local/3proxy/bin/</code> и конфигурацию в <code>/usr/local/etc/3proxy/</code>.
</p>
<p>
<b>Управление службой через launchd:</b>
<br>После установки через cmake службой можно управлять с помощью launchctl:
<pre>
# Загрузить и запустить службу
sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist
# Остановить службу
sudo launchctl stop org.3proxy.3proxy
# Запустить службу
sudo launchctl start org.3proxy.3proxy
# Выгрузить и отключить службу
sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist</pre>
Служба запускается от имени пользователя <code>proxy</code> (создаётся при установке).
Файл конфигурации: <code>/etc/3proxy/3proxy.cfg</code>
</p>
<li><a name="INSTDOCKER"><i>Как использовать 3proxy с Docker</i></a>
<p>
<b>Использование готовых образов из GitHub Container Registry:</b>
<pre>
docker pull ghcr.io/3proxy/3proxy:latest</pre>
</p>
<p>
<b>Сборка Docker-образов:</b>
<br>Предоставляются два Dockerfile:
<ul>
<li><code>Dockerfile.minimal</code> - минимальная статическая сборка без плагинов, конфигурация из stdin:
<pre>
docker build -f Dockerfile.minimal -t 3proxy.minimal .
docker run -i -p 3129:3129 --name 3proxy 3proxy.minimal</pre>
Затем введите конфигурацию, завершив командой "end".
</li>
<li><code>Dockerfile.full</code> - полная сборка с плагинами (SSL, PCRE, Transparent):
<pre>
docker build -f Dockerfile.full -t 3proxy.full .
docker run -p 3129:3129 -v /path/to/config:/usr/local/3proxy/conf 3proxy.full</pre>
Файл конфигурации должен находиться по пути <code>/path/to/config/3proxy.cfg</code>.
</li>
</ul>
</p>
<p>
По умолчанию 3proxy работает в chroot-окружении с uid/gid 65535. Используйте <code>nserver</code> в конфигурации для DNS-разрешения в chroot.
Для запуска без chroot монтируйте конфигурацию в <code>/etc/3proxy</code>.
</p>
</ul>
<hr>
<li><a name="SERVER"><b>Конфигурация сервера</b></a>
<p>
<ul>
<li><a name="NOTHING">Как заставить прокси работать</a></li>
<p>
Для работы требуется корректный файл конфигурации. Если прокси не запускается, значит в конфигурации есть ошибка.
</p>
<li><a name="LIMITS">Как заставить работать ограничения (контроль доступа, ограничения ширины канала, счетчики и т.п.)</a></li>
<p>
<i>A:</i> Обычные ошибки - использование auth none (для работы любых
функций, основанных на ACL, требуется auth iponly, nbname или strong),
нарушение порядка ввода команд (команды выполняются последовательно,
запуск сервиса proxy, socks, tcppm и т.д. должен осуществляться после
того, как указана его конфигурация), неправильный порядок записей в ACL
(записи просматриваются последовательно до первой, удовлетворяющей
критериям). Если в ACL имеется хотя бы одна запись, то считается, что
последняя запись в ACL - это неявная deny *.
</p>
<li><a name="SERVICE">Как починить запуск 3proxy службой</a></li>
<p>
Чаще всего 3proxy не запускается службой (но запускается вручную) по одной из следующих причин:
<ul>
<li>Использование относительных (неполных) путей файлов в файле конфигурации
При использовании файлов журналов, файлов вставок ($filename) используйте
полные пути, например, $"c:\3proxy\include files\networks.local". Тоже самое
относится к файлам журналов и любым другим.
Для отладки лучше запускать 3proxy с ведением журнала на стандартный вывод.
Не забудьте в таком случае отключить daemon и service в файле конфигурации.
Для чистоты эксперимента запускать 3proxy из коммандной строки в таком случае
следует, находясь в другой папке.
<li>Отсутствие у системной записи прав на доступ к исполняемому файлу, каким-либо файлам конфигурации, журнала и т.п.
<li>Отсутствие файла конфигурации по стандартному расположению -
3proxy.cfg в одном каталоге с исполняемым файлом. Если файл расположен по
другому пути, необходимо использовать команду
<pre>
3proxy --install path_to_configuration_file</pre>
<li>Отсутствие у пользователя прав на установку или запуск службы
<li>Служба уже установлена или запущена
</ul>
</p>
<li><a name="INTEXT">Как разобраться с internal и external</a></li>
<p>
Убедитесь, что выправильно понимаете что такое internal и external адреса.
Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy.
Эта опция конфигурации необходима в классической ситуации, когда 3proxy
установлен на граничном компьютере с двумя (или более) подключениями:
<pre>
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
^+-------------+^
| |
Internal IP External IP</pre>
Если 3proxy работает на хосте с одним интерфейсом, то его адрес будет и
internal и external.
<br>Интерфейс с адресом internal должен существовать и быть рабочим на момент
запуска 3proxy, и не должен отключаться. Если internal интерфейс
периодически отключается, то не следует его указывать, или можно указать адрес
0.0.0.0. При этом прокси будет принимать запросы на всех интерфейсах, поэтому
при наличии нескольких интерфейсов для ограничения доступа следует использовать
фаервол или хотя бы ACL.
</p>
<p>
Интерфейс с адресом external, если он указан, должен быть рабочим на момент
получения запроса клиента. При отсутствии external или адресе 0.0.0.0 внешний
адрес будет выбираться системой при установке соединения. При этом, может быть
возможность доступа через прокси к ресурсам локальной сети, поэтому для
предотвращения несанкционированного доступа следует использовать ACL. Кроме
того, могут быть проблемы с приемом входящих соединений через SOCKSv5
(SOCKSv5 используется в клиентах исключительно редко).
В случае, если адрес динамический, можно либо не
указывать external, либо использовать адрес 0.0.0.0, либо, если необходима
поддержка входящих соединений в SOCKSv5, использовать скрипт,
который будет получать текущий адрес и сохранять его в файл, который будет
отслуживаться через команду monitor.
</p>
<li><a name="ODBC">Как починить ведение журналов в ODBC</a></li>
<p>
Убедитесь, что используется системный, а не
пользовательский DSN. Убедитесь, что выполняется правильный SQL запрос. Наиболее
распространенная проблема связана с отсутствием кавычек или неправильным
форматом данных. Самый простой способ - сделать ведение журнала в файл или
на стандартный вывод, просмотреть выдаваемые SQL запросы и попробовать
дать такой запрос вручную.
</p>
<li><a name="IPv6">Как починить IPv6</a></li>
<p>
Прокси не может обращаться напрямую к IPv6 сети если в запросе от клиента
указан IPv4. В запросе от клиента должен быть IPv6 адрес или имя хоста, чаще
всего это решается включением опции разрешения имен через прокси-сервер на стороне
клиента.
</p>
<li><a name="CRASH">Как починить падения 3proxy</a></li>
<p>
Возможно, недостаточен размер стека потока по-умолчанию, это может
быть при использовани каких-либо сторонних плагинов (PAM, ODBC) или на
некоторых платформах (некоторые версии FreeBSD на amd64). Можно решить
проблему с помощью опции 'stacksize' или '-S', поддерживаемых в 0.8.4 и выше.
</p>
<li><a name="SAMPLE"><i>Как посмотреть пример файла конфигурации</i></a>
<p>
Пример файла конфигурации 3proxy.cfg.sample поставляется с любым дистрибутивом
@@ -225,7 +401,7 @@
<li>W, еженедельная ротация
<li>D, ежедневная ротация
<li>H, ежечасная ротация
<li>С, ежеминутная ротация
<li>C, ежеминутная ротация
</ul>
<pre>
rotate NUMBER</pre>
@@ -386,6 +562,278 @@
<pre>
proxy -p8080 -i192.168.1.1
proxy -p8080 -i192.168.2.1</pre>
<li><a name="NAMES"><i>Как разрешать имена на родительском прокси?</i></a></li>
<p>
<i>A:</i> Для этого надо использовать тип родительского прокси http,
connect+, socks4+ и socks5+. Однако, при это надо помнить, что самому 3proxy
требуется разрешение имени для управления ACL. Поэтому, если с прокси-хоста
не работают разрешения имени, необходимо в конфигурации дать команду
<pre>
fakeresolve</pre>
которая разрешает любое имя в адрес 127.0.0.2.
</p>
<li><a name="ISFTP"><i>Как настроить FTP прокси?</i></a></li>
<p>
Есть поддержка как FTP через HTTP (то, что называется FTP прокси в браузерах) так и настоящего FTP прокси (то, что называется
FTP proxy в командных оболочках и FTP клиентах). В браузерах в качестве FTP прокси следует прописывать порт службы proxy,
т.е. FTP организован
через http прокси, дополнительного прокси поднимать не надо. Для FTP-клиентов необходимо поднять ftppr. FTP прокси всегда работает
с FTP сервером в пассивном режиме.
</p>
<li><a name="TLSPR"><i>Как настроить SNI proxy (tlspr)</i></a></li>
<p>
SNI proxy может быть использован для транспарентного перенаправления любого TLS трафика (например HTTPS) на внешнем маршрутизаторе
или локальными правилами. Так же можно использовать его для извлечения имени хоста из TLS хендшейка с целью логгирования или использования в ACL.
Еще одна задача которую может решать модуль - требование наличия TLS или mTLS (mutual TLS).
Если tlspr используется как отдельный сервис без использования плагина Transparent, то необходимо задать порт назначения через опцию -P (по умолчанию 443),
т.к. TLS хендшейк не содержит информации о порте назначения.
</p><p>
<b>Опции:</b>
</p><pre>
-P &lt;порт&gt; - порт назначения (по умолчанию: 443)
-c &lt;уровень&gt; - уровень проверки TLS:
0 (по умолчанию) - пропустить трафик без TLS
1 - требовать TLS, проверять наличие client HELLO
2 - требовать TLS, проверять наличие client и server HELLO
3 - требовать TLS, проверять наличие серверного сертификата (не совместим с TLS 1.3+)
4 - требовать взаимный (mutual) TLS, проверять что сервер запрашивает сертификат и клиент его отправляет (не совместим с TLS 1.3+)
</pre>
<p>
<b>SNI Break (обход DPI):</b>
<br>tlspr может использоваться как родительский прокси типа "tls" для реализации SNI-фрагментации (аналог NoDPI/GoodByeDPI).
Клиент отправляет первую часть TLS ClientHello, tlspr разбивает его на расширении SNI и отправляет двумя TCP-пакетами,
что позволяет обойти некоторые DPI-системы, ищущие заблокированные имена хостов в TLS-рукопожатиях.
<br>Для включения SNI break используйте <code>parent ... tls 0.0.0.0 0</code> и опцию <code>-s</code> на слушающем сервисе с TCP_NODELAY:
</p><pre>
auth iponly
allow *
parent 1000 tls 0.0.0.0 0
allow *
proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443
</pre>
<p>
TCP_NODELAY необходим, чтобы ядро не объединяло разделенные пакеты.
</p>
<p>
<b>Примеры конфигурации:</b>
</p>
<p>
1. Отдельный SNI proxy на порту 1443 с перенаправлением на порт назначения 443:
</p><pre>
tlspr -p1443 -P443 -c1
</pre>
<p>
2. Использование tlspr как родительского прокси в SOCKS для обнаружения hostname из TLS (даже если клиент подключается по IP):
</p><pre>
allow * * * 80
parent 1000 http 0.0.0.0 0
allow * * * * CONNECT
parent 1000 tls 0.0.0.0 0
deny * * some.not.allowed.host
allow *
socks
</pre>
<p>
3. Использование tlspr с HTTP proxy для ACL по имени хоста TLS:
</p><pre>
allow * * * 80
parent 1000 http 0.0.0.0 0
allow * * * 443
parent 1000 tls 0.0.0.0 0
deny * * blocked.example.com
allow *
proxy
</pre>
</p>
<li><a name="SSLPLUGIN"><i>Как настроить TLS/SSL с помощью SSLPlugin (https прокси, mTLS)</i></a>
<p>
SSLPlugin обеспечивает поддержку TLS/SSL для 3proxy. Он может использоваться для:
<ul>
<li>Создания https:// прокси (TLS-шифрованное соединение между клиентом и прокси)</li>
<li>Реализации MITM для инспекции TLS-трафика</li>
<li>Соединения с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату</li>
<li>Требования аутентификации по клиентскому сертификату (mTLS)</li>
</ul>
</p>
<p>
<b>Создание https:// прокси:</b>
<br>Для создания https:// прокси требуется сертификат и ключ сервера. Сертификат не должен быть самоподписанным
и должен содержать альтернативные имена (SAN) для имени хоста/IP прокси.
</p><pre>
plugin /path/to/SSLPlugin.ld.so ssl_plugin
ssl_server_cert /etc/3proxy/certs/server.crt
ssl_server_key /etc/3proxy/certs/server.key
ssl_serv
proxy -p3129
ssl_noserv
proxy -p3128
</pre>
<p>
Создаётся https:// прокси на порту 3129 и http:// прокси на порту 3128.
Настройте клиенты на использование https://proxy-host:3129/ в качестве URL прокси.
</p>
<p>
<b>Аутентификация по клиентскому сертификату (mTLS):</b>
<br>Чтобы требовать от клиентов аутентификацию по сертификату, используйте ssl_server_verify и укажите CA-сертификат:
</p><pre>
plugin /path/to/SSLPlugin.ld.so ssl_plugin
ssl_server_cert /etc/3proxy/certs/server.crt
ssl_server_key /etc/3proxy/certs/server.key
ssl_server_ca_file /etc/3proxy/certs/ca.crt
ssl_server_verify
ssl_serv
proxy -p3129
</pre>
<p>
Только клиенты с действительным сертификатом, подписанным CA, смогут подключиться.
</p>
<p>
<b>MITM для инспекции TLS-трафика:</b>
<br>Для перехвата и расшифровки TLS-трафика требуется CA-сертификат для генерации подделанных серверных сертификатов:
</p><pre>
plugin /path/to/SSLPlugin.ld.so ssl_plugin
ssl_server_ca_file /etc/3proxy/certs/ca.crt
ssl_server_ca_key /etc/3proxy/certs/ca.key
ssl_client_verify
ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
ssl_mitm
proxy -p3128
ssl_nomitm
proxy -p3129
</pre>
<p>
CA-сертификат должен быть доверенным для клиентов. ssl_client_verify обеспечивает проверку реальных серверных сертификатов.
Без ssl_client_verify прокси уязвим для MITM-атак.
</p>
<p>
<b>TLS-клиент (соединение с вышестоящим сервером через TLS):</b>
<br>Для соединения с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату:
</p><pre>
plugin /path/to/SSLPlugin.ld.so ssl_plugin
ssl_client_cert /etc/3proxy/certs/client.crt
ssl_client_key /etc/3proxy/certs/client.key
ssl_client_verify
ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
ssl_cli
proxy -p3128
</pre>
<li><a name="CERTIFICATES"><i>Как создать CA и сертификаты для SSLPlugin</i></a>
<p>
<b>Создание удостоверяющего центра (CA):</b>
<br>Для MITM или mTLS требуется CA. Сгенерируйте закрытый ключ CA и сертификат:
</p><pre>
# Генерация закрытого ключа CA
openssl genrsa -out ca.key 4096
# Генерация сертификата CA (действителен 10 лет)
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=My CA" \
-out ca.crt
</pre>
<p>
Для MITM импортируйте ca.crt в браузеры/ОС клиентов как доверенный корневой CA.
</p>
<p>
<b>Создание серверного сертификата для https:// прокси:</b>
<br>Серверный сертификат должен иметь правильные альтернативные имена (SAN):
</p><pre>
# Генерация закрытого ключа сервера
openssl genrsa -out server.key 2048
# Создание запроса на подпись сертификата (CSR)
openssl req -new -key server.key \
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=proxy.example.com" \
-out server.csr
# Создание файла расширений для SAN
cat > server.ext << 'EOF'
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = proxy.example.com
DNS.2 = proxy
IP.1 = 192.168.1.100
EOF
# Подписание сертификата CA
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -out server.crt -days 365 -sha256 \
-extfile server.ext
</pre>
<p>
Для публичного https:// прокси используйте CA вроде Let's Encrypt вместо самоподписанного.
</p>
<p>
<b>Создание клиентского сертификата для mTLS:</b>
</p><pre>
# Генерация закрытого ключа клиента
openssl genrsa -out client1.key 2048
# Создание CSR
openssl req -new -key client1.key \
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=client1" \
-out client1.csr
# Создание файла расширений
cat > client.ext << 'EOF'
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment
extendedKeyUsage = clientAuth
EOF
# Подписание CA
openssl x509 -req -in client1.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -out client1.crt -days 365 -sha256 \
-extfile client.ext
# Создание PKCS#12 для импорта в браузер
openssl pkcs12 -export -out client1.p12 \
-inkey client1.key -in client1.crt -certfile ca.crt
</pre>
<p>
Импортируйте client1.p12 в хранилище сертификатов браузера или ОС клиента.
</p>
<p>
<b>Скрипт быстрой настройки для разработки/тестирования:</b>
</p><pre>
#!/bin/sh
# Создаёт CA, серверный и клиентский сертификаты для тестирования SSLPlugin
# CA
openssl genrsa -out ca.key 4096
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
-subj "/CN=3proxy CA" -out ca.crt
# Сервер
openssl genrsa -out server.key 2048
openssl req -new -key server.key -subj "/CN=localhost" -out server.csr
cat > server.ext << 'EOF'
basicConstraints=CA:FALSE
keyUsage = keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = DNS:localhost,DNS:proxy,IP:127.0.0.1
EOF
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -out server.crt -days 365 -sha256 -extfile server.ext
# Клиент
openssl genrsa -out client.key 2048
openssl req -new -key client.key -subj "/CN=client" -out client.csr
cat > client.ext << 'EOF'
basicConstraints=CA:FALSE
extendedKeyUsage = clientAuth
EOF
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -out client.crt -days 365 -sha256 -extfile client.ext
openssl pkcs12 -export -out client.p12 -passout pass: \
-inkey client.key -in client.crt -certfile ca.crt
</pre>
<li><a name="AUTH"><i>Как ограничить доступ к службе</i></a>
<p>
Во-первых, для ограничения доступа необходимо указать внутренний интерфейс,
@@ -469,6 +917,13 @@
использовать кэширование для доступа к критичным ресурсам, в частности к
интерфейсу администрирования.
</p>
<p>authcache так же может использоваться для привязки сессий пользователя к ip с
с помощью опции limit
<pre>
autchcache ip,user,pass,limit 120
auth cache strong</pre>
запретит пользователю использовать более одного адреса в течении времени кеширования.
</p>
<li><a name="USERS"><i>Как создать список пользователей</i></a>
<p>
Список пользователей задается с помощью команды users.
@@ -607,6 +1062,74 @@
того, чтобы видеть в логах записи о посещаемых пользвоателем ресурсах и
загружаемых файлах даже в том случае, если он подключается через SOCKS.
</p>
<li><a name="SOCKSREDIR">Как управлять локальными перенаправлениями</a>
<p>
<ul>
<li><a name="REDIR"><i>Q: Для чего это надо?</i></a></li>
<p>
<i>A:</i> Чтобы иметь в логах URL запросов, если пользователь SOCKS пользуется
Web, FTP или POP3.
</p>
<li><a name="REDIRLIMIT"><i>Q: Какие недостатки?</i></a></li>
<p>
<i>A:</i> Перенапраление невозможно для web-серверов или FTP, висящих на
нестандартных портах, для SOCKSv4 не поддрживается авторизация с
паролем (IE поддерживает только SOCKSv4), но при этом IE передает
имя пользователя по SOCKSv4 (имя, с которым пользователь вошел в систему).
Для SOCKSv5 не поддерживается NTLM авторизация, пароли передаются в открытом
тексте.
</p>
<li><a name="REDIRADV"><i>Q: Какие преимущества?</i></a></li>
<p>
<i>A:</i> Достаточно в настройках IE только указать адрес SOCKS прокси. В
больших сетях можно для этого использовать WPAD (автоматическое
обнаружение прокси). В 3proxy достаточно запускать только одну службу
(socks). Если используется только Internet Explorer, то можно
автоматически получать имя пользователя в логах, не запрашивая
логин/пароль.
</p>
<li><a name="REDIRHOW"><i>Q: Как настраивается?</i></a></li>
<p>
<i>A:</i> Указывается parent http proxy со специальным адресом 0.0.0.0 и портом
0. Пример:
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
allow * * * 80,8080-8088
#перенаправить соединения по портам 80 и 8080-8088 в локальный
#http прокси. Вторая команда allow необходима, т.к. контроль доступа
#осуществляется 2 раза - на уровне socks и на уровне HTTP прокси
allow * * * 21,2121
parent 1000 ftp 0.0.0.0 0
allow * * * 21,2121
#перенаправить соединения по портам 21 и 2121 в локальный
#ftp прокси
allow *
#пустить все соединения напрямую
socks</pre>
</p>
<li><a name="REDIINTER"><i>Q: Как взаимодействует с другими правилами в ACL?</i></a></li>
<p>
<i>A:</i> После внутреннего перенаправления правила рассматриваются еще раз за
исключением самого правила с перенаправлением (т.е. обработка правил не
прекращается). Это позволяет сделать дальнейшие перенаправления на
внешний прокси. По этой же причине локальное перенаправление не должно
быть последним правилом (т.е. должно быть еще хотя бы правило allow,
чтобы разрешить внешние соединения через HTTP прокси).
Например,
<pre>
allow * * * 80,8080-8088
parent 1000 http 0.0.0.0 0
#перенаправить во внутренний прокси
allow * * $c:\3proxy\local.nets 80,8080-8088
#разрешить прямой web-доступ к сетям из local.nets
allow * * * 80,8080-8088
parent 1000 http proxy.3proxy.ru 3128
#все остальные веб-запросы перенаправить на внешний прокси-сервер
allow *
#разрешить socks-запросы по другим портам</pre>
</p>
</ul>
<li><a name="ROUNDROBIN"><i>Как организовать балансировку между несоклькими каналами</i></a>
<p>
Сам по себе прокси не может управлять маршрутизацией пакетов сетевого уровня.
@@ -735,33 +1258,26 @@
<br>
amount - объем трафика на указанный период в мегабайтах.
</p>
<li><a name="NETLIST"><i>Как строить списки сетей</i></a>
<li><a name="TRAF">Как пофиксить некорректный подсчет трафика</a>
<p>
Очень часто списки сетей и пользователей бывают достаточно громоздкими.
3proxy не поддерживает создание групп, но позволяет включение файлов. Это
означает, что для удобства администрирования выгодно хранить списки
пользователей и списки сетей в отдельных файлах и при необходимости дать
пользователю доступ к тому или иному ресурсу, править файл со списком
пользователей или сетей вместо того, чтобы править сам файл 3proxy.cfg. В файле
3proxy.cfg файл со списком можно включить с помощью макроса $.
Поскольку в 3proxy есть ограничения на максимальный размер элемента
конфигурации, большие списки следует разбивать на несколько файлов и
использовать несколько записей списка контроля доступом.
В комплекте с 3proxy поставляется утилита dighosts, которая позволяет построить
список сетей по странице Web. Утилита осуществляет поиск адресов на Web-странице
в формате АДРЕС МАСКА или АДРЕС/ДЛИНА. Утилиту dighosts можно вызвать во время
старта 3proxy, используя команду system. Например:
<pre>
system "dighosts http://provider/network.html local.networks"
allow * * $local.networks
allow *
parent 1000 proxy.provider 3128 *
proxy
flush</pre>
В данном случае в файле local.networks генерируется список локальных сетей по
странице networklist.html. Далее используется список контроля доступа для того,
чтобы разрешить локальному прокси-серверу доступ к локальным сетям напрямую,
а все остальные запросы перенаправить на прокси-сервер провайдера.
Следует учитывать, что 3proxy считает трафик только на прикладном уровне и
только проходящий через прокси-сервер. Провайдеры и другие средства учета
трафика считают трафик на сетевом уровне, что уже дает расхождение порядка 10%
за счет информации из заголовков пакетов. Кроме того, часть трафика, как
минимум DNS-разрешения, различный флудовый трафик и т.д. идут мимо прокси.
Уровень "шумового" трафика в Internet сейчас составляет порядка 50KB/день на
каждый реальный IP адрес, но может сильно варьироваться в зависимости от сети,
наличия открытых портов, реакции на ping-запросы и текущего уровня вирусной
активности. По этим причинам, если 3proxy используется чтобы не "выжрать"
трафик, выделенный провайдером, всегда следует делать некий запас порядка
15%.
</p>
<p>
Если на одной с 3proxy машине имеются какие-либо сервисы или
работает пользователь, то их трафик не проходит через proxy-сервер и так же
не будет учтен. Если где-то есть NAT, то клиенты, выходящие через NAT мимо
прокси, так же останутся неучтенными. Если расхождение с провайдером превышает
10% - нужно искать причину именно в этом.
</p>
<li><a name="NSCACHING"><i>Как управлять разрешением имен и кэшированием DNS</i></a>
<p>
@@ -820,19 +1336,6 @@
tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128</pre>
В настройках браузера указывается host.dyndns.example.org:3128.
</p>
<li><a name="DEMANDDIAL"><i>Как устанавливать соединение по требованию</i></a>
<p>
Команда dialer задает программу, которая будет запускаться при
невозможности разрешить имя компьютера, например:
<pre>
dialer "rasdial PROVIDER"</pre>
(описание rasdial можно найти на сервере поддержки Microsoft).
Есть два аспекта: невозможность разрешения имени еще не свидетельствует
об отсутствии соединения (это должна учитывать вызываемая программа),
при использовании nscache имя может разрешиться при отсутствии
соединения. В таких случаях полезно запрашивать заведомо несуществующий
ресурс, например, http://dial.right.now/.
</p>
</ul>
<hr>
<li><a name="CLIENT"><b>Конфигурация клиентов</b></a>
@@ -889,9 +1392,9 @@
прокси-серверы для доступа к разным ресурсам. Эта возможность разбирается в
статьях
<br>Microsoft: Q296591 A Description of the Automatic Discovery Feature
<br><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591">http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591</a>
<br><a href="https://support.microsoft.com/default.aspx?scid=kb;EN-US;296591">http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591</a>
<br>Netscape: Navigator Proxy Auto-Config File Format
<br><a href="http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html">http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html</a>
<br><a href="https://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html">http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html</a>
<li><a name="FTP"><i>Как настраивать FTP клиент</i></a>
<p>
Настройка FTP клиента для работы через SOCKS прокси не отличается от настройки
@@ -947,20 +1450,14 @@
</p>
<li><a name="CAP"><i>Как использовать 3proxy с программой, не поддерживающей работу с прокси-сервером</i></a>
<p>
Можно использовать любую программу-редиректор, например,
<a href="http://www.socks.permeo.com">SocksCAP</a> или
<a href="http://www.freecap.ru">FreeCAP</a>. 3proxy поддерживает исходящие
Можно использовать любую программу-редиректор. 3proxy поддерживает исходящие
и обратные TCP и UDP соединения, но редиректоры могут иметь свои ограничения,
кроме того, некоторые плохо написаные приложения не поддаются "соксификации".
Если программе требуется обращаться к небольшому набору серверов
(например, игровых), то проблему можно решить с помощью портмаппинга.
<li><a name="GAMES"><i>Как использовать 3proxy с играми</i></a>
<p>
Оптимальный варинт - использовать соксификатор (<a href="#CAP">Как использовать
3proxy с программой, не поддерживающей работу с прокси-сервером</a>).
<a href="http://www.freecap.ru/">FreeCap 3.13 </a> проверен с играми на движке
Unreal (включая Unreal Tournament), Half-Life (включая Counter-Strike) и
другими. Если по каким-то причинам соксификатор не работает или недоступен,
Если по каким-то причинам соксификатор не работает или недоступен,
то необходимо использовать отображения портов (обычно игры,
кроме mood-подобных, работают по протоколу UDP, надо использовать udppm).
Нужно иметь ввиду, что для udppm требуется отдельный маппинг для каждого
@@ -985,7 +1482,7 @@
<li><a name="NEWVERSION"><i>Где взять свежую версию</i></a>
<p>
Свежую версию всегда можно взять
<a href="http://3proxy.ru/">здесь</a>. Обратите внимание,
<a href="https://3proxy.ru/">здесь</a>. Обратите внимание,
что в новой версии может измениться порядок лицензирования или команды
конфигурации, поэтому прежде чем устанавливать новую версии программы
обязательно ознакомьтесь с документацией.
@@ -1039,6 +1536,18 @@
<li>50-69 - ошибки перенаправления SOCKS5
<li>70-79 ошибки установки родительского соединения, аналогичны 1x
<li>90-99 - ошибки разрыва соединения
<li>с версии 0.9
<li>90 - неожиданная системная ошибка (не должно происходить)
<li>91 - ошибка poll (не должно происходить)
<li>92 - соединение прервано по таймауту на сетевую операцию (см. timeouts)
<li>93 - соединение прервано по таймауту связанному с рейтлимитом или из-за превышения числа ошибок
<li>94 - клиент или сервер закрыли соединение или произошла сетевая ошибка, остались неотправленные данные
<li>95 - клиент "грязно" закрыл соединение или сетевая ошибка
<li>96 - сервер "грязно" закрыл соединение или сетевая ошибка
<li>97 - клиент и сервер "грязно" закрыли соединение или сетевая ошибка
<li>98 - исчерпан лимит данных сервера (не должно быть в журнале)
<li>99 - исчерпан лимит данных клиента (не должно быть в журнале)
<li>до версии 0.9
<li>90 - ошибка сокета или соединение неожиданно прервано
<li>91 - общий сбой стека TCP/IP
<li>92 - соединение прервано по таймауту
@@ -1062,7 +1571,7 @@
<hr>
<li><a name="QUEST"><b>Как задать вопрос, которого нет в HowTo</b></a>
<p>
Задайте его на <a href="http://3proxy.ru/board3.html">форуме</a>.
Задайте его на <a href="https://github.com/z3APA3A/3proxy/issues">Github</a>.
Только не пытайтесь задавать какие-либо вопросы, если вы просто не поняли этот
HowTo.
</ul>
+3 -4
View File
@@ -1,18 +1,17 @@
<html><title>3proxy documentation</title><body><h2>3proxy documentation</h2>
<a href="securityen.html">Security recommendations</a><br>
<a href="highload.html">Optimizing 3proxy for high loads</a><br>
<a href="howtoe.html">How To (English, very incomplete)</a><br>
<a href="howtor.html">How To (Russian)</a><br>
<a href="faqe.html">FAQ (English)</a><br>
<a href="faqr.html">FAQ (Russian)</a>
<h3>Man pages:</h>
<h3>Man pages:</h3>
<br><A HREF="man8/3proxy.8.html">3proxy.8</A>
<br><A HREF="man8/ftppr.8.html">ftppr.8</A>
<br><A HREF="man8/icqpr.8.html">icqpr.8</A>
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
<br><A HREF="man8/proxy.8.html">proxy.8</A>
<br><A HREF="man8/smtpp.8.html">smtpp.8</A>
<br><A HREF="man8/socks.8.html">socks.8</A>
<br><A HREF="man8/tcppm.8.html">tcppm.8</A>
<br><A HREF="man8/tlspr.8.html">tlspr.8</A>
<br><A HREF="man8/udppm.8.html">udppm.8</A>
<br><A HREF="man3/3proxy.cfg.3.html">3proxy.cfg.3</A>
</body></html>
File diff suppressed because it is too large. Load diff
+221
View File
@@ -0,0 +1,221 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">3proxy</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#SIGNALS">SIGNALS</a><br>
<a href="#FILES">FILES</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#TRIVIA">TRIVIA</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> -
3[APA3A] tiny proxy server, or trivial proxy server, or free
proxy server</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b>
[<i>config_file</i>] <b><br>
3proxy</b> [<i>--install</i>] <b><br>
3proxy</b> [<i>--remove</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> is
a universal proxy server. It can be used to provide internal
users with fully controllable access to external resources
or to provide external users with access to internal
resources. 3proxy is not developed to replace
<b>squid</b>(8), but it can extend the functionality of an
existing caching proxy. It can be used to route requests
between different types of clients and proxy servers. Think
about it as application level gateway with configuration
like hardware router has for network layer. It can establish
multiple gateways with HTTP and HTTPS proxy with FTP over
HTTP support, SOCKS v4, v4.5 and v5, POP3 proxy, UDP and TCP
portmappers. Each gateway is started from the configuration
file like an independent service <b>proxy</b>(8)
<b>socks</b>(8) <b>pop3p</b>(8) <b>tcppm</b>(8)
<b>udppm</b>(8) <b>ftppr</b>(8) <b>dnspr</b> but
<b>3proxy</b> is not a kind of wrapper or superserver for
these daemons. It just has the same code compiled in, but
provides much more functionality. SOCKSv5 implementation
allows you to use 3proxy with any UDP or TCP based client
applications designed without proxy support (with
<i>SocksCAP</i>, <i>FreeCAP</i> or another client-side
redirector under Windows or with a socksification library
under Unix). So you can play your favourite games, listen to
music, exchange files and messages and even accept incoming
connections behind a proxy server.</p>
<p style="margin-left:6%; margin-top: 1em"><i>dnspr</i>
does not exist as an independent service. It&rsquo;s a DNS
caching proxy (it requires <i>nscache</i> and <i>nserver</i>
to be set in the configuration. Only A-records are cached.
Please note that this caching is mostly a &rsquo;hack&rsquo;
and has nothing to do with a real DNS server, but it works
perfectly for SOHO networks.</p>
<p style="margin-left:6%; margin-top: 1em">3proxy supports
access control lists (ACL) like network router. Source and
destination networks and destination port can be specified.
In addition, usernames and gateway action (for example GET
or POST) can be used in ACLs. In order to filter request on
username basis user must be authenticated somehow. There are
few authentication types including password authentication
and authentication by NetBIOS name for Windows clients
(it&acute;s very like ident authentication). Depending on
ACL action request can be allowed, denied or redirected to
another host or to another proxy server or even to a chain
of proxy servers.</p>
<p style="margin-left:6%; margin-top: 1em">It supports
different types of logging: to logfiles, <b>syslog</b>(3)
(only under Unix) or to an ODBC database. Logging format is
tunable to provide compatibility with existing log file
parsers. It makes it possible to use 3proxy with IIS, ISA,
Apache or Squid log parsers.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>config_file</b></p>
<p style="margin-left:15%;">Name of config file. See
<b>3proxy.cfg</b>(3) for configuration file format. Under
Windows, if config_file is not specified, <b>3proxy</b>
looks for a file named <i>3proxy.cfg</i> in the default
location (in the same directory as the executable file and
in the current directory). Under Unix, if no config file is
specified, 3proxy reads configuration from stdin. It makes
it possible to use the 3proxy.cfg file as an executable
script just by setting +x mode and adding <br>
#!/usr/local/3proxy/3proxy <br>
as a first line in 3proxy.cfg</p>
<p style="margin-left:6%;"><b>--install</b></p>
<p style="margin-left:15%;">(Windows NT family only)
install <b>3proxy</b> as a system service</p>
<p style="margin-left:6%;"><b>--remove</b></p>
<p style="margin-left:15%;">(Windows NT family only) remove
<b>3proxy</b> from system services</p>
<h2>SIGNALS
<a name="SIGNALS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Under Unix there
are a few signals <b>3proxy</b> catches. See <b>kill</b>(1).
<b><br>
SIGTERM</b></p>
<p style="margin-left:15%;">clean up connections and
exit</p>
<p style="margin-left:6%;"><b>SIGPAUSE</b></p>
<p style="margin-left:15%;">stop accepting new connections,
on second signal - start and re-read configuration</p>
<p style="margin-left:6%;"><b>SIGCONT</b></p>
<p style="margin-left:15%;">start to accept new
connections</p>
<p style="margin-left:6%;"><b>SIGUSR1</b></p>
<p style="margin-left:15%;">reload configuration</p>
<p style="margin-left:6%; margin-top: 1em">Under Windows,
if <b>3proxy</b> is installed as a service you can use
standard service management to start, stop, pause and
continue the 3proxy service, for example: <b><br>
net start 3proxy <br>
net stop 3proxy <br>
net pause 3proxy <br>
net continue 3proxy</b></p>
<p style="margin-left:6%; margin-top: 1em">Web admin
service can also be used to reload configuration. Use wget
to automate this task.</p>
<h2>FILES
<a name="FILES"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><i>/usr/local/3proxy/3proxy.cfg
(3proxy.cfg)</i></p>
<p style="margin-left:15%;"><b>3proxy</b> configuration
file</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy.cfg(3),
proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
kill(1), syslogd(8), <br>
https://3proxy.org/</p>
<h2>TRIVIA
<a name="TRIVIA"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3APA3A is
pronounced as ``zaraza&acute;&acute;.</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+232
View File
@@ -0,0 +1,232 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">ftppr</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> -
FTP proxy gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b>
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]
[<b>-h</b><i>default_ip[:port]</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> is
FTP gateway service to allow internal users to access
external FTP servers.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Never look for username
authentication.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-h</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Default destination. It&rsquo;s
used if the target address is not specified by the user.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Port. Port proxy listens for
incoming connections. Default is 21.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You can use any
FTP client, regardless of FTP proxy support. For a client
with FTP proxy support, configure <i>internal_ip</i> and
<i>port</i> in the FTP proxy parameters. For clients without
FTP proxy support, use <i>internal_ip</i> and <i>port</i> as
the FTP server. The address of the real FTP server must be
configured as a part of the FTP username. The format for the
username is <i>username</i><b>@</b><i>server</i>, where
<i>server</i> is the address of the FTP server and
<i>username</i> is the user&acute;s login on this FTP
server. The login itself may contain an &acute;@&acute;
sign. Only cleartext authentication is currently
supported.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+232
View File
@@ -0,0 +1,232 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">pop3p</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b> -
POP3 proxy gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b>
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]
[<b>-h</b><i>default_ip[:port]</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b> is
POP3 gateway service to allow internal users to access
external POP3 servers.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Never look for username
authentication.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Port. Port proxy listens for
incoming connections. Default is 110.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-h</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Default destination. It&rsquo;s
used if the target address is not specified by the user.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You can use any
MUA (Mail User Agent) with POP3 support. Set the client to
use <i>internal_ip</i> and <i>port</i> as a POP3 server. The
address of the real POP3 server must be configured as a part
of the POP3 username. The format for the username is
<i>username</i><b>@</b><i>server</i>, where <i>server</i> is
the address of the POP3 server and <i>username</i> is the
user&acute;s login on this POP3 server. The login itself may
contain an &acute;@&acute; sign. Only cleartext
authentication is supported, because challenge-response
authentication (APOP, CRAM-MD5, etc.) requires a challenge
from the server before we know which server to connect
to.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+237
View File
@@ -0,0 +1,237 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">proxy</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> -
HTTP proxy gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b>
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> is
HTTP gateway service with HTTPS and FTP over HTTPS
support.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Never ask for username
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-a</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Anonymous. Hide information
about client.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-a1</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Anonymous. Show fake information
about client.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Port. Port proxy listens for
incoming connections. Default is 3128.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; preceeds
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You should use a
client with HTTP proxy support or configure a router to
redirect HTTP traffic to the proxy (transparent proxy).
Configure the client to connect to <i>internal_ip</i> and
<i>port</i>. HTTPS support allows you to use almost any
TCP-based protocol. If you need to limit clients, use
<b>3proxy</b>(8) instead.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+232
View File
@@ -0,0 +1,232 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">smtpp</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b> -
SMTP proxy gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b>
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]
[<b>-h</b><i>default_ip[:port]</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b> is
SMTP gateway service to allow internal users to access
external SMTP servers.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Never look for username
authentication.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Port. Port proxy listens for
incoming connections. Default is 25.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-h</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Default destination. It&rsquo;s
used if the target address is not specified by the user.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You can use any
MUA (Mail User Agent) with SMTP authentication support. Set
the client to use <i>internal_ip</i> and <i>port</i> as an
SMTP server. The address of the real SMTP server must be
configured as a part of the SMTP username. The format for
the username is <i>username</i><b>@</b><i>server</i>, where
<i>server</i> is the address of the SMTP server and
<i>username</i> is the user&acute;s login on this SMTP
server. The login itself may contain an &acute;@&acute;
sign. Only cleartext authentication is supported, because
challenge-response authentication (CRAM-MD5, SPA, etc.)
requires a challenge from the server before we know which
server to connect to.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+250
View File
@@ -0,0 +1,250 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">socks</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> -
SOCKS 4/4.5/5 gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>socks</b>
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> is
SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to
v4 for server side name resolution) and SOCKSv5. SOCKSv5
specification allows both outgoing and reverse TCP
connections and UDP portmapping.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Never ask for username
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from.
External IP must be specified if you need incoming
connections. By default, the system will decide which
address to use in accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-Ne</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">External NAT address 3proxy
reports to client for CONNECT/BIND. This is external address
of NAT between 3proxy and destination server. By default,
the external address is reported. It&rsquo;s only useful in
the case of IP-IP NAT and does not work with port
translation.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-Ni</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal NAT address 3proxy
reports to client for UDPASSOC. This is external address of
the NAT between 3proxy and the client, client uses to
connect to 3proxy. By default, the internal address is
reported. It&rsquo;s only useful in the case of IP-IP NAT
and does not work with port translation.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Port. Port proxy listens for
incoming connections. Default is 1080.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; preceeds
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You should use a
client with SOCKS support or use some socksification support
(for example <i>SocksCAP</i> or <i>FreeCAP</i>). Configure
client to use <i>internal_ip</i> and <i>port</i>. SOCKS
allows you to use almost any application protocol without
limitation. This implementation also allows you to open
privileged ports on the server (if socks has sufficient
privileges). If you need to control access, use
<b>3proxy</b>(8) instead.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+209
View File
@@ -0,0 +1,209 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">tcppm</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ARGUMENTS">ARGUMENTS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>tcppm</b> -
TCP port mapper</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>tcppm</b>
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
<i>local_port remote_host remote_port</i></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><i><b>tcppm</b></i>
forwards connections from local to remote TCP port</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>ARGUMENTS
<a name="ARGUMENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><i>local_port</i></p>
<p style="margin-left:15%;">- port tcppm accepts
connections on</p>
<p style="margin-left:6%;"><i>remote_host</i></p>
<p style="margin-left:15%;">- IP address of the host the
connection is forwarded to</p>
<p style="margin-left:6%;"><i>remote_port</i></p>
<p style="margin-left:15%;">- remote port the connection is
forwarded to</p>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Any TCP-based
application can be used as a client. Use <i>internal_ip</i>
and <i>local_port</i> as the destination in the client
application. The connection is forwarded to
<i>remote_host</i>:<i>remote_port</i></p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+272
View File
@@ -0,0 +1,272 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">tlspr</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b> -
SNI proxy gateway service</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b>
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-p</b><i>listening_port</i>]
[<b>-P</b><i>destination_port</i>]
[<b>-c</b><i>tls_check_level</i>]
[<b>-i</b><i>internal_ip</i>]
[<b>-e</b><i>external_ip</i>]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b> is
an SNI gateway service (destination host is taken from TLS
handshake). The destination port must be specified via the
-P option (or it may be detected with the Transparent
plugin).</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Never ask for username
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-a</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Anonymous. Hide information
about client.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-a1</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Anonymous. Show fake information
about client.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-p</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">listening_port. Port proxy
listens for incoming connections. Default is 1443.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-P</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">destination_port. Port to
establish outgoing connections. Required unless the
Transparent plugin is used, because the TLS handshake does
not contain port information. Default is 443.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-c</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">TLS_CHECK_LEVEL. 0 (default) -
allow non-TLS traffic to pass, 1 - require TLS, only check
client HELLO packet, 2 - require TLS, check both client and
server HELLO, 3 - require TLS, check that the server sends a
certificate (not compatible with TLS 1.3), 4 - require
mutual TLS, check that the server sends a certificate
request and the client sends a certificate (not compatible
with TLS 1.3)</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">You should use a
client with TLS support or configure a router to redirect
TLS traffic to the proxy (transparent proxy). Configure the
client to connect to <i>internal_ip</i> and <i>port</i>. If
you need to limit clients, use <b>3proxy</b>(8) instead.</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8),
udppm(8), syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+225
View File
@@ -0,0 +1,225 @@
<!-- Creator : groff version 1.24.1 -->
<html>
<head>
</head>
<body>
<h1 align="center">udppm</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ARGUMENTS">ARGUMENTS</a><br>
<a href="#CLIENTS">CLIENTS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>udppm</b> -
UDP port mapper</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><b>udppm</b>
[<b>-ds</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
<i>local_port remote_host remote_port</i></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><i><b>udppm</b></i>
forwards datagrams from local to remote UDP port</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Inetd mode. Standalone service
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Daemonize. Detach service from
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Be silenT. Do not log
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">External address. IP address of
the interface the proxy should initiate datagrams from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts datagrams to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Log. By default logging is to
stdout. If <i>logfile</i> is specified logging is to file.
Under Unix, if &acute;<i>@</i>&acute; precedes
<i>logfile</i>, syslog is used for logging.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-s</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Single packet. By default, only
one client can use the udppm service, but if -s is
specified, only one packet will be forwarded between client
and server. This allows the service to be shared between
multiple clients for single-packet services (for example,
name lookups).</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-S</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Increase or decrease stack size.
You may want to try something like -S8192 if you experience
3proxy crashes.</p></td></tr>
</table>
<h2>ARGUMENTS
<a name="ARGUMENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em"><i>local_port</i></p>
<p style="margin-left:15%;">- port udppm accepts datagrams
on</p>
<p style="margin-left:6%;"><i>remote_host</i></p>
<p style="margin-left:15%;">- IP address of the host
datagrams are forwarded to</p>
<p style="margin-left:6%;"><i>remote_port</i></p>
<p style="margin-left:15%;">- remote port datagrams are
forwarded to</p>
<h2>CLIENTS
<a name="CLIENTS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Any UDP-based
application can be used as a client. Use <i>internal_ip</i>
and <i>local_port</i> as the destination in the client
application. All datagrams are forwarded to
<i>remote_host</i>:<i>remote_port</i></p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">Report all bugs
to <b>3proxy@3proxy.org</b></p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
syslogd(8), <br>
https://3proxy.org/</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:6%; margin-top: 1em">3proxy is
designed by Vladimir 3APA3A Dubrovin
(<i>3proxy@3proxy.org</i>)</p>
<hr>
</body>
</html>
+30 -31
View File
@@ -1,9 +1,9 @@
<h3>3proxy Perl Compatible Regular Expressions (PCRE) plugin</h3>
<h3>3proxy Perl Compatible Regular Expressions (PCRE) Plugin</h3>
This filtering plugin can be used to create matching and replace
rules with regular expressions for client's request, client and
servers header and client and server data. It adds 3 additional
This filtering plugin can be used to create matching and replacement
rules with regular expressions for client requests, client and
server headers, and client and server data. It adds 3 additional
configuration commands:
<pre>
@@ -12,11 +12,11 @@ pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE]
pcre_extend FILTER_ACTION [ACE]
pcre_options OPTION1 [...]
</pre>
pcre - allows to apply some rule for matching
<br>pcre_rewrite - in addition to 'pcre' allows to substitute substrings
<br>pcre_extend - extends ACL of the last pcre or pcre_rewrite comand by
adding additional ACE (like with allow/deny configuration commands).
<br>pcre_options - allows to set matching options. Awailable options are:
pcre - allows applying a rule for matching
<br>pcre_rewrite - in addition to 'pcre', allows substituting substrings
<br>pcre_extend - extends the ACL of the last pcre or pcre_rewrite command by
adding an additional ACE (like with allow/deny configuration commands).
<br>pcre_options - allows setting matching options. Available options are:
PCRE_CASELESS,
PCRE_MULTILINE,
PCRE_DOTALL,
@@ -32,7 +32,7 @@ PCRE_UTF8,
PCRE_NO_AUTO_CAPTURE,
PCRE_NO_UTF8_CHECK,
PCRE_AUTO_CALLOUT,
PCRE_PARTIAL,
PCRE_PARTIAL,
PCRE_DFA_SHORTEST,
PCRE_DFA_RESTART,
PCRE_FIRSTLINE,
@@ -47,32 +47,31 @@ PCRE_BSR_UNICODE
<ul>
<li>TYPE - type of filtered data. May contain one or more
(comma delimited list) values:
(comma-delimited list) values:
<ul>
<li>request - content of client's request e.g. HTTP GET request string.
(known problem: changing request string doesn't change IP of the host to connect)
<li>cliheader - content of client request headers, e.g. HTTP request header.
<li>srvheader - content of server's reply headers, e.g. HTTP status and headers.
<li>clidata - data received from client, e.g. HTTP POST request data
<li>srvdata - data received from server, e.g. HTML page
<li>request - content of the client's request, e.g., the HTTP GET request string.
(known problem: changing the request string doesn't change the IP of the host to connect to)
<li>cliheader - content of the client request headers, e.g., HTTP request headers.
<li>srvheader - content of the server's reply headers, e.g., HTTP status and headers.
<li>clidata - data received from the client, e.g., HTTP POST request data
<li>srvdata - data received from the server, e.g., an HTML page
</ul>
<li>FILTER_ACTION - action on match
<ul>allow - allow this request without checking rest of the given type
of the rules
<li>deny - deny this request without checking rest of the rules
<li>dunno - continue with the rest of rules (useful with pcre_rewrite)
<ul><li>allow - allow this request without checking the rest of the rules for the given type
<li>deny - deny this request without checking the rest of the rules
<li>dunno - continue with the rest of the rules (useful with pcre_rewrite)
</ul>
<li>REGEXP - PCRE (perl) regular expression. Use * if no regexp matching
required.
<li>REWRITE_EXPRESSION - substitution string. May contain perl-style
<li>REGEXP - PCRE (Perl) regular expression. Use * if no regexp matching
is required.
<li>REWRITE_EXPRESSION - substitution string. May contain Perl-style
substrings
(not tested) $1, $2. $0 - means whole matched string. \r and \n may be used
to insert new strings, string may be empty ("").
(not tested) $1, $2. $0 means the whole matched string. \r and \n may be used
to insert new strings; the string may be empty ("").
<li>ACE - access control entry (user names, source IPs, destination IPs,
ports, etc), absolutely identical to allow/deny/bandlimin commands.
Regular expression is only matched if ACL matches connection data.
ports, etc.), absolutely identical to allow/deny/bandlimin commands.
The regular expression is only matched if the ACL matches the connection data.
Warning:
reqular expression doesn't require authentication and can not replace
Regular expressions don't require authentication and cannot replace
authentication and/or allow/deny ACLs.
</ul>
@@ -88,7 +87,7 @@ pcre_extend deny * 192.168.0.1/16
<h4>Download:</h4>
<ul>
<li>Plugin is included into 3proxy 0.6 binary and source distribution
<li>Plugin is included in the 3proxy 0.6 binary and source distribution
<li>Example configuration (by Dennis Garber): <A HREF="NoPornLitest.cfg.txt">NoPornLitest.cfg</A>
</ul>
</li></ul>
+2 -2
View File
@@ -56,7 +56,7 @@ PCRE_BSR_UNICODE
<li>srvdata - данные полученные от сервера, например содержимое HTML-страницы
</ul>
<li>FILTER_ACTION - действие при совпадении. Может принимать значение
<ul>allow - разрешить данный запрос без просмотра дальнейших правил
<ul><li>allow - разрешить данный запрос без просмотра дальнейших правил
<li>deny - запретить данный запрос без просмотра дальнейших правил
<li>dunno - продолжить анализ правил (полезно для pcre_rewrite)
</ul>
@@ -87,4 +87,4 @@ pcre_extend deny * 192.168.0.1/16
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.6
<li>Пример конфигурации (by Dennis Garber): <A HREF="NoPornLitest.cfg.txt">NoPornLitest.cfg</A>
</ul>
</li></ul>
+90 -20
View File
@@ -1,34 +1,104 @@
<h3>3proxy SSL/TLS plugin</h3>
<h3>3proxy SSL/TLS Plugin</h3>
Plugin can be used to transparently decypher SSL/TLS data. Plugin should never be used in production environment due to
potential securiy reasons.
This plugin can be used to transparently decrypt SSL/TLS data, provide TLS encryption for proxy traffic, and authenticate using client certificates.
<pre>
ssl_certcache PATH_TO_CACHE
ssl_mitm
ssl_nomitm
</pre>
ssl_certcache - path to certificates cache. For transparent spoofing cache must contain 3 files: 3proxy.pem - public
self-signed certificates, 3proxy.key - key for public certificates, server.key - this key will be used to generates
spoofed certificates.
Generated certificates will be placed to the same path.
<br>ssl_mitm - spoof certificates for services started below
<h4>For transparent certificate spoofing (MITM):</h4>
<br>ssl_mitm - spoof certificates for services started below. Usage without ssl_client_verify is insecure.
<br>ssl_nomitm - do not spoof certificates for services started below
<h4>To protect traffic to the server (https:// proxy):</h4>
<h4>Example:</h4>
ssl_serv (or ssl_server) - require TLS connection from clients for services below
<br>ssl_noserv (or ssl_noserver) - do not require TLS connection from clients for services below
<h4>To use TLS for upstream connections:</h4>
ssl_cli (or ssl_client) - establish TLS connection to upstream server for services below
<br>ssl_nocli (or ssl_noclient) - do not establish TLS connection to upstream server for services below
<h4>Parameters:</h4>
<br><b>ssl_server_cert</b> /path/to/cert - Server certificate (should not be self-signed and must contain an Alternative Name) for ssl_serv
<br><b>ssl_server_key</b> /path/to/key - Server certificate key for ssl_server_cert or generated MITM certificate
<br><b>ssl_client_cert</b> /path/to/cert - Client certificate for authentication on upstream server (used with ssl_cli)
<br><b>ssl_client_key</b> /path/to/key - Client certificate key for ssl_client_cert
<br><b>ssl_client_ciphersuites</b> ciphersuites_list - TLS client ciphers for TLS 1.3, e.g., ssl_client_ciphersuites TLS_AES_128_GCM_SHA256
<br><b>ssl_server_ciphersuites</b> ciphersuites_list - TLS server ciphers for TLS 1.3
<br><b>ssl_client_cipher_list</b> ciphers_list - TLS client ciphers for TLS 1.2 and below, e.g., ssl_client_cipher_list ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
<br><b>ssl_server_cipher_list</b> ciphers_list - TLS server ciphers for TLS 1.2 and below
<br><b>ssl_client_min_proto_version</b> tls_version - TLS client minimum TLS version (e.g., TLSv1.2)
<br><b>ssl_server_min_proto_version</b> tls_version - TLS server minimum TLS version (e.g., TLSv1.2)
<br><b>ssl_client_max_proto_version</b> tls_version - TLS client maximum TLS version (e.g., TLSv1.2)
<br><b>ssl_server_max_proto_version</b> tls_version - TLS server maximum TLS version (e.g., TLSv1.2)
<br><b>ssl_client_verify</b> - verify the certificate for the upstream server in TLS client functionality (used with ssl_mitm or ssl_cli)
<br><b>ssl_client_no_verify</b> - do not verify the certificate for the upstream server in TLS client functionality (default)
<br><b>ssl_server_verify</b> - require client certificate authentication (mTLS) for ssl_serv
<br><b>ssl_server_no_verify</b> - do not require client certificate (default)
<br><b>ssl_server_ca_file</b> /path/to/cafile - CA certificate file for MITM
<br><b>ssl_server_ca_key</b> /path/to/cakey - key for ssl_server_ca_file MITM CA
<br><b>ssl_server_ca_dir</b> /path/to/cadir - CA directory for ssl_server_verify
<br><b>ssl_server_ca_store</b> /path/to/castore - CA store for ssl_server_verify (OpenSSL 3.0+)
<br><b>ssl_client_ca_file</b> /path/to/cafile - CA file for ssl_client_verify
<br><b>ssl_client_ca_dir</b> /path/to/cadir - CA directory for ssl_client_verify
<br><b>ssl_client_ca_store</b> /path/to/castore - CA store for ssl_client_verify (OpenSSL 3.0+)
<br><b>ssl_client_sni</b> hostname - SNI hostname to send to upstream server (overrides the requested hostname)
<br><b>ssl_client_alpn</b> protocol1 protocol2 ... - ALPN protocols to negotiate with upstream server (e.g., ssl_client_alpn h2 http/1.1)
<br><b>ssl_client_mode</b> mode - when to establish TLS connection: 0 - on connect (default), 1 - after authentication, 2 - before data
<br><b>ssl_certcache</b> /path/to/cache/ - location for the generated MITM certificates cache, optional if ssl_server_ca_file / ssl_server_ca_key are configured.
The cache may contain 3 files: 3proxy.pem - public
self-signed certificates (used if ssl_server_ca_file is not configured),
3proxy.key - key for public certificates, used if ssl_server_ca_key is not configured, server.key - this key is used if ssl_server_key is not configured to generate
spoofed certificates. If server.key is absent, 3proxy.key is used to generate certificates.
Generated certificates are placed in the same path.
<h4>MITM example:</h4>
<pre>
plugin /path/to/SslPlugin.dll ssl_plugin
ssl_certcache /path/to/cache/
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_ca_file /path/to/cafile
ssl_server_ca_key /path/to/cakey
ssl_mitm
proxy -p3128
ssl_nomitm
proxy -p3129
</pre>
MITM's traffic with a spoofed certificate for the port 3128 proxy.
<h4>Download:</h4>
<ul>
<li>Plugin included into 3proxy 0.8
</ul>
<h4>https:// proxy example:</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_cert path_to_cert
ssl_server_key path_to_key
ssl_serv
proxy -p33128
ssl_noserv
proxy -p3128
</pre>
Creates an https:// proxy on port 33128 and an http:// proxy on port 3128
<h4>TLS client example (connect to upstream via TLS):</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_client_cert /path/to/client.crt
ssl_client_key /path/to/client.key
ssl_client_verify
ssl_client_ca_file /path/to/ca.crt
ssl_cli
proxy -p3128
</pre>
Creates an HTTP proxy that connects to upstream servers via TLS with client certificate authentication.
<h4>mTLS example (require client certificate):</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_cert /path/to/server.crt
ssl_server_key /path/to/server.key
ssl_server_ca_file /path/to/ca.crt
ssl_server_verify
ssl_serv
proxy -p3128
</pre>
Creates an https:// proxy that requires client certificate authentication.
&copy; Vladimir Dubrovin, License: BSD style
+91 -22
View File
@@ -1,32 +1,101 @@
<h3>Плагин SSL/TLS для 3proxy</h3>
<h3>3proxy SSL/TLS плагин</h3>
Плагин используется для транспарентной дешифровки SSL-трафика с подменой сертификата.
Плагин не должен использоваться в рабочем окружении, т.к. его использование дает возможность обхода проверок SSL.
Плагин можно использовать для перехвата и дешифровки SSL/TLS трафика, для шифрования трафика прокси-сервера и аутентификации с помощью клиентских сертификатов.
<h4>Для прозрачного перехвата трафика (MITM):</h4>
<br>ssl_mitm - подменять сертификаты для сервисов, запущенных ниже. Использование без ssl_client_verify небезопасно.
<br>ssl_nomitm - не подменять сертификаты для сервисов, запущенных ниже.
<h4>Для защиты трафика прокси-сервера (https:// proxy):</h4>
ssl_serv (или ssl_server) - требовать TLS-соединение от клиентов для сервисов, запущенных ниже
<br>ssl_noserv (или ssl_noserver) - не требовать TLS-соединение от клиентов для сервисов, запущенных ниже
<h4>Для использования TLS при соединении к вышестоящему серверу:</h4>
ssl_cli (или ssl_client) - устанавливать TLS-соединение к вышестоящему серверу для сервисов, запущенных ниже
<br>ssl_nocli (или ssl_noclient) - не устанавливать TLS-соединение к вышестоящему серверу для сервисов, запущенных ниже
<h4>Параметры:</h4>
<br><b>ssl_server_cert</b> /path/to/cert - сертификат сервера (не должен быть самоподписанным, должен содержать альтернативные имена) для ssl_serv
<br><b>ssl_server_key</b> /path/to/key - ключ сертификата сервера для ssl_server_cert или сгенерированного MITM-сертификата
<br><b>ssl_client_cert</b> /path/to/cert - клиентский сертификат для аутентификации на вышестоящем сервере (используется с ssl_cli)
<br><b>ssl_client_key</b> /path/to/key - ключ клиентского сертификата для ssl_client_cert
<br><b>ssl_client_ciphersuites</b> ciphersuites_list - наборы шифров TLS для TLS 1.3 (клиент), пример: ssl_client_ciphersuites TLS_AES_128_GCM_SHA256
<br><b>ssl_server_ciphersuites</b> ciphersuites_list - наборы шифров TLS для TLS 1.3 (сервер)
<br><b>ssl_client_cipher_list</b> ciphers_list - наборы шифров TLS для TLS 1.2 и ниже (клиент), пример: ssl_client_cipher_list ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
<br><b>ssl_server_cipher_list</b> ciphers_list - наборы шифров TLS для TLS 1.2 и ниже (сервер)
<br><b>ssl_client_min_proto_version</b> tls_version - минимальная версия TLS клиента (например, ssl_client_min_proto_version TLSv1.2)
<br><b>ssl_server_min_proto_version</b> tls_version - минимальная версия TLS сервера
<br><b>ssl_client_max_proto_version</b> tls_version - максимальная версия TLS клиента
<br><b>ssl_server_max_proto_version</b> tls_version - максимальная версия TLS сервера
<br><b>ssl_client_verify</b> - проверять сертификат вышестоящего сервера (используется с ssl_mitm или ssl_cli)
<br><b>ssl_client_no_verify</b> - не проверять сертификат вышестоящего сервера (по умолчанию)
<br><b>ssl_server_verify</b> - требовать клиентский сертификат (mTLS) для ssl_serv
<br><b>ssl_server_no_verify</b> - не требовать клиентский сертификат (по умолчанию)
<br><b>ssl_server_ca_file</b> /path/to/cafile - файл CA-сертификата для MITM
<br><b>ssl_server_ca_key</b> /path/to/cakey - ключ CA-сертификата ssl_server_ca_file для MITM
<br><b>ssl_server_ca_dir</b> /path/to/cadir - директория CA-сертификатов для ssl_server_verify
<br><b>ssl_server_ca_store</b> /path/to/castore - хранилище CA-сертификатов для ssl_server_verify (OpenSSL 3.0+)
<br><b>ssl_client_ca_file</b> /path/to/cafile - файл CA-сертификатов для ssl_client_verify
<br><b>ssl_client_ca_dir</b> /path/to/cadir - директория CA-сертификатов для ssl_client_verify
<br><b>ssl_client_ca_store</b> /path/to/castore - хранилище CA-сертификатов для ssl_client_verify (OpenSSL 3.0+)
<br><b>ssl_client_sni</b> hostname - SNI-имя хоста для отправки вышестоящему серверу (переопределяет запрошенное имя хоста)
<br><b>ssl_client_alpn</b> протокол1 протокол2 ... - ALPN-протоколы для согласования с вышестоящим сервером (например, ssl_client_alpn h2 http/1.1)
<br><b>ssl_client_mode</b> режим - когда устанавливать TLS-соединение: 0 - при подключении (по умолчанию), 1 - после аутентификации, 2 - перед передачей данных
<br><b>ssl_certcache</b> /path/to/cache/ - расположение кеша сгенерированных MITM-сертификатов. Кеш может содержать
файлы 3proxy.pem, 3proxy.key, server.key, которые используются как ssl_server_ca_file,
ssl_server_ca_key и ssl_server_key соответственно, если они не заданы. Если server.key не задан,
3proxy.key используется для генерации серверного сертификата.
<h4>Пример MITM:</h4>
<pre>
ssl_certcache PATH_TO_CACHE
ssl_mitm
ssl_nomitm
</pre>
ssl_certcache - путь к кэшу сертификатов. Для транспорентной подмены сертификатов в кэше должно находиться 3 файла: 3proxy.pem - публичный
самоподписанный сертификат, 3proxy.key - ключ от этого сертификата, server.key - ключ с которым будут генерироваться подменные сертификаты.
Сгенерированные сертификаты будут помещаться в этот же каталог.
<br>ssl_mitm - подменять сертитфикаты для запущенных ниже сервисов
<br>ssl_nomitm - не подменять сертитфикаты для запущенных ниже сервисов
<h4>Пример:</h4>
<pre>
plugin /path/to/SslPlugin.dll ssl_plugin
ssl_certcache /path/to/cache/
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_ca_file /path/to/cafile
ssl_server_ca_key /path/to/cakey
ssl_mitm
proxy -p3128
ssl_nomitm
proxy -p3129
</pre>
Перехватывается трафик в прокси на порту 3128.
<h4>Загрузить:</h4>
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.8
</ul>
<h4>Пример конфигурации https:// прокси:</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_cert path_to_cert
ssl_server_key path_to_key
ssl_serv
proxy -p33128
ssl_noserv
proxy -p3128
</pre>
На порту 33128 создается https:// прокси, на порту 3128 - http:// прокси.
<h4>Пример TLS-клиента (соединение к вышестоящему серверу через TLS):</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_client_cert /path/to/client.crt
ssl_client_key /path/to/client.key
ssl_client_verify
ssl_client_ca_file /path/to/ca.crt
ssl_cli
proxy -p3128
</pre>
Создается HTTP-прокси, который соединяется с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату.
<h4>Пример mTLS (требование клиентского сертификата):</h4>
<pre>
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_server_cert /path/to/server.crt
ssl_server_key /path/to/server.key
ssl_server_ca_file /path/to/ca.crt
ssl_server_verify
ssl_serv
proxy -p3128
</pre>
Создается https:// прокси, требующий аутентификацию по клиентскому сертификату.
&copy; Vladimir Dubrovin, License: BSD style
+7 -7
View File
@@ -1,16 +1,16 @@
<h3>3proxy strings substitution plugin</h3>
May be used to make interface more pretty or to translate proxy server
messages to different language. All messages are taken from proxy.c and
moved to external text file (e.g. rus.3ps). On the moment of
writing there are 15 sections. Sections are delimited with "[end]".
<h3>3proxy Strings Substitution Plugin</h3>
This may be used to make the interface more attractive or to translate proxy server
messages to a different language. All messages are taken from proxy.c and
moved to an external text file (e.g., rus.3ps). At the time of
writing, there are 15 sections. Sections are delimited with "[end]".
<h4>Example:</h4>
<pre>plugin "StringsPlugin.dll" start c:\3proxy\bin\rus.3ps
</pre>
<h4>Download:</h4>
<ul>
<li>Plugin is included into 3proxy 0.6 binary and source distribution
<li>Plugin is included in the 3proxy 0.6 binary and source distribution
</li></ul>
©Kirill Lopuchov
&copy; Kirill Lopuchov
+2 -2
View File
@@ -1,4 +1,4 @@
<h3>Плагин подмены строк 3proxy</h3>
<h3>Плагин подмены строк 3proxy</h3>
Используется, в частности, для руссификации сообщений выдаваемых 3proxy.
Для корректной работы требуется 0.6 версия 3proxy.
@@ -15,4 +15,4 @@ plugin "StringsPlugin.dll" start c:\3proxy\bin\rus-win1251.3ps
<h4>Загрузить:</h4>
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.6
</ul>
</li></ul>
+22 -22
View File
@@ -1,15 +1,15 @@
<h3>3proxy traffic correction plugin</h3>
3proxy logs and counts traffic on application level, while provider usually does
it on network or link level. It's significant if you use 3proxy for billing,
especially in case where network packets are small, e.g. network games.
<h3>3proxy Traffic Correction Plugin</h3>
3proxy logs and counts traffic at the application level, while providers usually do
so at the network or link level. This is significant if you use 3proxy for billing,
especially in cases where network packets are small, e.g., online games.
<p>
This plugin attempts to correct 3proxy computations to approximate network or
link level traffic by using either fixed coefficients by port number or
attempting to predict number and sizes of network packets.
This plugin attempts to correct 3proxy's computations to approximate network or
link-level traffic by using either fixed coefficients by port number or
by attempting to predict the number and sizes of network packets.
</p><h4>Usage:</h4>
<ol>
<li>Extract TrafficPlugin.dll to the same folder with 3proxy executable.
</li><li>Start plugin in 3proxy.cfg with
<li>Extract TrafficPlugin.dll to the same folder as the 3proxy executable.
</li><li>Start the plugin in 3proxy.cfg with:
<pre>plugin TrafficPlugin.dll start
</pre>
</li><li>Add correction rules:
@@ -17,36 +17,36 @@ attempting to predict number and sizes of network packets.
FOR FIXED COEFFICIENTS MODE:
<pre>trafcorrect m &lt;service&gt; &lt;target port&gt; &lt;coefficient&gt;
</pre>
where &lt;service&gt; - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p, * matches "any".
<br> &lt;target port&gt; - target port, * matches any
where &lt;service&gt; - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p; * matches "any".
<br> &lt;target port&gt; - target port; * matches any
<br> &lt;coefficient&gt; - coefficient to multiply traffic for this port.
<br>
FOR PACKET HEADER PREDICTION MODE
FOR PACKET HEADER PREDICTION MODE:
<pre>trafcorrect p &lt;service&gt; &lt;tcp/udp&gt; &lt;target port&gt; [empty packet size]
</pre>
tcp ot udp - transport level protocol to apply rule
tcp or udp - transport-level protocol to apply the rule to
<br>
empty packet size - average size of "empty" packet, that is sum of average network/transport headers.
You can use network sniffer, such is Ethereal to discover it. Usually packet size
is 42 for UDP and
empty packet size - average size of an "empty" packet, i.e., the sum of average network/transport headers.
You can use a network sniffer such as Ethereal to discover it. Usually, the packet size
is 42 for UDP and
<br>Modes can be mixed.
<br>Plugin creates a list of rules, first matching rule will be applied.
<br>The plugin creates a list of rules; the first matching rule will be applied.
</li></ol>
For any mode plugin approximates traffic, logged or counted amount is not exact.
For any mode, the plugin approximates traffic; the logged or counted amount is not exact.
<h4>Example:</h4>
<pre>plugin "TrafficPlugin.dll" start
trafcorrect m socks5 6112 4.5
trafcorrect m socks5 * 1.1
</pre>
wrong usage:
Wrong usage:
<pre>trafcorrect m socks5 * 1.1
trafcorrect m socks5 6112 4.5
</pre>
second rule will never be applied.
The second rule will never be applied.
<h4>Download:</h4>
<ul>
<li>Plugin is included into 3proxy 0.6 binary and source distribution
<li>Plugin is included in the 3proxy 0.6 binary and source distribution
</li></ul>
©Maslov Michael aka Flexx(rus)
&copy; Maslov Michael aka Flexx(rus)
+3 -3
View File
@@ -1,4 +1,4 @@
<h3>Плагин коррекции траффика 3proxy</h3>
<h3>Плагин коррекции траффика 3proxy</h3>
Как известно, 3proxy считает траффик не сетевой, а прикладной.
Обычно прикладной траффик немного меньше (примерно на 10%) чем сетевой,
однако в некоторых случаях, например когда пользователи сети играют в
@@ -46,7 +46,7 @@ trafcorrect p &lt;сервис&gt; &lt;tcp/udp&gt; &lt;исходящий пор
Когда происходит окончание соединения выполняется первое подходящее правило.
</ol>
Подсчет трафика в любом режиме не является точным, это некоторая аппроксимация
позволяющаяподсчитать трафик с точностью до нескольких процентов.
позволяющая подсчитать трафик с точностью до нескольких процентов.
<h4>Пример:</h4>
<pre>
@@ -66,4 +66,4 @@ trafcorrect m socks5 6112 4.5
<h4>Загрузить:</h4>
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.6
</ul>
</li></ul>
+12 -9
View File
@@ -1,9 +1,9 @@
<h3>3proxy TransparentPlugin plugin (Linux only)</h3>
<h3>3proxy TransparentPlugin (Linux/BSD only)</h3>
Plugin can turn 3proxy into transparent proxy for virtually any TCP-based protocol
This plugin can turn 3proxy into a transparent proxy for virtually any TCP-based protocol
and use all 3proxy features - redirections, parent proxies, ACLs, traffic limitations,
etc. TransparentPlugin plugin takes destination IP:port from Linux and uses this
information as a target IP in proxy. An example of usage:
etc. The TransparentPlugin takes the destination IP:port from Linux and uses this
information as the target IP in the proxy. An example usage:
<pre>
plugin /path/to/TransparentPlugin.ld.so transparent_plugin
@@ -13,16 +13,19 @@ allow * * * 80
parent 1000 http 0.0.0.0 0
allow *
parent 1000 socks5 SOCKS5_IP SOCKS5_PORT USER PASSWORD
transparent
tcppm -iLOCAL_IP 12345 127.0.0.1 11111
notransparent
proxy
</pre>
Now, any TCP traffic transparently redirected to port 12345 will be routed via
parent SOCKSv5 proxy and logged, all URLs for web requests are visible in logs.
Paremeters '127.0.0.1 11111' in this case are not used and are overwritten by
destination IP:port for each transparent connection.
the parent SOCKSv5 proxy and logged; all URLs for web requests are visible in logs.
The parameters '127.0.0.1 11111' in this case are not used and are overwritten by
the destination IP:port for each transparent connection.
<h4>Download:</h4>
<ul>
<li>Plugin included into 3proxy 0.8
</ul>
<li>Plugin is included in 3proxy 0.8
</li></ul>
&copy; Vladimir Dubrovin, License: BSD style
+5 -2
View File
@@ -1,4 +1,4 @@
<h3>Плагин TransparentPlugin 3proxy (только для Linux)</h3>
<h3>Плагин TransparentPlugin 3proxy (только для Linux/BSD)</h3>
Плагин превращает 3proxy в транспарентный прокси для практически любых TCP-соединений
и позволяет прозрачно для клиентов использовать весь фунционал прокси - редиректоры,
@@ -15,7 +15,10 @@ allow * * * 80
parent 1000 http 0.0.0.0 0
allow *
parent 1000 socks5 SOCKS5_IP SOCKS5_PORT USER PASSWORD
transparent
tcppm -iLOCAL_IP 12345 127.0.0.1 11111
notransparent
proxy
</pre>
Теперь любые TCP-соединения транспарентно перенаправленные в локальный порт 12345
будут прологгированы и перенаправлены в родительский SOCKSv5 proxy, при этом для
@@ -25,6 +28,6 @@ HTTP-запросов по порту TCP/80 будут видны параме
<h4>Загрузить:</h4>
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.8
</ul>
</li></ul>
&copy; Vladimir Dubrovin, License: BSD style
+14 -14
View File
@@ -1,33 +1,33 @@
<h3>3proxy Windows Authentication plugin</h3>
Support for cleartext authentication against Windows domain or local Windows account.
<h3>3proxy Windows Authentication Plugin</h3>
Support for cleartext authentication against a Windows domain or local Windows account.
<h4>Usage:</h4>
<ol>
<li>Extract WindowsAuthentication.dll to the same folder with 3proxy executable.
<li>Create 3ProxyAllowedGroup - Windows system group allowed to use proxy.
You can choose different group name. Group can be either local or
<li>Extract WindowsAuthentication.dll to the same folder as the 3proxy executable.
<li>Create 3ProxyAllowedGroup - a Windows system group allowed to use the proxy.
You can choose a different group name. The group can be either local or
Active Directory. Every account allowed to use 3proxy must be included in this
group either directly or through group nesting.
<li>Configure plugin with 'plugin' command in 3proxy.cfg, e.g.:
<li>Configure the plugin with the 'plugin' command in 3proxy.cfg, e.g.:
<pre><code>
plugin &quot;WindowsAuthentication.dll&quot; WindowsAuthentication &quot;3ProxyAllowedGroup&quot;
</code></pre>
<br>WindowsAuthentication.dll - location of DLL, if DLL is located in different folder
from 3proxy.exe you must specify complete path to DLL here. 3ProxyAllowedGroup - Windows
<br>WindowsAuthentication.dll - location of the DLL; if the DLL is located in a different folder
from 3proxy.exe, you must specify the complete path to the DLL here. 3ProxyAllowedGroup - the Windows
system group allowed to use 3proxy.
After plugin is loaded, 'windows' authentication type is supported.
After the plugin is loaded, the 'windows' authentication type is supported.
<li>Configure 'auth windows' for services that require Windows authentication.
<li>It's recommended you also configure authentication caching (see 'authcache'),
to prevent excessive workload for domain controller. Example:
<li>It is recommended that you also configure authentication caching (see 'authcache')
to prevent excessive workload on the domain controller. Example:
<pre>
authcache user,pass 900
auth cache windows
</pre>
<li>NTLM authentication is not currently supported for plugins, you should use proxy -n key to disable it.
<li>NTLM authentication is not currently supported for plugins; you should use the proxy -n switch to disable it.
</ol>
<h4>Download:</h4>
<ul>
<li>Plugin is included into 3proxy 0.6 binary and source distribution
</ul>
<li>Plugin is included in the 3proxy 0.6 binary and source distribution
</li></ul>
@@ -1,4 +1,4 @@
<h3>Плагин аутентификации Windows для 3proxy</h3>
<h3>Плагин аутентификации Windows для 3proxy</h3>
Поддерживается только аутентификация открытым текстом в домене или на локальной машине Windows.
<h4>Использование</h4>
<ol>
@@ -31,5 +31,5 @@ auth windows
<h4>Загрузить:</h4>
<ul>
<li>Плагин включен в дистрибутив 3proxy 0.6
</ul>
</li></ul>
+24 -26
View File
@@ -1,35 +1,33 @@
<h3>3proxy security considirations</h3>
</ul>
<h3>3proxy Security Considerations</h3>
<ul>
<li>Never install 3proxy suid. If you need it to run suid write some
wrapper with fixed configuration file.
<li>Make configuration file only available to account 3proxy starts with.
<li>Under Windows if 3proxy is used as service create new
unprivileged local account without "logon locally" right. Assign this account
to 3proxy service.
<li>Under unix use chroot to jail 3proxy (make sure files included in
configuration file after 'chroot' command, if any, are available from jail)
<li>Under Unix, either start 3proxy with unprivileged account or, if you need
<li>Never install 3proxy suid. If you need it to run suid, write a
wrapper with a fixed configuration file.
<li>Make the configuration file accessible only to the account 3proxy starts with.
<li>Under Windows, if 3proxy is used as a service, create a new
unprivileged local account without "logon locally" rights. Assign this account
to the 3proxy service.
<li>Under Unix, use chroot to jail 3proxy (make sure files included in
the configuration file after the 'chroot' command, if any, are available from within the jail).
<li>Under Unix, either start 3proxy with an unprivileged account or, if you need
some privileged ports to be used by 3proxy, use setgid/setuid commands inside
3proxy.cfg immediately after last occurance of service binded to
privileged port in configuration file (setgid must preceed setuid).
<li>Allways use full paths in configuration file
3proxy.cfg immediately after the last occurrence of a service bound to a
privileged port in the configuration file (setgid must precede setuid).
<li>Always use full paths in the configuration file.
<li>Try to avoid 'strong' authentication, because only cleartext
authentication method is currently available.
authentication is currently available.
<li>Always specify internal and external interfaces.
<li>Always limit connections to internal network and localhost (to 127.0.0.1 and
all interfaces) with ACLs. Be carefull, because BIND command in SOCKS requies
BIND method with external interface IP address to be allowed.
<li> Before 3proxy 0.8 always use nserver and nscache under Unix, overwise DoS attack is possible
with unreachable DNS server (because gethostbyname will block over threads).
<li>Keep logs in secure location, because some confidential information from
user's request can be logged.
<li>Always limit connections to the internal network and localhost (to 127.0.0.1 and
all interfaces) with ACLs. Be careful, because the BIND command in SOCKS requires the
BIND method with the external interface IP address to be allowed.
<li>Before 3proxy 0.8, always use nserver and nscache under Unix; otherwise, a DoS attack is possible
with an unreachable DNS server (because gethostbyname will block other threads).
<li>Keep logs in a secure location, because some confidential information from
user requests can be logged.
<li>Use -xyz+A character filtering sequences for 'logformat', especially with
ODBC logging to prevent SQL and log record injections.
<li>Immediately report all service crashes to developers
ODBC logging, to prevent SQL and log record injections.
<li>Immediately report all service crashes to the developers.
<li>Participate in code audit :)
</ol>
</ul>
<p>
+6507 -1738
View File
File diff suppressed because it is too large. Load diff
+39 -39
View File
@@ -3,26 +3,26 @@ KOI8-R
Kirill Lopuchov, lopuchov at mail ru
<3proxy>
Довольно часто перед системным администратором встает задача предоставить доступ к Internet-ресурсам группе пользователей (небольшой офис, Internet-кафе). Данную задачу можно решить, настроив на Internet-шлюзе proxy-сервер, службу NAT (трансляция сетевых адресов) или раздать каждому пользователю реальный IP адрес.
Довольно часто перед системным администратором встает задача предоставить доступ к Internet-ресурсам группе пользователей (небольшой офис, Internet-кафе). Данную задачу можно решить, настроив на Internet-шлюзе proxy-сервер, службу NAT (трансляция сетевых адресов) или раздать каждому пользователю реальный IP адрес.
Давайте рассмотрим самый простой способ подключения - установку proxy-сервера. Традиционно для этих целей применяется популярный proxy Squid, но не всегда бывает необходимость в столь тяжеловатой программе :), да и в squid отсутствуют такие иногда необходимые вещи как SOCKS4/5-сервер, TCP/UP порт-маппинг. Поэтому вторым номером хочется представить вашему вниманию PROXY-сервер, под названием "3proxy" (http://3proxy.ru/), разработанный нашим программистом из г. Нижний Новгород. Одним из главных его достоинств является компактность и высокая переносимость. Код сервера написан так, что легко компилируется как для Win9x/2000/XP так и для Linux и FreeBSD.
Давайте рассмотрим самый простой способ подключения - установку proxy-сервера. Традиционно для этих целей применяется популярный proxy Squid, но не всегда бывает необходимость в столь тяжеловатой программе :), да и в squid отсутствуют такие иногда необходимые вещи как SOCKS4/5-сервер, TCP/UP порт-маппинг. Поэтому вторым номером хочется представить вашему вниманию PROXY-сервер, под названием "3proxy" (http://3proxy.ru/), разработанный нашим программистом из г. Нижний Новгород. Одним из главных его достоинств является компактность и высокая переносимость. Код сервера написан так, что легко компилируется как для Win9x/2000/XP так и для Linux и FreeBSD.
Сервер поддерживает следующие возможности:
Сервер поддерживает следующие возможности:
HTTP(S) proxy;
FTP over HTTP proxy;
SOCKS4/5 proxy;
POP3 proxy;
TCP & UDP маппинг портов;
листы доступа к различным службам и адресам;
ограничение пропускной способности канала каждого пользователя (чтобы пользователь не съел весь канал, качая кучу файлов в несколько потоков :) );
ограничение трафика пользователя на день, неделю и месяц;
авторизацию пользователей ко всем proxy-службам по имени и паролю или по ip адресам;
ведение журналов через ODBC (по-моему, такого нет ни в одном proxy) и syslog и т. д.
TCP & UDP маппинг портов;
листы доступа к различным службам и адресам;
ограничение пропускной способности канала каждого пользователя (чтобы пользователь не съел весь канал, качая кучу файлов в несколько потоков :) );
ограничение трафика пользователя на день, неделю и месяц;
авторизацию пользователей ко всем proxy-службам по имени и паролю или по ip адресам;
ведение журналов через ODBC (по-моему, такого нет ни в одном proxy) и syslog и т. д.
К недостаткам можно отнести отсутствие кэширования информации :-|. Но в последнее время Inernet-контент становится все более динамичным (то есть не поддающийся кэшированию) и может быть для кого-то экономия в 25% трафика за счет его кэширования не будет столь критична. Для тех пользователей, кому она может оказаться критичной, автор предлагает использовать цепочку из 2-х серверов и в качестве кэша такие сервера как wwwoffle или им подобные, либо ждать появления поддержки кеша в 3proxy :)
К недостаткам можно отнести отсутствие кэширования информации :-|. Но в последнее время Inernet-контент становится все более динамичным (то есть не поддающийся кэшированию) и может быть для кого-то экономия в 25% трафика за счет его кэширования не будет столь критична. Для тех пользователей, кому она может оказаться критичной, автор предлагает использовать цепочку из 2-х серверов и в качестве кэша такие сервера как wwwoffle или им подобные, либо ждать появления поддержки кеша в 3proxy :)
Установка
Установка
# wget http://3proxy.ru/current/3proxy.tgz
# tar -xvzf 3proxy.tgz
@@ -35,64 +35,64 @@ TCP & UDP
# touch /usr/local/3proxy/3proxy.cfg
# chown -R nobody:nogroup /usr/local/3proxy
Далее приведу небольшой пример конфигурационного файла 3proxy.cfg с
комментариями, более подробную информацию по конфигурированию можно
найти файле 3proxy.cfg.sample или в
Далее приведу небольшой пример конфигурационного файла 3proxy.cfg с
комментариями, более подробную информацию по конфигурированию можно
найти файле 3proxy.cfg.sample или в
HowTo http://3proxy.ru/howtor.asp
и FAQ http://3proxy.ru/faqr.asp
и FAQ http://3proxy.ru/faqr.asp
-------------3proxy.cfg-------------
# ВНИМАНИЕ !! не должны быть пробелов
# перед любыми опциями конфигурации !!
# ВНИМАНИЕ !! не должны быть пробелов
# перед любыми опциями конфигурации !!
# ip-адрес DNS-сервера провайдера или локального
# ip-адрес DNS-сервера провайдера или локального
nserver 127.0.0.1
timeouts 1 5 30 60 180 1800 15 60
# Создаем двух пользователей vasia, petia и vova
# и назначаем им пароли 24555, 14656 и 45455 соответственно
# Создаем двух пользователей vasia, petia и vova
# и назначаем им пароли 24555, 14656 и 45455 соответственно
users vasia:CL:24555
users petia:CL:14656
users vova:CL:45455
# Лог-файл со списком запросов пользователей
# будет создаваться каждый день новый
# Лог-файл со списком запросов пользователей
# будет создаваться каждый день новый
log /usr/local/3proxy/logs/3proxy.log D
logformat "%d-%m-%Y %H:%M:%S %U %C:%c %R:%r %O %I %T"
# Внешний интерфейс,
# через который будут уходить запросы от сервера
# Внешний интерфейс,
# через который будут уходить запросы от сервера
external 10.1.1.1
# ip-адрес интерфейса, на котором будут приниматься
# запросы от клиентов
# ip-адрес интерфейса, на котором будут приниматься
# запросы от клиентов
internal 192.168.1.1
# Устанавливаем тип авторизации по имени и паролю
# Устанавливаем тип авторизации по имени и паролю
auth strong
# Разрешаем доступ к портам 80,8080-8088
# Разрешаем доступ к портам 80,8080-8088
allow * * * 80,8080-8088
# Расскоментировать секцию parent, если у вас есть прокси верхнего
# уровня и заменить ip, порт, имя пользователя и пароль на свои значения
# Расскоментировать секцию parent, если у вас есть прокси верхнего
# уровня и заменить ip, порт, имя пользователя и пароль на свои значения
# parent 1000 http 192.168.0.1 8080 username passwd
# allow *
# Запускаем службу HTTP-proxy на порту (3128) и
# (-n) c отключенной NTLM-авторизацией)
# Запускаем службу HTTP-proxy на порту (3128) и
# (-n) c отключенной NTLM-авторизацией)
proxy -p3128 -n
# Ограничиваем толшину канала для пользователей
# vasia и petia в 20000 bps,
# а для vova 10000 bps
# Ограничиваем толшину канала для пользователей
# vasia и petia в 20000 bps,
# а для vova 10000 bps
bandlimin 20000 vasia,petia
bandlimin 10000 vova
# Запускаем сервер от пользователя nobody
# (возможно в вашей ОС uid и gid пользователя nobody
# будут другими. Для их определения воспользуйтесь коммандой id nobody)
# Запускаем сервер от пользователя nobody
# (возможно в вашей ОС uid и gid пользователя nobody
# будут другими. Для их определения воспользуйтесь коммандой id nobody)
setgid 65534
setuid 65534
------------------------------------
После того как мы создали конфигурационный файл сервера, запускаем 3proxy командой:
После того как мы создали конфигурационный файл сервера, запускаем 3proxy командой:
/usr/local/3proxy/3proxy /usr/local/3proxy/3proxy.cfg
+17 -17
View File
@@ -2,9 +2,9 @@ KOI8-R
Kirill Lopuchov, lopuchov at mail ru
÷ÅÄÅÎÉÅ ÌÏÇÏ× ÓÅÒ×ÅÒÁ × SQL-ÂÁÚÅ ÉÍÅÅÔ Ó×ÏÉ ÐÒÉÅÍÕÝÅÓÔ×Á ÐÅÒÅÄ ÏÂÙÞÎÙÍÉ ÔÅËÓÔÏ×ÙÍÉ ÆÁÊÌÁÍÉ. 3proxy ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÅÄÅÎÉÅ ÌÏÇÏ× ÞÅÒÅÚ ODBC-ÍÅÎÅÄÖÅÒ × ÌÀÂÏÊ ÂÁÚÅ ÄÁÎÎÙÈ, ÉÍÅÀÝÉÈ ODBC-ÄÒÁÊ×ÅÒ. üÔÏÔ ÍÅÎÅÄÖÅÒ ÓÔÁÌ ÓÔÁÎÄÁÒÔÏÍ ÄÅ-ÆÁËÔÏ × ÓÒÅÄÅ Windows, ÞÅÇÏ, Ë ÓÏÖÁÌÅÎÉÀ, ÎÅ ÓËÁÖÅÛØ ÐÒÏ Unix. ðÏÜÔÏÍÕ ÄÁÌÅÅ ÒÁÓÓÍÏÔÒÉÍ ÎÁ ÐÒÉÍÅÒÅ FreeBSD ÎÁÓÔÒÏÊËÕ ×ÅÄÅÎÉÑ ÌÏÇÏ× × ÂÁÚÅ SQLite. üÔÁ ÂÁÚÁ ÄÁÎÎÙÈ ×ÙÂÒÁÎÁ × ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ ÐÏÔÏÍÕ, ÞÔÏ ÏÎÁ ÐÒÏÓÔÁ × ÕÓÔÁÎÏ×ËÅ É ÎÁÓÔÒÏËÅ (× ÐÒÉÎÃÉÐÅ ÎÁÓÔÒÏÊËÁ ×ÅÄÅÎÉÑ ÌÏÇÏ× × ÌÀÂÏÊ ÄÒÕÇÏÊ ÂÁÚÅ mysql ÉÌÉ postgresql ÏÔÌÉÞÁÅÔÓÑ ÔÏÌØËÏ ÎÁÓÔÒÏÊËÏÊ ÅÇÏ odbc-ÄÒÁÊ×ÅÒÁ)
Ведение логов сервера в SQL-базе имеет свои приемущества перед обычными текстовыми файлами. 3proxy поддерживает ведение логов через ODBC-менеджер в любой базе данных, имеющих ODBC-драйвер. Этот менеджер стал стандартом де-факто в среде Windows, чего, к сожалению, не скажешь про Unix. Поэтому далее рассмотрим на примере FreeBSD настройку ведения логов в базе SQLite. Эта база данных выбрана в качестве примера потому, что она проста в установке и настроке (в принципе настройка ведения логов в любой другой базе mysql или postgresql отличается только настройкой его odbc-драйвера)
õÓÔÁÎÁ×ÌÉ×ÁÅÍ SQLite
Устанавливаем SQLite
wget http://www.sqlite.org/sqlite-2.8.14.tar.gz
tar -xvzf sqlite-2.8.14.tar.gz
cd sqlite
@@ -12,7 +12,7 @@ cd sqlite
gmake
gmake install
õÓÔÁÎÁ×ÌÉ×ÁÅÍ iODBC ÍÅÎÅÄÖÅÒ
Устанавливаем iODBC менеджер
wget http://www.iodbc.org/libiodbc-3.51.2.tar.gz
tar -xvzf libiodbc-3.51.2.tar.gz
cd libiodbc-3.51.2
@@ -20,24 +20,24 @@ cd libiodbc-3.51.2
make
make install
õÓÔÁÎÁ×ÌÉ×ÁÅÍ odbc ÄÒÁÊ×ÅÒ SQLite
Устанавливаем odbc драйвер SQLite
wget http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.62.tar.gz
tar -xvzf sqliteodbc-0.62.tar.gz
cd sqliteodbc-0.62
./configure
åÓÌÉ Õ ×ÁÓ ÓËÒÉÐÔ configure ×ÙÄÁÌ ÏÛÉÂËÕ :
Если у вас скрипт configure выдал ошибку :
(configure: error: SQLite library too old)
ÔÏ ÅÅ ÍÏÖÎÏ ÐÏÐÒÏÂÏ×ÁÔØ ÏÂÏÊÔÉ, ×ÓÔÁ×É× (SQLITE_COMPILE=1
× ÓÔÒ. 5092 ÐÏÓÌÅ ÕÓÌÏ×ÉÑ if endif) × ÆÁÊÌÅ configure
то ее можно попробовать обойти, вставив (SQLITE_COMPILE=1
в стр. 5092 после условия if endif) в файле configure
make
make install
äÁÌÅÅ ÎÁÓÔÒÁÉ×ÁÅÍ ÚÁÐÉÓÉ ÄÌÑ iODBC ÍÅÎÅÄÖÅÒÁ ×
ÆÁÊÌÁÈ /etc/odbcinst.ini É /etc/odbc.ini
Далее настраиваем записи для iODBC менеджера в
файлах /etc/odbcinst.ini и /etc/odbc.ini
îÁÓÔÒÁÉ×ÁÅÍ odbc ÄÒÁÊ×ÅÒ
Настраиваем odbc драйвер
--------------/etc/odbcinst.ini-------------
[ODBC Drivers]
SQLite=Installed
@@ -46,8 +46,8 @@ SQLite=Installed
Driver=/usr/local/lib/libsqliteodbc.so
---------------------------------------
óÏÚÄÁÅÍ DSN ÄÌÑ ÂÁÚÙ c ÉÍÅÎÅÍ "sqlite", ËÏÔÏÒÁÑ ÂÕÄÅÔ
ÒÁÓÐÏÌÁÇÁÔØÓÑ × ËÁÔÁÌÏÇÅ: /usr/local/3proxy/logs.db
Создаем DSN для базы c именем "sqlite", которая будет
располагаться в каталоге: /usr/local/3proxy/logs.db
--------------/etc/odbc.ini----------------
[ODBC Data Sources]
@@ -61,8 +61,8 @@ Database=/usr/local/3proxy/logs.db
Timeout=2000
---------------------------------------
óÏÚÄÁÅÍ ÂÁÚÕ ÄÌÑ ÌÏÇÏ× É ÔÁÂÌÉÃÕ × ÆÏÒÍÁÔÅ (logformat
ÓÍ. ÏÐÉÓÁÎÉÅ × 3proxy.cfg.sample )
Создаем базу для логов и таблицу в формате (logformat
см. описание в 3proxy.cfg.sample )
sqlite /usr/local/3proxy/logs.db
@@ -79,7 +79,7 @@ sqlite>create table log (
...>);
äÏÂÁ×ÌÑÅÍ ÓÌÅÄÕÀÝÉÅ ÚÁÐÉÓÉ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ 3proxy.cfg
Добавляем следующие записи в конфигурационный файл 3proxy.cfg
---------------3proxy.cfg-----------------
log &sqlite
@@ -88,12 +88,12 @@ l_descr)
values ('%d-%m-%Y', '%H:%M:%S', '%U', '%N', %I, %O, '%T')"
------------------------------------------
CÏÂÒÁÔØ 3proxy c ÐÏÄÄÒÅÖËÏÊ iODBC, ÄÌÑ ÜÔÏÇÏ × Makefile.unix ÐÏÍÅÎÑÔØ
Cобрать 3proxy c поддрежкой iODBC, для этого в Makefile.unix поменять
CFLAGS = -Wall -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DWITH_STD_MALLOC -I/usr/local/include
LIBS = -L /usr/local/lib -lodbc
É ÄÁÔØ ËÏÍÁÎÄÙ
и дать команды
make clean
make -f Makefile.unix
+8 -8
View File
@@ -1,6 +1,6 @@
Eugene: Re: 3proxy 0.6 + iODBC + PostgreSQL 22.11.2007 19:04:23
Наконец-то я разобрался и запустил.
1. Я использовал пакет unixODBC.
Наконец-то я разобрался и запустил.
1. Я использовал пакет unixODBC.
2. /etc/unixODBC/odbc.ini
[proxy]
Description = PostgreSQL ODBC driver
@@ -12,7 +12,7 @@ ServerName = localhost
Description = PostgreSQL ODBC driver
Driver = /usr/local/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
4. Собирал вручную psqlodbc-08.02.0500, слитый с postgresql.org (получился psqlodbcw.so).
4. Собирал вручную psqlodbc-08.02.0500, слитый с postgresql.org (получился psqlodbcw.so).
5. 3proxy.conf
log &proxy,logger,123
logformat "LINSERT INTO logger (ldatetime,username,userip,trafin,trafout,service,host,port,
@@ -20,9 +20,9 @@ url) VALUES ('%Y-%m-%d %H:%M:%S','%U','%C',
'%I','%O','%N',
'%n','%r','%T');"
То есть пароли и логины в odbc.ini прописывать не надо - система падает на драйвере ODBC.
Использовать libiodbc тоже не надо - система падает на libiodbc.so.
То есть пароли и логины в odbc.ini прописывать не надо - система падает на драйвере ODBC.
Использовать libiodbc тоже не надо - система падает на libiodbc.so.
Все вышесказанное справедливо для unixODBC + psqlodbc производства postgresql.org, как с -DSAFESQL, так и без оного.
С myodbc + unixODBC проблем не наблюдалось никаких.
Шаманство, в общем ;)
Все вышесказанное справедливо для unixODBC + psqlodbc производства postgresql.org, как с -DSAFESQL, так и без оного.
С myodbc + unixODBC проблем не наблюдалось никаких.
Шаманство, в общем ;)
+27 -27
View File
@@ -1,4 +1,4 @@
.TH 3proxy "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH 3proxy "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B 3proxy
\- 3[APA3A] tiny proxy server, or trivial proxy server, or free proxy
@@ -14,18 +14,18 @@ server
.RI [ \-\-remove ]
.SH DESCRIPTION
.B 3proxy
is universal proxy server. It can be used to provide internal users wuth
is a universal proxy server. It can be used to provide internal users with
fully controllable access to external resources or to provide external
users with access to internal resources. 3proxy is not developed to replace
.BR squid (8),
but it can extend functionality of existing cashing proxy.
but it can extend the functionality of an existing caching proxy.
It can be used to route requests between different types of clients and proxy
servers. Think about it as application level
gateway with configuration like hardware router has for network layer.
It can establish multiple
gateways with HTTP and HTTPS proxy with FTP over HTTP support, SOCKS v4,
v4.5 and v5, POP3 proxy, UDP and TCP portmappers. Each gateway is started
from configuration file like independant service
from the configuration file like an independent service
.BR proxy (8)
.BR socks (8)
.BR pop3p (8)
@@ -35,24 +35,24 @@ from configuration file like independant service
.BR dnspr
but
.BR 3proxy
is not a kind of wrapper or superserver for this daemons. It just has same
is not a kind of wrapper or superserver for these daemons. It just has the same
code compiled in, but provides much more functionality. SOCKSv5
implementatation allows to use 3proxy with any UDP or TCP based client
implementation allows you to use 3proxy with any UDP or TCP based client
applications designed without
proxy support (with
.IR SocksCAP ,
.I FreeCAP
or another client-side redirector under Windows of with socksification library
under Unix). So you can play your favourite games, listen music, exchange
files and messages and even accept incoming connections behind proxy server.
or another client-side redirector under Windows or with a socksification library
under Unix). So you can play your favourite games, listen to music, exchange
files and messages and even accept incoming connections behind a proxy server.
.PP
.I dnspr
does not exist as independant service. It\' DNS caching proxy (it requires
does not exist as an independent service. It's a DNS caching proxy (it requires
.I nscache
and
.I nserver
to be set in configuration. Only A-records are cached. Please note, the
this caching is mostly a 'hack' and has nothing to do with real
to be set in the configuration. Only A-records are cached. Please note that
this caching is mostly a 'hack' and has nothing to do with a real
DNS server, but it works perfectly for SOHO networks.
.PP
@@ -65,9 +65,9 @@ NetBIOS name for Windows clients (it\'s very like ident authentication).
Depending on ACL action request can be allowed, denied or redirected to another
host or to another proxy server or even to a chain of proxy servers.
.PP
It supports different types of logging: to logfiles,
It supports different types of logging: to logfiles,
.BR syslog (3)
(only under Unix) or to ODBC database. Logging format is turnable to provide
(only under Unix) or to an ODBC database. Logging format is tunable to provide
compatibility with existing log file parsers. It makes it possible to use
3proxy with IIS, ISA, Apache or Squid log parsers.
.SH OPTIONS
@@ -77,12 +77,12 @@ Name of config file. See
.BR 3proxy.cfg (3)
for configuration file format. Under Windows, if config_file is not specified,
.BR 3proxy
looks for file named
looks for a file named
.I 3proxy.cfg
in the default location (in same directory with executable file and in current
in the default location (in the same directory as the executable file and in the current
directory). Under Unix, if no config file is specified, 3proxy reads
configuration from stdin. It makes it possible to use 3proxy.cfg file as
executable script just by setting +x mode and adding
configuration from stdin. It makes it possible to use the 3proxy.cfg file as
an executable script just by setting +x mode and adding
.br
#!/usr/local/3proxy/3proxy
.br
@@ -98,28 +98,28 @@ as a system service
.BR 3proxy
from system services
.SH SIGNALS
Under Unix there are few signals
Under Unix there are a few signals
.BR 3proxy
catches. See
.BR kill (1).
.TP
.B SIGTERM
cleanup connections and exit
clean up connections and exit
.TP
.B SIGPAUSE
stop to accept new connections, on second signal - start and re-read
stop accepting new connections, on second signal - start and re-read
configuration
.TP
.B SIGCONT
start to accept new conenctions
start to accept new connections
.TP
.B SIGUSR1
reload configuration
.PP
Under Windows, if
.BR 3proxy
is installed as service you can standard service management to start, stop,
pause and continue 3proxy service, for example:
is installed as a service you can use standard service management to start, stop,
pause and continue the 3proxy service, for example:
.br
.BR "net start 3proxy"
.br
@@ -138,14 +138,14 @@ wget to automate this task.
configuration file
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy.cfg(3), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
kill(1), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH TRIVIA
3APA3A is pronounced as \`\`zaraza\'\'.
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+445 -264
View File
File diff suppressed because it is too large. Load diff
+21 -21
View File
@@ -1,4 +1,4 @@
.TH ftppr "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH ftppr "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B ftppr
\- FTP proxy gateway service
@@ -19,7 +19,7 @@ servers.
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
@@ -28,17 +28,17 @@ Be silenT. Do not log start/stop/accept error records.
Never look for username authentication.
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -h
Default destination. It's used if targed address is not specified by user.
Default destination. It's used if the target address is not specified by the user.
.TP
.B -p
Port. Port proxy listens for incoming connections. Default is 21.
@@ -48,7 +48,7 @@ Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
precedes
.IR logfile ,
syslog is used for logging.
.TP
@@ -56,32 +56,32 @@ syslog is used for logging.
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH CLIENTS
You can use any FTP client, regardless of FTP proxy support. For client with
FTP proxy support configure
You can use any FTP client, regardless of FTP proxy support. For a client with
FTP proxy support, configure
.I internal_ip
and
.IR port
in FTP proxy parameters.
For clients without FTP proxy support use
in the FTP proxy parameters.
For clients without FTP proxy support, use
.I internal_ip
and
.IR port
as FTP server. Address of real FTP server must be configured as a part of
FTP username. Format for username is
as the FTP server. The address of the real FTP server must be configured as a part of
the FTP username. The format for the username is
.IR username \fB@ server ,
where
.I server
is address of FTP server and
is the address of the FTP server and
.I username
is user\'s login on this FTP server. Login itself may contain \'@\' sign.
is the user\'s login on this FTP server. The login itself may contain an \'@\' sign.
Only cleartext authentication is currently supported.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
-80
View File
@@ -1,80 +0,0 @@
.TH icqpr "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.SH NAME
.B icqpr
\- ICQ (AOL OSCAR) proxy
.SH SYNOPSIS
.BR "icqpr " [ -d ]
.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
.IB \fR[ -i internal_ip\fR]
.IB \fR[ -e external_ip\fR]
.I local_port remote_host remote_port
.SH DESCRIPTION
.B icqpr
forwards ICQ connections from local to remote ICQ host. Most usual is
.B icqpr 5190 login.icq.com 5190
Also, icqpr adds UIN / AOL screen name as a username. It makes it possible
to control user's access to ICQ/AOL by UIN/screen name (use
.B auth useronly
in 3proxy).
.SH OPTIONS
.TP
.B -I
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
.IR logfile ,
syslog is used for logging.
.TP
.B -S
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH ARGUMENTS
.TP
.I local_port
- port icqpr accepts connection
.TP
.I remote_host
- IP address of the host connection is forwarded to
.TP
.I remote_port
- remote port connection is forwarded to
.SH CLIENTS
You can use any ICQ/AOL client where server address configuration is supported
or spoof login server name (e.g. login.icq.com) with IP address of proxy server
via DNS record or hosts file. Transparent redirection is also possible. Use
.I internal_ip
and
.I local_port
as a destination in client application. Connection is forwarded to
.IR remote_host : remote_port
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.SH SEE ALSO
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
+20 -20
View File
@@ -1,4 +1,4 @@
.TH pop3p "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH pop3p "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B pop3p
\- POP3 proxy gateway service
@@ -19,7 +19,7 @@ servers.
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
@@ -28,27 +28,27 @@ Be silenT. Do not log start/stop/accept error records.
Never look for username authentication.
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -p
Port. Port proxy listens for incoming connections. Default is 110.
.TP
.B -h
Default destination. It's used if targed address is not specified by user.
Default destination. It's used if the target address is not specified by the user.
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
precedes
.IR logfile ,
syslog is used for logging.
.TP
@@ -56,28 +56,28 @@ syslog is used for logging.
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH CLIENTS
You can use any MUA (Mail User Agent) with POP3 support. Set client to use
You can use any MUA (Mail User Agent) with POP3 support. Set the client to use
.I internal_ip
and
.IR port
as a POP3 server. Address of real POP3 server must be configured as a part of
POP3 username. Format for username is
as a POP3 server. The address of the real POP3 server must be configured as a part of
the POP3 username. The format for the username is
.IR username \fB@ server ,
where
.I server
is address of POP3 server and
is the address of the POP3 server and
.I username
is user\'s login on this POP3 server. Login itself may contain \'@\' sign.
is the user\'s login on this POP3 server. The login itself may contain an \'@\' sign.
Only cleartext authentication is supported, because challenge-response
authentication (APOP, CRAM-MD5, etc) requires challenge from server before
we know which server to connect.
authentication (APOP, CRAM-MD5, etc.) requires a challenge from the server before
we know which server to connect to.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+14 -14
View File
@@ -1,4 +1,4 @@
.TH proxy "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH proxy "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B proxy
\- HTTP proxy gateway service
@@ -17,7 +17,7 @@ is HTTP gateway service with HTTPS and FTP over HTTPS support.
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
@@ -26,14 +26,14 @@ Be silenT. Do not log start/stop/accept error records.
Never ask for username authentication
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -a
Anonymous. Hide information about client.
@@ -57,22 +57,22 @@ syslog is used for logging.
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH CLIENTS
You should use client with HTTP proxy support or configure router to redirect
HTTP traffic to proxy (transparent proxy). Configure client to connect to
You should use a client with HTTP proxy support or configure a router to redirect
HTTP traffic to the proxy (transparent proxy). Configure the client to connect to
.I internal_ip
and
.IR port .
HTTPS support allows to use almost any TCP based protocol. If you need to
HTTPS support allows you to use almost any TCP-based protocol. If you need to
limit clients, use
.BR 3proxy (8)
instead.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+20 -20
View File
@@ -1,4 +1,4 @@
.TH smtpp "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH smtpp "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B smtpp
\- SMTP proxy gateway service
@@ -19,7 +19,7 @@ servers.
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
@@ -28,27 +28,27 @@ Be silenT. Do not log start/stop/accept error records.
Never look for username authentication.
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -p
Port. Port proxy listens for incoming connections. Default is 25.
.TP
.B -h
Default destination. It's used if targed address is not specified by user.
Default destination. It's used if the target address is not specified by the user.
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
precedes
.IR logfile ,
syslog is used for logging.
.TP
@@ -57,28 +57,28 @@ Increase or decrease stack size. You may want to try something like -S8192 if yo
crashes.
.SH CLIENTS
You can use any MUA (Mail User Agent) with SMTP authentication support.
Set client to use
Set the client to use
.I internal_ip
and
.IR port
as a SMTP server. Address of real SMTP server must be configured as a part of
SMTP username. Format for username is
as an SMTP server. The address of the real SMTP server must be configured as a part of
the SMTP username. The format for the username is
.IR username \fB@ server ,
where
.I server
is address of SMTP server and
is the address of the SMTP server and
.I username
is user\'s login on this SMTP server. Login itself may contain \'@\' sign.
is the user\'s login on this SMTP server. The login itself may contain an \'@\' sign.
Only cleartext authentication is supported, because challenge-response
authentication (CRAM-MD5, SPA, etc) requires challenge from server before
we know which server to connect.
authentication (CRAM-MD5, SPA, etc.) requires a challenge from the server before
we know which server to connect to.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+27 -14
View File
@@ -1,4 +1,4 @@
.TH socks "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH socks "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B socks
\- SOCKS 4/4.5/5 gateway service
@@ -19,7 +19,7 @@ outgoing and reverse TCP connections and UDP portmapping.
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
@@ -28,14 +28,27 @@ Be silenT. Do not log start/stop/accept error records.
Never ask for username authentication
.TP
.B -e
External address. IP address of interface proxy should initiate connections
External address. IP address of the interface the proxy should initiate connections
from. External IP must be specified if you need incoming connections.
By default system will deside which address to use in accordance
with routing table.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -Ne
External NAT address 3proxy reports to client for CONNECT/BIND.
This is external address of NAT between 3proxy and destination server.
By default, the external address is reported. It's only useful in the case
of IP-IP NAT and does not work with port translation.
.TP
.B -Ni
Internal NAT address 3proxy reports to client for UDPASSOC.
This is external address of the NAT between 3proxy and the client, client
uses to connect to 3proxy.
By default, the internal address is reported. It's only useful in the case
of IP-IP NAT and does not work with port translation.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -p
Port. Port proxy listens for incoming connections. Default is 1080.
@@ -53,7 +66,7 @@ syslog is used for logging.
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH CLIENTS
You should use client with SOCKS support or use some socksification support
You should use a client with SOCKS support or use some socksification support
(for example
.I SocksCAP
or
@@ -62,18 +75,18 @@ Configure client to use
.I internal_ip
and
.IR port .
SOCKS allows to use almost any application protocol without limitation. This
implementation also allows to open priviledged port on server (if socks has
sufficient privileges). If you need to control access use
SOCKS allows you to use almost any application protocol without limitation. This
implementation also allows you to open privileged ports on the server (if socks has
sufficient privileges). If you need to control access, use
.BR 3proxy (8)
instead.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+17 -17
View File
@@ -1,4 +1,4 @@
.TH tcppm "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH tcppm "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B tcppm
\- TCP port mapper
@@ -17,27 +17,27 @@ forwards connections from local to remote TCP port
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
.TP
.B -e
External address. IP address of interface proxy should initiate connections
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
precedes
.IR logfile ,
syslog is used for logging.
.TP
@@ -47,27 +47,27 @@ crashes.
.SH ARGUMENTS
.TP
.I local_port
- port tcppm accepts connection
- port tcppm accepts connections on
.TP
.I remote_host
- IP address of the host connection is forwarded to
- IP address of the host the connection is forwarded to
.TP
.I remote_port
- remote port connection is forwarded to
- remote port the connection is forwarded to
.SH CLIENTS
Any TCP based application can be used as a client. Use
Any TCP-based application can be used as a client. Use
.I internal_ip
and
.I local_port
as a destination in client application. Connection is forwarded to
as the destination in the client application. The connection is forwarded to
.IR remote_host : remote_port
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+85
View File
@@ -0,0 +1,85 @@
.TH tlspr "8" "May 2024" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B tlspr
\- SNI proxy gateway service
.SH SYNOPSIS
.BR "tlspr " [ -d ][ -a ]
.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
.IB \fR[ -p listening_port\fR]
.IB \fR[ -P destination_port\fR]
.IB \fR[ -c tls_check_level\fR]
.IB \fR[ -i internal_ip\fR]
.IB \fR[ -e external_ip\fR]
.SH DESCRIPTION
.B tlspr
is an SNI gateway service (destination host is taken from TLS handshake). The destination port must be specified via the -P option (or it may be detected with the Transparent plugin).
.SH OPTIONS
.TP
.B -I
Inetd mode. Standalone service only.
.TP
.B -d
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
.TP
.B -u
Never ask for username authentication
.TP
.B -e
External address. IP address of the interface the proxy should initiate connections
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address the proxy accepts connections to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -a
Anonymous. Hide information about client.
.TP
.B -a1
Anonymous. Show fake information about client.
.TP
.B -p
listening_port. Port proxy listens for incoming connections. Default is 1443.
.TP
.B -P
destination_port. Port to establish outgoing connections. Required unless the Transparent plugin is used, because the TLS handshake does not contain port information. Default is 443.
.TP
.B -c
TLS_CHECK_LEVEL. 0 (default) - allow non-TLS traffic to pass, 1 - require TLS, only check client HELLO packet, 2 - require TLS, check both client and server HELLO, 3 - require TLS, check that the server sends a certificate (not compatible with TLS 1.3), 4 - require mutual TLS, check that the server sends a certificate request and the client sends a certificate (not compatible with TLS 1.3)
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
precedes
.IR logfile ,
syslog is used for logging.
.TP
.B -S
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
crashes.
.SH CLIENTS
You should use a client with TLS support or configure a router to redirect
TLS traffic to the proxy (transparent proxy). Configure the client to connect to
.I internal_ip
and
.IR port .
If you need to limit clients, use
.BR 3proxy (8)
instead.
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.org )
+20 -20
View File
@@ -1,9 +1,9 @@
.TH udppm "8" "January 2016" "3proxy 0.8" "Universal proxy server"
.TH udppm "8" "January 2019" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B udppm
\- UDP port mapper
.SH SYNOPSIS
.BR "pop3p " [ -ds ]
.BR "udppm " [ -ds ]
.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
.IB \fR[ -i internal_ip\fR]
.IB \fR[ -e external_ip\fR]
@@ -17,35 +17,35 @@ forwards datagrams from local to remote UDP port
Inetd mode. Standalone service only.
.TP
.B -d
Daemonise. Detach service from console and run in the background.
Daemonize. Detach service from console and run in the background.
.TP
.B -t
Be silenT. Do not log start/stop/accept error records.
.TP
.B -e
External address. IP address of interface proxy should initiate datagrams
from.
By default system will deside which address to use in accordance
with routing table.
External address. IP address of the interface the proxy should initiate datagrams
from.
By default, the system will decide which address to use in accordance
with the routing table.
.TP
.B -i
Internal address. IP address proxy accepts datagrams to.
By default connection to any interface is accepted. It\'s usually unsafe.
Internal address. IP address the proxy accepts datagrams to.
By default, connections to any interface are accepted. It\'s usually unsafe.
.TP
.B -l
Log. By default logging is to stdout. If
.I logfile
is specified logging is to file. Under Unix, if
.RI \' @ \'
preceeds
precedes
.IR logfile ,
syslog is used for logging.
.TP
.B -s
Single packet. By default only one client can use udppm service, but
if -s is specified only one packet will be forwarded between client and server.
It allows to share service between multiple clients for single packet services
(for example name lookups).
Single packet. By default, only one client can use the udppm service, but
if -s is specified, only one packet will be forwarded between client and server.
This allows the service to be shared between multiple clients for single-packet services
(for example, name lookups).
.TP
.B -S
Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
@@ -53,7 +53,7 @@ crashes.
.SH ARGUMENTS
.TP
.I local_port
- port udppm accepts datagrams
- port udppm accepts datagrams on
.TP
.I remote_host
- IP address of the host datagrams are forwarded to
@@ -61,19 +61,19 @@ crashes.
.I remote_port
- remote port datagrams are forwarded to
.SH CLIENTS
Any UDP based application can be used as a client. Use
Any UDP-based application can be used as a client. Use
.I internal_ip
and
.I local_port
as a destination in client application. All datagrams are forwarded to
as the destination in the client application. All datagrams are forwarded to
.IR remote_host : remote_port
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.ru
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
http://3proxy.ru/
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir 3APA3A Dubrovin
.RI ( 3proxy@3proxy.ru )
.RI ( 3proxy@3proxy.org )
+16 -16
View File
@@ -95,7 +95,7 @@ value {\n
[end]
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />\n
<pre><font size='-2'><b>
(c)3APA3A, Владимир Дубровин и <A href='http://3proxy.ru/'>3proxy.ru</A>\n
(c)3APA3A, Владимир Дубровин и <A href='https://3proxy.ru/'>3proxy.ru</A>\n
</b></font>\n
</td></tr></table></body></html>
[end]
@@ -112,7 +112,7 @@ value {\n
[/--admin--]
[--proxy--]
HTTP/1.0 400 Bad Request\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>400 Bad Request</title></head>\n
@@ -122,7 +122,7 @@ Content-type: text/html; charset=utf-8\n
</html>\n
[end]
HTTP/1.0 502 Bad Gateway\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>502 Bad Gateway</title></head>\n
@@ -131,7 +131,7 @@ Content-type: text/html; charset=utf-8\n
</body></html>\n
[end]
HTTP/1.0 503 Service Unavailable\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>503 Service Unavailable</title></head>\n
@@ -140,7 +140,7 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n
[end]
HTTP/1.0 503 Service Unavailable\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>503 Service Unavailable</title></head>\n
@@ -149,7 +149,7 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n
[end]
HTTP/1.0 501 Not Implemented\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>501 Not Implemented</title></head>\n
@@ -158,7 +158,7 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n
[end]
HTTP/1.0 502 Bad Gateway\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>502 Bad Gateway</title></head>\n
@@ -167,7 +167,7 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n",
[end]
HTTP/1.0 500 Internal Error\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>500 Internal Error</title></head>\n
@@ -177,7 +177,7 @@ Content-type: text/html; charset=utf-8\n
[end]
HTTP/1.0 407 Proxy Authentication Required\n
Proxy-Authenticate: Basic realm="proxy", encoding="utf-8"\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>407 Proxy Authentication Required</title></head>\n
@@ -191,7 +191,7 @@ HTTP/1.0 200 Connection established\n
Content-Type: text/html\n\n
[end]
HTTP/1.0 404 Not Found\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>404 Not Found</title></head>\n
@@ -200,7 +200,7 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n
[end]
HTTP/1.0 403 Forbidden\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>403 Access Denied</title></head>\n
@@ -212,7 +212,7 @@ Content-type: text/html; charset=utf-8\n
HTTP/1.0 407 Proxy Authentication Required\n
Proxy-Authenticate: NTLM\n
Proxy-Authenticate: basic realm="proxy", encoding="utf-8"\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>407 Proxy Authentication Required</title></head>\n
@@ -221,18 +221,18 @@ Content-type: text/html; charset=utf-8\n
</h3></body></html>\n
[end]
HTTP/1.0 407 Proxy Authentication Required\n
Proxy-Connection: keep-alive\n
Connection: keep-alive\n
Content-Length: 0\n
Proxy-Authenticate: NTLM
[end]
HTTP/1.0 403 Forbidden\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=us-ascii\n
\n
<pre>
[end]
HTTP/1.0 503 Service Unavailable\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>503 Service Unavailable</title></head>\n
@@ -242,7 +242,7 @@ Content-type: text/html; charset=utf-8\n
[end]
HTTP/1.0 401 Authentication Required\n
WWW-Authenticate: basic realm="FTP Server", encoding="utf-8"\n
Proxy-Connection: close\n
Connection: close\n
Content-type: text/html; charset=utf-8\n
\n
<html><head><title>401 FTP Server requires authentication</title></head>\n
+3 -31
View File
@@ -1,32 +1,4 @@
#!/usr/local/etc/3proxy/bin/3proxy
daemon
pidfile /usr/local/etc/3proxy/3proxy.pid
nscache 65536
nserver 127.0.0.1
config /usr/local/etc/3proxy/3proxy.cfg
monitor /usr/local/etc/3proxy/3proxy.cfg
monitor /usr/local/etc/3proxy/counters
monitor /usr/local/etc/3proxy/passwd
monitor /usr/local/etc/3proxy/bandlimiters
log /usr/local/etc/3proxy/log/log D
rotate 60
counter /usr/local/etc/3proxy/3proxy.3cf
users $/usr/local/etc/3proxy/passwd
include /usr/local/etc/3proxy/counters
include /usr/local/etc/3proxy/bandlimiters
auth strong
deny * * 127.0.0.1
allow *
proxy -n
socks
flush
allow admin
admin -p8080
#!/usr/local/bin/3proxy
#use standard syslog logging
log @3proxy
+4
View File
@@ -0,0 +1,4 @@
#!/bin/3proxy
#daemon
chroot /usr/local/3proxy proxy proxy
include /conf/3proxy.cfg
Loaded 100 of 217 files, more files were not shown because too many files have changed in this diff. Show more