
Show HN: Socks Protocol Version 5 Library in Go - txthinking
https://github.com/txthinking/socks5
======
golergka
Next time someone says to me that language's popularity doesn't matter for
it's utility, I'll remember how Go's socks library appears on the front page
of HN, while my pull request the Haskell's socks library (which implements the
most basic feature that author added to the top of TODO list himself) is
sitting unmerged and uncommented now for almost a year.(1) (If I sound bitter
it's because I am.)

Seriously though, such "boring" libraries that you just need in your toolbox
are a great way to evaluate the health of the whole ecosystem.

[1][[https://github.com/vincenthz/hs-
socks/pull/24](https://github.com/vincenthz/hs-socks/pull/24)]

~~~
zadokshi
Maybe the author died?

------
koblas
I will always say this was a complete hack to a specific time in history.
Having SOCKS in your toolbelt of tricks is always handy and can make hard
things surprisingly easy.

Last time was I needed to tunnel a request from my development environment
into a production VPN to contact a service which had IP access restrictions.

~~~
bogomipz
I'm curious was this a situation where ssh port-forwarding would not have
worked?

~~~
koblas
It was an SSL connection with a custom cert chain. So I could easily wrap the
HTTP side of things with a SOCKS forwarder which then SOCKS proxied into the
VPN and then back out to the other site.

There might have been another way to do it, but given that wrapping HTTP in a
SOCKS proxy is easy and ssh has a built in SOCKS proxy, this was quick win.

ps. It's SOCKS and not Socks - for the subject line of this story.

------
knorker
If I only want the client side, does this add anything over
[https://godoc.org/golang.org/x/net/proxy](https://godoc.org/golang.org/x/net/proxy)
?

------
cpach
Honest question: What do people use Socks for? Personally I haven’t used it
since Firesheep...

~~~
znpy
it's a no-conf-required vpn:

    
    
       ssh -D 8000 -q -C -N user@sshhost 
    

point firefox to use localhost:8000 as socksproxy, and all your internet
traffic appears to have originate from sshhost.

~~~
emmelaich
Except for DNS? And anything else that doesn't use the proxy.

You can apparently set the firefox flag "network.proxy.socks_remote_dns"

Never tried it myself!

Now, perhaps firefox does not need to do a lookup; it sends the hostname to
the remote end.

But best be safe?

~~~
znpy
Ok I checked -- you can tell firefox to proxy dns too when using socks proxy.

------
therein
Last time I needed a SOCKS5 server + client in Go, I remember using
github.com/getlantern/go-socks5. What does this offer above that?

