From a1a45bc4e6d2c27bf3649134bfcff31db499f6ed Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Sat, 4 Apr 2026 20:28:02 +0300 Subject: [PATCH] Update documentation --- .gitignore | 1 + 3proxy.cfg.md | 484 ++++++------- 3proxy.md | 139 ++-- High-Load.md | 280 ++++---- How-To-(incomplete).md | 1073 ---------------------------- How-To-(русский).md | 2 +- How-To.md | 1072 +++++++++++++++++++++++++++ PCREPlugin-(русский).md | 4 +- PCREPlugin.md | 61 +- SSLPlugin.md | 46 +- Security-recommendations.md | 50 +- StringsPlugin-(русский).md | 2 +- StringsPlugin.md | 32 +- TrafficPlugin-(русский).md | 4 +- TrafficPlugin.md | 44 +- TransparentPlugin-(русский).md | 2 +- TransparentPlugin.md | 18 +- WindowsAuthentication-(русский).md | 2 +- WindowsAuthentication.md | 28 +- ftppr.md | 162 +++-- pop3p.md | 160 +++-- proxy.md | 159 +++-- smtpp.md | 160 +++-- socks.md | 205 +++--- tcppm.md | 122 ++-- tlspr.md | 205 +++--- udppm.md | 139 ++-- 27 files changed, 2345 insertions(+), 2311 deletions(-) create mode 100644 .gitignore delete mode 100644 How-To-(incomplete).md create mode 100644 How-To.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/3proxy.cfg.md b/3proxy.cfg.md index 1e7d791..8b45a6a 100644 --- a/3proxy.cfg.md +++ b/3proxy.cfg.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

3proxy.cfg +

3proxy.cfg 3proxy configuration file

DESCRIPTION @@ -32,33 +32,33 @@

-

Common +

Common structure:
Configuration file is a text file 3proxy reads configuration from. Each line of the file is a command executed -immediately, as it was given from console. Sequence of -commands is important. Configuration file as actually a -script for 3proxy executable. Each line of the file is -treated as a blank (space or tab) separated command line. -Additional space characters are ignored. Think about 3proxy -as "application level router" with console -interface.

+immediately, as if it were given from the console. The +sequence of commands is important. The configuration file is +actually a script for the 3proxy executable. Each line of +the file is treated as a blank (space or tab) separated +command line. Additional space characters are ignored. Think +about 3proxy as "application level router" with +console interface.

-

Comments:
-Any string beginning with space character or ´#´ -character is comment. It´s ignored. <LF>s are -ignored. <CR> is end of command.

+

Comments:
+Any line beginning with a space character or ´#´ +character is a comment. It´s ignored. <LF>s are +ignored. <CR> is the end of a command.

-

Quotation:
-Quotation character is " (double quote). Quotation must -be used to quote spaces or another special characters. To -use quotation character inside quotation character must be -dubbed (BASIC convention). For example to use HELLO -"WORLD" as an argument you should use it as -"HELLO ""WORLD""". Good -practice is to quote any argument you use.

+

Quotation:
+The quotation character is " (double quote). Quotation +must be used to quote spaces or other special characters. To +use a quotation character inside a quoted string, the +character must be doubled (BASIC convention). For example, +to use HELLO "WORLD" as an argument, you should +write it as "HELLO ""WORLD""". +Good practice is to quote any argument you use.

-

File inclusion: +

File inclusion:
You can include file by using $FILENAME macro (replace FILENAME with a path to file, for example @@ -68,15 +68,15 @@ is required in last example because path contains space character. For included file <CR> (end of line characters) is treated as space character (arguments delimiter instead of end of command delimiter). Thus, -include files are only useful to store long signle-line +include files are only useful to store long single-line commands (like userlist, network lists, etc). To use dollar sign somewhere in argument it must be quoted. Recursion is not allowed.

-

Next commands +

Next commands start gateway services:

-

proxy +

proxy [options]
socks
[options]
pop3p
[options]
@@ -103,16 +103,15 @@ dnspr
caching DNS proxy (default port 53)
tcppm
TCP portmapper
udppm
UDP portmapper

-

Options: -
+

Options:
-pNUMBER
change default server port to NUMBER
-n
disable NTLM authentication (required if passwords are stored in Unix crypt format).
-n1
enable NTLMv1 authentication.
-g(GRACE_TRAFF,GRACE_NUM,GRACE_DELAY)
delay GRACE_DELAY -milliseconds before polling if average polling size below -GRACE_TRAFF bytes and GRACE_NUM read operations in single -directions are detected within 1 second. Useful to minimize +milliseconds before polling if average polling size is below +GRACE_TRAFF bytes and GRACE_NUM read operations in a single +direction are detected within 1 second. Useful to minimize polling -s
(for admin) secure, allow only secure operations, currently only traffic counters view without ability to reset.
@@ -127,7 +126,7 @@ authentication methods
client reported)
-a1
(for proxy) anonymous proxy (random client information reported)
--a2
(for proxy) generate Via: and X-Forwared-For: +-a2
(for proxy) generate Via: and X-Forwarded-For: instead of Forwarded:
-6
Only resolve IPv6 addresses. IPv4 addresses are packed in IPv6 in IPV6_V6ONLY compatible way.
@@ -158,20 +157,20 @@ SO_REUSEPORT, SO_PORT_SCALABILITY, SO_REUSE_UNICASTPORT, SO_KEEPALIVE, SO_DONTROUTE may be supported depending on OS.
-DiINTERFACE, -DeINTERFACE
bind internal interface / -external inteface to given INTERFACE (e.g. eth0) if -SO_BINDTODEVICE supported by system. You may need to run as -root or to have CAP_NET_RAW capability in order to bind to -interface, depending on system, so this option may require -root privileges and can be incompatible with some -configuraton commands like chroot and setuid (and daemon if +external interface to given INTERFACE (e.g. eth0) if +SO_BINDTODEVICE is supported by the system. You may need to +run as root or have CAP_NET_RAW capability in order to bind +to an interface, depending on the system, so this option may +require root privileges and can be incompatible with some +configuration commands like chroot and setuid (and daemon if setcap is used).
--e
External address. IP address of interface 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.
--i
Internal address. IP address proxy accepts -connections to. By default connection to any interface is +-e
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.
+-i
Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are accepted.
-N
(for socks) External NAT address 3proxy reports to client for BIND and UDPASSOC By default external address is @@ -205,17 +204,16 @@ FTP client does it for you. That is, if you use 3proxy with authentication use proxyuser:proxypassword:FTPuser as FTP username, otherwise do not change original FTP user name

-

include +

include <path>
Include config file

-

config +

config <path>
Path to configuration file to use on 3proxy restart or to save configuration.

- -

writable +

writable
ReOpens configuration file for write access via Web interface, and rereads it. Usually should be first command @@ -223,10 +221,10 @@ on config file but in combination with config it can be used anywhere to open alternate config file. Think twice before using it.

-

end
+

end
End of configuration

-

log +

log [[@|&]logfile] [<LOGTYPE>]
sets logfile for all gateways
@ (for Unix) use syslog, filename is used as ident name
@@ -250,12 +248,12 @@ with "logformat" filename must begin with Grinwitch time zone for all time-based format specificators.

-

rotate +

rotate <n>
how many archived log files to keep

-

logformat +

logformat <format>
Format for log record. First symbol in format must be L (local time) or G (absolute Grinwitch time). It can be @@ -267,25 +265,25 @@ logformat means comma and percent are replaced with space and all time based elemnts are in local time zone.
You can use:

-

%y Year in 2 +

%y Year in 2 digit format
%Y Year in 4 digit format
%m Month number
-%o Month abbriviature
+%o Month abbreviation
%d Day
%H Hour
%M Minute
%S Second
-%t Timstamp (in seconds since 01-Jan-1970)
+%t Timestamp (in seconds since 01-Jan-1970)
%. milliseconds
-%z timeZone (from Grinvitch)
+%z time zone (from Greenwich)
%D request duration (in milliseconds)
-%b average send rate per request (in Bytes per second) this -speed is typically below connection speed shown by download -manager.
-%B average receive rate per request (in Bytes per second) -this speed is typically below connection speed shown by +%b average send rate per request (in bytes per second); this +speed is typically below the connection speed shown by the download manager.
+%B average receive rate per request (in bytes per second); +this speed is typically below the connection speed shown by +the download manager.
%U Username
%N service Name
%p service Port
@@ -304,15 +302,15 @@ download manager.
%h Hops (redirections) count
%T service specific Text
%N1-N2T (N1 and N2 are positive numbers) log only fields -from N1 thorugh N2 of service specific text
-in the case of ODBC logging logformat specifies SQL -statement, for exmample:
+from N1 through N2 of service-specific text
+In the case of ODBC logging, logformat specifies an SQL +statement, for example:
logformat "-´+_Linsert into log (l_date, l_user, l_service, l_in, l_out, l_descr) values (´%d-%m-%Y %H:%M:%S´, ´%U´, ´%N´, %I, %O, ´%T´)"

-

logdump +

logdump <in_traffic_limit> <out_traffic_limit>
Immediately creates additional log records if given amount of incoming/outgoing traffic is achieved for connection, @@ -320,16 +318,14 @@ without waiting for connection to finish. It may be useful to prevent information about long-lasting downloads on server shutdown.

- -

archiver +

archiver <ext> <commandline>
Archiver to use for log files. <ext> is file extension produced by archiver. Filename will be last argument to archiver, optionally you can use %A as produced archive name and %F as filename.

- -

timeouts +

timeouts <BYTE_SHORT> <BYTE_LONG> <STRING_SHORT> <STRING_LONG> <CONNECTION_SHORT> <CONNECTION_LONG> <DNS> <CHAIN> @@ -354,7 +350,7 @@ DNS timeout for DNS request before requesting next server CHAIN timeout for reading data from chained connection
default timeouts 1 5 30 60 180 1800 15 60 15 5

-

radius +

radius <NAS_SECRET> <radius_server_1[:port][/local_address_1]> <radius_server_2[:port][/local_address_2]>
@@ -380,21 +376,20 @@ user), Reply-Message. Use authcache to speedup authentication. RADIUS feature is currently experimental.

-

nserver +

nserver <ipaddr>[:port][/tcp]
Nameserver to use for name resolutions. If none specified system routines for name resolution is used. Optional port number may be specified. If optional /tcp is added to IP address, name resolution is performed over TCP.

-

nscache +

nscache <cachesize> nscache6 <cachesize>
Cache <cachesize> records for name resolution (nscache -for IPv4, nscache6 for IPv6). Cachesize usually should be -large enougth (for example 65536).

+for IPv4, nscache6 for IPv6). The cache size should usually +be large enough (for example, 65536).

- -

nsrecord +

nsrecord <hostname> <hostaddr>
Adds static record to nscache. nscache must be enabled. If 0.0.0.0 is used as a hostaddr host will never resolve, it @@ -402,13 +397,13 @@ can be used to blacklist something or together with dialer command to set up UDL for dialing.

-

fakeresolve +

fakeresolve
-All names are resolved to 127.0.0.2 address. Usefull if all -requests are redirected to parent proxy with http, socks4+, -connect+ or socks5+.

+All names are resolved to the 127.0.0.2 address. Useful if +all requests are redirected to a parent proxy with http, +socks4+, connect+ or socks5+.

-

dialer +

dialer <progname>
Execute progname if external name can´t be resolved. Hint: if you use nscache, dialer may not work, because names @@ -416,16 +411,14 @@ will be resolved through cache. In this case you can use something like http://dial.right.now/ from browser to set up connection.

- -

internal +

internal <ipaddr>
sets ip address of internal interface. This IP address will be used to bind gateways. Alternatively you can use -i option for individual gateways. Since 0.8 version, IPv6 address may be used.

- -

external +

external <ipaddr>
sets ip address of external interface. This IP address will be source address for all connections made by proxy. @@ -433,43 +426,44 @@ Alternatively you can use -e option to specify individual address for gateway. Since 0.8 version External or -e can be given twice: once with IPv4 and once with IPv6 address.

-

maxconn +

maxconn <number>
-sets maximum number of simulationeous connections to each -service started after this command on network level. Default -is 100.
+sets the maximum number of simultaneous connections to each +service started after this command at the network level. +Default is 100.
To limit clients, use connlim instead. maxconn will silently ignore new connections, while connlim will report back to the client that the connection limit has been reached.

-

backlog +

backlog
sets the listening socket backlog of new connections. Default is 1 + maxconn/8. Maximum value is capped by kernel tunable somaxconn.

-

service +

service
-(depricated). Indicates 3proxy to behave as Windows -95/98/NT/2000/XP service, no effect for Unix. Not required -for 3proxy 0.6 and above. If you upgraded from previous -version of 3proxy use --remove and --install to reinstall -service.

+(deprecated). Indicates that 3proxy should behave as a +Windows 95/98/NT/2000/XP service; has no effect under Unix. +Not required for 3proxy 0.6 and above. If you upgraded from +a previous version of 3proxy, use --remove and --install to +reinstall the service.

-

daemon +

daemon
-Should be specified to close console. Do not use +Should be specified to close the console. Do not use ´daemon´ with ´service´. At least -under FreeBSD ´daemon´ should preceed any proxy -service and log commands to avoid sockets problem. Always +under FreeBSD, ´daemon´ should precede any proxy +service and log commands to avoid socket problems. Always place it in the beginning of the configuration file.

-

auth +

auth <authtype> [...]
Type of user authorization. Currently supported:
none - no authentication or authorization required.
-Note: is auth is none any ip based limitation, redirection, -etc will not work. This is default authentication type
+Note: if auth is none, any IP-based limitation, redirection, +etc. will not work. This is the default authentication type +
iponly - authentication by access control list with username ignored.
Appropriate for most cases
@@ -477,12 +471,12 @@ useronly - authentication by username without checking for any password with authorization by ACLs. Useful for e.g. SOCKSv4 proxy and icqpr (icqpr set UIN / AOL screen name as a username)
-dnsname - authentication by DNS hostnname with authorization -by ACLs. DNS hostname is resolved via PTR (reverse) record -and validated (resolved name must resolve to same IP -address). It´s recommended to use authcache by ip for -this authentication. NB: there is no any password check, -name may be spoofed.
+dnsname - authentication by DNS hostname with authorization +by ACLs. The DNS hostname is resolved via a PTR (reverse) +record and validated (the resolved name must resolve to the +same IP address). It´s recommended to use authcache by +IP for this authentication. NB: there is no password check; +the name may be spoofed.
strong - username/password authentication required. It will work with SOCKSv5, FTP, POP3 and HTTP proxy.
cache - cached authentication, may be used with @@ -490,24 +484,24 @@ cache - cached authentication, may be used with radius - authentication with RADIUS.
Plugins may add additional authentication types.

-

It´s -possible to use few authentication types in the same -commands. E.g.
+

It´s +possible to use multiple authentication types in the same +command. E.g.
auth iponly strong
-In this case ´strong´ authentication will be -used only in case resource access can not be performed with -´iponly´ authentication, that is username is -required in ACL. It´s usefull to protect access to -some resources with password allowing passwordless access to -another resources, or to use IP-based authentication for -dedicated laptops and request username/password for shared -ones.

+In this case, ´strong´ authentication will be +used only if resource access cannot be performed with +´iponly´ authentication, that is, a username is +required in the ACL. It´s useful to protect access to +some resources with a password while allowing passwordless +access to other resources, or to use IP-based authentication +for dedicated laptops and request a username/password for +shared ones.

-

authcache +

authcache <cachtype> <cachtime>
-Cache authentication information to given amount of time -(cachetime) in seconds. Cahtype is one of:
+Cache authentication information for a given amount of time +(cachetime) in seconds. Cachetype is one of:
ip - after successful authentication all connections during caching time from same IP are assigned to the same user, username is not requested.
@@ -525,7 +519,7 @@ ext - cache external IP
Use auth type ´cache´ for cached authentication

-

allow +

allow <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist> <weekdayslist> <timeperiodslist>
@@ -538,13 +532,13 @@ spaces are allowed. Usernames are case sensitive (if used with authtype nbname username must be in uppercase). Source and target lists may contain IP addresses (W.X.Y.Z), ranges A.B.C.D - W.X.Y.Z (since 0.8) or CIDRs (W.X.Y.Z/L). Since -0.6, targetlist may also contain host names, instead of -addresses. It´s possible to use wildmask in the -begginning and in the the end of hostname, e.g. *badsite.com -or *badcontent*. Hostname is only checked if hostname -presents in request. Targetportlist may contain ports (X) or -port ranges lists (X-Y). For any field * sign means ANY. If -access list is empty it´s assumed to be
+0.6, the targetlist may also contain host names, instead of +addresses. It´s possible to use a wildmask in the +beginning and at the end of the hostname, e.g. *badsite.com +or *badcontent*. The hostname is only checked if a hostname +is present in the request. Targetportlist may contain ports +(X) or port ranges lists (X-Y). For any field * sign means +ANY. If access list is empty it´s assumed to be
allow *
If access list is not empty last item in access list is assumed to be
@@ -557,8 +551,8 @@ specific addresses immediately without any conditions you should either bind proxy to appropriate interface only or to use ip filters.

-

Operation is -one of:
+

Operation is one +of:
CONNECT establish outgoing TCP connection
BIND bind TCP port for listening
UDPASSOC make UDP association
@@ -575,20 +569,20 @@ FTP_GET FTP get request
FTP_PUT FTP put request
FTP_LIST FTP list request
FTP_DATA FTP data connection. Note: FTP_DATA requires access -to dynamic non-ptivileged (1024-65535) ports on remote side. -
+to dynamic non-privileged (1024-65535) ports on the remote +side.
FTP matches any FTP/FTP Data request
ADMIN access to administration interface

-

Weeksdays are -week days numbers or periods, 0 or 7 means Sunday, 1 is +

Weekdays are +week day numbers or periods, 0 or 7 means Sunday, 1 is Monday, 1-5 means Monday through Friday.
Timeperiodlists is a list of time periods in HH:MM:SS-HH:MM:SS format. For example, 00:00:00-08:00:00,17:00:00-24:00:00 lists non-working hours.

-

parent +

parent <weight> <type> <ip> <port> <username> <password>
this command must follow "allow" rule. It extends @@ -597,9 +591,9 @@ grouped. Proxy inside the group is selected randomly. If few groups are specified one proxy is randomly picked from each group and chain of proxies is created (that is second proxy connected through first one and so on). Weight is used to -group proxies. Weigt is a number between 1 and 1000. Weights -are summed and proxies are grouped together untill weight of -group is 1000. That is:
+group proxies. Weight is a number between 1 and 1000. +Weights are summed and proxies are grouped together until +the weight of the group is 1000. That is:
allow *
parent 500 socks5 192.168.10.1 1080
parent 500 connect 192.168.10.1 3128
@@ -618,12 +612,12 @@ connections. Chains are only applied to new connections, pipelined (keep-alive) requests in the same connection use the same chain.

-

type is one of: +

