Code Monkey home page Code Monkey logo

3proxy's Introduction

# 3APA3A 3proxy tiny proxy server
(c) 2002-2021 by Vladimir '3APA3A' Dubrovin <[email protected]>


Branches:
Master (stable) branch - 3proxy 0.9 
Devel branch - 3proxy 10


Download: 
	Binaries for released (master) versions (Windows, Linux):
	https://github.com/z3APA3A/3proxy/releases
	Binaries for devel version (Windows, Linux):
	https://3proxy.org/download/devel/
	Docker images:
	https://hub.docker.com/repository/docker/3proxy/3proxy
Archive of old versions: https://github.com/z3APA3A/3proxy-archive


Windows installation:

3proxy --install 
	
	installs and starts proxy as Windows service
	(config file should be located in the same directory)

3proxy --remove 

	removes the service (should be stopped before via
	'net stop 3proxy').

To build in Linux install git and build-essential packages, use

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.

Please read doc/html/index.html and man pages.

 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.
	+ 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
	+ DNS proxy
	+ DNS over TCP support, redirecting DNS traffic via parent
	  proxy
	+ SOCKSv4/4.5 Proxy
	+ SOCKSv5 Proxy
	+ SOCKSv5 UDP and BIND support (fully compatible with
	  SocksCAP/FreeCAP for UDP)
	+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP
	+ POP3 Proxy
	+ FTP proxy
	+ TCP port mapper (port forwarding)
	+ UDP port mapper (port forwarding)
	+ SMTP proxy
	+ Threaded application (no child process).
	+ Web administration and statistics
	+ Plugins for functionality extension
	+ 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 ip/port redirection parent support
	+ Random parent selection
	+ Chain building (multihop proxing)
	+ Load balancing between few network connections by choosing network
	  interface
  3. Logging
	+ tuneable log format compatible with any log parser
	+ stdout logging
	+ file logging
	+ syslog logging (Unix)
	+ ODBC logging
	+ 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 traffic limitation per day, week or month for incoming and
	outgoing traffic
	+ Connection limitation and ratelimting
	+ User authentication by username / password
	+ 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).
	+ 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
	+ Authentication with Windows username/password (cleartext only)
	+ SSL/TLS decryptions with certificate spoofing
	+ 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
     Unix
	+ support for chroot
	+ support for setgid
	+ support for setuid
	+ support for signals (SIGUSR1 to reload configuration)
     Windows
	+ 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)
	+ OpenWatcom (static)
	+ Intel Windows Compiler (msvcrt.dll)
	+ Windows/gcc (msvcrt.dll)
	+ Cygwin/gcc (cygwin.dll)
	+ Unix/gcc
	+ Unix/ccc
	+ Solaris
	+ Mac OS X, iPhone OS
	+ Linux and derivered systems
	+ Lite version for Windows 95/98/NT/2000/XP/2003
	+ 32 bit and 64 bit versions for Windows Vista and above, Windows 2008 server and above 

3proxy    	Combined proxy server may be used as
		executable or service (supports installation and removal).
		It uses config file to read it's configuration (see
		3proxy.cfg.sample for details).
		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
ftppr		FTP proxy server, please do not mess it with FTP over HTTP
		proxy used in browsers
pop3p    	POP3 proxy server, binds to port 110. You must specify
		POP3 username as [email protected][:port]
		port is 110 by default.
		Exmple: in Username configuration for you e-mail reader
		set [email protected], 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 [email protected][:port]
		port is 25 by default.
		Exmple: in Username configuration for you e-mail reader
		set [email protected], to send mail as someuser
		via mail.somehost.ru via proxy.
tcppm    	TCP port mapping. Maps some TCP port on local machine to
		TCP port on remote host.
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
		in large networks. It's OK to use it to map to DNS server
		in small network or to map Counter-Strike server for single
		client (you can use few mappings on different ports for
		different clients in last case).
mycrypt    	Program to obtain crypted password fro cleartext. Supports
		both MD5/crypt and NT password.
			mycrypt password
		produces NT password
			mycrypt salt password
		produces MD5/crypt password with salt "salt".


