Husarnet is NOW Open Source

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

We have great news for many of you who like the idea of fast, peer-to-peer networks consisting of devices of any scale, but are sceptical of Husarnet's closed source policy.

Husarnet Client is now Open Source

Your feedback convinced us that going open source is the right decision. And therefore we are happy to officially announce that Husarnet Client is now open source and available on our GitHub page.

The goal of this blog post is to tell our story about what led us toward this big change.

The story of Husarnet#

Husarnet was initially started as an internal project of Husarion - a manufacturer of autonomous mobile robots. There was a point in time when we were looking for an easy way to run ROS (Robot Operating System) nodes across multiple computers, robots and sensors spread out across different networks. We had tested many existing solutions to achieve this goal, among which we can list very popular ones such as OpenVPN or ZeroTier, however they were not really suitable for our target use case. There was no single technology at that time which would integrate all of the features we were looking for:

  1. Peer-to-Peer data exchange

    For flexibility, low latency, but also security reasons (no single point of failure). At that time only ZeroTier had realized that feature the right way.

  2. Embedded Perfect Forward Secrecy

    Security, especially for industrial clients we were shipping our robots to, was of utmost importance. OpenVPN provided PFC, however it was not Peer-to-Peer, too complex and too heavy for what we were trying to achieve.

  3. Low reconfiguration time

    Autonomous Mobile Robots are, well ... mobile - this means that they are likely to be connected to different Wi-Fi routerds, or even mobile base stations throughout their journey. Peer-to-Peer projects that we have tested were not designed for such scenarios which lead to robots being outside of the network (losing connection) for up to 40 seconds.

  4. Light weight

    One of the target use cases that we had in mind was connecting dummy robots with limited computing power (but also consuming small amounts of energy) with powerful external computers capable of running advanced navigation or AI algorithms without the need to worry about power consumption, computing power and memory. Also, connecting robots with IoT sensors based on very popular (and cheap!) ESP32 Wi-Fi microcontrollers were a great thing to have. Our definition of "being lightweight" was very radical and there was no existing projects that met our expectations in that regard.

We always had a great and proactive team at Husarion, so we ended up with an idea: "why don't we just develop a solution like that on our own and integrate it with the Husarion Cloud?". And we did just that. However we quickly realized that keeping it as a part of the Husarion Cloud was wasting it's potential as a product by limiting it only to the autonomous mobile robot market. Therefore we decided to completely separate Husarnet from the Husarion Cloud and set it up as a standalone company to provide users from other sectors, such as IoT or smart homes, value as well.

Why Open Source?#

When talking with our users, we quite often heard the same sentence: "I really like your product, but I prefer to use open source software even if it is not as good as Husarnet". At this point we were a VC-funded company. For vast majority of VCs, proprietary software, preferably patented is something to look for in an investment. Going open source is sometimes seen as giving up IP rights for free, so it took some time convincing that it doesn't, but at the end we managed to agree that it's the right way to go. The huge success of many software companies like Red Hat, Docker, or Particle - to mention just a few - and mass adoption was caused by their open source policy loved by their users.

But there was also another aspect that we had to take into consideration: what Open Source License should we choose? MIT is the license all developers love, because it's the most permissive one. However, while this license is the most developer-friendly, it's at the same time the most business-risky - especially if you are opening a key part of your product.

Using MIT License comes with the risk of someone potentially closing the source code of your own product under a different brand and not telling you (or anyone else) about it! And we would not like that to happen as we want to keep our client open source for all of you.

Our goal was to choose a license that would be developer-friendly but would keep the core functionality of Husarnet protected from the business point of view.

Chosen licensing#

That is why (after hours of consultancy and research) we decided to go for a dual-licensing model:

  • GNU General Public License 3.0 license

    In case Husarnet code is linked or modified, and the target product is similar to Husarnet. If you create a generic connectivity product such as VPN, SD-WAN linked to Husarnet code, your source code will also need to be opened.

  • Mozilla Public License 2.0

    If the code linking to Husarnet is not intended to be a Husarnet-like, generic connectivity product like VPN, SD-WAN or something similar. So if you need to link your code to Husarnet code base, eg. through our SDK (coming soon) to create an encrypted p2p chatting app, or a smart garage door with P2P access (with no middle man), you do not need to open a source code of your project thanks to the MPL license.

Please note, that the key consideration for us, while choosing a license was the "linking" policy. If your code is not linked to Husarnet code base, but is only communicating over hnet0 network interface provided by Husarnet Client, you are free to choose any license you want for your own software. The key aspect is linking and understanding correctly what it means - because a code that is linked to GPL needs to inherit a GPL license.

Understanding the Linking Policy#

Corporations with no GPL policy often do not understand the goal of a GPL license correctly. It doesn't mean that you can not install a GPL software, because in some magical way it makes all of your custom software run on the same computer under GPL. It affects only the linking to a code or library. If your target use case does not link to a Husarnet code base or libraries, in other words you use Husarnet Client as a separate software installed on top of your OS (or within a Docker Container), then you do not have any GPL licencing issues for your own software, and your code can be closed source, under any license you want.

But what if you need to link your code to the Husarnet Code base, but making it Open Source is a "no go" for you? You still can do that as long as your end product is not a generic connectivity, SD-WAN, or VPN-like solution. So for example if you want to create an IoT product, like "private, p2p, smart garage door" based on ESP32 microcontroller statically linking to Husarnet libraries Husarnet is under MPL not GPL license in such a case. In other words you do not need to open a source code linking to Husarnet code base.

Full text of Husarnet Open Source Dual License is available here.

New Era Begins#

As developers ourselves, we are very excited about going Open Source with Husarnet. Transparency means a lot, especially for products providing secure connectivity, like Husarnet does. By going open source we hope to make Husarnet even better by building a great community around it together with you!

If you missed it, you can find Husarnet Client official GitHub repository here. Please "star" and follow our repository if you want to be informed about interesting updates in the future. Stay tuned!

Dominik Nowak
Dominik Nowak
CTO @ Husarnet. In 2013 co-fouded Husarion company manufacturing universal, autonomous mobile robot platforms. Graduate of the year 2015 at AGH University of Science and Technology in Krakow. In 2017 recognized on New Europe 100 list as one of the changemakers in emerging Europe.