type is one of:
-extip does not actully redirect request, it sets external -address for this request to <ip>. It can be chained -with another parent types. It’s usefaul to set -external IP based on ACL or make it random.
+extip does not actually redirect the request; it sets the +external address for this request to <ip>. It can be +chained with another parent type. It’s useful to set +the external IP based on ACL or make it random.
tcp simply redirect connection. TCP is always last in chain. This type of proxy is a simple TCP redirection, it does not support parent authentication.
@@ -643,10 +637,10 @@ socks4+ parent is SOCKSv4 proxy with name resolution socks5 parent is SOCKSv5 proxy
socks5+ parent is SOCKSv5 proxy with name resolution
socks4b parent is SOCKS4b (broken SOCKSv4 implementation -with shortened server reply. I never saw this kind ofservers -byt they say there are). Normally you should not use this -option. Do not mess this option with SOCKSv4a (socks4+). -
+with shortened server reply; I never saw this kind of +server, but they say there are some). Normally you should +not use this option. Do not confuse this option with +SOCKSv4a (socks4+).
socks5b parent is SOCKS5b (broken SOCKSv5 implementation with shortened server reply. I think you will never find it useful). Never use this option unless you know exactly you @@ -656,7 +650,7 @@ admin redirect request to local ´admin´ service Use "+" proxy only with "fakeresolve" option

-

IP and port are +

IP and port are ip addres and port of parent proxy server. If IP is zero, ip is taken from original request, only port is changed. If port is zero, it´s taken from original request, only @@ -665,18 +659,19 @@ special case of local redirection, it works only with socks proxy. In case of local redirection request is redirected to different service, ftp locally redirects to ftppr pop3 locally redirects to pop3p -http locally redurects to proxy admin locally -redirects to admin -s service.

+http
locally redirects to proxy admin locally +redirects to the admin -s service.

-

Main purpose of -local redirections is to have requested resource (URL or -POP3 username) logged and protocol-specific filters to be -applied. In case of local redirection ACLs are revied twice: -first, by SOCKS proxy up to ´parent´ command and -then with gateway service connection is redirected (HTTP, -FTP or POP3) after ´parent´ command. It means, -additional ´allow´ command is required for -redirected requests, for example:
+

Main purpose of +local redirections is to have the requested resource (URL or +POP3 username) logged and protocol-specific filters applied. +In case of local redirection, ACLs are reviewed twice: +first, by the SOCKS proxy up to the ´parent´ +command and then by the gateway service the connection is +redirected to (HTTP, FTP or POP3) after the +´parent´ command. It means an additional +´allow´ command is required for redirected +requests, for example:
allow * * * 80
parent 1000 http 0.0.0.0 0
allow * * * 80 HTTP_GET,HTTP_POST
@@ -685,20 +680,20 @@ redirects all SOCKS requests with target port 80 to local HTTP proxy, local HTTP proxy parses requests and allows only GET and POST requests.
parent 1000 http 1.2.3.4 0
-Changes external address for given connection to 1.2.3.4 (an -equivalent to -e1.2.3.4)
+Changes the external address for a given connection to +1.2.3.4 (equivalent to -e1.2.3.4)
Optional username and password are used to authenticate on parent proxy. Username of ´*´ means username must be supplied by user.

-

nolog +

nolog <n>
extends last allow or deny command to prevent logging, e.g.
allow * * 192.168.1.1
nolog

-

weight +

weight <n>
extends last allow or deny command to set weight for this request
@@ -706,7 +701,7 @@ allow * * 192.168.1.1
weight 100
Weight may be used for different purposes.

-

force
+

force
noforce

If force is specified for service, configuration reload will require all current sessions of this service to be @@ -716,7 +711,7 @@ closed. noforce allows to keep previously authenticated connections.

-

bandlimin +

bandlimin <rate> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist> <weekdayslist> @@ -733,30 +728,31 @@ nobandlimout <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist> <weekdayslist> <timeperiodslist>
-bandlim sets bandwith limitation filter to <rate> bps -(bits per second) If you want to specife bytes per second - -multiply your value to 8. bandlim rules act in a same manner -as allow/deny rules except one thing: bandwidth limiting is -applied to all services, not to some specific service. -bandlimin and nobandlimin applies to incoming traffic -bandlimout and nobandlimout applies to outgoing traffic If -tou want to ratelimit your clients with IPs 192.168.10.16/30 -(4 addresses) to 57600 bps you have to specify 4 rules like -
+bandlim sets a bandwidth limitation filter to <rate> +bps (bits per second). If you want to specify bytes per +second, multiply your value by 8. bandlim rules act in the +same manner as allow/deny rules, except for one thing: +bandwidth limiting is applied to all services, not to some +specific service. bandlimin and nobandlimin apply to +incoming traffic
+bandlimout and nobandlimout apply to outgoing traffic
+If you want to ratelimit your clients with IPs +192.168.10.16/30 (4 addresses) to 57600 bps, you have to +specify 4 rules like
bandlimin 57600 * 192.168.10.16
bandlimin 57600 * 192.168.10.17
bandlimin 57600 * 192.168.10.18
bandlimin 57600 * 192.168.10.19
-and every of you clients will have 56K channel. If you +and each of your clients will have a 56K channel. If you specify
bandlimin 57600 * 192.168.10.16/30
-you will have 56K channel shared between all clients. if you -want, for example, to limit all speed ecept access to POP3 -you can use
+you will have a 56K channel shared between all clients. If +you want, for example, to limit all speed except access to +POP3, you can use
nobandlimin * * * 110
before the rest of bandlim rules.

-

connlim +

connlim <rate> <period> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist> <weekdayslist> @@ -772,13 +768,13 @@ connections.
connlim 100 60 * 127.0.0.1
allows 100 connections per minute for 127.0.0.1.
connlim 20 0 * 127.0.0.1
-allows 20 simulationeous connections for 127.0.0.1.
-Like with bandlimin, if individual limit is required per -client, separate rule mustbe added for every client. Like -with nobanlimin, noconnlim adds an exception.

+allows 20 simultaneous connections for 127.0.0.1.
+Like with bandlimin, if an individual limit is required per +client, a separate rule must be added for every client. Like +with nobandlimin, noconnlim adds an exception.

-

counter -<filename> <reporttype> <repotname> +

counter +<filename> <reporttype> <reportname>
countin
<number> <type> <limit> <userlist> <sourcelist> <targetlist> @@ -805,30 +801,32 @@ nocountall
<userlist> <sourcelist> <operationlist> <weekdayslist> <timeperiodslist>

-

counter, -countin, nocountin, countout, noucountout, countall, -nocountall commands are used to set traffic limit in MB for -period of time (day, week or month). Filename is a path to a -special file where traffic information is permanently -stored. number is sequential number of record in this file. -If number is 0 this counter is not preserved in counter file -(that is if proxy restarted all counters with 0 are flushed) -overwise it should be unique sequential number which points -to position of the couter within the file. Type specifies a +

counter, +countin, nocountin, countout, nocountout, countall, +nocountall commands are used to set a traffic limit in MB +for a period of time (day, week or month). Filename is a +path to a special file where traffic information is +permanently stored. The number is the sequential number of +the record in this file. If the number is 0, this counter is +not preserved in the counter file (that is, if the proxy is +restarted, all counters with 0 are flushed); otherwise, it +should be a unique sequential number which points to the +position of the counter within the file. Type specifies a type of counter. Type is one of:
-H - counter is resetted hourly
-D - counter is resetted daily
-W - counter is resetted weekly
-M - counter is resetted monthely
-reporttype/repotname may be used to generate traffic -reports. Reporttype is one of D,W,M,H(hourly) and repotname -specifies filename template for reports. Report is text file -with counter values in format:
+H - counter is reset hourly
+D - counter is reset daily
+W - counter is reset weekly
+M - counter is reset monthly
+reporttype/reportname may be used to generate traffic +reports. Reporttype is one of D, W, M, H (hourly) and +reportname specifies the filename template for reports. The +report is a text file with counter values in the format: +
<COUNTERNUMBER> <TRAF>
The rest of parameters is identical to bandlim/nobandlim.

-

users +

users username[:pwtype:password] ...
pwtype is one of:
none (empty) - use system authentication
@@ -843,16 +841,21 @@ users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63

+ -

Note: double quotes are requiered because password -contains $ sign.

+

Note: double quotes are required because the password +contains a $ sign.

+ + + + -

flush +

flush
-empty active access list. Access list must be flushed avery -time you creating new access list for new service. For -example:
+empty the active access list. The access list must be +flushed every time you create a new access list for a new +service. For example:
allow *
pop3p
flush
@@ -860,60 +863,61 @@ allow * 192.168.1.0/24
socks
sets different ACLs for pop3p and socks

-

system +

system <command>
execute system command

-

pidfile +

pidfile <filename>
write pid of current process to file. It can be used to manipulate 3proxy with signals under Unix. Currently next signals are available:

-

monitor +

monitor <filename>
If file monitored changes in modification time or size, 3proxy reloads configuration within one minute. Any number of files may be monitored.

-

setuid +

setuid <uid>
calls setuid(uid), uid can be numeric or since 0.9 username. Unix only. Warning: under some Linux kernels setuid() works for current thread only. It makes it impossible to suid for all threads.

-

setgid +

setgid <gid>
calls setgid(gid), gid can be numeric or since 0.9 groupname. Unix only.

-

chroot +

chroot <path> [<uid>] [<gid>]
calls chroot(path) and sets gid/uid. Unix only. uid/gid supported since 0.9, can be numeric or username/groupname

-

stacksize +

