Hacker News new | ask | show | jobs
by userbinator 3181 days ago
Upon reading the title I wondered "would anyone ever create a VPN client that doesn't use encryption?" and thought, with the "2k lines" as additional evidence, that it was the source code which was somehow encrypted/obfuscated to e.g. prevent censorship...

I was also expecting to see a single file at that line count, but then again I'm not really familiar with Go. Is this style of "many tiny files in multiple nested directories" common/expected for Go? I know it's rather common in many other languages, but also not what I expect when I see "Simple" or explicit mention of a low line count.

2 comments

>would anyone ever create a VPN client that doesn't use encryption?"

They do, but generally call it tunneling. L2TP and GRE links that don't use IPSEC are fairly common on private WANs.

I suspect the author was trying to point out that the encryption was included in the 2k lines, versus say, calling out to ssh.

I wouldn't use that repo as a representative of what "go code looks like". Most go repos are pretty similar in "structure", but I really don't know how to navigate this. The 'src' directory looks like the author is really fighting the gopath concept, but also trying to vendor dependencies. I agree, if my hook was "in xx lines of code" I would try to avoid boilerplate and keep it all together as much as possible.