Allow to set internal / external namespace on linux

This commit is contained in:
Vladimir Dubrovin committed 2026-05-02 14:49:35 +03:00
1 parent b87e998e4d
commit 51a82613a6
21 files changed
+623 -205

No files matched your search

+30 -8
View File
@@ -116,23 +116,45 @@ authentication.</p> </td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/ftppr.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/ftppr.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
+30 -8
View File
@@ -116,23 +116,45 @@ authentication.</p> </td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/pop3p.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/pop3p.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
+40 -18
View File
@@ -55,11 +55,11 @@ support.</p>
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -67,11 +67,11 @@ support.</p>
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -79,11 +79,11 @@ only.</p> </td></tr>
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -91,11 +91,11 @@ console and run in the background.</p></td></tr>
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -103,11 +103,11 @@ start/stop/accept error records.</p></td></tr>
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -115,23 +115,45 @@ authentication</p> </td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/proxy.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/proxy.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
+30 -8
View File
@@ -116,23 +116,45 @@ authentication.</p> </td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/smtpp.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/smtpp.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
+39 -17
View File
@@ -57,11 +57,11 @@ connections and UDP portmapping.</p>
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -69,11 +69,11 @@ connections and UDP portmapping.</p>
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -81,11 +81,11 @@ only.</p> </td></tr>
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -93,11 +93,11 @@ console and run in the background.</p></td></tr>
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -105,11 +105,11 @@ start/stop/accept error records.</p></td></tr>
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -118,22 +118,44 @@ 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.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-Ne</b></p></td>
<p><b>-Ne</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">External NAT address 3proxy
reports to client for CONNECT/BIND. This is external address
of NAT between 3proxy and destination server. By default,
the external address is reported. It&rsquo;s only useful in
the case of IP-IP NAT and does not work with port
translation.</p> </td></tr>
<p>External NAT address 3proxy reports to client for
CONNECT/BIND. This is external address of NAT between 3proxy
and destination server. By default, the external address is
reported. It&rsquo;s only useful in the case of IP-IP NAT
and does not work with port translation.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
+30 -8
View File
@@ -104,23 +104,45 @@ start/stop/accept error records.</p></td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/tcppm.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/tcppm.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
+40 -18
View File
@@ -60,11 +60,11 @@ plugin).</p>
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-I</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -72,11 +72,11 @@ plugin).</p>
only.</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-d</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -84,11 +84,11 @@ only.</p> </td></tr>
console and run in the background.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-t</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -96,11 +96,11 @@ console and run in the background.</p></td></tr>
start/stop/accept error records.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-u</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -108,11 +108,11 @@ start/stop/accept error records.</p></td></tr>
authentication</p> </td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<td width="3%">
<p style="margin-top: 1em"><b>-e</b></p></td>
<td width="5%"></td>
<td width="6%"></td>
<td width="85%">
@@ -120,23 +120,45 @@ authentication</p> </td></tr>
the interface the proxy should initiate connections from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="5%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts connections to. By default, connections to any
interface are accepted. It&acute;s usually unsafe. Unix
domain sockets can be specified with
<i>-iunix:/path/to/socket</i> syntax (e.g.,
-iunix:/var/run/tlspr.sock). On Linux, abstract sockets use
<i>-iunix:@socketname</i> syntax.</p></td></tr>
<p>Internal address. IP address the proxy accepts
connections to. By default, connections to any interface are
accepted. It&acute;s usually unsafe. Unix domain sockets can
be specified with <i>-iunix:/path/to/socket</i> syntax
(e.g., -iunix:/var/run/tlspr.sock). On Linux, abstract
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="4%">
+27 -4
View File
@@ -104,19 +104,42 @@ start/stop/accept error records.</p></td></tr>
the interface the proxy should initiate datagrams from. By
default, the system will decide which address to use in
accordance with the routing table.</p></td></tr>
</table>
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> before opening
the listening socket. The current namespace is saved and
restored immediately after binding, so outgoing connections
run in the original namespace unless <b>-ne</b> is also
given.</p>
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
<p style="margin-left:15%;">(Linux only) Switch to the
network namespace identified by <i>PATH</i> after the
listening socket has been bound (and after restoring from
<b>-ni</b> if applicable). Both options accept any namespace
file path (e.g. <i>/var/run/netns/myns</i> or
<i>/proc/PID/ns/net</i>) and require
<b>CAP_SYS_ADMIN</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>-i</b></p></td>
<p><b>-i</b></p></td>
<td width="6%"></td>
<td width="85%">
<p style="margin-top: 1em">Internal address. IP address the
proxy accepts datagrams to. By default, connections to any
interface are accepted. It&acute;s usually unsafe.</p></td></tr>
<p>Internal address. IP address the proxy accepts datagrams
to. By default, connections to any interface are accepted.
It&acute;s usually unsafe.</p></td></tr>
<tr valign="top" align="left">
<td width="6%"></td>
<td width="3%">