stacksize <value_to_add_to_default_stack_size>
-Change default size for threads stack. May be required in -some situation, e.g. with non-default plugins, on on some -platforms (some FreeBSD version may require adjusting stack -size due to invalid defined value in system header files, -this value is also oftent reqruied to be changed for ODBC -and PAM support on Linux. If you experience 3proxy crash on -request processing, try to set some positive value. You may -start with stacksize 65536 and then find the minimal value -for service to work. If you experience memory shortage, you -can try to experiment with negative values.

+Change the default size for thread stacks. May be required +in some situations, e.g. with non-default plugins, or on +some platforms (some FreeBSD versions may require adjusting +the stack size due to an incorrectly defined value in system +header files; this value is also often required to be +changed for ODBC and PAM support on Linux). If you +experience 3proxy crash on request processing, try to set +some positive value. You may start with stacksize 65536 and +then find the minimal value for the service to work. If you +experience memory shortage, you can try to experiment with +negative values.

PLUGINS

-

plugin +

plugin <path_to_shared_library> <function_to_call> [<arg1> ...]
Loads specified library and calls given export function with @@ -924,19 +928,19 @@ function_to_call must return 0 in case of success, value > 0 to indicate error.

-

filtermaxsize +

filtermaxsize <max_size_of_data_to_filter>
If Content-length (or another data length) is greater than -given value, no data filtering will be performed thorugh +the given value, no data filtering will be performed through filtering plugins to avoid data corruption and/or -Content-Length chaging. Default is 1MB (1048576).

+Content-Length changing. Default is 1MB (1048576).

BUGS

-

Report all bugs +

Report all bugs to 3proxy@3proxy.org

SEE ALSO @@ -944,7 +948,7 @@ to 3proxy@3proxy.org

-

3proxy(8), +

3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
https://3proxy.org/

@@ -954,7 +958,7 @@ https://3proxy.org/

-

3APA3A is +

3APA3A is pronounced as ``zaraza´´.

AUTHORS @@ -962,7 +966,7 @@ pronounced as ``zaraza´´.

-

3proxy is +

3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


diff --git a/3proxy.md b/3proxy.md index 0603362..c616d3e 100644 --- a/3proxy.md +++ b/3proxy.md @@ -1,4 +1,4 @@ - + @@ -26,7 +26,7 @@ -

3proxy - +

3proxy - 3[APA3A] tiny proxy server, or trivial proxy server, or free proxy server

@@ -35,7 +35,7 @@ proxy server

-

3proxy +

3proxy [config_file]
3proxy
[--install]
3proxy
[--remove]

@@ -45,41 +45,42 @@ proxy server

-

3proxy -is universal proxy server. It can be used to provide -internal users wuth fully controllable access to external -resources or to provide external users with access to -internal resources. 3proxy is not developed to replace -squid(8), but it can extend functionality of existing -cashing 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 +

3proxy 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 +squid(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 configuration file -like independant service proxy(8) socks(8) -pop3p(8) tcppm(8) udppm(8) -ftppr(8) dnspr but 3proxy is not a kind -of wrapper or superserver for this daemons. It just has same -code compiled in, but provides much more functionality. -SOCKSv5 implementatation allows to use 3proxy with any UDP -or TCP based client applications designed without proxy -support (with SocksCAP, 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.

+portmappers. Each gateway is started from the configuration +file like an independent service proxy(8) +socks(8) pop3p(8) tcppm(8) +udppm(8) ftppr(8) dnspr but +3proxy 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 +SocksCAP, FreeCAP 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.

-

dnspr -does not exist as independant service. It´ DNS caching -proxy (it requires nscache and 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 DNS server, but it works +

dnspr +does not exist as an independent service. It’s a DNS +caching proxy (it requires nscache and nserver +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.

-

3proxy supports +

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 @@ -92,10 +93,10 @@ 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.

-

It supports +

It supports different types of logging: to logfiles, syslog(3) -(only under Unix) or to ODBC database. Logging format is -turnable to provide compatibility with existing log file +(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.

@@ -105,28 +106,28 @@ Apache or Squid log parsers.

-

config_file

+

config_file

-

Name of config file. See +

Name of config file. See 3proxy.cfg(3) for configuration file format. Under Windows, if config_file is not specified, 3proxy -looks for file named 3proxy.cfg in the default -location (in same directory with executable file and in -current directory). Under Unix, if no config file is +looks for a file named 3proxy.cfg 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
+it possible to use the 3proxy.cfg file as an executable +script just by setting +x mode and adding
#!/usr/local/3proxy/3proxy
as a first line in 3proxy.cfg

-

--install

+

--install

-

(Windows NT family only) +

(Windows NT family only) install 3proxy as a system service

-

--remove

+

--remove

-

(Windows NT family only) remove +

(Windows NT family only) remove 3proxy from system services

SIGNALS @@ -134,38 +135,38 @@ install 3proxy as a system service

-

Under Unix -there are few signals 3proxy catches. See -kill(1).
+

Under Unix there +are a few signals 3proxy catches. See kill(1). +
SIGTERM

-

cleanup connections and +

clean up connections and exit

-

SIGPAUSE

+

SIGPAUSE

-

stop to accept new connections, +

stop accepting new connections, on second signal - start and re-read configuration

-

SIGCONT

+

SIGCONT

-

start to accept new -conenctions

+

start to accept new +connections

-

SIGUSR1

+

SIGUSR1

-

reload configuration

+

reload configuration

-

Under Windows, -if 3proxy is installed as service you can standard -service management to start, stop, pause and continue 3proxy -service, for example:
+

Under Windows, +if 3proxy is installed as a service you can use +standard service management to start, stop, pause and +continue the 3proxy service, for example:
net start 3proxy
net stop 3proxy
net pause 3proxy
net continue 3proxy

-

Web admin +

Web admin service can also be used to reload configuration. Use wget to automate this task.

@@ -175,10 +176,10 @@ to automate this task.

-

/usr/local/3proxy/3proxy.cfg +

/usr/local/3proxy/3proxy.cfg (3proxy.cfg)

-

3proxy configuration +

3proxy configuration file

BUGS @@ -186,7 +187,7 @@ file

-

Report all bugs +

Report all bugs to 3proxy@3proxy.org

SEE ALSO @@ -194,7 +195,7 @@ to 3proxy@3proxy.org

-

3proxy.cfg(3), +

3proxy.cfg(3), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), kill(1), syslogd(8),
https://3proxy.org/

@@ -204,7 +205,7 @@ https://3proxy.org/

-

3APA3A is +

3APA3A is pronounced as ``zaraza´´.

AUTHORS @@ -212,7 +213,7 @@ pronounced as ``zaraza´´.

-

3proxy is +

3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


diff --git a/High-Load.md b/High-Load.md index f22441c..a66e644 100644 --- a/High-Load.md +++ b/High-Load.md @@ -1,12 +1,12 @@ -

Optimizing 3proxy for high load

-

Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product, the main reason is "one connection - one thread" model 3proxy uses. 3proxy is known to work with above 200,000 connections under proper configuration, but use it in production environment under high loads at your own risk and do not expect too much. -

Precaution 2: This documentation is incomplete and is not sufficient. High loads may require very specific system tuning including, but not limited to specific or cusomized kernels, builds, settings, sysctls, options, etc. All this is not covered by this documentation. +

Optimizing 3proxy for High Load

+

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. +

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.

Configuring 'maxconn'

-A number of simulatineous connections per service is limited by 'maxconn' option. -Default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn' -to higher value. Under this configuration: +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:
 maxconn 1000
 proxy -p3129
@@ -14,53 +14,53 @@ proxy -p3128
 socks
 
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 -simulatineous connections to 3proxy. -

Avoid setting 'maxconn' to arbitrary high value, it should be carefully -choosen to protect system and proxy from resources exhaution. Setting maxconn -above resources available can lead to denial of service conditions. -

Understanding resources requirements

-Each running service require: +(2 proxy and 1 socks), so for all services there can be up to 3000 +simultaneous connections to 3proxy. +

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. +

Understanding Resource Requirements

+Each running service requires:
    -
  • 1*thread (process) -
  • 1*socket (file descriptor) +
  • 1 thread (process) +
  • 1 socket (file descriptor)
  • 1 stack memory segment + some heap memory, ~64K-128K depending on the system
-Each connected client require: +Each connected client requires:
    -
  • 1*thread (process) -
  • 2*socket (file descriptor). For FTP 4 sockets are required. -
    Under linux since 0.9 splice() is used. It's much more effective, but requires -
    2*socket (file descriptor) + 2*pipe (file descriptors) = 4 file descriptors. -
    For FTP 4 sockets and 2 pipes are required with splice(). -
    Up to 128K (up to 256K in the case of splice()) of kernel buffers memory. This is theoretical maximum, actual numbers depend on connection quality and traffic amount. +
  • 1 thread (process) +
  • 2 sockets (file descriptors). For FTP, 4 sockets are required. +
    Under Linux since 0.9, splice() is used. It's much more efficient but requires +
    2 sockets (file descriptors) + 2 pipes (file descriptors) = 4 file descriptors. +
    For FTP with splice(), 4 sockets and 2 pipes are required. +
    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.
    1 additional socket (file descriptor) during name resolution for non-cached names
    1 additional socket during authentication or logging for RADIUS authentication or logging. -
  • 1*ephemeral port (3*ephemeral ports for FTP connection). -
  • 1 stack memory segment of ~32K-128K depending on the system + at least 16K and up to few MB (for 'proxy' and 'ftppr') of heap memory. If you are short of memory, prefer 'socks' to 'proxy' and 'ftppr'. -
  • a lot of system buffers, specially in the case of slow network connections. +
  • 1 ephemeral port (3 ephemeral ports for FTP connections). +
  • 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'. +
  • Many system buffers, especially in the case of slow network connections.
Also, additional resources like system buffers are required for network activity.

Setting ulimits

Hard and soft ulimits must be set above calculated requirements. Under Linux, you can -check limits of running process with +check the limits of a running process with
 cat /proc/PID/limits
 
-where PID is a pid of the process. -Validate ulimits match your expectation, especially if you run 3proxy under dedicated account -by adding e.g. +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.:
 system "ulimit -Ha >>/tmp/3proxy.ulim.hard"
 system "ulimit -Sa >>/tmp/3proxy.ulim.soft"
 
-in the beginning (before first service started) and the end of config file. -Make both hard restart (that is kill and start 3proxy process) and soft restart -by sending SIGUSR1 to 3proxy process, check ulimits recorded to files match your -expecation. In systemd based distros (e.g. latest Debian / Ubuntu) changing limits.conf -is not enough, limits must be ajusted in systemd configuration, e.g. by setting +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:
 DefaultLimitDATA=infinity
 DefaultLimitSTACK=infinity
@@ -73,51 +73,51 @@ DefaultLimitMEMLOCK=infinity
 
in user.conf / system.conf -

Extending system limitation

+

Extending System Limitations

-Check manuals / documentation for your system limitations e.g. system-wide limit for number of open files +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.

-To help with socket-based system-dependant settings, since 0.9-devel 3proxy supports different -socket options which can be set via -ol option for listening socket, -oc for proxy-to-client -socket and -os for proxy-to-server socket. Example: +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:

 proxy -olSO_REUSEADDR,SO_REUSEPORT -ocTCP_TIMESTAMPS,TCP_NODELAY -osTCP_NODELAY
 
-available options are system dependant. +Available options are system-dependent. -

Using 3proxy in virtual environment

+

Using 3proxy in a Virtual Environment

-If 3proxy is used in VPS environment, there can be additional limitations. -For example, kernel resources / system CPU usage / IOCTLs can be limited in a different way, 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 3proxy process and generally increases throughput, epecially in the case of high volume traffic. It especially -true for virtual environment (it can improve thoughput up to 10 times) unless there are additional kernel limitations. -Since some work is moved to 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 it as nearly 100% CPU usage without any real CPU activity for -any application which performs IOCTLS), use -s0 option to disable splice() usage for given service e.g. -
 
+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.:
+
 socks -s0
 
-

Extending ephemeral port range

+

Extending the Ephemeral Port Range

-Check ephemeral port range for your system and extend it to the number of the +Check the ephemeral port range for your system and extend it to the number of ports required. -Ephimeral range is always limited to maximum number of ports (64K). To extend the -number of outgoing connections above this limit, extending ephemeral port range -is not enough, you need additional actions: +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:
  1. Configure multiple outgoing IPs -
  2. Make sure 3proxy is configured to use different outgoing IP by either setting -external IP via RADIUS +
  3. Make sure 3proxy is configured to use a different outgoing IP by either setting +the external IP via RADIUS:
     radius secret 1.2.3.4
     auth radius
     proxy
     
    or by using multiple services with different external -interfaces, example: +interfaces, for example:
     allow user1,user11,user111
     proxy -p1111 -e1.1.1.1
    @@ -133,7 +133,7 @@ proxy -p4444 -e4.4.4.4
     flush
     
    or via "parent extip" rotation, -e.g. +e.g.:
     allow user1,user11,user111
     parent 1000 extip 1.1.1.1 0
    @@ -156,8 +156,8 @@ socks
     
     
    -Under latest Linux version you can also start multiple services with different -external addresses on the single port with SO_REUSEPORT on listening socket to +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:
     socks -olSO_REUSEPORT -p3128 -e 1.1.1.1
    @@ -165,136 +165,136 @@ 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
     
    -for Web browsing last two examples are not recommended, because same client can get -different external address for different requests, you should choose external +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. -
  4. You may need additional system dependant actions to use same port on different IPs, -usually by adding SO_REUSEADDR (SO_PORT_SCALABILITY for Windows) socket option to -external socket. This option can be set (since 0.9 devel) with -os option: +
  5. 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:
     proxy -p3128 -e1.2.3.4 -osSO_REUSEADDR
     
    -Behavior for SO_REUSEADDR and SO_REUSEPORT is different between different system, -even between different kernel versions and can lead to unexpected results. -Specifics is described here. -Use this options only if actually required and if you fully understand possible -consiquences. E.g. SO_REUSEPORT can help to establish more connections than the -number of the client port available, but it can also lead to situation connections -are randomely fail due to ip+port pairs collision if remote or local system +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 here. +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.
-

Setting stacksize

+

Setting Stack Size

'stacksize' is a size added to all stack allocations and can be both positive and -negative. Stack is required in functions call. 3proxy itself doesn't require large +negative. Stack is required for function calls. 3proxy itself doesn't require a large stack, but it can be required if some -purely-written libc, 3rd party libraries or system functions called. There is known\ +poorly written libc, 3rd party libraries, or system functions are called. There is known dirty code in Unix ODBC -implementations, build-in DNS resolvers, especially in the case of IPv6 and large -number of interfaces. Under most 64-bit system extending stacksize will lead -to additional memory space usage, but do not require actual commited memory, -so you can inrease stacksize to relatively large value (e.g. 1024000) without -the need to add additional phisical memory, -but it's system/libc dependant and requires additional testing under your -installation. Don't forget about memory related ulimts. -

For 32-bit systems address space can be a bottlneck you should consider. If -you're short of address space you can try to use negative stack size. +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. +

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. -

Known system issues

+

Known System Issues

-There are known race condition issues in Linux / glibc resolver. The probability -of race condition arises under configuration with IPv6, large number of interfaces -or IP addresses or resolvers configured. In this case, install local recursor and -use 3proxy built-in resolver (nserver / nscache / nscache6). -

Do not use public resolvers

-Public resolvers like ones from Google have ratelimits. For large number of -requests install local caching recursor (ISC bind named, PowerDNS recursor, etc). +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). +

Do Not Use Public Resolvers

+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). -

Avoid large lists

+

Avoid Large Lists

Currently, 3proxy is not optimized to use large ACLs, user lists, etc. All lists -are processed lineary. In devel version you can use RADIUS authentication to avoid -user lists and ACLs in 3proxy itself. Also, RADIUS allows to easily set outgoing IP -on per-user basis or more sophisicated logics. -RADIUS is a new beta feature, test it before using in production. +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. -

Avoid changing configuration too often

+

Avoid Changing Configuration Too Often

-Every configuration reload requires additional resources. Do not do frequent -changes, like users addition/deletaion via connfiguration, use alternative +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. -

Consider using 'noforce'

+

Consider Using 'noforce'

-'force' behaviour (default) re-authenticates all connections after -configuration reload, it may be resource consuming on large number of -connections. Consider adding 'noforce' command before services started -to prevent connections reauthentication. +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. -

Do not monitor configuration files directly

+

Do Not Monitor Configuration Files Directly

-Using configuration file directly in 'monitor' can lead to race condition where -configuration is reloaded while file is being written. +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:
  1. Update config files only if there is no lock file -
  2. Create lock file then 3proxy configuration is updated, e.g. with +
  3. 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 user's request via web, you should consider -implementing existance checking and file creation as atomic operation. -
  4. add +asynchronously, e.g., by a user's request via web, you should consider +implementing existence checking and file creation as an atomic operation. +
  5. Add
     system "rm /some/path/3proxy/3proxy.lck"
     
    -at the end of config file to remove it after configuration is successfully loaded -
  6. Use a dedicated version file to monitor, e.g. +at the end of the config file to remove it after the configuration is successfully loaded +
  7. Use a dedicated version file to monitor, e.g.:
     monitor "/some/path/3proxy/3proxy.ver"
     
    -
  8. After config is updated, change version file for 3proxy to reload configuration, -e.g. with "touch /some/path/3proxy/3proxy.ver". +
  9. After the config is updated, change the version file for 3proxy to reload the configuration, +e.g., with "touch /some/path/3proxy/3proxy.ver".
-

Use TCP_NODELAY to speed-up connections with small amount of data

+

Use TCP_NODELAY to Speed Up Connections with Small Amounts of Data

-If most requests require exchange with a small amount of data in a both ways -without the need for bandwidth, e.g. messengers or small web request, -you can eliminate Nagle's algorithm delay with TCP_NODELAY flag. Usage example: +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:
 proxy -osTCP_NODELAY -ocTCP_NODELAY
 
sets TCP_NODELAY for client (oc) and server (os) connections. -

Do not use TCP_NODELAY on slow connections with high delays and then +

Do not use TCP_NODELAY on slow connections with high delays when connection bandwidth is a bottleneck. -

Use splice to speedup large data amount transfers

+

Use Splice to Speed Up Large Data Amount Transfers

-splice() allows to copy data between connections without copying to process -addres space. It can speedup proxy on high bandwidth connections, if most +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: +since 0.9; "-s0" disables splice usage. Example:
 proxy -s0
 
-Splice is only available on Linux. Splice requires more system buffers and file descriptors, +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 is a lot of short-living connections with no bandwidth +Disable splice if there are a lot of short-lived connections with no bandwidth requirements. -

Use splice only on high-speed connections (e.g. 10GBE), if processor, memory speed or +

Use splice only on high-speed connections (e.g., 10GbE) when the processor, memory speed, or system bus are bottlenecks. -

TCP_NODELAY and splice are not contrary to each over and should be combined on +

TCP_NODELAY and splice are not contrary to each other and should be combined on high-speed connections. -

Add grace delay to reduce system calls

+

Add Grace Delay to Reduce System Calls

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. +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.
logdump 1 1
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. diff --git a/How-To-(incomplete).md b/How-To-(incomplete).md deleted file mode 100644 index 3f4152b..0000000 --- a/How-To-(incomplete).md +++ /dev/null @@ -1,1073 +0,0 @@ -
    -
  • 3APA3A 3proxy tiny proxy server HowTo -
    Under construction, very incomplete - -
    -
      -
      -
    • Compilation -

      -

        -
      • How to compile 3proxy with Visual C++ -

        -Extract source code files from 3proxy.tgz (with WinZip or another utility). -Use nmake /f Makefile.msvc command -

        -
      • How to compile 3proxy with Intel C Compiler under Windows -

        -See How to compile 3proxy with Visual C++ -Use Makefile.intl instead of Makefile.msvc -

        -
      • How to compile 3proxy with GCC under Windows
      • -

        -Extract source files from 3proxy.tgz (for example with tar -xzf 3proxy.tgz command if you have tar installed) -Use make -f Makefile.win command. -If you want to use POSIX emulation Cygwin library (normally you shouldn't) - use make -f Makefile.unix instead. -Windows specific things (like installing as service) will not be available if compiled with Cygwin emulation. -

        -
      • How to compile 3proxy with GCC under Unix/Linux
      • -

        -Use -

        -make -f Makefile.Linux
        -
        -for Linux or Cygwin, Makefile.Solaris* (depending on compiler version) for Solaris -and Makefile.unix for different Unix-like OS. On BSD derivered systems make -sure to use GNU make, sometimes it's called gmake instead of make. -
        Compilation is tested under FreeBSD/i386, NetBSD/i386, OpenBSD/i386, -RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC, Solaris/x86 but you -shouldn't have problems under different Solaris, BSD or linux compatible systems. -For different systems you may be required to patch Makefile or even source codes. -If you want to use ODBC support, make sure to install ODBC for unix, remove -DNOODBC -option from makefile compiler options and add ODBC library to linker variable. -

        -
      -
      -
    • Proxy server installation and removal -

      -

        -
      • How to install/remove 3proxy under Windows NT/2000/XP -

        -Unpack 3proxy.zip to any directory, for example -c:\Program Files\3proxy. If needed, create directory for storing log files, -ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See Server configuration). -If you use 3proxy before 0.6 Add -

        -service
        -
        -string into 3proxy.cfg. Now, start command prompt (cmd.exe). -Change directory to 3proxy installation and run 3proxy.exe --install: -
        -D:\>C:
        -C:\>cd C:\Program Files\3proxy
        -C:\Program Files\3proxy>3proxy.exe --install
        -
        -Now, you should have 3proxy service installed and running. If service is not -started, remove "service" string from 3proxy.cfg, run 3proxy.exe manually -and correct all errors. -

        -To remove 3proxy run 3proxy --remove: -

        -D:\>C:
        -C:\>cd C:\Program Files\3proxy
        -C:\Program Files\3proxy>net stop 3proxy
        -C:\Program Files\3proxy>3proxy.exe --remove
        -
        -Now you can simply remove 3proxy installation directory. -

        -
      • How to install/remove 3proxy under Windows 95/98/ME -

        -Unpack 3proxy.zip to any directory, for example -c:\Program Files\3proxy. If needed, create directory for storing log files, -ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See Server configuration). -Remove string -

        -service
        -
        -from 3proxy.cfg and add -
        -daemon
        -
        -if you want 3proxy to run in background. -Create shortcut for 3proxy.exe and place it in autostart or add -to registry with regedit.exe: -
        HKLM\Software\Microsoft\Windows\CurrentVersion\Run
        -Type: String -
        3proxy = "c:\Program Files\3proxy.exe" "C:\Program Files\3proxy.cfg"
        -You must use quotes if path contains space. If neccessary, restart Windows. -If service is not started, check log. Remove "daemon" command from 3proxy.cfg, -start 3proxy.exe manually and correct all errors. -

        -
      • How to install/remove 3proxy under Unix/Linux -

        -Complie 3proxy (see Compilation). Copy -executables to any appropriate location (for example /usr/local/3proxy/sbin -for servers and /usr/local/3proxy/bin for utilities). -Create /usr/local/etc/3proxy.cfg. -(see Server configuration). -You can change default configuration file location by specifing configuration file -in 3proxy command line. -Add 3proxy to system startup scripts. -

        -
      -
      -
    • Server configuration -

      -

        -
      • How to make 3proxy start -

        Valid configuration file is required. - -

      • How to make limitation (access, bandwidth, traffic, connections) work -

        Most probable reasons for non-working limitations: '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 *'. - -

      • How to make 3proxy to run as a service -

        Possible reasons for 3proxy starts manually but fails to start as a service: -

          -
        • 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). -
        • SYSTEM account doesn't have access to executable file, configuration files, -log files, etc. -
        • configuration files is not located in default path (3proxy.cfg in same -location with 3proxy.exe). For alternative configuration file location use -
          -3proxy --install full_path_to_configuration_file
          -
          -
        • user has no rights to install or start service -
        • service is already installed and/or started - -
        - -

        How to understant internal and external -

        -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 -

        -     LAN connection +-------------+ Internet connection
        -LAN <-------------->| 3proxy host |<-------------------> INTERNET
        -                   ^+-------------+^
        -	           |               |
        -              Internal IP       External IP
        -
        -If 3proxy is used on the host with single connection, both internal and -external are usually same IP. -
        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. -
        -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. - -
      • How to make ODBC logging work? -

        -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. - -

      • How to make IPv6 work -

        Proxy can not access destination directly over IPv6 if client requests IPv4 address. -To access IPv6 destination, either IPv6 address or hostname must be used in request. -Best solution is to enable option to resolve hostnames via proxy on client side. - -

      • How to fix 3proxy crashes -

        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. - - -

      • Where to find configuration example -

        -Server configuration example 3proxy.cfg.sample is in any 3proxy distribution. -

        -
      • How to set up logging -

        -3proxy can log to stdout, file, ODBC datasource and -syslog (Unix/Linux/Cygwin only). For using ODBC under Unix/Linux you must -compile 3proxy with Unix ODBC libraries, see Compilation. -You can control logging from 3proxy.cfg for all services or you can control -logging of individual service, for example -/usr/local/sbin/socks -l/var/log/socks.log starts SOCKS proxy with logging to file. -For universal proxy (3proxy) log file rotation and archiving is supported. -Log type is defined with "log" configuration file command or with --l switch on individual service invokation. log or -l is stdout logging. -

        -	log filename
        -
        -and -
        -	-lfilename
        -
        -specify filename for logging -
        -	log @ident
        -
        -and -
        -	-l@ident
        -
        -specify ident for syslog logging. If filename within "log" command contains -'%' characters, it's processes as format specificator (see "logformat"). E.g. -log c:\3proxy\logs\%y%m%d.log D creates file like c:\3proxy\logs\060729.log, -date is generated based on local time. -
        -	log &connstring
        -
        - -specifies ODBC connection string, connstring is in format -datasource,username,password (2 last are optional of -datasource does not require or already has authentication information). -Also, you must specify logformat to build SQL query, to insert recod into -log, see How to setup logging format -

        -

        -Rotation and archiving may be set up with log, rotate ¨ archiver commands -

        -	log filename LOGTYPE
        -
        -sets rotation type. LOGTYPE may be: -
          -
        • M, monthely -
        • W, weekly -
        • D, daily -
        • H, hourly -
        • C, minutely -
        -
        -	rotate NUMBER
        -
        - specifies number of files in rotation (that is how many files to keep). -
        -	archiver EXT COMMAND PARAMETERS
        -
        - Sets external archiver. EXT is extention of archived files - (for example zip, gz, Z, rar etc) COMMAND and PARAMETERS are command - to execute and command line PARAMETERS. Originale file is not deleted by - 3proxy, this work is left for archiver. - You can pass original filename to archiver with %F macro and archive filename with %A. - Examples are located in - 3proxy.cfg.sample -

        -
      • How to setup logging format -

        - Since 0.3 version log format may be set with "logformat" command. - First symbol of log format specifies format of date and time and - should be L (LOCAL) or G (GMT - Grinwitch Meridian Time). Format - string may contains some macro substitutions: -

          -
        • %y - Year (2 digits) -
        • %Y - Year (4 digits) -
        • %m - Month (2 digits) -
        • %o - mOnth (3 letter abbriviation) -
        • %d - Day (2 digits) -
        • %H - Hour (2 digits) -
        • %M - Minute (2 digits) -
        • %S - Second (2 digits) -
        • %t - Timestamp (seconds since January, 1 1970 00:00:00 GMT) -
        • %. - Milliseconds -
        • %z - Timezone in mail format (from GMT, '+' east, '-' west HHMM), For example Moscow winter time is +0300. -
        • %U - Username ('-' if unknown). -
        • %N - Service name (PROXY, SOCKS, POP3P, etc) -
        • %p - Service port -
        • %E - Error code (see. Log error codes reference) -
        • %C - client IP -
        • %c - client port -
        • %R - target IP -
        • %r - target port -
        • %e - external IP address used to establish connection -
        • %Q - requested IP -
        • %q - requested port -
        • %I - bytes received from target -
        • %O - bytes sent to target -
        • %n - host name from request -
        • %h - hops before target (if redirection or chaning is used). - see How to use chains and parent proxies) -
        • %T - service specific text (for example URL requested). %X-YT - where X and Y are positive numbers, only displays fields - (space delimited) X to Y of the text. An example is %1-2T. -
        - Example: -
        -logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
        -
        - generates something like -

        -1042454727.0296 SOCK4.1080 000 3APA3A 127.0.0.1:4739 195.122.226.28:4739 505 18735 1 GET http://3proxy.org/ HTTP/1.1 - -
        (no line breaks) -

        -

        - If ODBC used, logformat should specify SQL command, - to insert record into log, for example -

        -logformat "-\'+_GINSERT INTO proxystat  VALUES (%t, '%c', '%U', %I)"
        -
        (no line breaks) -
        -\'+_ instructs to replace characters \ and ' with _ -

        -
      • How to use log analizers with 3proxy -

        -Just make format of 3proxy logs compatible with format supported by your -favourite log analizer. Examples of compatible logformats are: -
        -For Squid access.log: -

        -"- +_G%t.%. %D %C TCP_MISS/200 %I %1-1T %2-2T %U DIRECT/%R application/unknown" -

        -or, more compatible format without %D -
        -"- +_G%t.%.      1 %C TCP_MISS/200 %I %1-1T %2-2T %U
        - DIRECT/%R application/unknown"
        -
        -ISA 2000 proxy WEBEXTD.LOG (fields are TAB-delimited): -
        -"-	+ L%C	%U	Unknown	Y	%Y-%m-%d	%H:%M:%S
        -	w3proxy	3PROXY	-	%n	%R	%r	%D
        -	%O	%I	http	TCP	%1-1T	%2-2T	-	-
        -	%E	-	-	-"
        -
        -ISA 2004 proxy WEB.w3c (fields are TAB-delimited): -
        -"-	+ L%C	%U	Unknown	%Y-%m-%d	%H:%M:%S
        -	3PROXY	-	%n	%R	%r	%D	%O
        -	%I	http	%1-1T	%2-2T	-	%E	-
        -	-	Internal	External	0x0	Allowed"
        -
        -ISA 2000/2004 firewall FWSEXTD.log (fields are TAB-delimited): -
        -"-	+ L%C	%U	unnknown:0:0.0	N	%Y-%m-%d
        -	%H:%M:%S	fwsrv	3PROXY	-	%n	%R	%r
        -	%D	%O	%I	%r	TCP	Connect	-	-
        -	-	%E	-	-	-	-	-"
        -
        -HTTPD standard log (Apache and others): -

        -"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" %E %I" -

        -or more compatible without error code -

        -"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" 200 %I" -

        -
      • How to start any of proxy services (HTTP, SOCKS etc) -

        -3proxy is distributed in 2 variants: as a set of standalone modules (proxy, -socks, pop3p, tcppm, udppm) and as universal proxy server. These services are -absolutely independant, and if you use 3proxy you needn't any of standalone -modules. -
        Standalone modules are only configurable via command line interface while -3proxy uses configuration file. Many functions, such as ODBC logging, log -rotation, access control, etc are only available in 3proxy, not in standalone -proxies. -Standalone module may be started from command line, for example: -

        -$/sbin/socks -l/var/log/socks.log -i127.0.0.1
        -
        -Starts SOCKS server binded to localhost ip, port 1080 with logging to -/var/log/socks.log. -You can get help for any standalone service with -? command line option. -

        -If 3proxy is used you should start all services in 3proxy.cfg file. 3proxy.cfg -is executed by 3proxy as a batch file. Example of 3proxy.cfg and command syntaxys -can be found in -3proxy.cfg.sample. -

        -log /var/log/3proxy.log D
        -rotate 30
        -internal 127.0.0.1
        -external 192.168.1.1
        -proxy
        -socks -p3129
        -pop3p 
        -
        -Starts 3 services: HTTP PROXY, SOCKS and POP3 PROXY. Each listens localhost -interface with default port (3128 for HTTP, 1080 for SOCKS and 110 for POP3P) -except socks started with port 3129. -All logs are in file /var/log/3proxy.log (with daily date modification and -rotation). 30 last files are stored. -

        -
      • How to bind service to specific interface and port? -

        --i options specifies internal interface, -p - listening port. No space are -allowed. To bind 'proxy' service to port 8080 on interfaces 192.168.1.1 -and 192.168.2.1 use -

        -proxy -p8080 -i192.168.1.1
        -proxy -p8080 -i192.168.2.1
        -
        -

        -
      • How to resolve names through a parent proxy
      • -

        - A: Use one of proxy, connect+, socks4+ or socks5+ as a parent type. 3proxy - itself still performs a name resolution, it's required e.g. to ACLs matching. - So, if no name resolution must be performed by 3proxy itself add a command -

        -  fakeresolve
        - this command resolves any name to 127.0.0.2 address. -

        -
      • How to setup FTP proxy
      • -

        - There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP ¯பᨠ- (what is called FTP proxy in file managers and FTP clients). For browsers, there is no need to start additional - proxy service, 'proxy' supports FTP over HTTP, configure 'proxy' port as an FTP proxy. For ftp clients and file - managers use ftppr. FTP proxy supports both active and passive mode with client, but always use passive mode with FTP servers. -

        -
      • How to setup SNI proxy (tlspr)
      • -

        - SNI proxy can be used to transparently redirect any TLS traffic with external router or local redirection rules. It can also be used - to extract hostnames from TLS to use in ACLs in combination with SOCKS or HTTP(s) proxy and/or Transparent plugin. It can also be used to require TLS or mTLS between services. TLS hadshake contains no - port information, if tlspr is used as a standalone service, destination port may be either detected with Transparent plugin or configured with -P option (default 443). -

        - -c option is used to specify level of TLS check: -

        -0 (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)    
        -
        -

        -configuration examples: -1. port 1443 may be used to redirect traffic to destination port 143). SNI is used to find destination host -

        -tlspr -p1443 -P443 -c1
        -
        -2. used as parent tls to detect destination hostname from TLS in socks -
        -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
        -
        -

        -
      • How to limit service access -

        -First, always specify internal interface to accept incoming connection with -'internal' configuration command or '-i' service command. (See -How to start any of proxy services (HTTP, SOCKS etc)). If -no internal interface is specified your proxy will act as open one. -

        It's also important to specify external interface to prevent access to -internal network with 'external' or -e. -

        3proxy with configuration files allows to use authentication and -authorization for user's access. Authentication is possible by -username/password or user's NetBIOS name. Authentication type is specified by -'auth' command. -

        -auth none
        -
        -Disables both authentication and authorization. You can not use ACLs. -
        -auth iponly
        -
        -Specifies no authentication, ACLs authorization is used. -
        -auth nbname
        -
        -Authentication by NetBIOS name + ACLs. NetBIOS name of 'messenger' service -is obrained before ACL validation. If no name is obtained it's assumed to be -empty. Messenger is started by default in Windows NT/2000/XP. For Win9x -WinPopUP need to be launched. This type of authentication may be spoofed -by privileged local user. -
        -auth strong
        -
        -Authentication by username/password. If user is not registered his -access is denied regardless of ACLs. -

        -Different services can have different authentication levels. -

        -auth none
        -pop3p
        -auth iponly
        -proxy
        -auth strong
        -socks
        -
        - -It's possible to authorize access by client IP address, IP address or requested resource, -target port, time, etc after authentication. -(See How to limit resource access). -

        Since 0.6 version double authentication is possible, e.g. -

        -auth iponly strong
        -allow * * 192.168.0.0/16
        -allow user1,user2
        -proxy
        -
        -strong authentication will only be used if ACL requires username to deside if -access must be granted. That is, in example, strong username authentication -is not required to access 192.168.0.0/16 -

        0.6 version introduces authentication (username) caching to increase -productivity. It's recommended to use authentication caching with resource -or time consuming authentication types, such as nbname or external plugins -(WindowsAuthentication). -Caching can be set with 'authcache' command with 2 parameters: caching type -and caching time (in seconds). Caching type defines the type of cached access: -'ip' - after successful authentication all connections during caching time -from same IP are assigned to the same user, username is not requested. -"ip,user" - username is requested and all connections from the same IP are -assigned to the same user without actual authentication. "user" - same as above, -but IP is not checked. "user,password" - username and password are checked -against cached ones. For authentication special authentication type 'cache' -must be used. - Example: -

        -authcache ip 60
        -auth cache strong windows
        -proxy -n
        -
        -

        -Please note, that caching affects security. Never use caching for access to -critical resources, such as web administration. -

        authcache can be used to bind user's sessions to ip with 'limit' option, with -

        -  autchcache ip,user,pass,limit 120
        -  auth cache strong
        - user will not be able to use more than a single IP during cache time (120 sec). -

        -
      • How to create user list -

        -Userslist is created with 'users' command. -

        -users USERDESC ...
        -
        -With a single command it's possible to define few users, or you -can use few 'users' commands. USERDESC is user description. Description -consists of three semicolon delimited parts - login, password type and -
        -users admin:CL:bigsecret test:CL:password test1:CL:password1
        -users "test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49."
        -users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
        -
        -Please note the usage of quotation sign: it's required to comment out $ sign -overwise used as a file inclusion macro. -Next password types are available: -
          -
        • No password type: use system authentication. -
        • CL - cleartext password -
        • CR - crypt password, only MD5 crypt passwords are supported -
        • NT - NT-hashed (MD4) passwords in hex, as used in pwdump or SAMBA -
        -NT and crypt passwords can be used to import accounts from Windows/SAMBA or -Unix. For Windows you can use pwdump family of utilities. -It's convenient to store accounts apart and include account file with $ macro. -Because for included files newlines are treated as a space, it's possible to -use atandard passwd file format: -
        -users $/etc/.3proxypasswd
        -
        -or -
        -users $"c:\Program Files\3proxy\passwords"
        -
        -It's possible to create NT and crypt passwords with mycrypt utility included -in distribution. -
        Userlist is system-wide. To manage user access to specific service use ACLs. -

        -
      • How to limit user access to resources -

        -Commands allow, deny and flush are used to manage ACLs: -

        -allow <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> <weekdaylist> <timeperiodlist> -
        deny <userlist> <sourcelist> <targetlist> <weekdaylist> <timeperiodlist> -
        flush -
        -

        -'flush' command is used to finish with existing ACL and to start new one. -It's required to have different ACLs for different services. -'allow' is used to allow connection and 'deny' to deny connection. 'allow' -command can be extended by 'parent' command to manage redirections (see How to manage redirections)). If ACL -is empty it allow everything. If ACL is not empty, first matching ACL entry -is searched for user request and ACL action (allow or deny) performed. If -no matching record found, connection is denied and user will be asked to -re-authenticate (requested for username/password). To prevent this request -add 'deny *' to the end of list. -
          -
        • <userlist> - comma delimited list of users -
        • <sourcelist> - comma delimited list of source (client) networks. - Networks can be defined as single IP address or in CIDR form - xxx.yyy.zzz.mmm/l, where l - is the length of network mask - (a number of non-zero bits). 192.168.1.0/24 - means network with 255.255.255.0 mask. -
        • <targetlist> - comma delimited list of target (server) networks. - In 3proxy 0.6 and above it's allowed to use hostnames with wildmasks - in targetlist. Wildmask may only present in the begginning or at the - end of the hostname, e.g. - 192.168.0.0/16,www.example.com,*wrongsite.com,*wrongcontent*. -
        • <targetportlist> - comma delimited list of ports. I - It's possible to define port ranges with -, e.g. 80,1024-65535 - means port 80 and all unprivileged ports. -
        • <commandlist> - the list of allowed actions -
          CONNECT - establish outgoing TCP connection. e.g. POP3 or SOCKSv5 -
          BIND - allow incoming TCP connection (SOCKSv5) -
          UDPASSOC - create UDP association (SOCKSv5) -
          ICMPASSOC - create ICMP association (not implemented) -
          HTTP_GET - HTTP GET request (HTTP proxy) -
          HTTP_PUT - HTTP PUT request (HTTP proxy) -
          HTTP_POST - HTTP POST request (HTTP proxy) -
          HTTP_HEAD - HTTP HEAD request (HTTP proxy) -
          HTTP_CONNECT - HTTP CONNECT, aka HTTPS request (HTTP proxy) -
          HTTP_OTHER - another HTTP request (HTTP proxy) -
          HTTP - any HTTP request except HTTP_CONNECT (HTTP proxy) -
          HTTPS - alias to HTTP_CONNECT (HTTP proxy) -
          FTP_GET - FTP get request (http, ftp proxy) -
          FTP_PUT - FTP put request (ftp proxy) -
          FTP_LIST - FTP list request (http, ftp proxy) -
          FTP - any FTP request -
          ADMIN - administration interface access -

          -

        • <weeksdays> - week days numbers or periods (0 or 7 means Sunday, 1 is Monday, 1-5 means Monday through Friday). -
        • <timeperiodlists> - a list of time periods in HH:MM:SS-HH:MM:SS format. For example, - 00:00:00-08:00:00,17:00:00-24:00:00 lists non-working hours. - -
        -* in ACL means "any". -Usage examples could be found in 3proxy.cfg.sample. -

        -
      • How to manage redirections -

        -Redirections are usefull to e.g. forward requests from specific clients -to different servers or proxy server. Additionally, redirections are usefull -to convert proxy interface from ont format to another, e.g. requests from -SOCKS proxy can be redirected to parent HTTP proxy, or SOCKSv5 client can be -redirected to SOCKSv4 proxy. -
        Because 3proxy understand "transparent" web request, it can be used as an -intermediate software between HTTP proxy and NAT server for transparent HTTP -forwarding, because it can convert "Web server" request issued by client to -"proxy request" required by proxy server. A simplest redirection is: -

        -auth iponly
        -allow *
        -parent 1000 http 192.168.1.1 3128
        -proxy
        -
        -All trafiic of HTTP proxy is redirected to parent proxy 192.168.1.1 port 3128. -
        If port number is '0', IP address from 'parent' is used as external address -for this connection (that is like -eIP, but only for connections matching -'allow'). -
        Special case of redirection are local redirections. In this case both IP is -0.0.0.0 and port is 0. It's only usseful with SOCKS service. In this case no -new connection is established, but request is parsed by corresponding local -service. E.g.: -
        -auth iponly
        -allow * * * 80
        -parent 1000 http 0.0.0.0 0
        -allow * * * 21
        -parent 1000 ftp 0.0.0.0 0
        -allow * * * 110
        -parent 1000 pop3 0.0.0.0 0
        -socks
        -
        -In this case all SOCKS traffic with destination port 80 is forwarded to local -'proxy' service, destination port 21 to 'ftppr' and 110 to 'pop3pr'. There is -no need to run these services expicitly. Local redirections are usefull if -you want to see and control via ACLs protocol specific parameters, e.g. -filenames requests thorugh FTP while clients are using SOCKS. -

        -
      • Š ª ã¯ࠢ«ïâì «®ª «ì­묨 ¯¥७ ¯ࠢ«¥­¨ﬨ -

        -

        Q: What is it for?

        -A: To have control based on request and to have URLs and another protocol specific parameters to be logged. - -

        Q: What are restrictions?

        -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. - -

        Q: What are advantages?

        -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. - -

        Q: How to setup?

        -A: You should specify parent proxy with IP of 0.0.0.0 and port 0. Examples: -
        -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
        -
        - -

        Q: How it affects different ACL rules

        -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. -
        -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.org 3128
        -#use parent caching proxy for rest of the networks
        -
        -allow *
        -#allow direct connections for rest of socks
        -#requests
        -
        - -
      • How to balance traffic between few external channgels? -

        -Proxy itself doesn't manage network level routing. The only way to control -outgoing channel is to select external interface. It's possible to make -external interface (what is usually selected with 'external' command or -'-e' option) random by using local redirection with external port 0. -

        -auth iponly
        -allow *
        -parent 500 http 10.1.1.101 0
        -parent 500 http 10.2.1.102 0
        -
        -Now external interface is randomly selected with 0.5 probability between -10.1.1.101 and 10.2.1.102. To work as expected, different default routes -must between 2 interfaces. -used -

        -If both interface addresses are in same network, e.g. 10.1.1.101 and 10.1.1.102 -and you want to select random gateway between 10.1.1.1 and 10.1.1.2, you must -control it by using routing table, in case there is no default gateway route -for Windows: -

        - route add -p 10.1.1.1 10.1.1.101
        - route add -p 10.1.1.2 10.1.1.102
        - route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1
        - route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.2
        -
        -If you have no second address yet, just add it. Under Linux/Unix it's better -to use source routing. -

        -
      • How to manage proxy chains -

        -parent command may also be used to build a proxy chains. In this case -few 'parent' commands are used for single 'allow' rule with different -weights (first argument of parent command). Chain may contain any number -of proxy servers, but it should be noted that every hope significantly -reduces productivity. It's possible to mix different types of proxy within -single chain: HTTPS (HTTP connect), SOCKS4, SOCKS5. Weight different from -1000 is used to build random chains. if weight W is below 1000, this proxy -will be used as a next chain hop with probability of W/1000. That is, if -the weight is 250 probability this proxy will be used for the next hope is -25%. 'parent' records with common weight of 1000 establish a group, one of -these record will be used for the hop with probability according to weight. -Warning: each group must have a weight even of 1000. As follows, common -weight of all 'parent' records must also be even of 1000. If common weight -of 'parent' records in te chain is 3000, chain has 3 hops and must be formed -of 3 groups. Example: -

        -allow *
        -parent 500 socks5 192.168.1.1 1080
        -parent 500 connect 192.168.10.1 3128
        -
        -In this case we have 1 parent proxy (1 hop) which is randomely choosen between -2 hosts: 192.168.1.1 and 192.168.10.1. 2 records form a single group. -
        -allow * * * 80
        -parent 1000 socks5 192.168.10.1 1080
        -parent 1000 connect 192.168.20.1 3128
        -parent 300 socks4 192.168.30.1 1080
        -parent 700 socks5 192.168.40.1 1080
        -
        -In this case we have 3 groups (3 hops in the chain). First hop is 192.168.10.1, -second hop is 192.168.20.1 and 3rd one is either 192.168.30.1 with probability -of 30% or 192.168.40.1 with probability of 70%. -

        - -
      • How to limit bandwidth -

        -3proxy supports bandwidth filters. To manage filters bandlimin/bandlimout and -nobandlimin/nobandlimout. 'in' means incoming and 'out' - outgoing traffic. -

        -bandlimin <bitrate> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        nobandlimin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        -

        -Commands are applied to all services. Imagine bandwidth filters as a series of -pipes. Bitrate is a pipe's width and ACLs controls the flow thorugh this pipe. -
        -  bandlimin 57600 * 192.168.10.16
        -  bandlimin 57600 * 192.168.10.17
        -  bandlimin 57600 * 192.168.10.18
        -  bandlimin 57600 * 192.168.10.19
        -
        -Create 4 separete pipes for 4 client with emulation of modem connection. -
        -  bandlimin 57600 * 192.168.10.16/30
        -
        -Create single pipe for all 4 clients. That is 4 clients share modem connection. -In this example: -
        -  nobandlimin * * * 110
        -  bandlimin 57600 * 192.168.10.16/32
        -
        -mail traffic from POP3 servers bypasses the pipe and has no bandwidth -limitation. -

        -
      • How to limit traffic amount -

        -

        -counter <filename> <type> <reportpath> -
        countin <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        nocountin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        countout <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        nocountout <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> -
        -

        -

        -You can set traffic limit per day (D), week (W), month (M), year (Y) or -absolute ('N'), as specified by 'type' argument of counterin command. -Traffic information is stored in binary file specified by 'filename' argument. -countersutil utility can be used to manage this file. -reportpath specifies location of text reports, type parameter of 'counter' -command controls how often text reports are created. amount is amount of -allowed traffic in Megabytes (MB). nocountin allows you to set exclusions. -

        -
      • How to fix incorrect traffic accounting - -

        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. -

      • How to configure name resolution and DNS caching -

        - For name resolution and caching use commands nserver, nscache / nscache6 and nsrecord. -

        -  nserver 192.168.1.2
        -  nserver 192.168.1.3:5353/tcp
        - sets DNS resolvers. 192.168.1.3 will be used via TCP/5353 (instead of default UDP/53) - only if 192.168.1.2 fails. Up to 5 nservers may be specified. - If no nserver is configured, default system name resolution functions are used. -
        -  nscache 65535
        -  nscache6 65535
        - sets name cache size for IPv4 and IPv6. Name cache must be large enouth, if presents. - name cache is only used if nserver is configured. -
        -  nsrecord server.mycompany.example.com 192.168.1.1
        -  nsrecord www.porno.com 127.0.0.2
        -  ...
        -  deny * * 127.0.0.2
        - adds static nsrecords. Also, static nsrecords are used for dnspr, unless -s option is specified. - Since 0.8 version, parent proxy may be configured for dnspr. -

        -
      • How to use IPv6 -

        - IPv6 is supported since 0.8. Please note, some proxy protolos, e.g. SOCKSv4, - do not support IPv6. SOCKSv5 supports IPv6 with special request type (must be - implemented by client). -
        - 3proxy supports proxying from IPv4 and IPv6 networks to IPv4, - IPv6 and mixed networks. IPv6 address may be used in - internal, external, parent commands, ACLs, -i and -e options,etc. - external command and -e options may be given twice for each service - once with IPv4 - and once with IPv6 address. internal can be given only once, to bind to all IPv4 and - IPv6 addresses use [0:0:0:0:0:0:0:0] or [::]. -
        - Any service may be configured with -4, -46, -64, -6 options to specify decied - priority for name to IPv4/IPv6 address resolution (IPv4 only, IPv4 priority, - IPv6 priority, IPv6 only). -

        -
      • How to use connect back -

        - In example, users needs access from external network to proxy server located - on the host 192.168.1.2. This host can not be accessed from external network, - but it has access to external network with with external address 1.1.1.1. - Also, user has access to the host 2.2.2.2 (IP address may be dynamic) with - hostname host.dyndns.example.org via external network. User needs 2 instances - of 3proxy, first one on the host 192.168.1.2 with config -

        -  users user:CL:password
        -  auth strong
        -  allow user
        -  proxy -rhost.dyndns.example.org:1234
        - second one on the host.dyndns.example.org (2.2.2.2) with config -
        -  auth iponly
        -  allow * * 1.1.1.1
        -  tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128
        - For browser settings proxy is host.dyndns.example.org:3128. -

        -
      - -
      -
    • Client configuration -

      -


      -
    • Administering and information analisys -

      -

        -
      • How to obtain latest 3proxy version -

        -Latest version of 3proxy may be obtained -here. -New version may have changes and incompatibilities with previous one in files -format or commands. Please, read CHANGELOG file and another documentation -before installing new version. -

        -
      • How to control 3proxy service under Windows NT/2000/XP -

        -If installed as system service, 3proxy understands Windows service commands -for START, STOP, PAUSE and RESUME. If service is PAUSEd, no new connections -are accepted while older connections are processed. Currently there is no -support for dynamic configuration change, so, you have to restart service -completely if you have changed any configuration. - -You can control 3proxy service via "Services" administration ot via "net" command: -

        -	net start 3proxy
        -	net stop 3proxy
        -	net pause 3proxy
        -	net continue 3proxy
        -
        -

        -
      • Log error codes reference -

        -

          -
        • 0 - Operation successfully complited (connection - was closed by one of peers) -
        • 1-9 - AUTHENTICATION ERRORS -
        • 1 - Access denied by ACL (deny) -
        • 2 - Redirection (should not appear) -
        • 3 - No ACL found, denied by default -
        • 4 - auth=strong and no username in request -
        • 5 - auth=strong and no matching username in configuration -
        • 6 - User found, wrong password (cleartext) -
        • 7 - User found, wrong password (crypt) -
        • 8 - User found, wrong password (NT) -
        • 9 - Redirection data not found (should not appear) -
        • 10 - Traffic limit exceeded -
        • 11-19 - CONNECTION ERRORS -
        • 11 - failed to create socket() -
        • 12 - failed to bind() -
        • 13 - failed to connect() -
        • 14 - failed to getpeername() -
        • 20-29 - COMMON ERRORS -
        • 21 - memory allocation failed -
        • 30-39 - CONNECT PROXY REDIRECTION ERRORS -
        • 31 - failed to request HTTP CONNECT proxy -
        • 32 - CONNECT proxy connection timed out or wrong reply -
        • 33 - CONNECT proxy fails to establish connection -
        • 34 - CONNECT proxy timed out or closed connection -
        • 40-49 - SOCKS4 PROXY REDIRECTION ERRORS -
        • 50-69 - SOCKS5 PROXY REDIRECTION ERRORS -
        • 70-79 PARENT PROXY CONNECTION ERRORS (identical to 1x) -
        • 90-99 - established connection errors -
        • since 0.9 -
        • 90 - unexpected system error (should not happen) -
        • 91 - unexpected poll error (should not happen) -
        • 92 - connection terminated by timeout (see timeouts) -
        • 93 - connection terminated by ratelimit-related timeout or due to errors limit -
        • 94 - connection termination by server or client with unsent data -
        • 95 - dirty connection termination by client (or networking issue) -
        • 96 - dirty connection termination by server (or networking issue) -
        • 97 - dirty connection termination by both client and server (probably networking issue) -
        • prior to 0.9: -
        • 90 - socket error or connection broken -
        • 91 - TCP/IP common failure -
        • 92 - connection timed out -
        • 93 - error on reading data from server -
        • 94 - error on reading data from client -
        • 95 - timeout from bandlimin/bandlimout limitations -
        • 96 - error on sending data to client -
        • 97 - error on sending data to server -
        • 98 - server data limit (should not appear) -
        • 99 - client data limit (should not appear) -
        • 100 - HOST NOT FOUND -
        • 200-299 - UDP portmapper specific bugs -
        • 300-399 - TCP portmapper specific bugs -
        • 400-499 - SOCKS proxy specific bugs -
        • 500-599 - HTTP proxy specific bugs -
        • 600-699 - POP3 proxy specific bugs -
        • 999 - NOT IMPLEMENTED -
        -

        -
      -
      -
    • How To ask quiestion not in How To? -

      - Ask it in Github. - Don't try to ask something before reading this document. -

    - -
