Join HeadSpin at Mobile World Congress Barcelona from 28 Feb - 2 Mar
Close
A Complete Guide on How to Use HS Tunnel

A Guide on How to Use HS Tunnel

January 24, 2023
 by 
Christy ManjilaChristy Manjila
Christy Manjila

Introduction

Last year has been an amazing year for HeadSpin in terms of software updates. In HeadSpin’s latest software updates, the introduction of the HS tunnel has been a breakthrough one, as it helps securely connect HeadSpin devices to local or staging environments for the organization, teams, or individual users. This blog will help you understand HeadSpin’s latest feature, HS tunnel, and how to use it easily without any complications.

What is an HS tunnel?

HS tunnel is a proprietary tool that is developed by Headspin to connect the cloud devices to your local machine to gain access to any local environments or even to get Charles proxy connected. It’s a very diverse tool that can be seamlessly used by running very few commands in your terminal.

Prerequisite

The first thing to do is to install the HS CLI tool that is available on the platform. It is available for MAC, Linux, and Windows. The steps to download the tool are below. 
Get the latest version of the HS tunnel installed by following the steps below:

1) click on your name and Org name that's on the top right of the UI

Dashboard Home

2) Select "Settings." 

settings

3) Go to the bottom, and you can see the link to download the CLI tool. Download the tool for your respective machine and install the tool.

Downloads

4) To check if you have the latest CLI installed, type "hs -V" in your terminal.

Once you have installed the CLI tool, you are all set to run the HS tunnel.

How to run:

To run the HS tunnel, all you have to do is run the command below on your terminal, and that's it, easy as that.

Command:


hs tunnel -t TOKEN

Here TOKEN is replaced by the TOKEN you generate from the UI. It is found on the same settings page as shown above, and if you don’t have a TOKEN, you can click on "New Token" in the settings page to generate one.

The above command will get all the hosts in your account connected to your local machine. Once that is done. Start the device that you would want to connect to your local environment and click on the capture button.

Device Configuration Dashboard

When you click on the capture button, you get two options: “With network” and “Without network.” Select “With the network,” and your device will be connected to your local environment.

Recording Option

Now when you check your connected IP, the cloud device should have the IP of your local network. 

Get Charles connected to your network using the HS tunnel

Another example of using an HS tunnel would be to get Charles connected to the cloud devices. For this, all you have to do is add the tag “--proxy” with the hs tunnel command and add the port in which Charles is listening and follow the instructions above to get the device connected again. 

Example:


hs tunnel -t TOKEN --proxy  http://localhost:8888

The tunnel has multiple features and rules which you can go through just by running the “hs tunnel -help” command on your terminal.

A Guide on How to Use HS Tunnel

4 Parts