Upgrade your ROS / ROS 2 system working in LAN network, to work over the Internet. There is no code modification required, as Husarnet simply creates a new virtual network interface on top of your operating system.
Husarnet VPN Client is:
and it works over Wi-Fi, LTE, Ethernet and 5G.
It's an perfect solution for both real-time remote control and autonomous applications.
Husarnet connects all of your devices peer-to-peer over the Internet. It means that at no point in time Husarnet servers take part in the communication, therefore the traffic goes only between the devices that belong to you ensuring the lowest possible latency.
P2P benefits:
Husarnet is also lightweight and provides low communication overhead. On popular single board computers, Husarnet adds only 1ms extra latency in a LAN network in comparison to a network with no VPN. That extra latency is spent mostly on data encryption using state of the art, optimized algorithms.In most cases, the data overhead is at the level of only 5%-10%.
Execute the following command on each device:
sudo husarnet join fc94:...:932a/XXXXXXXXXXXXXXXXXXXXXX mydevice
Where:
Security was a crucial aspect we had in mind when designing Husarnet.
Cryptography: Husarnet uses X25519 from libsodium for key exchange, with ephemeral Curve25519 keys for forward secrecy. The packets are encrypted using libsodium ChaCha20-Poly1305 secretbox construction with random 192-bit nonce.
Runtime safety: Husarnet is written in C++ using modern memory-safe constructs. Linux version drops all capabilities after initializing. It retains access to /etc/hosts via a helper process.
ROS itself doesn't have any built-in security. If somebody can connect to a ROS master, he can control the whole robotic system. Fortunately, Husarnet makes your network much more secure.
Husarnet provides a secure network layer for ROS - however you need to ensure that no one can connect to your nodes and services from unsecured networks. With husarnet-firewall, it can be done in just one command:$ husarnet-firewall enable
That's all! Now all non-Husarnet incoming connections to your ROS system will be blocked.
Read more.More and more ROS and ROS 2 software is running in Docker containers. You can connect your Docker container, directly over the Internet, with other devices without having Husarnet installed on your host system.
You can run multiple Docker Containers in the same host with separate Husarnet Clients for each one.
Or even better - you can run an official Husarnet Docker Container next to your exisitng containers by just launching it with Docker Compose.