Run utility with --help option for command line reference.

Latest version is available from https://3proxy.org/

Want to donate the project? https://3proxy.org/donations/

3proxy's People

Contributors

alexndlm avatar danwin avatar johny-bravo avatar lkundrak avatar tautschnig avatar victor-rds avatar z3apa3a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3proxy's Issues

Утечка ресурсов?

Версия 3proxy: 0.8-devel-150608002425.
При попытке зайти по адресу 127.0.0.1:81/S (т.е. в админку, раздел Running Services) браузер начинает использовать 50-60% ЦП и стремительно поглощать ОЗУ, при этом сам прокси-сервер практически ничего не потребляет. Закрыв браузер процент ЦП перекидывается на 3proxy.exe.
В версии 0.7.1.2, с которой я перешёл на 0.8, этого замечено не было.
Содержание 3proxy.cfg:
monitor "C:\3proxy\bin\3proxy.cfg"
log
users admin:CL:
auth strong
allow admin
admin -i127.0.0.1 -p81

На скриншоте один 3proxy — основной (установлен как служба), другой — для тестов (просто запущен из папки).
screenshot-1

падение с пам авторизацией

Все привет. Есть конфиг, минимально настроеный для тест под виртуалкой
ОС: Debian 8.3
Ядро: 3.16.0-4-amd64, из доп модулей собирался еще памавторизаловка

cat /etc/3proxy/3proxy.cfg

daemon

plugin "/var/lib/3poxy/pamauth.ld.so" start 3proxy

pidfile /var/run/3proxy/3proxy.pid

internal 172.16.35.6
external 172.16.35.6

nserver 8.8.8.8

nscache 65536
timeouts 1 5 30 60 180 1800 15 60

log /var/log/3proxy/3proxy.log D
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
rotate 30

flush
maxconn 32

authcache user,password 60
auth cache pam
allow *

proxy -p3199
socks -p3198

демон стартует, но конект проходит но приеме логина и пароля (нет разныцы верные или нет), прокся валится наглухо, единственное что на рыл, вот в dmesg
[16490.890530] 3proxy[15562]: segfault at 7fa5213d8748 ip 00007fa51fda5558 sp 00007fa5213d8740 error 6 in libaudit.so.1.0.0[7fa51fda0000+1a000]

может кто подскажет, что не так может сделал и т.д.

Заранее всех благодарю за помощь!

Не работает 'auth strong' через SOCKS

3proxy 0.8. Centos-7 x86_64

Столкнулся с такой проблемой: при подключении к прокси по http все работает нормально, запрашивается авторизация, подключается, всё ок. А при подключении к тому же прокcи по socks даже авторизацию не запрашивает, выдает: ERR_SOCKS_CONNECTION_FAILED.
Причём, если авторизацию отключить, то всё работает нормально.

Логи при подключении к fb.com и 2ip.ru по http:

160115064621.213 8000 00000 vasya xxx.xxx.xxx.xxx:53350 173.252.120.68:80 378 282 0 GET http://fb.com/ HTTP/1.1
160115070624.774 8000 00090 vasya xxx.xxx.xxx.xxx:53515 178.63.151.224:80 864 33264 0 GET http://2ip.ru/ HTTP/1.1

при подключении к fb.com и 2ip.ru по SOCKS:

160115065143.650 1200 00004 - xxx.xxx.xxx.xxx:53416 31.13.81.36:443 0 0 0 CONNECT www.facebook.com:443
160115070608.470 1200 00004 - xxx.xxx.xxx.xxx:53511 178.63.151.224:80 0 0 0 CONNECT 2ip.ru:80

Конфиг:

daemon
log /var/log/3proxy.log Drotate 3
pidfile /usr/local/etc/3proxy/3proxy.pid
users vasya:CL:password
auth strong

proxy -n -a -p8000 -ixxx.xxx.xxx.xxx -exxx.xxx.xxx.xxx
socks -p1200 -ixxx.xxx.xxx.xxx -exxx.xxx.xxx.xxx

