Live data from Hacker News

ExpressVPN open-sources Lightway: a modern VPN protocol

github.com

11–15 of 15 posts

Re: ExpressVPN open-sources Lightway: a modern VPN protocol

#12

I don't love the code style in terms of indentation, line length, alignment and bracket placing but IMO at least it doesn't look childish / reckless. I think there could be bug in he_internal_send_auth_userpass when it copies the strings because when calculating the string lengths it uses the size of he_conn->username and he_conn->password which are "HE_CONFIG_TEXT_FIELD_LENGTH +1" whereas the sizes of the destinatio…

Disclaimer: I'm an employee of ExpressVPN and work on this codebase.

The specific reason for the size disparity is that we require he_conn->{username,password} to be null-terminated, whereas we do NOT require he_msg_auth->{username,password} to be null-terminated. I remember raising the same point and being convinced that we had a good reason for doing so, but I also haven't had enough coffee to remember what the good reason was!

Regardless of whether this is a "bug" or not I do think that the disparity points to something that unnecessarily causes confusion, will have a think about making it more consistent.

Regarding style -- I also ~hate if(x==0) without the space after the if but we committed to consistency instead of arguing over it via clang-format. To quote Rob Pike, "Gofmt's style is no one's favorite, yet gofmt is everyone's favorite."

Re: ExpressVPN open-sources Lightway: a modern VPN protocol

#13
post #8
post #3

Earlier quoted context omitted.

A core reason for creating Lightway was the need for a VPN protocol that was designed for all the things that a privacy focused, high performance VPN platform needs. Unlike Wireguard, Lightway does not need a wrapper, it provides these features out of the box for everyone. Wireguard is a great VPN protocol, but it was designed for a very different use case. Edit: My apologies, I should have first introduced myself as…

I would love to see some benchmarks comparing lightway to Wireguard, OpenVPN and other protocols added to the repo. Specially on Battery usage while idle and Performance over a unstable connection. Also I don't really get this? This to be looks like just the core library that details the protocol and nothing else around it. Like this is really just wolfSSL + wire format. You'd still have to write the code for getting…

We have released a reference implementation that uses Lightway Core to create both a client and a server. It can be found here:

https://github.com/expressvpn/lightway-laser

Lightway Core is designed specifically to be embeddable and to work well on any platform without making assumptions about how that platform works (i.e. OpenVPN assumes a tun-like device).

The comparison to WolfSSL is a good one because it was inspired by their library's design. As WolfSSL is to SSL, Lightway Core is to VPN tunnels. Just like WolfSSL, how you use Lightway Core is really up to you.

For example, if you wanted to create a VPN that connects over Google Sheets or uses DNS messages, you’d be able to do that easily with Lightway Core.

Re: ExpressVPN open-sources Lightway: a modern VPN protocol

#14
post #5
post #3

Earlier quoted context omitted.

A core reason for creating Lightway was the need for a VPN protocol that was designed for all the things that a privacy focused, high performance VPN platform needs. Unlike Wireguard, Lightway does not need a wrapper, it provides these features out of the box for everyone. Wireguard is a great VPN protocol, but it was designed for a very different use case. Edit: My apologies, I should have first introduced myself as…

To be honest, I’m pretty familiar with the top VPN providers and I’ve never heard of ExpressVPN. When I Google it, I immediately receive so many explicit ads for your service and a bunch of obviously promoted blog posts comparing garbage VPNs to your service. Creating a VPN protocol from scratch is ambitious and going to take some pretty heavy hitters to join and contribute to this protocol to gain trust in a pretty…

[deleted]

Re: ExpressVPN open-sources Lightway: a modern VPN protocol

#15
post #12

I don't love the code style in terms of indentation, line length, alignment and bracket placing but IMO at least it doesn't look childish / reckless. I think there could be bug in he_internal_send_auth_userpass when it copies the strings because when calculating the string lengths it uses the size of he_conn->username and he_conn->password which are "HE_CONFIG_TEXT_FIELD_LENGTH +1" whereas the sizes of the destinatio…

Disclaimer: I'm an employee of ExpressVPN and work on this codebase. The specific reason for the size disparity is that we require he_conn->{username,password} to be null-terminated, whereas we do NOT require he_msg_auth->{username,password} to be null-terminated. I remember raising the same point and being convinced that we had a good reason for doing so, but I also haven't had enough coffee to remember what the goo…

Sorry about the late reply, I didn't realize there was a reply to my message. I reviewed it once again and can attest that what you say is correct, so that's cool.

Thanks for taking the time to reply!

Post reply on HN