- diff --git a/How-To-(русский).md b/How-To-(русский).md index 5779aef..2e5569d 100644 --- a/How-To-(русский).md +++ b/How-To-(русский).md @@ -219,7 +219,7 @@
  • Служба уже установлена или запущена

    -
  • Как разобраться с internal и external
  • +
  • Как разобраться с internal и external
  • Убедитесь, что выправильно понимаете что такое internal и external адреса. Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy. diff --git a/How-To.md b/How-To.md new file mode 100644 index 0000000..8d0c780 --- /dev/null +++ b/How-To.md @@ -0,0 +1,1072 @@ +

      +
    • 3APA3A 3proxy Tiny Proxy Server HowTo +
      Under construction, very incomplete + +
      +
        +
        +
      • Compilation +

        +

          +
        • How to compile 3proxy with Visual C++ +

          +Extract source code files from 3proxy.tgz (with WinZip or another utility). +Use nmake /f Makefile.msvc command +

          +
        • How to compile 3proxy with Intel C Compiler under Windows +

          +See How to compile 3proxy with Visual C++ +Use Makefile.intl instead of Makefile.msvc +

          +
        • How to compile 3proxy with GCC under Windows
        • +

          +Extract source files from 3proxy.tgz (for example with tar -xzf 3proxy.tgz command if you have tar installed) +Use make -f Makefile.win command. +If you want to use POSIX emulation Cygwin library (normally you shouldn't) - use make -f Makefile.unix instead. +Windows specific things (like installing as service) will not be available if compiled with Cygwin emulation. +

          +
        • How to compile 3proxy with GCC under Unix/Linux
        • +

          +Use +

          +make -f Makefile.Linux
          +
          +for Linux or Cygwin, Makefile.Solaris* (depending on compiler version) for Solaris +and Makefile.unix for different Unix-like OSes. On BSD-derived systems, make +sure to use GNU make; sometimes it's called gmake instead of make. +
          Compilation is tested under FreeBSD/i386, NetBSD/i386, OpenBSD/i386, +RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC, Solaris/x86, but you +shouldn't have problems under different Solaris, BSD, or Linux-compatible systems. +For different systems, you may be required to patch the Makefile or even the source code. +If you want to use ODBC support, make sure to install ODBC for Unix, remove the -DNOODBC +option from the makefile compiler options, and add the ODBC library to the linker variable. +

          +
        +
        +
      • Proxy server installation and removal +

        +

          +
        • How to install/remove 3proxy under Windows NT/2000/XP +

          +Unpack 3proxy.zip to any directory, for example +c:\Program Files\3proxy. If needed, create a directory for storing log files, +ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (see Server configuration). +If you use 3proxy before version 0.6, add the +

          +service
          +
          +string into 3proxy.cfg. Now, start a command prompt (cmd.exe). +Change to the 3proxy installation directory and run 3proxy.exe --install: +
          +D:\>C:
          +C:\>cd C:\Program Files\3proxy
          +C:\Program Files\3proxy>3proxy.exe --install
          +
          +Now, you should have the 3proxy service installed and running. If the service is not +started, remove the "service" string from 3proxy.cfg, run 3proxy.exe manually +and correct all errors. +

          +To remove 3proxy, run 3proxy --remove: +

          +D:\>C:
          +C:\>cd C:\Program Files\3proxy
          +C:\Program Files\3proxy>net stop 3proxy
          +C:\Program Files\3proxy>3proxy.exe --remove
          +
          +Now you can simply remove the 3proxy installation directory. +

          +
        • How to install/remove 3proxy under Windows 95/98/ME +

          +Unpack 3proxy.zip to any directory, for example +c:\Program Files\3proxy. If needed, create a directory for storing log files, +ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (see Server configuration). +Remove the string +

          +service
          +
          +from 3proxy.cfg and add +
          +daemon
          +
          +if you want 3proxy to run in the background. +Create a shortcut for 3proxy.exe and place it in the autostart folder or add +it to the registry with regedit.exe: +
          HKLM\Software\Microsoft\Windows\CurrentVersion\Run
          +Type: String +
          3proxy = "c:\Program Files\3proxy.exe" "C:\Program Files\3proxy.cfg"
          +You must use quotes if the path contains spaces. If necessary, restart Windows. +If the service is not started, check the log. Remove the "daemon" command from 3proxy.cfg, +start 3proxy.exe manually and correct all errors. +

          +
        • How to install/remove 3proxy under Unix/Linux +

          +Compile 3proxy (see Compilation). Copy +executables to any appropriate location (for example, /usr/local/3proxy/sbin +for servers and /usr/local/3proxy/bin for utilities). +Create /usr/local/etc/3proxy.cfg. +(see Server configuration). +You can change the default configuration file location by specifying the configuration file +in the 3proxy command line. +Add 3proxy to the system startup scripts. +

          +
        +
        +
      • Server configuration +

        +

          +
        • How to make 3proxy start +

          A valid configuration file is required. + +

        • How to make limitations (access, bandwidth, traffic, connections) work +

          The most probable reasons for non-working limitations: 'auth none' or no auth is used. For any ACL-based feature, one of 'iponly', 'nbname', or 'strong' auth is required. The sequence of commands may be invalid. Commands are executed one-by-one, and 'proxy', 'tcppm', 'socks', or another service commands must follow a valid configuration. An invalid sequence of ACLs. The first matching ACL is used (except for internal redirections, see below). If an ACL contains at least one record, the last record is assumed to be 'deny *'. + +

        • How to make 3proxy run as a service +

          Possible reasons for 3proxy starting manually but failing to start as a service: +

            +
          • there are relative paths in the 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, and try to execute 3proxy from the command +line from a different directory (for example, from the disk root). +
          • the SYSTEM account doesn't have access to the executable file, configuration files, +log files, etc. +
          • the configuration file is not located in the default path (3proxy.cfg in the same +location as 3proxy.exe). For an alternative configuration file location, use +
            +3proxy --install full_path_to_configuration_file
            +
            +
          • the user has no rights to install or start the service +
          • the service is already installed and/or started + +
          + +

          How to understand internal and external +

          +Both internal and external IPs are IPs of the host running 3proxy itself. +This configuration option is useful in situations where 3proxy is running on a +border host with 2 (or more) connections: e.g., LAN and WAN with different IPs +

          +     LAN connection +-------------+ Internet connection
          +LAN <-------------->| 3proxy host |<-------------------> INTERNET
          +                   ^+-------------+^
          +	           |               |
          +              Internal IP       External IP
          +
          +If 3proxy is used on a host with a single connection, both internal and +external are usually the same IP. +
          The internal interface should exist and be UP at the moment 3proxy is started and +should never be disconnected/DOWN. If this interface is periodically +disconnected (e.g., a direct link between 2 hosts), do not specify an internal +address or use 0.0.0.0 instead. In this case, if you have 2 or more +interfaces, you must use a firewall (preferably) or 3proxy ACLs to avoid an open +proxy situation. +
          +The external IP (if specified) must exist at the moment 3proxy +serves a client request. If the external interface is not specified (or 0.0.0.0), +the system selects the external IP. It may be possible to access resources of the internal +network; to prevent this, use ACLs. In addition, SOCKSv5 will not support the BIND +operation, which is required for incoming connections (this operation is quite rarely +implemented in SOCKSv5 clients and is usually not required). In case of +a dynamic address, do not specify external or use external 0.0.0.0, or, if +an external address is required, create a script to determine the current external +IP and save it to a file, and use external "$path_to_file" with the "monitor" command +to automatically reload the configuration on address change. + +
        • How to make ODBC logging work? +

          +Check that you are using a system DSN. +Check that the SQL request is valid. +The best way to check is to use file or stdout logging, get the SQL request from the log file or console, and execute this request manually. +Under Unix, you may also want to adjust the 'stacksize' parameter. + +

        • How to make IPv6 work +

          The proxy cannot access a destination directly over IPv6 if the client requests an IPv4 address. +To access an IPv6 destination, either an IPv6 address or a hostname must be used in the request. +The best solution is to enable the option to resolve hostnames via the proxy on the client side. + +

        • How to fix 3proxy crashes +

          The 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 (a few versions of FreeBSD on amd64). + The problem can be resolved with the 'stacksize' command or '-S' option starting with 3proxy 0.8.4. + + +

        • Where to find a configuration example +

          +A server configuration example, 3proxy.cfg.sample, is included in every 3proxy distribution. +

          +
        • How to set up logging +

          +3proxy can log to stdout, a file, an ODBC datasource, or +syslog (Unix/Linux/Cygwin only). To use ODBC under Unix/Linux, you must +compile 3proxy with Unix ODBC libraries; see Compilation. +You can control logging from 3proxy.cfg for all services, or you can control +logging for an individual service. For example, +/usr/local/sbin/socks -l/var/log/socks.log starts a SOCKS proxy with logging to a file. +For the universal proxy (3proxy), log file rotation and archiving are supported. +The log type is defined with the "log" configuration file command or with the +-l switch on individual service invocation. log or -l with no argument is stdout logging. +

          +	log filename
          +
          +and +
          +	-lfilename
          +
          +specify a filename for logging. +
          +	log @ident
          +
          +and +
          +	-l@ident
          +
          +specify an ident for syslog logging. If the filename within the "log" command contains +'%' characters, it is processed as a format specifier (see "logformat"). E.g., +log c:\3proxy\logs\%y%m%d.log D creates a file like c:\3proxy\logs\060729.log; +the date is generated based on local time. +
          +	log &connstring
          +
          + +specifies an ODBC connection string; connstring is in the format +datasource,username,password (the last two are optional if the +datasource does not require or already has authentication information). +Also, you must specify logformat to build the SQL query to insert a record into +the log; see How to set up logging format +

          +

          +Rotation and archiving may be set up with log, rotate, and archiver commands. +

          +	log filename LOGTYPE
          +
          +sets the rotation type. LOGTYPE may be: +
            +
          • M, monthly +
          • W, weekly +
          • D, daily +
          • H, hourly +
          • C, minutely +
          +
          +	rotate NUMBER
          +
          + specifies the number of files in rotation (i.e., how many files to keep). +
          +	archiver EXT COMMAND PARAMETERS
          +
          + Sets an external archiver. EXT is the extension of archived files + (for example, zip, gz, Z, rar, etc.). COMMAND and PARAMETERS are the command + to execute and its command-line parameters. The original file is not deleted by + 3proxy; this work is left for the archiver. + You can pass the original filename to the archiver with the %F macro and the archive filename with %A. + Examples are located in + 3proxy.cfg.sample +

          +
        • How to set up logging format +

          + Since version 0.3, the log format may be set with the "logformat" command. + The first symbol of the log format specifies the format of the date and time and + should be L (LOCAL) or G (GMT - Greenwich Meridian Time). The format + string may contain some macro substitutions: +

            +
          • %y - Year (2 digits) +
          • %Y - Year (4 digits) +
          • %m - Month (2 digits) +
          • %o - Month (3-letter abbreviation) +
          • %d - Day (2 digits) +
          • %H - Hour (2 digits) +
          • %M - Minute (2 digits) +
          • %S - Second (2 digits) +
          • %t - Timestamp (seconds since January 1, 1970 00:00:00 GMT) +
          • %. - Milliseconds +
          • %z - Timezone in mail format (from GMT, '+' east, '-' west HHMM). For example, Moscow winter time is +0300. +
          • %U - Username ('-' if unknown). +
          • %N - Service name (PROXY, SOCKS, POP3P, etc.) +
          • %p - Service port +
          • %E - Error code (see Log error codes reference) +
          • %C - client IP +
          • %c - client port +
          • %R - target IP +
          • %r - target port +
          • %e - external IP address used to establish the connection +
          • %Q - requested IP +
          • %q - requested port +
          • %I - bytes received from the target +
          • %O - bytes sent to the target +
          • %n - hostname from the request +
          • %h - hops before the target (if redirection or chaining is used); + see How to use chains and parent proxies) +
          • %T - service-specific text (for example, the requested URL). %X-YT, + where X and Y are positive numbers, only displays fields + (space-delimited) X to Y of the text. An example is %1-2T. +
          + Example: +
          +logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
          +
          + generates something like +

          +1042454727.0296 SOCK4.1080 000 3APA3A 127.0.0.1:4739 195.122.226.28:4739 505 18735 1 GET http://3proxy.org/ HTTP/1.1 + +
          (no line breaks) +

          +

          + If ODBC is used, logformat should specify the SQL command + to insert a record into the log, for example: +

          +logformat "-\'+_GINSERT INTO proxystat  VALUES (%t, '%c', '%U', %I)"
          +
          (no line breaks) +
          -\'+_ instructs to replace characters \ and ' with _ +

          +
        • How to use log analyzers with 3proxy +

          +Just make the format of 3proxy logs compatible with a format supported by your +favorite log analyzer. Examples of compatible logformats are: +
          +For Squid access.log: +

          +"- +_G%t.%. %D %C TCP_MISS/200 %I %1-1T %2-2T %U DIRECT/%R application/unknown" +

          +or, a more compatible format without %D: +
          +"- +_G%t.%.      1 %C TCP_MISS/200 %I %1-1T %2-2T %U
          + DIRECT/%R application/unknown"
          +
          +ISA 2000 proxy WEBEXTD.LOG (fields are TAB-delimited): +
          +"-	+ L%C	%U	Unknown	Y	%Y-%m-%d	%H:%M:%S
          +	w3proxy	3PROXY	-	%n	%R	%r	%D
          +	%O	%I	http	TCP	%1-1T	%2-2T	-	-
          +	%E	-	-	-"
          +
          +ISA 2004 proxy WEB.w3c (fields are TAB-delimited): +
          +"-	+ L%C	%U	Unknown	%Y-%m-%d	%H:%M:%S
          +	3PROXY	-	%n	%R	%r	%D	%O
          +	%I	http	%1-1T	%2-2T	-	%E	-
          +	-	Internal	External	0x0	Allowed"
          +
          +ISA 2000/2004 firewall FWSEXTD.log (fields are TAB-delimited): +
          +"-	+ L%C	%U	unnknown:0:0.0	N	%Y-%m-%d
          +	%H:%M:%S	fwsrv	3PROXY	-	%n	%R	%r
          +	%D	%O	%I	%r	TCP	Connect	-	-
          +	-	%E	-	-	-	-	-"
          +
          +HTTPD standard log (Apache and others): +

          +"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" %E %I" +

          +or a more compatible format without the error code: +

          +"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" 200 %I" +

          +
        • How to start any of the proxy services (HTTP, SOCKS, etc.) +

          +3proxy is distributed in 2 variants: as a set of standalone modules (proxy, +socks, pop3p, tcppm, udppm) and as a universal proxy server. These services are +absolutely independent, and if you use 3proxy, you don't need any of the standalone +modules. +
          Standalone modules are only configurable via the command line interface, while +3proxy uses a configuration file. Many functions, such as ODBC logging, log +rotation, access control, etc., are only available in 3proxy, not in standalone +proxies. +A standalone module may be started from the command line, for example: +

          +$/sbin/socks -l/var/log/socks.log -i127.0.0.1
          +
          +Starts a SOCKS server bound to localhost IP, port 1080, with logging to +/var/log/socks.log. +You can get help for any standalone service with the -? command line option. +

          +If 3proxy is used, you should start all services in the 3proxy.cfg file. 3proxy.cfg +is executed by 3proxy as a batch file. An example of 3proxy.cfg and command syntax +can be found in +3proxy.cfg.sample. +

          +log /var/log/3proxy.log D
          +rotate 30
          +internal 127.0.0.1
          +external 192.168.1.1
          +proxy
          +socks -p3129
          +pop3p
          +
          +Starts 3 services: HTTP PROXY, SOCKS, and POP3 PROXY. Each listens on the localhost +interface with the default port (3128 for HTTP, 1080 for SOCKS, and 110 for POP3P) +except socks, which is started with port 3129. +All logs are in the file /var/log/3proxy.log (with daily date modification and +rotation). The 30 most recent files are stored. +

          +
        • How to bind a service to a specific interface and port? +

          +The -i option specifies the internal interface; -p specifies the listening port. No spaces are +allowed. To bind the 'proxy' service to port 8080 on interfaces 192.168.1.1 +and 192.168.2.1, use: +

          +proxy -p8080 -i192.168.1.1
          +proxy -p8080 -i192.168.2.1
          +
          +

          +
        • How to resolve names through a parent proxy
        • +

          + A: Use one of proxy, connect+, socks4+, or socks5+ as the parent type. 3proxy + itself still performs name resolution; it's required, e.g., for ACL matching. + So, if no name resolution must be performed by 3proxy itself, add the command +

          +  fakeresolve
          + This command resolves any name to the 127.0.0.2 address. +

          +
        • How to set up an FTP proxy
        • +

          + There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP + (what is called FTP proxy in file managers and FTP clients). For browsers, there is no need to start an additional + proxy service; 'proxy' supports FTP over HTTP. Configure the 'proxy' port as an FTP proxy. For FTP clients and file + managers, use ftppr. The FTP proxy supports both active and passive mode with the client but always uses passive mode with FTP servers. +

          +
        • How to set up an SNI proxy (tlspr)
        • +

          + An SNI proxy can be used to transparently redirect any TLS traffic with an external router or via local redirection rules. It can also be used + to extract hostnames from TLS to use in ACLs in combination with SOCKS or HTTP(s) proxy and/or the Transparent plugin. It can also be used to require TLS or mTLS between services. The TLS handshake contains no + port information; if tlspr is used as a standalone service, the destination port may be either detected with the Transparent plugin or configured with the -P option (default 443). +

          + The -c option is used to specify the level of TLS check: +

          +0 (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 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)
          +
          +

          +Configuration examples: +1. Port 1443 may be used to redirect traffic to destination port 143. SNI is used to find the destination host. +

          +tlspr -p1443 -P443 -c1
          +
          +2. Used as a parent TLS proxy to detect the destination hostname from TLS in socks: +
          +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
          +
          +

          +
        • How to limit service access +

          +First, always specify the internal interface to accept incoming connections with the +'internal' configuration command or '-i' service command. (See +How to start any of the proxy services (HTTP, SOCKS, etc.)). If +no internal interface is specified, your proxy will act as an open proxy. +

          It's also important to specify the external interface to prevent access to the +internal network with 'external' or -e. +

          3proxy with configuration files allows you to use authentication and +authorization for user access. Authentication is possible by +username/password or the user's NetBIOS name. The authentication type is specified by the +'auth' command. +

          +auth none
          +
          +Disables both authentication and authorization. You cannot use ACLs. +
          +auth iponly
          +
          +Specifies no authentication; ACL-based authorization is used. +
          +auth nbname
          +
          +Authentication by NetBIOS name + ACLs. The NetBIOS name of the 'messenger' service +is obtained before ACL validation. If no name is obtained, it's assumed to be +empty. Messenger is started by default in Windows NT/2000/XP. For Win9x, +WinPopUP needs to be launched. This type of authentication may be spoofed +by a privileged local user. +
          +auth strong
          +
          +Authentication by username/password. If the user is not registered, their +access is denied regardless of ACLs. +

          +Different services can have different authentication levels. +

          +auth none
          +pop3p
          +auth iponly
          +proxy
          +auth strong
          +socks
          +
          + +It's possible to authorize access by client IP address, IP address or requested resource, +target port, time, etc., after authentication. +(See How to limit resource access). +

          Since version 0.6, double authentication is possible, e.g.: +

          +auth iponly strong
          +allow * * 192.168.0.0/16
          +allow user1,user2
          +proxy
          +
          +Strong authentication will only be used if the ACL requires a username to decide if +access must be granted. That is, in the example, strong username authentication +is not required to access 192.168.0.0/16. +

          Version 0.6 introduces authentication (username) caching to increase +performance. It's recommended to use authentication caching with resource- +or time-consuming authentication types, such as nbname or external plugins +(WindowsAuthentication). +Caching can be set with the 'authcache' command with 2 parameters: caching type +and caching time (in seconds). The caching type defines the type of cached access: +'ip' - after successful authentication, all connections during the caching time +from the same IP are assigned to the same user; the username is not requested. +"ip,user" - the username is requested, and all connections from the same IP are +assigned to the same user without actual authentication. "user" - same as above, +but IP is not checked. "user,password" - username and password are checked +against cached ones. For authentication, the special authentication type 'cache' +must be used. + Example: +

          +authcache ip 60
          +auth cache strong windows
          +proxy -n
          +
          +

          +Please note that caching affects security. Never use caching for access to +critical resources, such as web administration. +

          authcache can be used to bind a user's sessions to an IP with the 'limit' option. With +

          +  authcache ip,user,pass,limit 120
          +  auth cache strong
          + the user will not be able to use more than a single IP during the cache time (120 sec). +

          +
        • How to create a user list +

          +The user list is created with the 'users' command. +

          +users USERDESC ...
          +
          +With a single command, it's possible to define a few users, or you +can use multiple 'users' commands. USERDESC is a user description. The description +consists of three semicolon-delimited parts - login, password type, and +
          +users admin:CL:bigsecret test:CL:password test1:CL:password1
          +users "test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49."
          +users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
          +
          +Please note the usage of quotation marks: they're required to escape the $ sign, +which is otherwise used as a file inclusion macro. +The following password types are available: +
            +
          • No password type: use system authentication. +
          • CL - cleartext password +
          • CR - crypt password; only MD5 crypt passwords are supported +
          • NT - NT-hashed (MD4) passwords in hex, as used in pwdump or SAMBA +
          +NT and crypt passwords can be used to import accounts from Windows/SAMBA or +Unix. For Windows, you can use the pwdump family of utilities. +It's convenient to store accounts separately and include an account file with the $ macro. +Because for included files, newlines are treated as spaces, it's possible to +use a standard passwd file format: +
          +users $/etc/.3proxypasswd
          +
          +or +
          +users $"c:\Program Files\3proxy\passwords"
          +
          +It's possible to create NT and crypt passwords with the mycrypt utility included +in the distribution. +
          The user list is system-wide. To manage user access to a specific service, use ACLs. +

          +
        • How to limit user access to resources +

          +The commands allow, deny, and flush are used to manage ACLs: +

          +allow <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> <weekdaylist> <timeperiodlist> +
          deny <userlist> <sourcelist> <targetlist> <weekdaylist> <timeperiodlist> +
          flush +
          +

          +The 'flush' command is used to finish with the existing ACL and start a new one. +It's required to have different ACLs for different services. +'allow' is used to allow a connection, and 'deny' to deny a connection. The 'allow' +command can be extended by the 'parent' command to manage redirections (see How to manage redirections). If the ACL +is empty, it allows everything. If the ACL is not empty, the first matching ACL entry +is searched for the user request, and the ACL action (allow or deny) is performed. If +no matching record is found, the connection is denied, and the user will be asked to +re-authenticate (prompted for username/password). To prevent this prompt, +add 'deny *' to the end of the list. +
            +
          • <userlist> - comma-delimited list of users +
          • <sourcelist> - comma-delimited list of source (client) networks. + Networks can be defined as a single IP address or in CIDR form + xxx.yyy.zzz.mmm/l, where l is the length of the network mask + (a number of non-zero bits). 192.168.1.0/24 + means a network with a 255.255.255.0 mask. +
          • <targetlist> - comma-delimited list of target (server) networks. + In 3proxy 0.6 and above, it's allowed to use hostnames with wildmasks + in the targetlist. A wildmask may only appear at the beginning or at the + end of the hostname, e.g., + 192.168.0.0/16,www.example.com,*wrongsite.com,*wrongcontent*. +
          • <targetportlist> - comma-delimited list of ports. + It's possible to define port ranges with -, e.g., 80,1024-65535 + means port 80 and all unprivileged ports. +
          • <commandlist> - the list of allowed actions: +
            CONNECT - establish an outgoing TCP connection, e.g., POP3 or SOCKSv5 +
            BIND - allow an incoming TCP connection (SOCKSv5) +
            UDPASSOC - create a UDP association (SOCKSv5) +
            ICMPASSOC - create an ICMP association (not implemented) +
            HTTP_GET - HTTP GET request (HTTP proxy) +
            HTTP_PUT - HTTP PUT request (HTTP proxy) +
            HTTP_POST - HTTP POST request (HTTP proxy) +
            HTTP_HEAD - HTTP HEAD request (HTTP proxy) +
            HTTP_CONNECT - HTTP CONNECT, aka HTTPS request (HTTP proxy) +
            HTTP_OTHER - another HTTP request (HTTP proxy) +
            HTTP - any HTTP request except HTTP_CONNECT (HTTP proxy) +
            HTTPS - alias for HTTP_CONNECT (HTTP proxy) +
            FTP_GET - FTP get request (http, ftp proxy) +
            FTP_PUT - FTP put request (ftp proxy) +
            FTP_LIST - FTP list request (http, ftp proxy) +
            FTP - any FTP request +
            ADMIN - administration interface access +

            +

          • <weekdays> - weekday numbers or periods (0 or 7 means Sunday, 1 is Monday, 1-5 means Monday through Friday). +
          • <timeperiodlist> - a list of time periods in HH:MM:SS-HH:MM:SS format. For example, + 00:00:00-08:00:00,17:00:00-24:00:00 lists non-working hours. + +
          +* in an ACL means "any". +Usage examples can be found in 3proxy.cfg.sample. +

          +
        • How to manage redirections +

          +Redirections are useful to, e.g., forward requests from specific clients +to different servers or proxy servers. Additionally, redirections are useful +to convert the proxy interface from one format to another, e.g., requests from +a SOCKS proxy can be redirected to a parent HTTP proxy, or a SOCKSv5 client can be +redirected to a SOCKSv4 proxy. +
          Because 3proxy understands "transparent" web requests, it can be used as an +intermediate software between an HTTP proxy and a NAT server for transparent HTTP +forwarding, because it can convert a "Web server" request issued by a client to a +"proxy request" required by a proxy server. A simple redirection is: +

          +auth iponly
          +allow *
          +parent 1000 http 192.168.1.1 3128
          +proxy
          +
          +All traffic of the HTTP proxy is redirected to the parent proxy 192.168.1.1 port 3128. +
          If the port number is '0', the IP address from 'parent' is used as the external address +for this connection (that is like -eIP, but only for connections matching +'allow'). +
          A special case of redirection is local redirections. In this case, both the IP is +0.0.0.0 and the port is 0. It's only useful with the SOCKS service. In this case, no +new connection is established, but the request is parsed by the corresponding local +service. E.g.: +
          +auth iponly
          +allow * * * 80
          +parent 1000 http 0.0.0.0 0
          +allow * * * 21
          +parent 1000 ftp 0.0.0.0 0
          +allow * * * 110
          +parent 1000 pop3 0.0.0.0 0
          +socks
          +
          +In this case, all SOCKS traffic with destination port 80 is forwarded to the local +'proxy' service, destination port 21 to 'ftppr', and 110 to 'pop3pr'. There is +no need to run these services explicitly. Local redirections are useful if +you want to see and control via ACLs protocol-specific parameters, e.g., +filenames requested through FTP while clients are using SOCKS. +

          +
        • How to manage local redirections +

          +

          Q: What is it for?

          +A: To have control based on the request and to have URLs and other protocol-specific parameters logged. + +

          Q: What are the restrictions?

          +A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends the username, but not the password); for SOCKSv5, only cleartext password authentication is supported. + +

          Q: What are the advantages?

          +A: You only need to set up a SOCKS proxy in browser settings. You can use a socksifier, e.g., FreeCAP or SocksCAP, with an application that is not proxy-aware. + +

          Q: How to set it up?

          +A: You should specify a parent proxy with an IP of 0.0.0.0 and port 0. Examples: +
          +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 the rest of connections directly
          +
          +socks
          +#now let the socks server start
          +
          + +

          Q: How does it affect different ACL rules?

          +A: After local redirections, rules are applied again to the protocol-level request. The redirection rule itself is skipped. This makes it possible to redirect the request again to an external proxy depending on the request itself. +
          +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.org 3128
          +#use parent caching proxy for the rest of the networks
          +
          +allow *
          +#allow direct connections for the rest of socks
          +#requests
          +
          + +
        • How to balance traffic between multiple external channels? +

          +The proxy itself doesn't manage network-level routing. The only way to control +the outgoing channel is to select the external interface. It's possible to make +the external interface (what is usually selected with the 'external' command or +'-e' option) random by using local redirection with an external port of 0. +

          +auth iponly
          +allow *
          +parent 500 http 10.1.1.101 0
          +parent 500 http 10.2.1.102 0
          +
          +Now the external interface is randomly selected with 0.5 probability between +10.1.1.101 and 10.2.1.102. To work as expected, different default routes +must be used between the 2 interfaces. +

          +If both interface addresses are in the same network, e.g., 10.1.1.101 and 10.1.1.102, +and you want to select a random gateway between 10.1.1.1 and 10.1.1.2, you must +control it by using the routing table, in case there is no default gateway route +for Windows: +

          + route add -p 10.1.1.1 10.1.1.101
          + route add -p 10.1.1.2 10.1.1.102
          + route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1
          + route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.2
          +
          +If you don't have a second address yet, just add it. Under Linux/Unix, it's better +to use source routing. +

          +
        • How to manage proxy chains +

          +The parent command may also be used to build proxy chains. In this case, +multiple 'parent' commands are used for a single 'allow' rule with different +weights (the first argument of the parent command). A chain may contain any number +of proxy servers, but it should be noted that every hop significantly +reduces performance. It's possible to mix different types of proxies within a +single chain: HTTPS (HTTP connect), SOCKS4, SOCKS5. A weight different from +1000 is used to build random chains. If weight W is below 1000, this proxy +will be used as the next chain hop with a probability of W/1000. That is, if +the weight is 250, the probability that this proxy will be used for the next hop is +25%. 'parent' records with a combined weight of 1000 establish a group; one of +these records will be used for the hop with a probability according to the weight. +Warning: each group must have a weight that is a multiple of 1000. As follows, the combined +weight of all 'parent' records must also be a multiple of 1000. If the combined weight +of 'parent' records in the chain is 3000, the chain has 3 hops and must be formed +of 3 groups. Example: +

          +allow *
          +parent 500 socks5 192.168.1.1 1080
          +parent 500 connect 192.168.10.1 3128
          +
          +In this case, we have 1 parent proxy (1 hop) which is randomly chosen between +2 hosts: 192.168.1.1 and 192.168.10.1. The 2 records form a single group. +
          +allow * * * 80
          +parent 1000 socks5 192.168.10.1 1080
          +parent 1000 connect 192.168.20.1 3128
          +parent 300 socks4 192.168.30.1 1080
          +parent 700 socks5 192.168.40.1 1080
          +
          +In this case, we have 3 groups (3 hops in the chain). The first hop is 192.168.10.1, +the second hop is 192.168.20.1, and the 3rd one is either 192.168.30.1 with a probability +of 30% or 192.168.40.1 with a probability of 70%. +

          + +
        • How to limit bandwidth +

          +3proxy supports bandwidth filters. Use the bandlimin/bandlimout and +nobandlimin/nobandlimout commands to manage filters. 'in' means incoming and 'out' means outgoing traffic. +

          +bandlimin <bitrate> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          nobandlimin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          +

          +Commands are applied to all services. Imagine bandwidth filters as a series of +pipes. Bitrate is a pipe's width, and ACLs control the flow through this pipe. +
          +  bandlimin 57600 * 192.168.10.16
          +  bandlimin 57600 * 192.168.10.17
          +  bandlimin 57600 * 192.168.10.18
          +  bandlimin 57600 * 192.168.10.19
          +
          +Create 4 separate pipes for 4 clients with emulation of a modem connection. +
          +  bandlimin 57600 * 192.168.10.16/30
          +
          +Create a single pipe for all 4 clients. That is, 4 clients share a modem connection. +In this example: +
          +  nobandlimin * * * 110
          +  bandlimin 57600 * 192.168.10.16/32
          +
          +mail traffic from POP3 servers bypasses the pipe and has no bandwidth +limitation. +

          +
        • How to limit traffic amount +

          +

          +counter <filename> <type> <reportpath> +
          countin <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          nocountin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          countout <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          nocountout <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> +
          +

          +

          +You can set a traffic limit per day (D), week (W), month (M), year (Y), or +absolute ('N'), as specified by the 'type' argument of the counterin command. +Traffic information is stored in a binary file specified by the 'filename' argument. +The countersutil utility can be used to manage this file. +The reportpath specifies the location of text reports; the type parameter of the 'counter' +command controls how often text reports are created. The amount is the amount of +allowed traffic in megabytes (MB). nocountin allows you to set exclusions. +

          +
        • How to fix incorrect traffic accounting + +

          3proxy accounts for protocol-level traffic. Providers count channel- or IP-level traffic with network and transport headers. In addition, 3proxy does not count DNS resolutions, pings, floods, scans, etc. This accounts for approximately a 10% difference. That is why you should have a 15% reserve if you use 3proxy to limit your traffic. If the difference with your provider is significantly above 10%, you should look for traffic bypassing the proxy server, for example connections through NAT, traffic originating from the host with the proxy installed, traffic from server applications, etc. +

        • How to configure name resolution and DNS caching +

          + For name resolution and caching, use the commands nserver, nscache / nscache6, and nsrecord. +

          +  nserver 192.168.1.2
          +  nserver 192.168.1.3:5353/tcp
          + sets DNS resolvers. 192.168.1.3 will be used via TCP/5353 (instead of default UDP/53) + only if 192.168.1.2 fails. Up to 5 nservers may be specified. + If no nserver is configured, default system name resolution functions are used. +
          +  nscache 65535
          +  nscache6 65535
          + sets name cache size for IPv4 and IPv6. The name cache must be large enough, if present. + The name cache is only used if nserver is configured. +
          +  nsrecord server.mycompany.example.com 192.168.1.1
          +  nsrecord www.porno.com 127.0.0.2
          +  ...
          +  deny * * 127.0.0.2
          + adds static nsrecords. Also, static nsrecords are used for dnspr, unless the -s option is specified. + Since version 0.8, a parent proxy may be configured for dnspr. +

          +
        • How to use IPv6 +

          + IPv6 is supported since version 0.8. Please note that some proxy protocols, e.g., SOCKSv4, + do not support IPv6. SOCKSv5 supports IPv6 with a special request type (which must be + implemented by the client). +
          + 3proxy supports proxying from IPv4 and IPv6 networks to IPv4, + IPv6, and mixed networks. An IPv6 address may be used in + internal, external, and parent commands, ACLs, -i and -e options, etc. + The external command and -e options may be given twice for each service—once with an IPv4 + and once with an IPv6 address. internal can be given only once; to bind to all IPv4 and + IPv6 addresses, use [0:0:0:0:0:0:0:0] or [::]. +
          + Any service may be configured with -4, -46, -64, or -6 options to specify the desired + priority for name-to-IPv4/IPv6 address resolution (IPv4 only, IPv4 priority, + IPv6 priority, IPv6 only). +

          +
        • How to use connect back +

          + For example, a user needs access from an external network to a proxy server located + on the host 192.168.1.2. This host cannot be accessed from the external network, + but it has access to the external network with an external address 1.1.1.1. + Also, the user has access to the host 2.2.2.2 (IP address may be dynamic) with + hostname host.dyndns.example.org via the external network. The user needs 2 instances + of 3proxy, the first one on the host 192.168.1.2 with the config +

          +  users user:CL:password
          +  auth strong
          +  allow user
          +  proxy -rhost.dyndns.example.org:1234
          + and the second one on host.dyndns.example.org (2.2.2.2) with the config +
          +  auth iponly
          +  allow * * 1.1.1.1
          +  tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128
          + For browser settings, the proxy is host.dyndns.example.org:3128. +

          +
        + +
        +
      • Client configuration +

        +


        +
      • Administering and information analysis +

        +

          +
        • How to obtain latest 3proxy version +

          +The latest version of 3proxy may be obtained +here. +A new version may have changes and incompatibilities with the previous one in file +formats or commands. Please read the CHANGELOG file and other documentation +before installing a new version. +

          +
        • How to control 3proxy service under Windows NT/2000/XP +

          +If installed as a system service, 3proxy understands Windows service commands +for START, STOP, PAUSE, and RESUME. If the service is PAUSEd, no new connections +are accepted while older connections are processed. Currently, there is no +support for dynamic configuration changes, so you have to restart the service +completely if you have changed any configuration. + +You can control the 3proxy service via "Services" administration or via the "net" command: +

          +	net start 3proxy
          +	net stop 3proxy
          +	net pause 3proxy
          +	net continue 3proxy
          +
          +

          +
        • Log error codes reference +

          +

            +
          • 0 - Operation successfully completed (connection + was closed by one of the peers) +
          • 1-9 - AUTHENTICATION ERRORS +
          • 1 - Access denied by ACL (deny) +
          • 2 - Redirection (should not appear) +
          • 3 - No ACL found, denied by default +
          • 4 - auth=strong and no username in request +
          • 5 - auth=strong and no matching username in configuration +
          • 6 - User found, wrong password (cleartext) +
          • 7 - User found, wrong password (crypt) +
          • 8 - User found, wrong password (NT) +
          • 9 - Redirection data not found (should not appear) +
          • 10 - Traffic limit exceeded +
          • 11-19 - CONNECTION ERRORS +
          • 11 - failed to create socket() +
          • 12 - failed to bind() +
          • 13 - failed to connect() +
          • 14 - failed to getpeername() +
          • 20-29 - COMMON ERRORS +
          • 21 - memory allocation failed +
          • 30-39 - CONNECT PROXY REDIRECTION ERRORS +
          • 31 - failed to request HTTP CONNECT proxy +
          • 32 - CONNECT proxy connection timed out or wrong reply +
          • 33 - CONNECT proxy fails to establish connection +
          • 34 - CONNECT proxy timed out or closed connection +
          • 40-49 - SOCKS4 PROXY REDIRECTION ERRORS +
          • 50-69 - SOCKS5 PROXY REDIRECTION ERRORS +
          • 70-79 PARENT PROXY CONNECTION ERRORS (identical to 1x) +
          • 90-99 - established connection errors +
          • since 0.9 +
          • 90 - unexpected system error (should not happen) +
          • 91 - unexpected poll error (should not happen) +
          • 92 - connection terminated by timeout (see timeouts) +
          • 93 - connection terminated by ratelimit-related timeout or due to errors limit +
          • 94 - connection termination by server or client with unsent data +
          • 95 - dirty connection termination by client (or networking issue) +
          • 96 - dirty connection termination by server (or networking issue) +
          • 97 - dirty connection termination by both client and server (probably networking issue) +
          • prior to 0.9: +
          • 90 - socket error or connection broken +
          • 91 - TCP/IP common failure +
          • 92 - connection timed out +
          • 93 - error on reading data from server +
          • 94 - error on reading data from client +
          • 95 - timeout from bandlimin/bandlimout limitations +
          • 96 - error on sending data to client +
          • 97 - error on sending data to server +
          • 98 - server data limit (should not appear) +
          • 99 - client data limit (should not appear) +
          • 100 - HOST NOT FOUND +
          • 200-299 - UDP portmapper specific bugs +
          • 300-399 - TCP portmapper specific bugs +
          • 400-499 - SOCKS proxy specific bugs +
          • 500-599 - HTTP proxy specific bugs +
          • 600-699 - POP3 proxy specific bugs +
          • 999 - NOT IMPLEMENTED +
          +

          +
        +
        +
      • How to ask a question not in How To? +

        + Ask it in Github. + Please read this document before asking a question. +

      + +
    + diff --git a/PCREPlugin-(русский).md b/PCREPlugin-(русский).md index ea59bcc..ed83631 100644 --- a/PCREPlugin-(русский).md +++ b/PCREPlugin-(русский).md @@ -56,7 +56,7 @@ PCRE_BSR_UNICODE
  • srvdata - данные полученные от сервера, например содержимое HTML-страницы
  • FILTER_ACTION - действие при совпадении. Может принимать значение -
      allow - разрешить данный запрос без просмотра дальнейших правил +
      • allow - разрешить данный запрос без просмотра дальнейших правил
      • deny - запретить данный запрос без просмотра дальнейших правил
      • dunno - продолжить анализ правил (полезно для pcre_rewrite)
      @@ -87,4 +87,4 @@ pcre_extend deny * 192.168.0.1/16
      • Плагин включен в дистрибутив 3proxy 0.6
      • Пример конфигурации (by Dennis Garber): NoPornLitest.cfg -
      +
    diff --git a/PCREPlugin.md b/PCREPlugin.md index e219fd7..1f4f1f8 100644 --- a/PCREPlugin.md +++ b/PCREPlugin.md @@ -1,9 +1,9 @@ -

    3proxy Perl Compatible Regular Expressions (PCRE) plugin

    +

    3proxy Perl Compatible Regular Expressions (PCRE) Plugin

    -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:
    @@ -12,11 +12,11 @@ pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE]
     pcre_extend FILTER_ACTION [ACE]
     pcre_options OPTION1 [...]
     
    -pcre - allows to apply some rule for matching -
    pcre_rewrite - in addition to 'pcre' allows to substitute substrings -
    pcre_extend - extends ACL of the last pcre or pcre_rewrite comand by -adding additional ACE (like with allow/deny configuration commands). -
    pcre_options - allows to set matching options. Awailable options are: +pcre - allows applying a rule for matching +
    pcre_rewrite - in addition to 'pcre', allows substituting substrings +
    pcre_extend - extends the ACL of the last pcre or pcre_rewrite command by +adding an additional ACE (like with allow/deny configuration commands). +
    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
    • TYPE - type of filtered data. May contain one or more -(comma delimited list) values: +(comma-delimited list) values:
        -
      • 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) -
      • cliheader - content of client request headers, e.g. HTTP request header. -
      • srvheader - content of server's reply headers, e.g. HTTP status and headers. -
      • clidata - data received from client, e.g. HTTP POST request data -
      • srvdata - data received from server, e.g. HTML page +
      • 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) +
      • cliheader - content of the client request headers, e.g., HTTP request headers. +
      • srvheader - content of the server's reply headers, e.g., HTTP status and headers. +
      • clidata - data received from the client, e.g., HTTP POST request data +
      • srvdata - data received from the server, e.g., an HTML page
    • FILTER_ACTION - action on match -
        allow - allow this request without checking rest of the given type -of the rules -
      • deny - deny this request without checking rest of the rules -
      • dunno - continue with the rest of rules (useful with pcre_rewrite) +
        • allow - allow this request without checking the rest of the rules for the given type +
        • deny - deny this request without checking the rest of the rules +
        • dunno - continue with the rest of the rules (useful with pcre_rewrite)
        -
      • REGEXP - PCRE (perl) regular expression. Use * if no regexp matching -required. -
      • REWRITE_EXPRESSION - substitution string. May contain perl-style +
      • REGEXP - PCRE (Perl) regular expression. Use * if no regexp matching +is required. +
      • 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 ("").
      • 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.
      @@ -88,7 +87,7 @@ pcre_extend deny * 192.168.0.1/16

      Download:

        -
      • Plugin is included into 3proxy 0.6 binary and source distribution +
      • Plugin is included in the 3proxy 0.6 binary and source distribution
      • Example configuration (by Dennis Garber): NoPornLitest.cfg -
      +
    diff --git a/SSLPlugin.md b/SSLPlugin.md index d3b453b..9224e65 100644 --- a/SSLPlugin.md +++ b/SSLPlugin.md @@ -1,6 +1,6 @@ -

    3proxy SSL/TLS plugin

    +

    3proxy SSL/TLS Plugin

    -Plugin can be used to transparently decypher SSL/TLS data and TLS encryption for proxy traffic. +This plugin can be used to transparently decrypt SSL/TLS data and provide TLS encryption for proxy traffic. @@ -9,35 +9,35 @@ Plugin can be used to transparently decypher SSL/TLS data and TLS encryption for
    ssl_mitm - spoof certificates for services started below. Usage without ssl_client_verify is insecure.
    ssl_nomitm - do not spoof certificates for services started below -

    To protect traffic to server (https:// proxy) - since 0.9.5 version

    +

    To protect traffic to the server (https:// proxy) - since version 0.9.5

    ssl_serv - require TLS connection for services below
    ssl_noserv - do not require TLS connection for services below Parameters: -
    ssl_server_cert /path/to/cert - Server certificate (should not be selfsigned and must contain Alternative name) for ssl_serv -
    ssl_server_key /path/to/key - Server ceritifacte key for ssl_server_cert or generated mitm certificate -
    ssl_client_ciphersuites ciphersuites_list - TLS client ciphers for TLS 1.3, e.g. ssl_client_ciphersuites TLS_AES_128_GCM_SHA256 +
    ssl_server_cert /path/to/cert - Server certificate (should not be self-signed and must contain an Alternative Name) for ssl_serv +
    ssl_server_key /path/to/key - Server certificate key for ssl_server_cert or generated MITM certificate +
    ssl_client_ciphersuites ciphersuites_list - TLS client ciphers for TLS 1.3, e.g., ssl_client_ciphersuites TLS_AES_128_GCM_SHA256
    ssl_server_ciphersuites ciphersuites_list - TLS server ciphers for TLS 1.3 -
    ssl_client_cipher_list ciphersuites_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_client_cipher_list ciphersuites_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 ciphersuites_list - TLS server ciphers for TLS 1.2 and below -
    ssl_client_min_proto_version tls_version - TLS client min TLS version (e.g. TLSv1.2) -
    ssl_server_min_proto_version tls_version - TLS server min TLS version (e.g. TLSv1.2) -
    ssl_client_max_proto_version tls_version - TLS client max TLS version (e.g. TLSv1.2) -
    ssl_server_max_proto_version tls_version - TLS server max TLS version (e.g. TLSv1.2) -
    ssl_client_verify - verify certificate for upstream server in TLS client functionality (used with ssl_mitm) -
    ssl_client_no_verify - do not verify certificate for upstream server in TLS client functionality (default) -
    ssl_server_ca_file /path/to/cafile - CA certificate file for mitm -
    ssl_server_ca_key /path/to/cakey - key for ssl_server_ca_file mitm CA +
    ssl_client_min_proto_version tls_version - TLS client minimum TLS version (e.g., TLSv1.2) +
    ssl_server_min_proto_version tls_version - TLS server minimum TLS version (e.g., TLSv1.2) +
    ssl_client_max_proto_version tls_version - TLS client maximum TLS version (e.g., TLSv1.2) +
    ssl_server_max_proto_version tls_version - TLS server maximum TLS version (e.g., TLSv1.2) +
    ssl_client_verify - verify the certificate for the upstream server in TLS client functionality (used with ssl_mitm) +
    ssl_client_no_verify - do not verify the certificate for the upstream server in TLS client functionality (default) +
    ssl_server_ca_file /path/to/cafile - CA certificate file for MITM +
    ssl_server_ca_key /path/to/cakey - key for ssl_server_ca_file 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 /path/to/cache/ - location for generated mitm certificates cache, optional, if ssl_server_ca_file / ssl_server_ca_key are configured. -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_keyserver.key is not configured, server.key - this key is used if ssl_server_key is not configured to generates +
    ssl_certcache /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 to the same path. +Generated certificates are placed in the same path. -

    mitm example:

    +

    MITM example:

     plugin /path/to/SslPlugin.dll ssl_plugin
     ssl_server_ca_file /path/to/cafile
    @@ -47,7 +47,7 @@ proxy -p3128
     ssl_nomitm
     proxy -p3129
     
    -mitm's traffic with spoofed ceritifacate for port 3128 proxy. +MITM's traffic with a spoofed certificate for the port 3128 proxy.

    https:// proxy example:

    @@ -59,6 +59,6 @@ proxy -p33128
     ssl_noserv
     proxy -p3128
     
    -creates https:// proxy on 33128 and http:// proxy on 3128 +Creates an https:// proxy on port 33128 and an http:// proxy on port 3128 © Vladimir Dubrovin, License: BSD style diff --git a/Security-recommendations.md b/Security-recommendations.md index 860f411..da334ac 100644 --- a/Security-recommendations.md +++ b/Security-recommendations.md @@ -1,35 +1,33 @@ -

    3proxy security considirations

    - +

    3proxy Security Considerations

      -
    • Never install 3proxy suid. If you need it to run suid write some -wrapper with fixed configuration file. -
    • Make configuration file only available to account 3proxy starts with. -
    • Under Windows if 3proxy is used as service create new -unprivileged local account without "logon locally" right. Assign this account -to 3proxy service. -
    • Under unix use chroot to jail 3proxy (make sure files included in -configuration file after 'chroot' command, if any, are available from jail) -
    • Under Unix, either start 3proxy with unprivileged account or, if you need +
    • Never install 3proxy suid. If you need it to run suid, write a +wrapper with a fixed configuration file. +
    • Make the configuration file accessible only to the account 3proxy starts with. +
    • 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. +
    • 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). +
    • 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). -
    • 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). +
    • Always use full paths in the configuration file.
    • Try to avoid 'strong' authentication, because only cleartext -authentication method is currently available. +authentication is currently available.
    • Always specify internal and external interfaces. -
    • 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. -
    • 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). -
    • Keep logs in secure location, because some confidential information from -user's request can be logged. +
    • 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. +
    • 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). +
    • Keep logs in a secure location, because some confidential information from +user requests can be logged.
    • Use -xyz+A character filtering sequences for 'logformat', especially with -ODBC logging to prevent SQL and log record injections. -
    • Immediately report all service crashes to developers +ODBC logging, to prevent SQL and log record injections. +
    • Immediately report all service crashes to the developers.
    • Participate in code audit :) - -
    +

    diff --git a/StringsPlugin-(русский).md b/StringsPlugin-(русский).md index 97ebbdf..4d9e1a9 100644 --- a/StringsPlugin-(русский).md +++ b/StringsPlugin-(русский).md @@ -15,4 +15,4 @@ plugin "StringsPlugin.dll" start c:\3proxy\bin\rus-win1251.3ps

    Загрузить:

    • Плагин включен в дистрибутив 3proxy 0.6 -
    +
  • diff --git a/StringsPlugin.md b/StringsPlugin.md index 05d8076..815ae17 100644 --- a/StringsPlugin.md +++ b/StringsPlugin.md @@ -1,16 +1,16 @@ - -

    3proxy strings substitution plugin

    -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]". -

    Example:

    -
    plugin "StringsPlugin.dll" start c:\3proxy\bin\rus.3ps
    -
    - -

    Download:

    -
      -
    • Plugin is included into 3proxy 0.6 binary and source distribution -
    - -©Kirill Lopuchov \ No newline at end of file + +

    3proxy Strings Substitution Plugin

    +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]". +

    Example:

    +
    plugin "StringsPlugin.dll" start c:\3proxy\bin\rus.3ps
    +
    + +

    Download:

    +
      +
    • Plugin is included in the 3proxy 0.6 binary and source distribution +
    + +© Kirill Lopuchov diff --git a/TrafficPlugin-(русский).md b/TrafficPlugin-(русский).md index 5d6c1d2..616e24a 100644 --- a/TrafficPlugin-(русский).md +++ b/TrafficPlugin-(русский).md @@ -46,7 +46,7 @@ trafcorrect p <сервис> <tcp/udp> <исходящий пор Когда происходит окончание соединения выполняется первое подходящее правило. Подсчет трафика в любом режиме не является точным, это некоторая аппроксимация -позволяющаяподсчитать трафик с точностью до нескольких процентов. +позволяющая подсчитать трафик с точностью до нескольких процентов.

    Пример:

    @@ -66,4 +66,4 @@ trafcorrect m socks5 6112 4.5
     

    Загрузить:

    • Плагин включен в дистрибутив 3proxy 0.6 -
    + diff --git a/TrafficPlugin.md b/TrafficPlugin.md index 9931480..ead57fe 100644 --- a/TrafficPlugin.md +++ b/TrafficPlugin.md @@ -1,15 +1,15 @@ -

    3proxy traffic correction plugin

    -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. +

    3proxy Traffic Correction Plugin

    +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.

    -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.

    Usage:

      -
    1. Extract TrafficPlugin.dll to the same folder with 3proxy executable. -
    2. Start plugin in 3proxy.cfg with +
    3. Extract TrafficPlugin.dll to the same folder as the 3proxy executable. +
    4. Start the plugin in 3proxy.cfg with:
      plugin TrafficPlugin.dll start
       
    5. Add correction rules: @@ -17,36 +17,36 @@ attempting to predict number and sizes of network packets. FOR FIXED COEFFICIENTS MODE:
      trafcorrect m <service> <target port> <coefficient>
       
      -where <service> - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p, * matches "any". -
      <target port> - target port, * matches any +where <service> - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p; * matches "any". +
      <target port> - target port; * matches any
      <coefficient> - coefficient to multiply traffic for this port.
      -FOR PACKET HEADER PREDICTION MODE +FOR PACKET HEADER PREDICTION MODE:
      trafcorrect p <service> <tcp/udp> <target port> [empty packet size]
       
      -tcp ot udp - transport level protocol to apply rule +tcp or udp - transport-level protocol to apply the rule to
      -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
      Modes can be mixed. -
      Plugin creates a list of rules, first matching rule will be applied. +
      The plugin creates a list of rules; the first matching rule will be applied.
    -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.

    Example:

    plugin "TrafficPlugin.dll" start
     trafcorrect m socks5 6112 4.5
     trafcorrect m socks5 * 1.1
     
    -wrong usage: +Wrong usage:
    trafcorrect m socks5 * 1.1
     trafcorrect m socks5 6112 4.5
     
    -second rule will never be applied. +The second rule will never be applied.

    Download:

      -
    • Plugin is included into 3proxy 0.6 binary and source distribution +
    • Plugin is included in the 3proxy 0.6 binary and source distribution
    -©Maslov Michael aka Flexx(rus) +© Maslov Michael aka Flexx(rus) \ No newline at end of file diff --git a/TransparentPlugin-(русский).md b/TransparentPlugin-(русский).md index 86586f5..631fafd 100644 --- a/TransparentPlugin-(русский).md +++ b/TransparentPlugin-(русский).md @@ -28,6 +28,6 @@ HTTP-запросов по порту TCP/80 будут видны параме

    Загрузить:

    • Плагин включен в дистрибутив 3proxy 0.8 -
    + © Vladimir Dubrovin, License: BSD style diff --git a/TransparentPlugin.md b/TransparentPlugin.md index c6ddad4..4283d40 100644 --- a/TransparentPlugin.md +++ b/TransparentPlugin.md @@ -1,9 +1,9 @@ -

    3proxy TransparentPlugin plugin (Linux/BSD only)

    +

    3proxy TransparentPlugin (Linux/BSD only)

    -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:
     plugin /path/to/TransparentPlugin.ld.so transparent_plugin
    @@ -19,13 +19,13 @@ notransparent
     proxy
     
    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.

    Download:

      -
    • Plugin included into 3proxy 0.8 -
    +
  • Plugin is included in 3proxy 0.8 +
  • © Vladimir Dubrovin, License: BSD style diff --git a/WindowsAuthentication-(русский).md b/WindowsAuthentication-(русский).md index e77bdab..e4feb19 100644 --- a/WindowsAuthentication-(русский).md +++ b/WindowsAuthentication-(русский).md @@ -31,5 +31,5 @@ auth windows

    Загрузить:

    • Плагин включен в дистрибутив 3proxy 0.6 -
    + diff --git a/WindowsAuthentication.md b/WindowsAuthentication.md index 5a3b00e..d0e155c 100644 --- a/WindowsAuthentication.md +++ b/WindowsAuthentication.md @@ -1,33 +1,33 @@ -

    3proxy Windows Authentication plugin

    -Support for cleartext authentication against Windows domain or local Windows account. +

    3proxy Windows Authentication Plugin

    +Support for cleartext authentication against a Windows domain or local Windows account.

    Usage:

      -
    1. Extract WindowsAuthentication.dll to the same folder with 3proxy executable. -
    2. Create 3ProxyAllowedGroup - Windows system group allowed to use proxy. - You can choose different group name. Group can be either local or +
    3. Extract WindowsAuthentication.dll to the same folder as the 3proxy executable. +
    4. 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. -
    5. Configure plugin with 'plugin' command in 3proxy.cfg, e.g.: +
    6. Configure the plugin with the 'plugin' command in 3proxy.cfg, e.g.:
      
       plugin "WindowsAuthentication.dll" WindowsAuthentication "3ProxyAllowedGroup"
       
      -
      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 +
      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.
    7. Configure 'auth windows' for services that require Windows authentication. -
    8. It's recommended you also configure authentication caching (see 'authcache'), - to prevent excessive workload for domain controller. Example: +
    9. It is recommended that you also configure authentication caching (see 'authcache') + to prevent excessive workload on the domain controller. Example:
        authcache user,pass 900
        auth cache windows
       
      -
    10. NTLM authentication is not currently supported for plugins, you should use proxy -n key to disable it. +
    11. NTLM authentication is not currently supported for plugins; you should use the proxy -n switch to disable it.

    Download:

      -
    • Plugin is included into 3proxy 0.6 binary and source distribution -
    \ No newline at end of file +
  • Plugin is included in the 3proxy 0.6 binary and source distribution +
  • \ No newline at end of file diff --git a/ftppr.md b/ftppr.md index 2de2208..01b1d82 100644 --- a/ftppr.md +++ b/ftppr.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    ftppr - +

    ftppr - FTP proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ FTP proxy gateway service

    -

    ftppr +

    ftppr [-d] [-l[[@]logfile]] [-pport] [-iinternal_ip] [-eexternal_ip] @@ -43,7 +43,7 @@ FTP proxy gateway service

    -

    ftppr is +

    ftppr is FTP gateway service to allow internal users to access external FTP servers.

    @@ -55,128 +55,131 @@ external FTP servers.

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never look for username +authentication.

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Default destination. It’s +used if the target address is not specified by the user.

    - + - - + + +

    Port. Port proxy listens for +incoming connections. Default is 21.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never look for username authentication.

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -h

    +

    -h

    -

    Default destination. It’s used if targed address -is not specified by user.

    -

    -p

    +

    -p

    -

    Port. Port proxy listens for incoming connections. -Default is 21.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -184,25 +187,26 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You can use any -FTP client, regardless of FTP proxy support. For client with -FTP proxy support configure internal_ip and -port in FTP proxy parameters. For clients without FTP -proxy support use internal_ip and port as FTP -server. Address of real FTP server must be configured as a -part of FTP username. Format for username is -username@server, where server is -address of FTP server and username is user´s -login on this FTP server. Login itself may contain -´@´ sign. Only cleartext authentication is -currently supported.

    +

    You can use any +FTP client, regardless of FTP proxy support. For a client +with FTP proxy support, configure internal_ip and +port in the FTP proxy parameters. For clients without +FTP proxy support, use internal_ip and port 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 username@server, where +server is the address of the FTP server and +username is the user´s login on this FTP +server. The login itself may contain an ´@´ +sign. Only cleartext authentication is currently +supported.

    BUGS

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -210,7 +214,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -220,7 +224,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/pop3p.md b/pop3p.md index 3e50961..8acfa7b 100644 --- a/pop3p.md +++ b/pop3p.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    pop3p - +

    pop3p - POP3 proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ POP3 proxy gateway service

    -

    pop3p +

    pop3p [-d] [-l[[@]logfile]] [-pport] [-iinternal_ip] [-eexternal_ip] @@ -43,7 +43,7 @@ POP3 proxy gateway service

    -

    pop3p is +

    pop3p is POP3 gateway service to allow internal users to access external POP3 servers.

    @@ -55,128 +55,131 @@ external POP3 servers.

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never look for username +authentication.

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Port. Port proxy listens for +incoming connections. Default is 110.

    - + - - + + +

    Default destination. It’s +used if the target address is not specified by the user.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never look for username authentication.

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -p

    +

    -p

    -

    Port. Port proxy listens for incoming connections. -Default is 110.

    -

    -h

    +

    -h

    -

    Default destination. It’s used if targed address -is not specified by user.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -184,25 +187,26 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You can use any -MUA (Mail User Agent) with POP3 support. Set client to use -internal_ip and port as a POP3 server. Address -of real POP3 server must be configured as a part of POP3 -username. Format for username is +

    You can use any +MUA (Mail User Agent) with POP3 support. Set the client to +use internal_ip and port 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 username@server, where server is -address of POP3 server and username is user´s -login on this POP3 server. Login itself may contain -´@´ 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.

    +the address of the POP3 server and username 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 a challenge +from the server before we know which server to connect +to.

    BUGS

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -210,7 +214,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -220,7 +224,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/proxy.md b/proxy.md index 4e70d58..c3ef3c9 100644 --- a/proxy.md +++ b/proxy.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    proxy - +

    proxy - HTTP proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ HTTP proxy gateway service

    -

    proxy +

    proxy [-d][-a] [-l[[@]logfile]] [-pport] [-iinternal_ip] [-eexternal_ip]

    @@ -42,7 +42,7 @@ HTTP proxy gateway service

    -

    proxy is +

    proxy is HTTP gateway service with HTTPS and FTP over HTTPS support.

    @@ -54,138 +54,143 @@ support.

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never ask for username +authentication

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Anonymous. Hide information +about client.

    - + - - + + +

    Anonymous. Show fake information +about client.

    - + - - + + +

    Port. Port proxy listens for +incoming connections. Default is 3128.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ preceeds +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never ask for username authentication

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -a

    +

    -a

    -

    Anonymous. Hide information about client.

    -

    -a1

    +

    -a1

    -

    Anonymous. Show fake information about client.

    -

    -p

    +

    -p

    -

    Port. Port proxy listens for incoming connections. -Default is 3128.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -193,12 +198,12 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You should use -client with HTTP proxy support or configure router to -redirect HTTP traffic to proxy (transparent proxy). -Configure client to connect to internal_ip and -port. HTTPS support allows to use almost any TCP -based protocol. If you need to limit clients, use +

    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 internal_ip and +port. HTTPS support allows you to use almost any +TCP-based protocol. If you need to limit clients, use 3proxy(8) instead.

    BUGS @@ -206,7 +211,7 @@ based protocol. If you need to limit clients, use

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -214,7 +219,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -224,7 +229,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/smtpp.md b/smtpp.md index aae9f37..e2bc798 100644 --- a/smtpp.md +++ b/smtpp.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    smtpp - +

    smtpp - SMTP proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ SMTP proxy gateway service

    -

    smtpp +

    smtpp [-d] [-l[[@]logfile]] [-pport] [-iinternal_ip] [-eexternal_ip] @@ -43,7 +43,7 @@ SMTP proxy gateway service

    -

    smtpp is +

    smtpp is SMTP gateway service to allow internal users to access external SMTP servers.

    @@ -55,128 +55,131 @@ external SMTP servers.

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never look for username +authentication.

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Port. Port proxy listens for +incoming connections. Default is 25.

    - + - - + + +

    Default destination. It’s +used if the target address is not specified by the user.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never look for username authentication.

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -p

    +

    -p

    -

    Port. Port proxy listens for incoming connections. -Default is 25.

    -

    -h

    +

    -h

    -

    Default destination. It’s used if targed address -is not specified by user.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -184,25 +187,26 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You can use any +

    You can use any MUA (Mail User Agent) with SMTP authentication support. Set -client to use internal_ip and port as a SMTP -server. Address of real SMTP server must be configured as a -part of SMTP username. Format for username is -username@server, where server is -address of SMTP server and username is user´s -login on this SMTP server. Login itself may contain -´@´ 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.

    +the client to use internal_ip and port 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 username@server, where +server is the address of the SMTP server and +username 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 a challenge from the server before we know which +server to connect to.

    BUGS

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -210,7 +214,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -220,7 +224,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/socks.md b/socks.md index 4bf4a1d..aead5cb 100644 --- a/socks.md +++ b/socks.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    tlspr - +

    tlspr - SNI proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ SNI proxy gateway service

    -

    tlspr +

    tlspr [-d][-a] [-l[[@]logfile]] [-plistening_port] [-Pdestination_port] @@ -45,10 +45,11 @@ SNI proxy gateway service

    -

    proxy is -SNI gateway service (destination host is taken from TLS -handshake). Destination port must be specified via -P option -(or it may be detected with Transparent plugin).

    +

    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).

    OPTIONS @@ -58,169 +59,175 @@ handshake). Destination port must be specified via -P option - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never ask for username +authentication

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Anonymous. Hide information +about client.

    - + - - + + +

    Anonymous. Show fake information +about client.

    - + - - + + +

    listening_port. Port proxy +listens for incoming connections. Default is 1443.

    - + - - + + +

    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.

    - + - - + + +

    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)

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never ask for username authentication

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -a

    +

    -a

    -

    Anonymous. Hide information about client.

    -

    -a1

    +

    -a1

    -

    Anonymous. Show fake information about client.

    -

    -p

    +

    -p

    -

    listening_port. Port proxy listens for incoming -connections. Default is 1443.

    -

    -P

    +

    -P

    -

    destination_port. Port to establish outgoing -connections. One is required unless Transparent plugin is -not used because TLS handshake does not contain port -information. Default is 443.

    -

    -c

    +

    -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 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)

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -228,20 +235,18 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You should use -client with HTTP proxy support or configure router to -redirect HTTP traffic to proxy (transparent proxy). -Configure client to connect to internal_ip and -port. HTTPS support allows to use almost any TCP -based protocol. If you need to limit clients, use -3proxy(8) instead.

    +

    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 internal_ip and port. If +you need to limit clients, use 3proxy(8) instead.

    BUGS

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -249,7 +254,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -259,7 +264,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/tcppm.md b/tcppm.md index 4cac471..a9ec6e4 100644 --- a/tcppm.md +++ b/tcppm.md @@ -1,4 +1,4 @@ - + @@ -25,7 +25,7 @@ -

    tcppm - +

    tcppm - TCP port mapper

    SYNOPSIS @@ -33,7 +33,7 @@ TCP port mapper

    -

    tcppm +

    tcppm [-d] [-l[[@]logfile]] [-iinternal_ip] [-eexternal_ip] local_port remote_host remote_port

    @@ -44,7 +44,7 @@ TCP port mapper

    -

    tcppm +

    tcppm forwards connections from local to remote TCP port

    OPTIONS @@ -55,93 +55,95 @@ forwards connections from local to remote TCP port

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    ARGUMENTS @@ -150,19 +152,19 @@ something like -S8192 if you experience 3proxy crashes.

    -

    local_port

    +

    local_port

    -

    - port tcppm accepts -connection

    +

    - port tcppm accepts +connections on

    -

    remote_host

    +

    remote_host

    -

    - IP address of the host +

    - IP address of the host the connection is forwarded to

    -

    remote_port

    +

    remote_port

    -

    - remote port connection is +

    - remote port the connection is forwarded to

    CLIENTS @@ -170,10 +172,10 @@ forwarded to

    -

    Any TCP based +

    Any TCP-based application can be used as a client. Use internal_ip -and local_port as a destination in client -application. Connection is forwarded to +and local_port as the destination in the client +application. The connection is forwarded to remote_host:remote_port

    BUGS @@ -181,7 +183,7 @@ application. Connection is forwarded to

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -189,7 +191,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -199,7 +201,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/tlspr.md b/tlspr.md index 4bf4a1d..aead5cb 100644 --- a/tlspr.md +++ b/tlspr.md @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ -

    tlspr - +

    tlspr - SNI proxy gateway service

    SYNOPSIS @@ -32,7 +32,7 @@ SNI proxy gateway service

    -

    tlspr +

    tlspr [-d][-a] [-l[[@]logfile]] [-plistening_port] [-Pdestination_port] @@ -45,10 +45,11 @@ SNI proxy gateway service

    -

    proxy is -SNI gateway service (destination host is taken from TLS -handshake). Destination port must be specified via -P option -(or it may be detected with Transparent plugin).

    +

    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).

    OPTIONS @@ -58,169 +59,175 @@ handshake). Destination port must be specified via -P option - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    Never ask for username +authentication

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Anonymous. Hide information +about client.

    - + - - + + +

    Anonymous. Show fake information +about client.

    - + - - + + +

    listening_port. Port proxy +listens for incoming connections. Default is 1443.

    - + - - + + +

    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.

    - + - - + + +

    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)

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -u

    +

    -u

    -

    Never ask for username authentication

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts connections -to. By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -a

    +

    -a

    -

    Anonymous. Hide information about client.

    -

    -a1

    +

    -a1

    -

    Anonymous. Show fake information about client.

    -

    -p

    +

    -p

    -

    listening_port. Port proxy listens for incoming -connections. Default is 1443.

    -

    -P

    +

    -P

    -

    destination_port. Port to establish outgoing -connections. One is required unless Transparent plugin is -not used because TLS handshake does not contain port -information. Default is 443.

    -

    -c

    +

    -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 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)

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    CLIENTS @@ -228,20 +235,18 @@ something like -S8192 if you experience 3proxy crashes.

    -

    You should use -client with HTTP proxy support or configure router to -redirect HTTP traffic to proxy (transparent proxy). -Configure client to connect to internal_ip and -port. HTTPS support allows to use almost any TCP -based protocol. If you need to limit clients, use -3proxy(8) instead.

    +

    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 internal_ip and port. If +you need to limit clients, use 3proxy(8) instead.

    BUGS

    -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -249,7 +254,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -259,7 +264,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)


    diff --git a/udppm.md b/udppm.md index f033bfc..c9212f4 100644 --- a/udppm.md +++ b/udppm.md @@ -1,4 +1,4 @@ - + @@ -25,7 +25,7 @@ -

    udppm - +

    udppm - UDP port mapper

    SYNOPSIS @@ -33,7 +33,7 @@ UDP port mapper

    -

    pop3p +

    udppm [-ds] [-l[[@]logfile]] [-iinternal_ip] [-eexternal_ip] local_port remote_host remote_port

    @@ -44,7 +44,7 @@ UDP port mapper

    -

    udppm +

    udppm forwards datagrams from local to remote UDP port

    OPTIONS @@ -55,108 +55,111 @@ forwards datagrams from local to remote UDP port

    - + - - + - + - - + + +

    Daemonize. Detach service from +console and run in the background.

    - + - - + + +

    Be silenT. Do not log +start/stop/accept error records.

    - + - - + + +

    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.

    - + - - + + +

    Internal address. IP address the +proxy accepts datagrams to. By default, connections to any +interface are accepted. It´s usually unsafe.

    - + - - + + +

    Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging.

    - + - - + + +

    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).

    - + - - + + +

    Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes.

    -I

    +

    Inetd mode. Standalone service only.

    -

    -d

    +

    -d

    -

    Daemonise. Detach service from console and run in the -background.

    -

    -t

    +

    -t

    -

    Be silenT. Do not log start/stop/accept error -records.

    -

    -e

    +

    -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.

    -

    -i

    +

    -i

    -

    Internal address. IP address proxy accepts datagrams to. -By default connection to any interface is accepted. -It´s usually unsafe.

    -

    -l

    +

    -l

    -

    Log. By default logging is to stdout. If logfile -is specified logging is to file. Under Unix, if -´@´ preceeds logfile, syslog is -used for logging.

    -

    -s

    +

    -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).

    -

    -S

    +

    -S

    -

    Increase or decrease stack size. You may want to try -something like -S8192 if you experience 3proxy crashes.

    ARGUMENTS @@ -165,19 +168,19 @@ something like -S8192 if you experience 3proxy crashes.

    -

    local_port

    +

    local_port

    -

    - port udppm accepts -datagrams

    +

    - port udppm accepts datagrams +on

    -

    remote_host

    +

    remote_host

    -

    - IP address of the host +

    - IP address of the host datagrams are forwarded to

    -

    remote_port

    +

    remote_port

    -

    - remote port datagrams are +

    - remote port datagrams are forwarded to

    CLIENTS @@ -185,9 +188,9 @@ forwarded to

    -

    Any UDP based +

    Any UDP-based application can be used as a client. Use internal_ip -and local_port as a destination in client +and local_port as the destination in the client application. All datagrams are forwarded to remote_host:remote_port

    @@ -196,7 +199,7 @@ application. All datagrams are forwarded to -

    Report all bugs +

    Report all bugs to 3proxy@3proxy.org

    SEE ALSO @@ -204,7 +207,7 @@ to 3proxy@3proxy.org

    -

    3proxy(8), +

    3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
    https://3proxy.org/

    @@ -214,7 +217,7 @@ https://3proxy.org/

    -

    3proxy is +

    3proxy is designed by Vladimir 3APA3A Dubrovin (3proxy@3proxy.org)