flush
allow vasya
timeouts 1 5 30 60 180 1800 15 60

ldap auth

Добрый день. При сборке с поддержкой LDAP вылазит следующее:

gcc -o ../../PCREPlugin.ld.so -O2 -pthread -shared pcre_compile.o pcre_config.o pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o pcre_globals.o pcre_info.o pcre_maketables.o pcre_newline.o pcre_ord2utf8.o pcre_refcount.o pcre_study.o pcre_tables.o pcre_try_flipped.o pcre_ucp_searchfuncs.o pcre_valid_utf8.o pcre_version.o pcre_xclass.o pcre_dftables.o pcre_plugin.o pcreposix.o make[2]: Leaving directory '/usr/src/devel/src/plugins/PCREPlugin' make[2]: Entering directory '/usr/src/devel/src/plugins/TransparentPlugin' gcc -fpic -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL transparent_plugin.c gcc -o ../../TransparentPlugin.ld.so -O2 -pthread -shared transparent_plugin.o make[2]: Leaving directory '/usr/src/devel/src/plugins/TransparentPlugin' make[2]: Entering directory '/usr/src/devel/src/plugins/PamAuth' gcc -fpic -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL pamauth.c gcc -o ../../pamauth.ld.so -O2 -pthread -shared -lpam pamauth.o make[2]: Leaving directory '/usr/src/devel/src/plugins/PamAuth' make[2]: Entering directory '/usr/src/devel/src/plugins/LdapPlugin' Makefile.var:33: Makefile.inc: No such file or directory make[2]: *** No rule to make target 'Makefile.inc'. Stop. make[2]: Leaving directory '/usr/src/devel/src/plugins/LdapPlugin' make[1]: Leaving directory '/usr/src/devel/src'

влез один раз относительно путей так это повлекло еще больше проблем с сборкой, такой результат на дев и мастер ветках, подскажите может я что не так делаю!!!!!

В версии 0.8.0 не обрабатываются правила разрешенных IP подсетей

Версия 0.8 не обрабатывает диапазон разрешенных сетей
в версии 0.7 при попытке запроса в сеть не разрешенную к доступу - Error = 0x03 (Network unreachable) всё отлично блочит.
С тем же конфигом версия 0.8 - A default web page was successfuly loaded. - Пропускает

3proxy-0.8.4-x64 crash

3proxy-0.8.4-x64, Win7 Вылетает при установке писать логи в файл:
log C:\3proxy\logs\3proxy.log D
если просто
log
то всё нормально.
P.S. В версии 3proxy-0.6.1-x64 тот же конфиг всё логирует нормально в файл.

Support Haproxy's Proxy Protocol

Using haproxy for load balance with multi 3proxy instances, the client's real IP should be able to pass to 3proxy, so could do do some thing better.

Store all long-living strings (usernames, hostnames) inside nametables

Перейти с чаров на стринги с хранимой длиной, оптимизировать по скорости операции со строками, исключить дублирование хранения имен хостов/юзернеймов (унести имена в хэштейблы), посмотреть в сторону неблокирующих thread-safe реализаций хэштейблов без использования мутексов.

Password-protected FTP over HTTP

Hi!
Seems like 3proxy doesn't ask user for login and pass for password-protected FTP if one uses FTP over HTTP. It just tries to login as anonymous, and shows
401 FTP Server requires authentication
This FTP server rejects anonymous access
530 User cannot log in.

and that's it. No questions for user.

socks proxy sends DNS queries to interface other than specified in "external" setting

I have a standard notebook running Windows 7 x64. I am connected to a closed network via the wired adapter and to the Internet via the wireless adapter. wired is set as the preferred adapter and has the highest routing priority. There is a DNS server on this closed network for internal hosts and it does not resolve any external names.

I am hoping to setup 3proxy to bind to the wireless interface and allow a browser to connect to the public Internet through it, while all the other programs keep on happily using the wired adapter. This is my configuration, cut down to the bare minimum:

          nserver 8.8.8.8
          nserver 8.8.4.4
          nscache 65536

          external 192.168.0.50
          internal 127.0.0.1

          socks

