https://pzwiki.wdka.nl/mw-mediadesign/index.php?title=Wrap_network_traffic_of_almost_any_application_with_a_SOCKS_proxy&feed=atom&action=historyWrap network traffic of almost any application with a SOCKS proxy - Revision history2024-03-28T23:56:35ZRevision history for this page on the wikiMediaWiki 1.38.2https://pzwiki.wdka.nl/mw-mediadesign/index.php?title=Wrap_network_traffic_of_almost_any_application_with_a_SOCKS_proxy&diff=9852&oldid=prevAymeric Mansoux at 13:36, 15 January 20112011-01-15T13:36:45Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:36, 15 January 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>And add the following section in <del style="font-weight: bold; text-decoration: none;">you </del>/etc/dante.conf:</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>And add the following section in <ins style="font-weight: bold; text-decoration: none;">your </ins>/etc/dante.conf:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="bash"></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="bash"></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l29">Line 29:</td>
<td colspan="2" class="diff-lineno">Line 29:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>socksify ./superbot.py</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>socksify ./superbot.py</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category: Cookbook]]</ins></div></td></tr>
</table>Aymeric Mansouxhttps://pzwiki.wdka.nl/mw-mediadesign/index.php?title=Wrap_network_traffic_of_almost_any_application_with_a_SOCKS_proxy&diff=9851&oldid=prevAymeric Mansoux: Created page with "So you have your nice little tunnel up and running, and now you would like to also use it for some network scripts/app you wrote. One way to..."2011-01-15T13:35:00Z<p>Created page with "So you have your <a href="/mediadesign/Tunnel_your_HTTP_traffic_with_ssh" title="Tunnel your HTTP traffic with ssh">nice little tunnel up and running</a>, and now you would like to also use it for some network scripts/app you wrote. One way to..."</p>
<p><b>New page</b></p><div>So you have your [[Tunnel your HTTP traffic with ssh|nice little tunnel up and running]], and now you would like to also use it for some network scripts/app you wrote. One way to do it is to set and export, in your terminal or in a shell wrapper for your application, the SOCKS_SERVER environment variable:<br />
<br />
<source lang="bash"><br />
export SOCKS_SERVER=127.0.0.1:12345<br />
</source><br />
<br />
In theory everything started in the shell from which this has been set, should have its network traffic going through your SOCKS proxy. Unfortunately this is rarely the case as a lot of applications do not take this variable into account or simply have no support for SOCKS in general.<br />
<br />
Enter socksify! Thanks to this small wrapper, it is possible to dynamically SOCKSify a program.<br />
<br />
<source lang="bash"><br />
sudo apt-get install dante-client<br />
</source><br />
<br />
And add the following section in you /etc/dante.conf:<br />
<br />
<source lang="bash"><br />
route {<br />
from: 0.0.0.0/0 to: 0.0.0.0/0 via: 127.0.0.1 port = 12345<br />
protocol: tcp udp <br />
proxyprotocol: socks_v5<br />
method: none<br />
}<br />
</source><br />
<br />
From now on, any program that should be used through your SOCKS proxy, can be started like this:<br />
<br />
<source lang="bash"><br />
socksify ./superbot.py<br />
</source></div>Aymeric Mansoux