Hosting WebRTC Server on IP Camera

Konrad Przewłoka

Konrad Przewłoka

Software Developer @ Husarnet

Popular industrial and home monitoring systems are based on a central media server that connects cameras with the end users. This architecture is fine for most use cases, however have some drawbacks such as: higher latency, privacy concerns (if you use 3rd party server), and high cost.

In the article we present a peer-to-peer alternative: let's remove a media server and directly access a camera streaming service running on the camera itself.

The project is based on WebRTC for audio and video streaming to a web browser. Access to the server over the Internet is possible thanks to Husarnet VPN Client.

Here are some of the advantages of our solution:

  • low latency over the Internet
  • simple infrastructure architecture (only your laptop and Internet camera)
  • quick setup (everything is dockerized)

Basically all WebRTC infrastructure is hosted on the Internet camera (Single Board Computer + webcam) together with a simple web server.

SSH Access to VM-like Containers

Paweł Kozubal

Paweł Kozubal

Software Developer @ Husarnet

Docker Containers provide some level of isolation, but unfortunately, not enough if you want to give full access to someone who you do not trust.

🔐 In this blog post we will show you a much safer alternative: Kata Containers that provide VM-like isolation for your container, while keeping the simplicity of Docker ecosystem.

💡 As an example use-case we will configure a VPN client and SSH server inside Kata Container, that can be securely exposed to untrusted users of your service. Doing the same with pure Docker would be very risky.

Thanks to Husarnet P2P VPN used in this example you can provide a secure and quick access to isolated containers in an easy way.

Use VPN in a Docker Container

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

Encapsulating software within a container brings a lot of benefits, such as quicker deployment, easier development and - last but not least - isolation of your host system from the application.

In this blog post I will show you how to install and configure a VPN client directly inside a docker container without a need of installing anything on your host system.

Thanks to that other computers from a VPN network will have access only to that container and not to your host system!

Because a container has it's own VPN IPv6 network, you can also easily move that container to other hosts without changing anything in your system configuration.

I will show you how to do that in a few easy steps...

Host a Private Website With No Static IP

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

In this article I present how to host a web app on your Raspberry Pi (or other computers) with a couple of interesting features.

  • ⛔ no static IP address, Dynamic DNS or port forwarding on your router needed
  • 🚀 low latency access over the public Internet without server in the middle
  • 🔁 possibility to easily share access to that web app only to specific people

The web app will consist of two elements:

  • ✏️ front-end: using Bootstrap 4 and websocket client written in JS
  • ✏️ back-end: Python app with a websocket server providing a JSON API to the front-end part

I show a bi-directional connection over a single websocket. The demo application will be very simple - controlling a LED connected to Raspberry Pi using a button in web UI and controlling an indicator in the web UI over the button connected to Raspberry Pi.

💭 You can treat this app as a boilerplate code for your own, more sophisticated apps requiring a low-latency control over a web user interface.

Remote Desktop Over The Internet

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

Remote Desktop Software helps you access your headless (without physical display, mouse or keyboard) computer or server desktop over the network.

There are many different solutions available using RDP, RFB (VNC) or proprietary protocols. Some of them are open source and free to use, but many of them are quite expensive. In this article I will show you how to configure one of them - TigerVNC which works great, is open source, multiplatform and is completely free.

I will also show you how to access remote desktop of your computer over the Internet even if it doesn't have a static IP, or is hidden behind a NAT or a firewall.

Access Raspberry Pi Remotely

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

This blog post is an all-in-one setup guide for all of you interested in having both over the internet (remote) and LAN access to SSH terminal for your Raspberry Pi.

  • ⛔ no port forwarding on your router
  • ⛔ no static IP needed
  • ⛔ no VPN server configuration

We start from installing the Raspberry Pi system image, then go through configuration of Wi-Fi connection, finishing on establishing VPN network between your laptop and Raspberry Pi.

Let's start!

ESP32 OTA Over The Internet

Dominik Nowak

Dominik Nowak

CTO @ Husarnet

There are a lot of examples on the internet about how to perform OTA (Over-The-Air firmware update) to your ESP32 as long as your chip is in the same LAN as your computer.

While Husarnet is basically a VPN software which works not only on your laptop, but also on your ESP32, it's easy to port exisitng OTA examples to work over the Internet. I'll show you how to to that.