What did I expect from this? That the proxy only accept connections from my own PC, that it did DNS lookups by itself using Google DNS (not rely on Windows DNS client) and serve all requests by using the wireless interface.

Sadly, it did not work.

Using a network monitor, I can see that the proxy is creating a DNS query properly and sending that query to the configured DNS server, but it attempts to do this through the default interface which will never be able to route to it. No DNS response, timeout, "no page for you"!

If I try to access an IP address directly, it seems that this traffic is indeed sent to the "external" interface, it appears the issue is just with the DNS queries.

I am not sure if this is a bug or what I want is a new feature or I am just wrong, I do hope this is the correct place to mention it and hope it can be fixed/incorporated. Thank you very much.

[Request] RADIUS

Хотелось бы, чтобы 3proxy поддерживал аутентификацию через RADIUS-сервер, а так же принимал от него параметры Framed-IP-Address и Framed-IPv6-Address в качестве extip для пользователя. И если говорить о полноценной интеграции, то так же отправлял информацию о количестве трафика пользователя радиусу.

Segfault on FreeBSD

Вылетает Segmentation fault при обращении к прокси.

httppr -l -i192.168.0.4 -p3128
160205101007.434 3128 00000 - 192.168.0.4:3128 0.0.0.0:0 0 0 0 Accepting connections [40090/20997120]
Segmentation fault

Версия httppr of 3proxy-0.8.3 (160126120751) из портов.
10.2-RELEASE FreeBSD amd64

Если тупо "гадить" в порт через телнет, то прокси не вылетает, только при обращении от браузера.
Пробовал подменять и пересобирать исходники из devel, тот же результат.

Length of proxy username and password

Hi,

First of all. Thank you for such great software! Use it from 2007.

Could you increase a limitations for username and password till 64 chars?
32 are very small. Some proxy-services control settings of proxy by username.

Thank you very much!

fakeresolve should work better by only fakeresolve parented requests.

consider this situation:

auth iponly
allow * * google.com,*.google.com
parent 1000 socks5+ 192.168.0.1 8000
allow *
proxy -p8080 -a
flush

In my network, some hosts won't resolve, like google.com, but fakeresolve won't work for me since I need to connect to hosts other than google.com directly, I found an ugly fix: comment out the targetip test in handleredirect(auth.c), it works but it still tries to resolve them in the first place and it's painfully slow.

the ugly fix works for 0.7.1.2 and I see that in the current git version, that should be SAISNULL, I didn't test it though.

I here by propose that fakeresolve should only apply to host capable parented requests, so eliminate the unnecessary resolve and still able to handle un-parented requests.

Не получается собрать v08x на Debian 8.2 jessie

может, пакетов каких не хватает, надо поставить?
мета build-essential установлен
а IPv6 только в 08 поддерживается? в 07 IPv6 нету?

gcc -o 3proxy -Wall -O2 -pthread 3proxy.o mainfunc.o auth.o datatypes.o srvproxy.o srvpop3p.o srvsmtpp.o srvftppr.o srvsocks.o srvtcppm.o srvicqpr.o srvudppm.o sockmap.o sockgetchar.o myalloc.o common.o mycrypt.o md5.o md4.o base64.o ftp.o smbdes.o ntlm.o stringtable.o srvwebadmin.o srvdnspr.o plugins.o -lcrypto -lssl -ldl
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lssl
collect2: error: ld returned 1 exit status
Makefile.inc:168: recipe for target '3proxy' failed
make[1]: *** [3proxy] Error 1
make[1]: Leaving directory '/usr/src/3proxy/08/src'
Makefile.inc:6: recipe for target 'all' failed
make: *** [all] Error 2
root@vpsX:/usr/src/3proxy/08# Write failed: Broken pipe

Segmentation fault при запуске программы с ODBC логированием

При указании в конфиг файле логирования в базу данных postgresql через ODBC программа падает:

