3proxy/man/3proxy.8
Vladimir Dubrovin f4dca5d462
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
tcptoudp, udptotcp: tunnels between TCP and UDP
Datagrams on a TCP connection, each with a two byte length in network
order in front of it, which is how udptunnel (the rfc1036 one) and
ProxyGuard (eduVPN) put them there, the framing alone or after a
handshake: udptunnel's 32 bytes, or ProxyGuard's HTTP Upgrade for
UoTLV/1 answered with 101 Switching Protocols.

tcptoudp takes the connections, a UDP socket of its own to the target
for each, the handshake a client speaks recognised by its first bytes
and answered; a parent the ACL gives is a SOCKS5 UDP relay, as for
udppm. udptotcp takes the datagrams, each client a session of the
service's with a TCP connection of its own, connected as the service's
loop sees it writable (dnspr asks a name server over TCP the same way);
-m sends udptunnel's handshake to the target, -m2 ProxyGuard's, -m0
(the default) none, so both ends of either tool are stood in for.

The service names take two places of the string table, the default
configuration path moving two later (stringtable[27]).

Built by the Makefiles and CMake, with the standalone binaries, and
installed by them; a case of the test suite speaks all three handshakes.
2026-11-15 17:36:42 +03:00

172 lines
6.0 KiB
Groff

.TH 3proxy "8" "May 2026" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B 3proxy
\- 3[APA3A] tiny proxy server, or trivial proxy server, or free proxy
server
.SH SYNOPSIS
.B 3proxy
.RI [ config_file ]
.br
.B 3proxy
.RI [ \-\-install ]
.br
.B 3proxy
.RI [ \-\-remove ]
.SH DESCRIPTION
.B 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
.BR 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 the configuration file like an independent service
.BR proxy (8)
.BR socks (8)
.BR pop3p (8)
.BR imapp (8)
.BR tcppm (8)
.BR udppm (8)
.BR tcptoudp (8)
.BR udptotcp (8)
.BR ftppr (8)
.BR dnspr
but
.BR 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
.IR SocksCAP ,
.I 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.
.PP
.I dnspr
does not exist as an independent service. It's a DNS caching proxy (it requires
.I nscache
and
.I 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.
.PP
3proxy supports access control lists (ACL) like network router. Source
and destination networks and destination port can be specified. In addition,
usernames and gateway action (for example GET or POST) can be used in ACLs.
In order to filter request on username basis user must be authenticated somehow. There are few
authentication types including password authentication and authentication by
NetBIOS name for Windows clients (it\'s very like ident authentication).
Depending on ACL action request can be allowed, denied or redirected to another
host or to another proxy server or even to a chain of proxy servers.
.PP
It supports different types of logging: to logfiles,
.BR syslog (3)
(only under Unix) or to an ODBC database. Logging format is tunable to provide
compatibility with existing log file parsers. It makes it possible to use
3proxy with IIS, ISA, Apache or Squid log parsers.
.SH OPTIONS
.TP
.B config_file
Name of config file. See
.BR 3proxy.cfg (3)
for configuration file format. Under Windows, if config_file is not specified,
.BR 3proxy
looks for a file named
.I 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 the 3proxy.cfg file as
an executable script just by setting +x mode and adding
.br
#!/usr/local/3proxy/3proxy
.br
as a first line in 3proxy.cfg
.TP
.B --install
(Windows NT family only) install
.BR 3proxy
as a system service
.TP
.B --remove
(Windows NT family only) remove
.BR 3proxy
from system services
.SH SIGNALS
Under Unix there are a few signals
.BR 3proxy
catches. See
.BR kill (1).
.TP
.B SIGTERM
clean up connections and exit
.TP
.B SIGPAUSE
stop accepting new connections, on second signal - start and re-read
configuration
.TP
.B SIGCONT
start to accept new connections
.TP
.B SIGUSR1
reload configuration. The file is read whole before anything changes: if
it has an error, the configuration in force stays as it is, its services
running. Otherwise the new services start and the old ones stop accepting
within a second; connections already open finish under the old
configuration. A new service listening on the same address and port, in
the same network namespace and on the same device, takes over the old
service's TCP or UDP socket, so no connection is refused or lost
meanwhile, and UDP sessions go on through it. Services of one
configuration on one address share its socket, all accepting on it; they
must be of the same type with the same -ol options, or the
configuration is refused. Of the -ol options only those acting when the socket is
bound must be the same (SO_REUSEADDR, SO_REUSEPORT, SO_EXCLUSIVEADDRUSE,
IP_TRANSPARENT, TCP_FASTOPEN); the others are set on the socket taken over,
those no longer given turned off. Otherwise the old service closes its
socket and the new one opens another. Connections of the old services are
re-authenticated as clients of the new service on their address, or on the
place a service connecting back (-r) connects to (several
may connect to one place), unless noforce is set;
they are closed if their service was removed or is of another type, or if
none of the new ones of their type has a free slot of its maxconn. Settings left out of
the new file go back to their defaults.
.PP
Under Windows, if
.BR 3proxy
is installed as a service you can use standard service management to start, stop,
pause and continue the 3proxy service, for example:
.br
.BR "net start 3proxy"
.br
.BR "net stop 3proxy"
.br
.BR "net pause 3proxy"
.br
.BR "net continue 3proxy"
.PP
Web admin service can also be used to reload configuration. Use
wget to automate this task.
.SH FILES
.TP
.I "/usr/local/3proxy/3proxy.cfg (3proxy.cfg)"
.BR 3proxy
configuration file
.SH BUGS
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
3proxy.cfg(5), proxy(8), ftppr(8), socks(8), pop3p(8), imapp(8), tcppm(8), udppm(8), tcptoudp(8), udptotcp(8),
kill(1), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
3proxy is designed by Vladimir Dubrovin <vlad@3proxy.org>