TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Spiped + SSH = Secure Proxy

20 pointsby SlyShyabout 11 years ago

9 comments

peterwwillisabout 11 years ago
I know Colin likes to keep commenting that the simplicity of spiped makes it inherently more secure than more complex alternatives. I haven&#x27;t evaluated the code, nor done a study to see if the number of lines of code always correlates to number of security holes, or if the complexity of the operations compared to the number of lines is related to the number of security holes, and what the bounds of that are. But I just took a brief look at one file and saw this:<p><pre><code> &#x2F;* Generate a 32-byte connection nonce. *&#x2F; if (crypto_entropy_read(H-&gt;nonce_local, 32)) goto err1; &#x2F;* Send our nonce. *&#x2F; if ((H-&gt;write_cookie = network_write(s, H-&gt;nonce_local, 32, 32, callback_nonce_write, H)) == NULL) goto err1; &#x2F;* Read the other party&#x27;s nonce. *&#x2F; if ((H-&gt;read_cookie = network_read(s, H-&gt;nonce_remote, 32, 32, callback_nonce_read, H)) == NULL) goto err2; </code></pre> The gotos themselves aren&#x27;t harmful (even though I don&#x27;t get why people still use gotos). What strikes me as really funny about this code is its over-simplicity is what caused a huge crypto bug to be missed in Apple&#x27;s iOS 7 recently. Take a look at the above code and then this security hole[1], and tell me if you can&#x27;t spot a potential problem.<p>[1] <a href="http://www.wired.com/2014/02/gotofail/" rel="nofollow">http:&#x2F;&#x2F;www.wired.com&#x2F;2014&#x2F;02&#x2F;gotofail&#x2F;</a>
azthabout 11 years ago
&gt; As an American living in a Middle Eastern monarchy, multiple government agencies are likely monitoring my internet traffic<p>Ironically, living in the democracy of the United States would have yielded a similar situation (except remove &quot;likely&quot;).
lawlabout 11 years ago
Are there any advantages over something like sshuttle? [0]<p>Doing sshuttle --dns 0&#x2F;0 seems more convinient especially since a regular sshd on my box is all I need, no additional software. And it instantly tunnels <i>all</i> my traffic, no need to configure socks proxies. It also avoids TCP-over-TCP which it seems like you&#x27;re doing?<p>[0] <a href="https://github.com/apenwarr/sshuttle" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apenwarr&#x2F;sshuttle</a>
评论 #7565190 未加载
khrfabout 11 years ago
&gt; In System Preferences, configure your network to connect to a SOCKS proxy at localhost:8089. Now all your internet activity is securely routed through your server.<p>That&#x27;s a big surprise. <i>all your internet activity</i>?!?! Even when I use curl&#x2F;wget&#x2F;IRC&#x2F;netcat? Skype, xmpp, git, email client? As I understand SOCKS proxy will be used by web-browser only, am I wrong?
rakooabout 11 years ago
Just a heads up: he seems to be running ssh as root [0]. My mom always told me not to run ssh as root, but maybe things change with Docker since it&#x27;s running in a virtualized OS.<p>[0] <a href="https://github.com/morgante/spiped-docker/blob/master/Dockerfile" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;morgante&#x2F;spiped-docker&#x2F;blob&#x2F;master&#x2F;Docker...</a>
D9uabout 11 years ago
From the link to the OpenSSL vulnerability;<p><pre><code> Unfortunately, there&#x27;s nothing users can do to protect themselves </code></pre> Um, how about a VPN, or ssh with dynamic forwarding?<p>I would do something like;<p>ssh -C -D 8080 -fN user@server.tld<p>Then it&#x27;s as simple as setting your web connected applications to use the localhost proxy on port 8080.
评论 #7562582 未加载
morganteabout 11 years ago
Looks like my server is having some issues. The post is also on GitHub.<p><a href="https://github.com/morgante/spiped-docker/blob/master/readme.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;morgante&#x2F;spiped-docker&#x2F;blob&#x2F;master&#x2F;readme...</a>
oijaf888about 11 years ago
I don&#x27;t understand what advantage this has over just doing: ssh -D8080 username@server.name<p>Also does spiped natively act as a socks proxy? I was under the impression all it did was handle an encrypted stream of data from one socket to another.
评论 #7562467 未加载
评论 #7562490 未加载
评论 #7562486 未加载
评论 #7562425 未加载
dfcabout 11 years ago
Why use the -f switch:<p><pre><code> -f Use fast&#x2F;weak handshaking: This reduces the CPU time spent in the initial connection setup, at the expense of losing perfect forward secrecy.</code></pre>
评论 #7562546 未加载
评论 #7562614 未加载
评论 #7562431 未加载