gdb ./3proxy 
GNU gdb (GDB) Fedora 7.10.1-30.fc23
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./3proxy...done.
(gdb) run 3proxy.
3proxy.c    3proxy.cfg  3proxy.o    
(gdb) run 3proxy.cfg 
Starting program: /home/test/tmp/3proxy-3proxy-0.8.3/src/3proxy 3proxy.cfg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7fee700 (LWP 8730)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fee700 (LWP 8730)]
_SQLGetInstalledDrivers (pszSection=0x7ffff7bc633b "ODBC", pszEntry=0x7ffff7bc106d "Pooling", pszDefault=0x7ffff7bc628e "0", pRetBuffer=0x7ffff7fed430 "", 
    nRetBuffer=128) at _SQLGetInstalledDrivers.c:28
28  {
(gdb)

Версия 0.7 работает прекрасно

0.8.3 не компилируется

proxymain.c: In function 'mainfunc':
proxymain.c:319: error: expected ')' before 'BUILDDATE'
proxymain.c:350: error: expected ')' before 'BUILDDATE'
make[1]: *** [mainfunc.o] Error 1
make[1]: Leaving directory `/root/3proxy-3proxy-0.8.3/src'
make: *** [all] Error 2

Monitoring configs folder

Было бы просто великолепно, иметь возможность мониторить кроме файла конфига сразу каталог:

по типу:
monitoring /etc/3proxy/users/

и при любых изменениях в каталоге перечитывать конфиги.
возможно как вариант с помощью inotify.

0.8.1 проблемы с загрузкой содержимого по 443 порту

log - ver 0.8.1
160121152141.872 32076 00000 - XXXXXXXXXX:32076 XXXXXXXXXX:11272 0 0 0 Accepting connections [2391/3070385008]
160121152149.868 32076 00013 user 95.190.97.194:34819 173.194.32.190:443 0 0 0 CONNECT 173.194.32.190:443
160121152150.395 32076 00013 user 95.190.97.194:51046 173.194.32.190:443 0 0 0 CONNECT 173.194.32.190:443
160121152150.927 32076 00013 user 95.190.97.194:51048 173.194.32.190:443 0 0 0 CONNECT 173.194.32.190:443
160121152151.477 32076 00013 user 95.190.97.194:35331 173.194.32.190:443 0 0 0 CONNECT 173.194.32.190:443
160121152152.957 32076 00013 user 95.190.97.194:35074 109.234.76.160:443 0 0 0 CONNECT 109.234.76.160:443
160121152154.425 32076 00013 user 95.190.97.194:35586 173.194.32.135:443 0 0 0 CONNECT 173.194.32.135:443
160121152155.577 32076 00013 user 95.190.97.194:51057 109.234.76.160:443 0 0 0 CONNECT 109.234.76.160:443
160121152156.104 32076 00013 user 95.190.97.194:35587 109.234.76.160:443 0 0 0 CONNECT 109.234.76.160:443
160121152156.634 32076 00013 user 95.190.97.194:34946 109.234.76.160:443 0 0 0 CONNECT 109.234.76.160:443
160121152157.722 32076 00013 user 95.190.97.194:35458 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152158.276 32076 00013 user 95.190.97.194:35459 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152158.812 32076 00013 user 95.190.97.194:51064 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152159.343 32076 00013 user 95.190.97.194:51065 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152159.876 32076 00013 user 95.190.97.194:35202 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152201.804 32076 00013 user 95.190.97.194:35714 64.233.165.155:443 0 0 0 CONNECT 64.233.165.155:443
160121152202.670 32076 00000 user 95.190.97.194:51043 173.194.32.190:443 433 4261 0 CONNECT 173.194.32.190:443
160121152212.492 32076 00000 user 95.190.97.194:35715 64.233.165.157:443 0 0 0 CONNECT 64.233.165.157:443
160121152212.671 32076 00000 user 95.190.97.194:34947 109.234.76.190:443 474 4503 0 CONNECT 109.234.76.190:443
160121152222.672 32076 00000 user 95.190.97.194:51056 173.194.32.131:443 433 4261 0 CONNECT 173.194.32.131:443

log - ver 0.7.1.3
160121152415.457 32076 00000 - XXXXXXXXXX:32076 XXXXXXXXXX0 0 0 0 Accepting connections [2503/3074796400]
160121152435.733 32076 00000 user 95.190.97.194:51085 173.194.32.158:443 0 0 0 CONNECT 173.194.32.158:443
160121152445.732 32076 00000 user 95.190.97.194:35011 109.234.76.190:443 0 0 0 CONNECT 109.234.76.190:443
160121152446.557 32076 00094 user 95.190.97.194:51082 173.194.32.158:443 902 4698 0 CONNECT 173.194.32.158:443
160121152446.557 32076 00094 user 95.190.97.194:35394 173.194.32.158:443 934 4698 0 CONNECT 173.194.32.158:443
160121152446.558 32076 00094 user 95.190.97.194:35267 74.125.205.95:443 961 39234 0 CONNECT 74.125.205.95:443
160121152446.560 32076 00094 user 95.190.97.194:35395 109.234.76.160:443 4649 31767 0 CONNECT 109.234.76.160:443
160121152446.560 32076 00094 user 95.190.97.194:35138 109.234.76.160:443 6413 72713 0 CONNECT 109.234.76.160:443
160121152446.561 32076 00094 user 95.190.97.194:35266 109.234.76.190:443 235 145 0 CONNECT 109.234.76.190:443
160121152446.563 32076 00094 user 95.190.97.194:51089 109.234.76.160:443 8120 19506 0 CONNECT 109.234.76.160:443
160121152446.563 32076 00094 user 95.190.97.194:35650 109.234.76.160:443 1810 4016 0 CONNECT 109.234.76.160:443
160121152446.564 32076 00094 user 95.190.97.194:35651 173.194.32.167:443 1867 16359 0 CONNECT 173.194.32.167:443
160121152446.566 32076 00094 user 95.190.97.194:35010 109.234.76.190:443 3138 10720 0 CONNECT 109.234.76.190:443
160121152446.566 32076 00094 user 95.190.97.194:51094 109.234.76.190:443 3804 19225 0 CONNECT 109.234.76.190:443
160121152446.566 32076 00094 user 95.190.97.194:51088 109.234.76.160:443 6478 30059 0 CONNECT 109.234.76.160:443
160121152446.568 32076 00094 user 95.190.97.194:51095 109.234.76.190:443 1142 8854 0 CONNECT 109.234.76.190:443
160121152446.568 32076 00094 user 95.190.97.194:51096 109.234.76.190:443 1142 6513 0 CONNECT 109.234.76.190:443
160121152446.570 32076 00094 user 95.190.97.194:35522 173.194.32.167:443 1637 608 0 CONNECT 173.194.32.167:443
160121152446.570 32076 00094 user 95.190.97.194:51097 109.234.76.190:443 1728 18148 0 CONNECT 109.234.76.190:443
160121152446.570 32076 00094 user 95.190.97.194:35139 109.234.76.160:443 1794 2496 0 CONNECT 109.234.76.160:443

FreeBSD: 3proxy 0.8.1 can't bind to interface

Hi!
After upgrading 3proxy from 0.7.1.3 to 0.8.1 (0.8.0 has the same problem) it stopped working on FreeBSD (at least).

$ tail /var/log/3proxy.log.2016.01.22
1453464413.007 ADMIN.80 00000 - 127.0.0.1:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464413.008 DNSPR.53 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464413.008 POP3P.110 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464413.008 TCPPM.25 00000 - 192.168.122.70:25 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.816 ADMIN.80 00000 - 127.0.0.1:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.817 POP3P.110 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.827 TCPPM.25 00000 - 192.168.122.70:25 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.827 PROXY.3128 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.827 SOCKS.1080 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
1453464425.828 DNSPR.53 00000 - 192.168.122.70:0 192.168.122.70:9217 0 0 0 bind():_Invalid_argument
etc

$ sockstat | grep 3pro
root 3proxy 2767 5 udp4 : :
root 3proxy 2767 6 tcp4 : :
root 3proxy 2767 7 tcp4 : :
root 3proxy 2767 8 tcp4 : :
root 3proxy 2767 9 tcp4 : :
root 3proxy 2767 10 tcp4 : :

I used config file from the distribution. The only change is nserver, extrenal and internal options.

[Request] Возможность указать внешний IP или IPv6 для каждого пользователя

Здравствуйте.
Очень нужна возможность указать используемый внешний адрес (задаваемый параметром -e) для каждого пользователя индивидуально, вне зависимости от того, к какому сервису он подключился. Например, все пользователи подключаются к HTTP-прокси на порту 3128, а выходят каждый через свой адрес. Те же пользователи, но уже используя SOCKS-сервер на порту 1080, аналогично имели бы на выходе тот адрес, что указан в конфиге.

Так же, думаю, многим хотелось бы, чтобы 3proxy поддерживал авторизацию через RADIUS-сервер, с возможностью указать внешний адрес для каждого пользователя в Framed-IP-Address и Framed-IPv6-Address, или только один из них, если используются параметры -4 или -6 соответственно

Do you plan to add the function which limit connections for each user in the next version?

Hi,
If provide 3proxy service for public,any user has no limitaion of connections.So there is an issue,some users have lots of connections,even if we can limit the bandwidth or traffic,it still make the 3proxy server very unstable,like high cpu,high load,the result is the speed is slow and it won't accpet new connecions.Other users can't use the service any more.

Do you plan to add the function which limit connections for each user in the next version?

For example like this,each user in the userlist has the same max conneciotns.
connlimin

Kindly regards
Michael

почему не работает авторизация

Здравствуйте, вот такой простой конфиг:

service
users pro:CL:pass1 p:CL:pass2
log "D:\Programs\3proxy\log\log" D
rotate 30
auth strong 
allow pro,p
proxy 
socks

Но прокси сервер не принемает авторизацию. Chrome, windows server 2012 r2 - постоянно спрашивает имя пользователя/пароль. Internet Explorer после трёх вводов правильного пароля (pass1 для пользователя pro) показывает ошибку:

407 Proxy Authentication Required

Access to requested resource disallowed by administrator or you need valid username/password to use this resource

Если вместо auth strong написать auth none - прокси работает и пароль не спрашивает.
Подскажите, что я делаю не так?

parent Request-URI и absoluteURI

3proxy отправляет запрос родителю в формате

GET /pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org

squid нормально обрабатывает только absoluteURI
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

в результате 400 Bad Request.

Можно ли исправить это, либо добавить опцию изменяющую поведение.

Yara integration

Хотел бы предложить фичу, которая могла бы быть интересна многим пользователям 3proxy. Существует механизм описания сигнатур вредоносного кода -- Yara.

https://plusvic.github.io/yara/

Интеграция Yara с веб шлюзом позволила бы получить удобный механизим фильтрации трафика. Есть готовые фиды с сигнатурами

http://yararules.com
https://github.com/Yara-Rules/rules/tree/master/malware

странное поведение socks с IPv6

приветствую.
прежде всего спасибо за сервер и его развитие - очень нужный пакет.

возник вопрос по работе пакета 3proxy-0.9-devel:
Очень странное поведение пакета при попытке шлюзования IPv4 -> IPv6 посредством socks.
в обычных http/https все отлично работает при ключике -6 и IPv6_N меняется в зависимости от порта, тогда как в случае socks именно ключ -6 не работает, но работают любые другие. При этом, если включен один из работающих ключей, то работать будут абсолютно все порты и определяться как адрес IPv4 (в примере 1.1.1.1)

кусок конфига (пронумеровал строки socks для более понятного описания проблемы)

nserver 2620:0:ccc::2
nscache6 65536
users user:CL:pass
auth strong
maxconn 50
allow user
deny * * 127.0.0.1,192.168.1.1 25,465,2525,587,2526

  1. socks -6 -i1.1.1.1 -eIPv6_1 -p1080
  2. socks -46 -i1.1.1.1 -eIPv6_2 -p1081
  3. socks -64 -i1.1.1.1 -eIPv6_3 -p1082
  4. socks -4 -i1.1.1.1 -eIPv6_4 -p1083
  5. socks -6 -i1.1.1.1 -eIPv6_5 -p1085

т.е на примере конфига, если включены только строки 1 и/или 5 (остальные закомментированы или отсуствуют), то соединение не проходит. Если же в конфиг добавлена любая из строк 2, 3 или 4, то работают абсолютно все порты, в том числе и 1080/1085, но IP определяется как 1.1.1.1

для проксификации использую Proxyfier 3.21 который вроде как поддерживает все фичи IPv6 и туннелирования оного через IPv4

в чем может быть затык и вообще решаемо ли сие?

Запрет доступа на сайты в .рф

Здравствуйте.
Хочу поблагодарить Вас за столь прекрасный 3proxy!
Вопрос: есть ли возможность в 3proxy блокировать доступ на сайты в доменной зоне .рф? Если да, то как это сделать? Сайты в латинице блокируются замечательно! А в кирилице - не получается.
Спасибо.

internal=external inreface/address ?

Не могу нащупать настройки 3proxy, при которых можно подключиться через некий интерфейс и далее выполнять через него внешние запросы и через него же возвращать результаты клиенту. Все время получаю SOCK5 error 2 (not allowed by ruleset) на клиенте (установлена прога ProxyCap)

Сценарий: пользование быстрым рабочим анлимом из дома через SOCK5-прокси, установленный на рутере на работе. В моем месте проживания местный (от дома до рабочего прокси) интернет - высоко-скоростной и вообще бесплатный.
Другие прокси (dante, ss5) в этом режиме работают с пол-пинка. Но эти прокси слегка глючноватые - поэтому ищу альтернативу.

Вопросы, комментарии, багрепорты и запросы фич

Запросы фич и багрепорты создавайте как issue, по-русски или по-английски.
Комментарии и вопросы можно создавать как issue или отправлять на [email protected]

Пожалуйста, прочитайте FAQ, How To и руководства прежде, чем задавать вопрос:
http://3proxy.ru/doc/
http://3proxy.ru/documents/

[Request] Поддержка нескольких ядер

Сейчас 3proxy работает на одном ядре, хочу распределить его по всем ядрам. Чтобы он использовал все доступные ресурсы сервера. Реализован ли, такой функционал?

При большой нагрузке запросы выполняются очень медленно, а нагрузка CPU едва ли выше пары процентов.

Update documentation for 0.8 changes

  • IPv6 functionality
  • IP ranges in ACLs
  • DNS over TCP redirection functionality
  • dnspr -s
  • default behavior for authentication and NTLM
  • ulimit related warnings FAQ

crashes on v0.7, 502 error (00012) on v0.8

на Crashdump'ы кидал ссылку в skype, после всех экспериментов попробовал снова перебраться на 0.8 версию, крашится меньше, но очень много 502 ошибок у клиентов.

в логах много вот таких записей, как то уже писал на email об этой проблеме,
добавил патчик для дополнительного логирования, вот такое вот выводит:

18-11-2015 20:44:55 +0200 PROXY.42010 00012 0 0 0 GET HTTP/1.1
18-11-2015 20:44:55 +0200 PROXY.42010 00000 <login ip ...> 0 0 0 Address already in use

почему и кем занят не понятно, причем на 0.7 версии с одинаковыми настройками, всё работает.
но крашится (

как будет время и желание гляньте pls, со своей стороны предоставлю любые данные.
если что можно через skype )

заранее спасибо.

ICAP support

Ability to send traffic to an external server by using ICAP protocol. This could be used for antimalware analysis or for DLP.

pam + разные сервера

Добрый день. Скажите пожалуйста, при pam авторазации, возможно ли каким-то образом pam модулю указать с какой именно прокси пришла авторазация?............................суть в том, что нам нужно как разделять с авторизаци по разным проксям отдельно.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.