Live data from Hacker News

Show HN: Encrypted VPN in 2k lines of Go

github.com

21–30 of 66 posts

Re: Show HN: Encrypted VPN in 2k lines of Go

#21

Is it just me or Golang started gaining momentum recently? More and more related articles/OSS projects/HN links show up every day.

No it's not you [0]. Rust, Go, R, and Python have the highest year-to-year growth.

[0] https://stackoverflow.blog/2017/09/06/incredible-growth-pyth...

Re: Show HN: Encrypted VPN in 2k lines of Go

#22

Related: Wireguard is a new VPN for linux in 4k lines of C https://www.wireguard.com/ the model of wireguard has been proven correct by formal methods. Builds on modern crypto, and they kept code short for auditing purposes.

There's also a work-in-progress Go implementation of Wireguard, found over here: https://git.zx2c4.com/wireguard-go/about/

Re: Show HN: Encrypted VPN in 2k lines of Go

#23

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…

[deleted]

Re: Show HN: Encrypted VPN in 2k lines of Go

#24
post #7

Earlier quoted context omitted.

When I first saw Go I was put off by its syntax, but after giving it a chance I very quickly fell in love with it. I've used C#, Python, Ruby, Java, C, Obj-C, JS and Go for mid-large scale projects. Go is the only language I've ever truly loved; sometimes I even feel like I'm writing poetry (as ridiculous as that may sound). The community is really incredible^, I've yet to encounter anything that didn't have great do…

Genuine question as I've only dabbled in Go, but I've heard complaints from other dabblers that Go seems to encourage large files rather than breaking things up in a more modular fashion. Is that a reality? Or has the complainer just been unlucky in the code they've viewed?

Most of Go code I was working on or contributed to usually has quite a split out structure and more complex structs are defined in multiple files with related methods grouped together. I have seen couple of Go packages which consist of one huge file but I think it's quite rare. Most people will structure their code into multiple files to keep it more readable/maintainable and file sizes relatively small.

Re: Show HN: Encrypted VPN in 2k lines of Go

#25

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…

>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.

Re: Show HN: Encrypted VPN in 2k lines of Go

#26
post #7

Is it just me or Golang started gaining momentum recently? More and more related articles/OSS projects/HN links show up every day.

When I first saw Go I was put off by its syntax, but after giving it a chance I very quickly fell in love with it. I've used C#, Python, Ruby, Java, C, Obj-C, JS and Go for mid-large scale projects. Go is the only language I've ever truly loved; sometimes I even feel like I'm writing poetry (as ridiculous as that may sound). The community is really incredible^, I've yet to encounter anything that didn't have great do…

Yeah, I also love Golang, though I am a full-job front-end developer. Sometimes it can make me shout "WHAT THE FUCK"[1] to the IDE, but it's the most enjoyable language I worked with during last 20 years.

[1] http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in...

Re: Show HN: Encrypted VPN in 2k lines of Go

#27
post #21

Is it just me or Golang started gaining momentum recently? More and more related articles/OSS projects/HN links show up every day.

No it's not you [0]. Rust, Go, R, and Python have the highest year-to-year growth. [0] https://stackoverflow.blog/2017/09/06/incredible-growth-pyth...

Python is interesting in that list, given how it's at least 4 times as old as all of the other ones in that list. What's behind that? I don't recall any major developments after Python 3, and most of the news behind that one was about its backwards incompatibility (and currently how 2.x isn't about to go anytime soon)

Re: Show HN: Encrypted VPN in 2k lines of Go

#28
post #7

Earlier quoted context omitted.

When I first saw Go I was put off by its syntax, but after giving it a chance I very quickly fell in love with it. I've used C#, Python, Ruby, Java, C, Obj-C, JS and Go for mid-large scale projects. Go is the only language I've ever truly loved; sometimes I even feel like I'm writing poetry (as ridiculous as that may sound). The community is really incredible^, I've yet to encounter anything that didn't have great do…

Genuine question as I've only dabbled in Go, but I've heard complaints from other dabblers that Go seems to encourage large files rather than breaking things up in a more modular fashion. Is that a reality? Or has the complainer just been unlucky in the code they've viewed?

I've only dabbled myself, but I can see how that would start; I come from a Java background which forces you to have one module / class per file, but Go doesn't. It's very easy to start hacking up a thing, and it's easier in development to just keep it in one file. Of course, the nature of code is that it grows, so spend enough time there and it'll start growing. If you're familiar with the code (as in, you wrote it yourself), single files shouldn't be a problem.

It's not uncommon in other projects either, NodeJS for example has a relatively small number of large files (https://github.com/nodejs/node/blob/master/src/node.cc).

Re: Show HN: Encrypted VPN in 2k lines of Go

#29
post #21

Earlier quoted context omitted.

No it's not you [0]. Rust, Go, R, and Python have the highest year-to-year growth. [0] https://stackoverflow.blog/2017/09/06/incredible-growth-pyth...

Python is interesting in that list, given how it's at least 4 times as old as all of the other ones in that list. What's behind that? I don't recall any major developments after Python 3, and most of the news behind that one was about its backwards incompatibility (and currently how 2.x isn't about to go anytime soon)

They followed up on that question with another blog post: https://stackoverflow.blog/2017/09/14/python-growing-quickly...

Re: Show HN: Encrypted VPN in 2k lines of Go

#30

sshuttle is another great tool with a similar use case. One advantage is that it doesn't require any server setup at all, as long as you have ssh access. https://github.com/sshuttle/sshuttle

Sshuttle is very cool. But it only does TCP and UDP. (no ICMP)
Post reply on HN