mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-19 18:50:12 +08:00
Update documentation for parent tcps/https/etc
This commit is contained in:
parent
afbdad0ac7
commit
c4ac696919
@ -711,6 +711,29 @@ ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
|
|||||||
ssl_cli
|
ssl_cli
|
||||||
proxy -p3128
|
proxy -p3128
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
<b>Conditional TLS for parent proxy (ssl_client_mode 3):</b>
|
||||||
|
<br>With ssl_client_mode 3, TLS handshake to parent proxy is performed only if the parent type ends with 's' (secure types). This allows mixing secure and non-secure parent proxies in the same configuration:
|
||||||
|
</p><pre>
|
||||||
|
plugin /path/to/SSLPlugin.ld.so ssl_plugin
|
||||||
|
ssl_server_cert /etc/3proxy/certs/server.crt
|
||||||
|
ssl_server_key /etc/3proxy/certs/server.key
|
||||||
|
ssl_client_mode 3
|
||||||
|
|
||||||
|
auth strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 https parent1.example.com 443
|
||||||
|
allow user2
|
||||||
|
parent 1000 socks5 parent2.example.com 1080
|
||||||
|
ssl_serv
|
||||||
|
ssl_cli
|
||||||
|
proxy -p3128
|
||||||
|
ssl_noserv
|
||||||
|
ssl_nocli
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
This creates an HTTPS proxy (ssl_serv) that accepts TLS connections from clients. For parent proxy connections, user1's traffic goes through an https parent with TLS encryption (secure type), while user2's traffic goes through a regular socks5 parent without TLS. Secure parent types include: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps.
|
||||||
|
</p>
|
||||||
<li><a name="CERTIFICATES"><i>How to create CA and certificates for SSLPlugin</i></a>
|
<li><a name="CERTIFICATES"><i>How to create CA and certificates for SSLPlugin</i></a>
|
||||||
<p>
|
<p>
|
||||||
<b>Creating a Certificate Authority (CA):</b>
|
<b>Creating a Certificate Authority (CA):</b>
|
||||||
|
|||||||
@ -720,6 +720,29 @@ ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
|
|||||||
ssl_cli
|
ssl_cli
|
||||||
proxy -p3128
|
proxy -p3128
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
<b>Условное TLS для parent прокси (ssl_client_mode 3):</b>
|
||||||
|
<br>При ssl_client_mode 3 TLS-рукопожатие с родительским прокси выполняется только если тип parent прокси заканчивается на 's' (защищённые типы). Это позволяет смешивать защищённые и незащищённые родительские прокси в одной конфигурации:
|
||||||
|
</p><pre>
|
||||||
|
plugin /path/to/SSLPlugin.ld.so ssl_plugin
|
||||||
|
ssl_server_cert /etc/3proxy/certs/server.crt
|
||||||
|
ssl_server_key /etc/3proxy/certs/server.key
|
||||||
|
ssl_client_mode 3
|
||||||
|
|
||||||
|
auth strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 https parent1.example.com 443
|
||||||
|
allow user2
|
||||||
|
parent 1000 socks5 parent2.example.com 1080
|
||||||
|
ssl_serv
|
||||||
|
ssl_cli
|
||||||
|
proxy -p3128
|
||||||
|
ssl_noserv
|
||||||
|
ssl_nocli
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
Создаётся HTTPS-прокси (ssl_serv), принимающий TLS-соединения от клиентов. Для соединений с родительским прокси трафик user1 идёт через https родитель с TLS-шифрованием (защищённый тип), а трафик user2 — через обычный socks5 родитель без TLS. Защищённые типы parent прокси: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps.
|
||||||
|
</p>
|
||||||
<li><a name="CERTIFICATES"><i>Как создать CA и сертификаты для SSLPlugin</i></a>
|
<li><a name="CERTIFICATES"><i>Как создать CA и сертификаты для SSLPlugin</i></a>
|
||||||
<p>
|
<p>
|
||||||
<b>Создание удостоверяющего центра (CA):</b>
|
<b>Создание удостоверяющего центра (CA):</b>
|
||||||
|
|||||||
@ -44,7 +44,7 @@ ssl_cli (or ssl_client) - establish TLS connection to upstream server for servic
|
|||||||
<br><b>ssl_client_ca_store</b> /path/to/castore - CA store for ssl_client_verify (OpenSSL 3.0+)
|
<br><b>ssl_client_ca_store</b> /path/to/castore - CA store for ssl_client_verify (OpenSSL 3.0+)
|
||||||
<br><b>ssl_client_sni</b> hostname - SNI hostname to send to upstream server (overrides the requested hostname)
|
<br><b>ssl_client_sni</b> hostname - SNI hostname to send to upstream server (overrides the requested hostname)
|
||||||
<br><b>ssl_client_alpn</b> protocol1 protocol2 ... - ALPN protocols to negotiate with upstream server (e.g., ssl_client_alpn h2 http/1.1)
|
<br><b>ssl_client_alpn</b> protocol1 protocol2 ... - ALPN protocols to negotiate with upstream server (e.g., ssl_client_alpn h2 http/1.1)
|
||||||
<br><b>ssl_client_mode</b> mode - when to establish TLS connection: 0 - on connect (default), 1 - after authentication, 2 - before data
|
<br><b>ssl_client_mode</b> mode - when to establish TLS connection: 0 - on connect (default), 1 - after authentication, 2 - before data, 3 - only for secure parent types (ending with 's')
|
||||||
<br><b>ssl_certcache</b> /path/to/cache/ - location for the generated MITM certificates cache, optional if ssl_server_ca_file / ssl_server_ca_key are configured.
|
<br><b>ssl_certcache</b> /path/to/cache/ - location for the generated MITM certificates cache, optional if ssl_server_ca_file / ssl_server_ca_key are configured.
|
||||||
The cache may contain 3 files: 3proxy.pem - public
|
The cache may contain 3 files: 3proxy.pem - public
|
||||||
self-signed certificates (used if ssl_server_ca_file is not configured),
|
self-signed certificates (used if ssl_server_ca_file is not configured),
|
||||||
@ -89,6 +89,26 @@ proxy -p3128
|
|||||||
</pre>
|
</pre>
|
||||||
Creates an HTTP proxy that connects to upstream servers via TLS with client certificate authentication.
|
Creates an HTTP proxy that connects to upstream servers via TLS with client certificate authentication.
|
||||||
|
|
||||||
|
<h4>Conditional TLS for parent proxy (ssl_client_mode 3):</h4>
|
||||||
|
<pre>
|
||||||
|
plugin /path/to/SSLPlugin.so ssl_plugin
|
||||||
|
ssl_server_cert /path/to/server.crt
|
||||||
|
ssl_server_key /path/to/key
|
||||||
|
ssl_client_mode 3
|
||||||
|
|
||||||
|
auth strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 https parent1.example.com 443
|
||||||
|
allow user2
|
||||||
|
parent 1000 socks5 parent2.example.com 1080
|
||||||
|
ssl_serv
|
||||||
|
ssl_cli
|
||||||
|
proxy -p3128
|
||||||
|
ssl_noserv
|
||||||
|
ssl_nocli
|
||||||
|
</pre>
|
||||||
|
Creates an HTTP proxy on port 3128 that uses TLS for client connections (ssl_serv). With ssl_client_mode 3, TLS handshake to parent proxy is performed only if the parent type ends with 's' (secure types). In this example, user1's traffic goes through an https parent proxy with TLS encryption, while user2's traffic goes through a regular socks5 parent without TLS. Secure parent types include: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps.
|
||||||
|
|
||||||
<h4>mTLS example (require client certificate):</h4>
|
<h4>mTLS example (require client certificate):</h4>
|
||||||
<pre>
|
<pre>
|
||||||
plugin /path/to/SSLPlugin.so ssl_plugin
|
plugin /path/to/SSLPlugin.so ssl_plugin
|
||||||
|
|||||||
@ -44,7 +44,7 @@ ssl_cli (или ssl_client) - устанавливать TLS-соединени
|
|||||||
<br><b>ssl_client_ca_store</b> /path/to/castore - хранилище CA-сертификатов для ssl_client_verify (OpenSSL 3.0+)
|
<br><b>ssl_client_ca_store</b> /path/to/castore - хранилище CA-сертификатов для ssl_client_verify (OpenSSL 3.0+)
|
||||||
<br><b>ssl_client_sni</b> hostname - SNI-имя хоста для отправки вышестоящему серверу (переопределяет запрошенное имя хоста)
|
<br><b>ssl_client_sni</b> hostname - SNI-имя хоста для отправки вышестоящему серверу (переопределяет запрошенное имя хоста)
|
||||||
<br><b>ssl_client_alpn</b> протокол1 протокол2 ... - ALPN-протоколы для согласования с вышестоящим сервером (например, ssl_client_alpn h2 http/1.1)
|
<br><b>ssl_client_alpn</b> протокол1 протокол2 ... - ALPN-протоколы для согласования с вышестоящим сервером (например, ssl_client_alpn h2 http/1.1)
|
||||||
<br><b>ssl_client_mode</b> режим - когда устанавливать TLS-соединение: 0 - при подключении (по умолчанию), 1 - после аутентификации, 2 - перед передачей данных
|
<br><b>ssl_client_mode</b> режим - когда устанавливать TLS-соединение: 0 - при подключении (по умолчанию), 1 - после аутентификации, 2 - перед передачей данных, 3 - только для защищённых типов parent прокси (заканчивающихся на 's')
|
||||||
<br><b>ssl_certcache</b> /path/to/cache/ - расположение кеша сгенерированных MITM-сертификатов. Кеш может содержать
|
<br><b>ssl_certcache</b> /path/to/cache/ - расположение кеша сгенерированных MITM-сертификатов. Кеш может содержать
|
||||||
файлы 3proxy.pem, 3proxy.key, server.key, которые используются как ssl_server_ca_file,
|
файлы 3proxy.pem, 3proxy.key, server.key, которые используются как ssl_server_ca_file,
|
||||||
ssl_server_ca_key и ssl_server_key соответственно, если они не заданы. Если server.key не задан,
|
ssl_server_ca_key и ssl_server_key соответственно, если они не заданы. Если server.key не задан,
|
||||||
@ -86,6 +86,26 @@ proxy -p3128
|
|||||||
</pre>
|
</pre>
|
||||||
Создается HTTP-прокси, который соединяется с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату.
|
Создается HTTP-прокси, который соединяется с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату.
|
||||||
|
|
||||||
|
<h4>Условное TLS для parent прокси (ssl_client_mode 3):</h4>
|
||||||
|
<pre>
|
||||||
|
plugin /path/to/SSLPlugin.so ssl_plugin
|
||||||
|
ssl_server_cert /path/to/server.crt
|
||||||
|
ssl_server_key /path/to/key
|
||||||
|
ssl_client_mode 3
|
||||||
|
|
||||||
|
auth strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 https parent1.example.com 443
|
||||||
|
allow user2
|
||||||
|
parent 1000 socks5 parent2.example.com 1080
|
||||||
|
ssl_serv
|
||||||
|
ssl_cli
|
||||||
|
proxy -p3128
|
||||||
|
ssl_noserv
|
||||||
|
ssl_nocli
|
||||||
|
</pre>
|
||||||
|
Создается HTTP-прокси на порту 3128, использующий TLS для клиентских соединений (ssl_serv). При ssl_client_mode 3 TLS-рукопожатие с родительским прокси выполняется только если тип parent прокси заканчивается на 's' (защищённые типы). В данном примере трафик user1 идёт через https родительский прокси с TLS-шифрованием, а трафик user2 — через обычный socks5 родитель без TLS. Защищённые типы parent прокси: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps.
|
||||||
|
|
||||||
<h4>Пример mTLS (требование клиентского сертификата):</h4>
|
<h4>Пример mTLS (требование клиентского сертификата):</h4>
|
||||||
<pre>
|
<pre>
|
||||||
plugin /path/to/SSLPlugin.so ssl_plugin
|
plugin /path/to/SSLPlugin.so ssl_plugin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user