3proxy/man/3proxy.cfg.3

1080 lines
32 KiB
Groff
Raw Permalink Normal View History

2019-01-17 17:26:38 +08:00
.TH 3proxy.cfg "8" "January 2019" "3proxy 0.9" "Universal proxy server"
2014-04-08 17:03:21 +08:00
.SH NAME
.B 3proxy.cfg
2019-01-17 22:24:42 +08:00
3proxy configuration file
2014-04-08 17:03:21 +08:00
.SH DESCRIPTION
Common structure:
.br
2016-01-15 08:06:06 +08:00
Configuration file is a text file 3proxy reads configuration from. Each line
2014-04-08 17:03:21 +08:00
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.
2019-01-17 22:31:15 +08:00
Think about 3proxy as "application level router" with console interface.
2016-01-15 08:06:06 +08:00
2014-04-08 17:03:21 +08:00
.br
Comments:
.br
2016-01-15 08:06:06 +08:00
Any string beginning with space character or \'#\' character is comment. It\'s
2014-04-08 17:03:21 +08:00
ignored. <LF>s are ignored. <CR> is end of command.
.br
Quotation:
.br
2019-01-17 22:31:15 +08:00
Quotation character is " (double quote). Quotation must be used to quote
2014-04-08 17:03:21 +08:00
spaces or another special characters. To use quotation character inside
quotation character must be dubbed (BASIC convention). For example to use
2019-01-17 22:31:15 +08:00
HELLO "WORLD" as an argument you should use it as "HELLO ""WORLD""".
2014-04-08 17:03:21 +08:00
Good practice is to quote any argument you use.
2016-01-15 08:06:06 +08:00
2014-04-08 17:03:21 +08:00
.br
File inclusion:
.br
2016-01-15 08:06:06 +08:00
You can include file by using $FILENAME macro (replace FILENAME with a path
2014-04-08 17:03:21 +08:00
to file, for example $/usr/local/etc/3proxy/conf.incl or
2019-01-17 22:31:15 +08:00
$"c:\\\\Program Files\\3proxy\\include.cfg" Quotation is
2014-04-08 17:03:21 +08:00
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 commands
(like userlist, network lists, etc).
To use dollar sign somewhere in argument it must be quoted.
Recursion is not allowed.
2016-01-15 08:06:06 +08:00
2014-04-08 17:03:21 +08:00
.br
Next commands start gateway services:
2016-01-15 08:06:06 +08:00
.br
2019-01-17 22:24:42 +08:00
.B proxy
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B socks
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B pop3p
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B ftppr
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B admin
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B dnspr
2014-04-08 17:03:21 +08:00
[options]
.br
2019-01-17 22:24:42 +08:00
.B tcppm
2014-04-08 17:03:21 +08:00
[options]
<SRCPORT> <DSTADDR> <DSTPORT>
.br
2019-01-17 22:24:42 +08:00
.B udppm
2014-04-08 17:03:21 +08:00
[options]
<SRCPORT> <DSTADDR> <DSTPORT>
.br
Descriptions:
.br
.B proxy
2019-01-17 22:24:42 +08:00
HTTP/HTTPS proxy (default port 3128)
2014-04-08 17:03:21 +08:00
.br
.B socks
2019-01-17 22:24:42 +08:00
SOCKS 4/4.5/5 proxy (default port 1080)
2014-04-08 17:03:21 +08:00
.br
.B pop3p
2019-01-17 22:24:42 +08:00
POP3 proxy (default port 110)
2014-04-08 17:03:21 +08:00
.br
.B ftppr
2019-01-17 22:24:42 +08:00
FTP proxy (default port 21)
2014-04-08 17:03:21 +08:00
.br
.B admin
2019-01-17 22:24:42 +08:00
Web interface (default port 80)
2014-04-08 17:03:21 +08:00
.br
.B dnspr
2019-01-17 22:24:42 +08:00
caching DNS proxy (default port 53)
2014-04-08 17:03:21 +08:00
.br
.B tcppm
2019-01-17 22:24:42 +08:00
TCP portmapper
2014-04-08 17:03:21 +08:00
.br
.B udppm
2019-01-17 22:24:42 +08:00
UDP portmapper
2014-04-08 17:03:21 +08:00
2019-01-17 22:24:42 +08:00
.br
2014-04-08 17:03:21 +08:00
Options:
.br
.B -pNUMBER
change default server port to NUMBER
.br
.B -n
2019-01-17 22:24:42 +08:00
disable NTLM authentication (required if passwords are stored in Unix crypt format).
2014-04-08 17:03:21 +08:00
.br
.B -n1
enable NTLMv1 authentication.
.br
.B -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 polling
2014-04-08 17:03:21 +08:00
.B -s
2019-01-17 22:24:42 +08:00
(for admin) secure, allow only secure operations, currently only traffic counters
view without ability to reset.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
(for dnspr) simple, do not use resolver and 3proxy cache, always use external DNS server.
.br
2019-01-17 22:24:42 +08:00
(for udppm) singlepacket, expect only one packet from both client and server
2016-01-15 07:26:56 +08:00
.br
2016-01-15 20:29:57 +08:00
.B -u
Never ask for username/password
.br
.B -u2
2019-01-17 22:24:42 +08:00
(for socks) require username/password in authentication methods
2016-01-15 20:29:57 +08:00
.br
2014-04-08 17:03:21 +08:00
.B -a
2019-01-17 22:24:42 +08:00
(for proxy) anonymous proxy (no information about client reported)
2014-04-08 17:03:21 +08:00
.br
.B -a1
2019-01-17 22:24:42 +08:00
(for proxy) anonymous proxy (random client information reported)
2016-01-15 07:26:56 +08:00
.br
2016-01-15 20:29:57 +08:00
.B -a2
2019-01-17 22:24:42 +08:00
(for proxy) generate Via: and X-Forwared-For: instead of Forwarded:
2016-01-15 20:29:57 +08:00
.br
.B -6
2016-01-19 21:41:04 +08:00
Only resolve IPv6 addresses. IPv4 addresses are packed in IPv6 in IPV6_V6ONLY compatible way.
2016-01-15 07:26:56 +08:00
.br
.B -4
Only resolve IPv4 addresses
2016-01-15 07:26:56 +08:00
.br
.B -46
Resolve IPv6 addresses if IPv4 address is not resolvable
2016-01-15 07:26:56 +08:00
.br
.B -64
Resolve IPv4 addresses if IPv6 address is not resolvable
2016-01-15 07:26:56 +08:00
.br
.B -RHOST:port
listen on given local HOST:port for incoming connections instead of making remote outgoing connection. Can be used with another 3proxy service running -r option for connect back functionality. Most commonly used with tcppm. HOST can be given as IP or hostname, useful in case of dynamic DNS.
.br
.B -rHOST:port
connect to given remote HOST:port instead of listening local connection on -p or default port. Can be used with another 3proxy service running -R option for connect back functionality. Most commonly used with proxy or socks. HOST can be given as IP or hostname, useful in case of dynamic DNS.
2017-08-15 00:46:26 +08:00
.br
.B -ocOPTIONS, -osOPTIONS, -olOPTIONS, -orOPTIONS, -oROPTIONS
options for proxy-to-client (oc), proxy-to-server (os), proxy listening (ol), connect back client (or), connect back listening (oR) sockets.
Options like TCP_CORK, TCP_NODELAY, TCP_DEFER_ACCEPT, TCP_QUICKACK, TCP_TIMESTAMPS, USE_TCP_FASTOPEN, SO_REUSEADDR, SO_REUSEPORT, SO_PORT_SCALABILITY, SO_REUSE_UNICASTPORT, SO_KEEPALIVE, SO_DONTROUTE may be supported depending on OS.
2017-08-15 00:46:26 +08:00
.br
2017-09-07 00:19:36 +08:00
.B -DiINTERFACE, -DeINTERFACE
2019-08-01 21:44:30 +08:00
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 setcap is used).
.br
.B -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.
.br
.B -i
Internal address. IP address proxy accepts connections to.
By default connection to any interface is accepted.
.br
.B -N
(for socks) External NAT address 3proxy reports to client for BIND and UDPASSOC
By default external address is reported. It's only useful in the case
of IP-IP NAT (will not work for PAT)
2014-04-08 17:03:21 +08:00
.br
Also, all options mentioned for
.BR proxy (8)
.BR socks (8)
.BR pop3p (8)
.BR tcppm (8)
.BR udppm (8)
.BR ftppr (8)
are also supported.
.br
Portmapping services listen at SRCPORT and connect to DSTADDR:DSTPORT
HTTP and SOCKS proxies are standard.
.br
POP3 proxy must be configured as POP3 server and requires username in the form of:
pop3username@pop3server. If POP3 proxy access must be authenticated, you can
specify username as proxy_username:proxy_password:POP3_username@pop3server
.br
DNS proxy resolves any types of records but only hostnames are cached. It
requires nserver/nscache to be configured. If nserver is configured as TCP,
redirections are applied on connection, so parent proxy may be used to resolve
names to IP.
2014-04-08 17:03:21 +08:00
.br
FTP proxy can be used as FTP server in any FTP client or configured as FTP
proxy on a client with FTP proxy support. Username format is one of
.br
FTPuser@FTPServer
.br
FTPuser:FTPpassword@FTPserver
.br
proxyuser:proxypassword:FTPuser:FTPpassword@FTPserver
.br
2016-01-15 07:26:56 +08:00
Please note, if you use FTP client interface for FTP proxy do not add FTPpassword and FTPServer to username, because 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
2014-04-08 17:03:21 +08:00
2016-01-15 07:26:56 +08:00
.br
2014-04-08 17:03:21 +08:00
.B include
<path>
.br
2016-01-15 08:06:06 +08:00
Include config file
2014-04-08 17:03:21 +08:00
.br
.B config
<path>
.br
2016-01-15 08:06:06 +08:00
Path to configuration file to use on 3proxy restart or to save configuration.
2014-04-08 17:03:21 +08:00
.br
.B writable
.br
2016-01-15 08:06:06 +08:00
ReOpens configuration file for write access via Web interface,
2019-01-17 22:24:42 +08:00
and rereads it. Usually should be first command on config file
but in combination with config
it can be used anywhere to open
2014-04-08 17:03:21 +08:00
alternate config file. Think twice before using it.
.br
.B end
.br
2016-01-15 08:06:06 +08:00
End of configuration
2014-04-08 17:03:21 +08:00
.br
.B log
[[@|&]logfile] [<LOGTYPE>]
.br
2016-01-15 08:06:06 +08:00
sets logfile for all gateways
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
@ (for Unix) use syslog, filename is used as ident name
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
& use ODBC, filename consists of comma-delimited datasource,username,password (username and password are optional)
2020-10-15 17:25:33 +08:00
.br
radius - use RADIUS for logging
2014-04-08 17:03:21 +08:00
.br
LOGTYPE is one of:
.br
2019-01-17 22:24:42 +08:00
M Monthly
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
W Weekly (starting from Sunday)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
D Daily
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
H Hourly
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
if logfile is not specified logging goes to stdout. You can specify individual logging options for gateway by using -l
option in gateway configuration.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
log command supports same format specifications for filename template
2019-01-17 22:31:15 +08:00
as "logformat" (if filename contains \'%\' sign it\'s believed to be template).
As with "logformat" filename must begin with \'L\' or \'G\' to specify Local or
2014-04-08 17:03:21 +08:00
Grinwitch time zone for all time-based format specificators.
.br
.B rotate
<n>
2016-01-15 08:06:06 +08:00
how many archived log files to keep
2014-04-08 17:03:21 +08:00
.br
.B logformat
<format>
2016-01-15 08:06:06 +08:00
.br
Format for log record. First symbol in format must be L (local time)
2014-04-08 17:03:21 +08:00
or G (absolute Grinwitch time).
It can be preceeded with -XXX+Y where XXX is list of characters to be
filtered in user input (any non-printable characters are filtered too
2019-01-17 22:31:15 +08:00
in this case) and Y is replacement character. For example, "-,%+ L" in
2014-04-08 17:03:21 +08:00
the beginning of logformat means comma and percent are replaced
with space and all time based elemnts are in local time zone.
.br
2016-01-15 08:06:06 +08:00
You can use:
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%y Year in 2 digit format
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%Y Year in 4 digit format
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%m Month number
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%o Month abbriviature
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%d Day
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%H Hour
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%M Minute
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%S Second
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%t Timstamp (in seconds since 01-Jan-1970)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%. milliseconds
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%z timeZone (from Grinvitch)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%D request duration (in milliseconds)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%b average send rate per request (in Bytes per second) this speed is typically below connection speed shown by download manager.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%B average receive rate per request (in Bytes per second) this speed is typically below connection speed shown by download manager.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%U Username
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%N service Name
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%p service Port
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%E Error code
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%C Client IP
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%c Client port
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%R Remote IP
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%r Remote port
2016-06-06 22:54:23 +08:00
.br
2019-01-17 22:24:42 +08:00
%i Internal IP used to accept client connection
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%e External IP used to establish connection
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%Q Requested IP
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%q Requested port
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%n requested hostname
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%I bytes In
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%O bytes Out
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%h Hops (redirections) count
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%T service specific Text
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
%N1-N2T (N1 and N2 are positive numbers) log only fields from N1 thorugh N2 of service specific text
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
in the case of ODBC logging logformat specifies SQL statement, for exmample:
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:31:15 +08:00
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\')"
2014-04-08 17:03:21 +08:00
.br
.B logdump
<in_traffic_limit> <out_traffic_limit>
.br
2016-01-15 08:06:06 +08:00
Immediately creates additional log records if given amount of incoming/outgoing
2014-04-08 17:03:21 +08:00
traffic is achieved for connection, without waiting for connection to finish.
It may be useful to prevent information about long-lasting downloads on server
shutdown.
.br
.B archiver
<ext> <commandline>
.br
2016-01-15 08:06:06 +08:00
Archiver to use for log files. <ext> is file extension produced by
2014-04-08 17:03:21 +08:00
archiver. Filename will be last argument to archiver, optionally you
can use %A as produced archive name and %F as filename.
.br
.B timeouts
<BYTE_SHORT> <BYTE_LONG> <STRING_SHORT> <STRING_LONG> <CONNECTION_SHORT> <CONNECTION_LONG> <DNS> <CHAIN> <CONNECT> <CONNECTBACK>
2014-04-08 17:03:21 +08:00
.br
Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15, 60, 15, 5.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
BYTE_SHORT short timeout for single byte, is usually used for receiving single byte from stream.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
BYTE_LONG long timeout for single byte, is usually used for receiving first byte in frame (for example first byte in socks request).
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
STRING_SHORT short timeout, for character string within stream (for example to wait between 2 HTTP headers)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
STRING_LONG long timeout, for first string in stream (for example to wait for HTTP request).
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
CONNECTION_SHORT inactivity timeout for short connections (HTTP, POP3, etc).
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
CONNECTION_LONG inactivity timeout for long connection (SOCKS, portmappers, etc).
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
DNS timeout for DNS request before requesting next server
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
CHAIN timeout for reading data from chained connection
2019-02-21 22:41:54 +08:00
.br
default timeouts 1 5 30 60 180 1800 15 60 15 5
2020-10-15 17:25:33 +08:00
.br
.B radius
<NAS_SECRET> <radius_server_1[:port][/local_address_1]> <radius_server_2[:port][/local_address_2]>
.br
Configures RADIUS servers to be used for logging and authentication (log and auth types
must be set to radius). port and local address to use with given server may be specified.
.br
Attributes within request: User-Name, Password: (username and password if presented by client),
Service Type: Authenticate-Only,
NAS-Port-Type: NAS-Port-Virtual,
NAS-Port-ID: (proxy service port, e.g. 1080),
NAS-IPv6-Address / NAS-IP-Address: (proxy interface accessed by client),
NAS-Identifier: (text identifing proxy, e.g. PROXY or SOCKSv5),
Framed-IPv6-Address / Framed-IP-Address: (IP address of the client),
Called-Station-ID: (requested Hostname, if presents),
Login-Service: (type of request, e.g. 1001 - SOCKS CONNECT, 1010 - HTTP GET, 1013 - HTTP CONNECT),
Login-TCP-Port: (requested port),
Login-IPv6-Host / Login-IP-Host: (requested IP).
.br
Supported reply attributes for authentication:
Framed-IP-Address / Framed-IPv6-Address (IP to assign to user), Reply-Message.
Use authcache to speedup authentication. RADIUS feature is currently experimental.
2014-04-08 17:03:21 +08:00
.br
.B nserver
2016-01-15 07:41:14 +08:00
<ipaddr>[:port][/tcp]
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
Nameserver to use for name resolutions. If none specified
2019-08-01 21:44:30 +08:00
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.
2014-04-08 17:03:21 +08:00
.br
.B nscache
<cachesize>
.B nscache6
<cachesize>
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
Cache <cachesize> records for name resolution (nscache for IPv4,
nscache6 for IPv6). Cachesize usually should be large enougth
(for example 65536).
2014-04-08 17:03:21 +08:00
.br
.B nsrecord
<hostname> <hostaddr>
2016-01-15 08:06:06 +08:00
.br
Adds static record to nscache. nscache must be enabled. If 0.0.0.0
2014-04-08 17:03:21 +08:00
is used as a hostaddr host will never resolve, it can be used to
blacklist something or together with
.B dialer
command to set up UDL for dialing.
.br
.B fakeresolve
2016-01-15 08:06:06 +08:00
.br
All names are resolved to 127.0.0.2 address. Usefull if all requests are
2014-04-08 17:03:21 +08:00
redirected to parent proxy with http, socks4+, connect+ or socks5+.
.br
.B dialer
<progname>
.br
2019-01-17 22:24:42 +08:00
Execute progname if external name can\'t be resolved.
2014-04-08 17:03:21 +08:00
Hint: if you use nscache, dialer may not work, because names will
be resolved through cache. In this case you can use something like
http://dial.right.now/ from browser to set up connection.
.br
.B internal
<ipaddr>
.br
2016-01-15 08:06:06 +08:00
sets ip address of internal interface. This IP address will be used
2014-04-08 17:03:21 +08:00
to bind gateways. Alternatively you can use -i option for individual
gateways. Since 0.8 version, IPv6 address may be used.
2014-04-08 17:03:21 +08:00
.br
.B external
<ipaddr>
.br
2016-01-15 08:06:06 +08:00
sets ip address of external interface. This IP address will be source
2019-01-17 22:24:42 +08:00
address for all connections made by proxy. 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.
2014-04-08 17:03:21 +08:00
.br
.B maxconn
<number>
.br
2022-11-08 20:25:05 +08:00
sets maximum number of simulationeous connections to each service
started after this command on network level. Default is 100.
.br
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.
2014-04-08 17:03:21 +08:00
2022-11-08 22:01:39 +08:00
.br
.B backlog
.br
sets the listening socket backlog of new connections. Default is
2022-11-08 22:42:04 +08:00
1 + maxconn/8. Maximum value is capped by kernel tunable somaxconn.
2022-11-08 22:01:39 +08:00
2014-04-08 17:03:21 +08:00
.br
.B service
.br
2016-01-15 08:06:06 +08:00
(depricated). Indicates 3proxy to behave as Windows 95/98/NT/2000/XP
2014-04-08 17:03:21 +08:00
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.
.br
.B daemon
.br
2019-01-17 22:24:42 +08:00
Should be specified to close console. Do not use \'daemon\' with \'service\'.
At least under FreeBSD \'daemon\' should preceed any proxy service
2014-04-08 17:03:21 +08:00
and log commands to avoid sockets problem. Always place it in the beginning
of the configuration file.
.br
.B auth
<authtype> [...]
.br
2016-01-15 08:06:06 +08:00
Type of user authorization. Currently supported:
.br
2019-01-17 22:24:42 +08:00
none - no authentication or authorization required.
2014-04-08 17:03:21 +08:00
.br
Note: is auth is none any ip based limitation, redirection, etc will not work.
2016-01-15 08:06:06 +08:00
This is default authentication type
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
iponly - authentication by access control list with username ignored.
2014-04-08 17:03:21 +08:00
Appropriate for most cases
.br
2019-01-17 22:24:42 +08:00
useronly - authentication by username without checking for any password with
2014-04-08 17:03:21 +08:00
authorization by ACLs. Useful for e.g. SOCKSv4 proxy and icqpr (icqpr set UIN /
AOL screen name as a username)
.br
2019-01-17 22:24:42 +08:00
dnsname - authentication by DNS hostnname with authorization by ACLs.
2014-04-08 17:03:21 +08:00
DNS hostname is resolved via PTR (reverse) record and validated (resolved
2019-01-17 22:24:42 +08:00
name must resolve to same IP address). It\'s recommended to use authcache by
2014-04-08 17:03:21 +08:00
ip for this authentication.
NB: there is no any password check, name may be spoofed.
.br
2019-01-17 22:24:42 +08:00
strong - username/password authentication required. It will work with
2014-04-08 17:03:21 +08:00
SOCKSv5, FTP, POP3 and HTTP proxy.
.br
2019-01-17 22:24:42 +08:00
cache - cached authentication, may be used with \'authcache\'.
2020-10-15 17:25:33 +08:00
.br
radius - authentication with RADIUS.
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
Plugins may add additional authentication types.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
It\'s possible to use few authentication types in the same commands. E.g.
.br
auth iponly strong
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
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
2014-04-08 17:03:21 +08:00
password allowing passwordless access to another resources, or to use
IP-based authentication for dedicated laptops and request username/password for
shared ones.
2016-01-15 07:26:56 +08:00
2014-04-08 17:03:21 +08:00
.br
.B authcache
<cachtype> <cachtime>
.br
2016-01-15 08:06:06 +08:00
Cache authentication information to given amount of time (cachetime) in seconds.
2014-04-08 17:03:21 +08:00
Cahtype is one of:
.br
2019-01-17 22:24:42 +08:00
ip - after successful authentication all connections during caching time
2014-04-08 17:03:21 +08:00
from same IP are assigned to the same user, username is not requested.
.br
2019-01-17 22:24:42 +08:00
ip,user username is requested and all connections from the same IP are
2014-04-08 17:03:21 +08:00
assigned to the same user without actual authentication.
.br
2019-01-17 22:24:42 +08:00
user - same as above, but IP is not checked.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
user,password - both username and password are checked against cached ones.
.br
limit - limit user to use only one ip, \'ip\' and \'user\' are required
2020-06-17 21:14:23 +08:00
.br
acl - only use cached auth if user access service with same ACL
.br
ext - cache external IP
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
Use auth type \'cache\' for cached authentication
2016-01-15 07:26:56 +08:00
2014-04-08 17:03:21 +08:00
.br
.B allow
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
<weekdayslist> <timeperiodslist>
.br
.B deny
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
<weekdayslist> <timeperiodslist>
.br
2016-01-15 08:06:06 +08:00
Access control entries. All lists are comma-separated, no spaces are
2014-04-08 17:03:21 +08:00
allowed. Usernames are case sensitive (if used with authtype nbname
username must be in uppercase). Source and target lists may contain
2019-01-17 22:24:42 +08:00
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
2014-04-08 17:03:21 +08:00
.br
allow *
.br
If access list is not empty last item in access list is assumed to be
.br
deny *
.br
2019-01-17 22:24:42 +08:00
You may want explicitly add deny * to the end of access list to prevent
HTTP proxy from requesting user\'s password.
2014-04-08 17:03:21 +08:00
Access lists are checked after user have requested any resource.
If you want 3proxy to reject connections from specific addresses
immediately without any conditions you should either bind proxy
to appropriate interface only or to use ip filters.
.br
2019-01-17 22:24:42 +08:00
Operation is one of:
.br
CONNECT establish outgoing TCP connection
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
BIND bind TCP port for listening
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
UDPASSOC make UDP association
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
ICMPASSOC make ICMP association (for future use)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_GET HTTP GET request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_PUT HTTP PUT request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_POST HTTP POST request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_HEAD HTTP HEAD request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_CONNECT HTTP CONNECT request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP_OTHER over HTTP request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTP matches any HTTP request except HTTP_CONNECT
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
HTTPS same as HTTP_CONNECT
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
FTP_GET FTP get request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
FTP_PUT FTP put request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
FTP_LIST FTP list request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
FTP_DATA FTP data connection. Note: FTP_DATA requires access to dynamic
2016-01-15 20:29:57 +08:00
non-ptivileged (1024-65535) ports on remote side.
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
FTP matches any FTP/FTP Data request
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
ADMIN access to administration interface
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
Weeksdays are week days numbers or periods, 0 or 7 means Sunday, 1 is Monday, 1-5 means Monday through Friday.
.br
Timeperiodlists is a list of time
2016-01-15 08:06:06 +08:00
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.
2019-01-17 22:24:42 +08:00
2014-04-08 17:03:21 +08:00
.br
.B parent
<weight> <type> <ip> <port> <username> <password>
.br
2019-01-17 22:31:15 +08:00
this command must follow "allow" rule. It extends last allow rule to
2014-04-08 17:03:21 +08:00
build proxy chain. Proxies may be 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:
.br
allow *
.br
parent 500 socks5 192.168.10.1 1080
.br
parent 500 connect 192.168.10.1 3128
.br
makes 3proxy to randomly choose between 2 proxies for all outgoing
connections. These 2 proxies form 1 group (summarized weight is 1000).
.br
allow * * * 80
.br
parent 1000 socks5 192.168.10.1 1080
.br
parent 1000 connect 192.168.20.1 3128
.br
parent 300 socks4 192.168.30.1 1080
.br
parent 700 socks5 192.168.40.1 1080
.br
creates chain of 3 proxies: 192.168.10.1, 192.168.20.1 and third
is (192.168.30.1 with probability of 0.3 or 192.168.40.1
2020-11-27 16:09:43 +08:00
with probability of 0.7) for outgoing web connections. Chains are only applied to new connections, pipelined (keep-alive) requests in the same connection use the same chain.
2014-04-08 17:03:21 +08:00
.br
type is one of:
2020-11-27 16:09:43 +08:00
.br
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.
2014-04-08 17:03:21 +08:00
.br
2019-03-25 23:01:14 +08:00
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.
2014-04-08 17:03:21 +08:00
.br
2020-11-27 16:09:43 +08:00
http redirect to HTTP proxy. HTTP is always the last chain. It should only be used with http (proxy) service,
2019-03-25 23:01:14 +08:00
if used with different service, it works as tcp redirection.
2014-04-08 17:03:21 +08:00
.br
2019-03-25 23:01:14 +08:00
pop3 redirect to POP3 proxy (only local redirection is supported, can only be used as a first hop in chaining)
2014-04-08 17:03:21 +08:00
.br
2019-03-25 23:01:14 +08:00
ftp redirect to FTP proxy (only local redirection is supported, can only be used as a first hop in chaining)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
connect parent is HTTP CONNECT method proxy
2014-04-08 17:03:21 +08:00
.br
2019-03-25 23:01:14 +08:00
connect+ parent is HTTP CONNECT proxy with name resolution (hostname is used instead of IP if available)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
socks4 parent is SOCKSv4 proxy
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
socks4+ parent is SOCKSv4 proxy with name resolution (SOCKSv4a)
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
socks5 parent is SOCKSv5 proxy
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
socks5+ parent is SOCKSv5 proxy with name resolution
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
socks4b parent is SOCKS4b (broken SOCKSv4 implementation with shortened
2014-04-08 17:03:21 +08:00
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+).
.br
2019-01-17 22:24:42 +08:00
socks5b parent is SOCKS5b (broken SOCKSv5 implementation with shortened
2014-04-08 17:03:21 +08:00
server reply. I think you will never find it useful). Never use this option
unless you know exactly you need it.
.br
2019-01-17 22:24:42 +08:00
admin redirect request to local \'admin\' service (with -s parameter).
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:31:15 +08:00
Use "+" proxy only with "fakeresolve" option
2014-04-08 17:03:21 +08:00
.br
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.
2019-01-17 22:24:42 +08:00
If port is zero, it\'s taken from original request, only IP is changed.
If both IP and port are zero - it\'s a special case of local redirection,
2014-04-08 17:03:21 +08:00
it works only with
.B socks
proxy. In case of local redirection request is redirected to different service,
.B ftp
locally redirects to
.B ftppr
.B pop3
locally redirects to
.B pop3p
.B http
locally redurects to
.B proxy
.B admin
locally redirects to admin -s service.
2019-01-17 22:24:42 +08:00
.br
2014-04-08 17:03:21 +08:00
Main purpose of local redirections is to have requested resource
(URL or POP3 username) logged and protocol-specific filters to be applied.
2019-01-17 22:24:42 +08:00
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
2014-04-08 17:03:21 +08:00
example:
.br
allow * * * 80
.br
parent 1000 http 0.0.0.0 0
.br
allow * * * 80 HTTP_GET,HTTP_POST
.br
socks
.br
2016-01-15 08:06:06 +08:00
redirects all SOCKS requests with target port 80 to local HTTP proxy,
2014-04-08 17:03:21 +08:00
local HTTP proxy parses requests and allows only GET and POST requests.
.br
parent 1000 http 1.2.3.4 0
.br
2019-01-17 22:24:42 +08:00
Changes external address for given connection to 1.2.3.4 (an equivalent to -e1.2.3.4)
2016-01-15 08:06:06 +08:00
.br
2014-04-08 17:03:21 +08:00
Optional username and password are used to authenticate on parent
2019-01-17 22:24:42 +08:00
proxy. Username of \'*\' means username must be supplied by user.
2014-04-08 17:03:21 +08:00
.br
.B nolog
<n>
2016-01-15 08:06:06 +08:00
.br
extends last allow or deny command to prevent logging, e.g.
2014-04-08 17:03:21 +08:00
.br
allow * * 192.168.1.1
.br
nolog
.br
.B weight
<n>
.br
2016-01-15 08:06:06 +08:00
extends last allow or deny command to set weight for this request
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
allow * * 192.168.1.1
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
weight 100
.br
Weight may be used for different purposes.
2014-04-08 17:03:21 +08:00
.br
.B force
.br
.B noforce
.br
If force is specified for service, configuration reload will require all current
sessions of this service to be re-authenticated. If ACL is changed or user account
is removed, old connections which do not match current are closed.
2019-01-17 22:24:42 +08:00
noforce allows to keep previously authenticated connections.
2014-04-08 17:03:21 +08:00
.br
.B bandlimin
<rate> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
.B nobandlimin
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2016-01-15 07:26:56 +08:00
.br
2014-04-08 17:03:21 +08:00
.B bandlimout
<rate> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
.B nobandlimout
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
bandlim sets bandwith limitation filter to <rate> bps (bits per second)
2019-01-17 22:24:42 +08:00
If you want to specife bytes per second - multiply your value to 8.
2014-04-08 17:03:21 +08:00
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
2019-01-17 22:24:42 +08:00
If tou want to ratelimit your clients with IPs 192.168.10.16/30 (4
2014-04-08 17:03:21 +08:00
addresses) to 57600 bps you have to specify 4 rules like
.br
bandlimin 57600 * 192.168.10.16
.br
bandlimin 57600 * 192.168.10.17
.br
bandlimin 57600 * 192.168.10.18
.br
bandlimin 57600 * 192.168.10.19
.br
2016-01-15 07:26:56 +08:00
and every of you clients will have 56K channel. If you specify
2014-04-08 17:03:21 +08:00
.br
bandlimin 57600 * 192.168.10.16/30
.br
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
.br
nobandlimin * * * 110
.br
before the rest of bandlim rules.
.br
.B connlim
<rate> <period> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
.br
.B noconnlim
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
.br
2019-01-17 22:24:42 +08:00
connlim sets connections rate limit per time period for traffic
pattern controlled by ACL. Period is in seconds. If period is 0,
connlim limits a number of parallel connections.
.br
connlim 100 60 * 127.0.0.1
.br
2019-01-17 22:24:42 +08:00
allows 100 connections per minute for 127.0.0.1.
.br
connlim 20 0 * 127.0.0.1
.br
2019-01-17 22:24:42 +08:00
allows 20 simulationeous connections for 127.0.0.1.
.br
2019-01-17 22:24:42 +08:00
Like with bandlimin, if individual limit is required per client, separate
rule mustbe added for every client. Like with nobanlimin, noconnlim adds an
exception.
2014-04-08 17:03:21 +08:00
.br
.B counter
<filename> <reporttype> <repotname>
.br
.B countin
<number> <type> <limit> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
.B nocountin
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
.B countout
<number> <type> <limit> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
.B nocountout
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
2019-03-25 23:01:14 +08:00
<weekdayslist> <timeperiodslist>
.br
.B countall
<number> <type> <limit> <userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
<weekdayslist> <timeperiodslist>
.br
.B nocountall
<userlist> <sourcelist> <targetlist> <targetportlist> <operationlist>
<weekdayslist> <timeperiodslist>
2014-04-08 17:03:21 +08:00
.br
counter, countin, nocountin, countout, noucountout, countall,
nocountall commands are used to set traffic limit
2014-04-08 17:03:21 +08:00
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.
2014-04-08 17:03:21 +08:00
Type specifies a type of counter. Type is one of:
2016-01-15 07:26:56 +08:00
.br
H - counter is resetted hourly
2014-04-08 17:03:21 +08:00
.br
D - counter is resetted daily
.br
W - counter is resetted weekly
.br
M - counter is resetted monthely
.br
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:
.br
2016-01-15 07:26:56 +08:00
<COUNTERNUMBER> <TRAF>
2014-04-08 17:03:21 +08:00
.br
The rest of parameters is identical to bandlim/nobandlim.
.br
.B users
username[:pwtype:password] ...
.br
2016-01-15 08:06:06 +08:00
pwtype is one of:
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
none (empty) - use system authentication
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
CL - password is cleartext
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
CR - password is crypt-style password
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:24:42 +08:00
NT - password is NT password (in hex)
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
example:
2014-04-08 17:03:21 +08:00
.br
2019-01-17 22:31:15 +08:00
users test1:CL:password1 "test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49."
2014-04-08 17:03:21 +08:00
.br
users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
.br
2016-01-15 07:41:14 +08:00
Note: double quotes are requiered because password contains $ sign.
2014-04-08 17:03:21 +08:00
.br
.B flush
.br
2016-01-15 08:06:06 +08:00
empty active access list. Access list must be flushed avery time you creating
2014-04-08 17:03:21 +08:00
new access list for new service. For example:
.br
allow *
.br
pop3p
.br
flush
.br
allow * 192.168.1.0/24
.br
socks
.br
2016-01-15 08:06:06 +08:00
sets different ACLs for
2014-04-08 17:03:21 +08:00
.B pop3p
and
.B socks
.br
.B system
2016-01-15 08:06:06 +08:00
<command>
2014-04-08 17:03:21 +08:00
.br
2016-01-15 08:06:06 +08:00
execute system command
2014-04-08 17:03:21 +08:00
.br
.B pidfile
<filename>
.br
2016-01-15 08:06:06 +08:00
write pid of current process to file. It can be used to manipulate
2014-04-08 17:03:21 +08:00
3proxy with signals under Unix. Currently next signals are available:
.br
.B monitor
<filename>
.br
2016-01-15 08:06:06 +08:00
If file monitored changes in modification time or size, 3proxy reloads
2014-04-08 17:03:21 +08:00
configuration within one minute. Any number of files may be monitored.
.br
.B setuid
<uid>
.br
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
2014-04-08 17:03:21 +08:00
for all threads.
.br
.B setgid
<gid>
.br
calls setgid(gid), gid can be numeric or since 0.9 groupname. Unix only.
2014-04-08 17:03:21 +08:00
.br
.B chroot
<path> [<uid>] [<gid>]
2014-04-08 17:03:21 +08:00
.br
calls chroot(path) and sets gid/uid. Unix only. uid/gid supported since 0.9, can be numeric or username/groupname
2014-04-08 17:03:21 +08:00
.br
.B stacksize
<value_to_add_to_default_stack_size>
.br
Change default size for threads stack. May be required in some situation,
2019-01-17 22:24:42 +08:00
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.
2016-02-17 23:23:29 +08:00
.SH PLUGINS
.br
.B plugin
<path_to_shared_library> <function_to_call> [<arg1> ...]
.br
Loads specified library and calls given export function with given arguments,
as
.br
int functions_to_call(struct pluginlink * pl, int argc, char * argv[]);
.br
function_to_call must return 0 in case of success, value > 0 to indicate error.
2014-04-08 17:03:21 +08:00
.br
.B filtermaxsize
<max_size_of_data_to_filter>
.br
2016-01-15 08:06:06 +08:00
If Content-length (or another data length) is greater than given value, no
2014-04-08 17:03:21 +08:00
data filtering will be performed thorugh filtering plugins to avoid data
corruption and/or Content-Length chaging. Default is 1MB (1048576).
2016-01-14 04:35:35 +08:00
.SH BUGS
Report all bugs to
2021-07-02 16:50:33 +08:00
.BR 3proxy@3proxy.org
2014-04-08 17:03:21 +08:00
.SH SEE ALSO
3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
.br
2019-01-17 22:24:42 +08:00
https://3proxy.org/
2014-04-08 17:03:21 +08:00
.SH TRIVIA
3APA3A is pronounced as \`\`zaraza\'\'.
.SH AUTHORS
2016-01-13 07:13:49 +08:00
3proxy is designed by Vladimir 3APA3A Dubrovin
2021-07-02 16:50:33 +08:00
.RI ( 3proxy@3proxy.org )