New mysocketctl client and some updates
It’s been two weeks since our last blog, so time for an update. I’m happy to report the introduction of our “Identity aware sockets” feature was well received, and we’ ‘ll continue to expand on that over the next few weeks.
In the meantime, we’ve spent time on rewriting the mysocket client, mysocketctl, in Go. The original version was written in Python3, and although it works fine, we’ve had numerous requests to publish easy to install binaries. This will make it easier to install the client as not everyone is familiar with pip or python. The new package has all dependencies built-in, so it is super easy to get started.
I’m happy to announce the availability of the new and improved version of mysocketctl. Please visit https://download.edge.mysocket.io/ to download the latest version.
To Install mysocketctl for your platform, just click on the square for your OS and follow the instructions. For Linux, for example, the instructions are as follows:
wget https://download.edge.mysocket.io/linux_amd64/mysocketctl chmod +x ./mysocketctl sudo mv ./mysocketctl /usr/local/bin/ mysocketctl -v
Support for multiple Operating Systems and architectures
One of the primary reasons to rewrite the client in Go, was to make it easy to download and install the clients so that it will work without much effort or system experience on a wide variety of Operating Systems and Architectures. We now publish images for macOS, Linux (x86/amd64), Linux Raspberry Pi (arm), and windows.
The source code is available on our GitHub so if there are any other platforms you need this for, or if you are just curious, feel free to check it out here: https://github.com/mysocketio/mysocketctl-go
As we move forward, we will continue to make improvements and introduce new functionality. So one of the things that we really wanted is an easy way for users to upgrade, and make sure you’re benefiting from the features in the latest version. To do so, we implemented a version check and self-upgrade capabilities into mysocketctl.
$ mysocketctl version check You're running version v1.0-9-g0efd9e3 There is a newer version available (v1.0-11-g8a59517)! Please upgrade: mysocketctl version upgrade
Ok, this shows us a new version is available. The same version check will run at each login as well. Next, let’s run the suggested command and upgrade.
# Ok let's upgrade $ mysocketctl version upgrade Upgrading /usr/local/bin/mysocketctl to version v1.0-11-g8a59517 Upgrade completed $ mysocketctl -v mysocketctl: version v1.0-11-g8a59517 date: 20210127
One of the new features in mysocketctl is the — host parameter. With this flag, you can control where ingress tunnel traffic is delivered. Until recently, traffic coming in over the tunnel was delivered to localhost (127.0.0.1) on the port defined by the — port parameter.
With the introduction of the — host parameter, you can define something other than the default localhost value. What are the use-cases, you ask?
There are a few. To start, we can look at the mysocket Kubernetes controller. It does exactly this. It acts as a router function between the mysocket edge and the actual Kubernetes services. So it will forward traffic to the IP address or name of the Kubernetes Service.
Another use-case that we’ve seen is that not always easy or possible to run a client on all things you’d like to make available. For example: appliances, IOT devices, managed databases services, or generally anything you can’t install software on or have shell access for.
This is a simple example, where we create a mysocket instance, connect to our tunnel service, and will forward all traffic for our socket to google.com port 80.
mysocketctl connect \ --name "forwarding test" \ --port 80 \ --host google.com
Another new feature you asked for, is to make it easy to use custom keys. The introduction of the -i, or — identity_file parameter allows you to select a file from which the identity (private key) for public-key authentication is read.
using a custom identity key on windows.
How about the python client?
From now on, we do recommend you to use the Go version, as I expect that’s where we’ll invest most of our time. So only use the Python version if you have a specific need or reason.
Finally, we’ve introduced a new feature to validate the performance of our service. The mysocket servers are distributed worldwide, with anycast servers in North America, Europe, and Asia. Since we’ll be fronting your origins, we want to make it easy to give you a sense of our infrastructure’s performance. To do so, all your(HTTP/HTTPS) Sockets now come with a special /.mysocket/speedtest/ URL, which serves up a speed test.
This makes it easier to troubleshoot or validate the performance. Check out for example this instance here, or test your own sockets by appending the /.mysocket/speedtest/ path to your socket name.
Example speed test from my Cable connection to https://blue-snowflake-1578.edge.mysocket.io/.mysocket/speedtest/
Ok, that’s it for now. I’m pretty happy with the progress so far! I appreciate the feedback received so far, and please keep it coming. Feel free to reach out on Twitter, leave a comment on this blog, or send me an email at andree at mysocket.io.
Should you run into any issues or have questions about the new version of mysocketctl, please open an issue here.
Now that we have the new client out the door, it’s time to focus again on our identity-aware sockets, some exciting stuff coming up soon :)