tsocket - expose localhost to internet
tsocket is completely free for personal and commercial use.
Launch secure multiple http and tcp tunnels, without limitation.
Overview
With tsocket you can tunnel localhost to get public https url for local site and for a tcp service running locally it provides you with a hostname and publicly available port that you can connect to from anywhere.
- ✅ Ability to tunnel local website to internet and get public
http
andhttps
url - ✅ Can create TCP Tunnels
- ✅ Can tunnel websockets
- ✅ Single user can launch multiple http and tcp tunnels
- ✅ Can launch multiple tsocket processes
- ✅ No config files and simple cli interface
- ✅ Completely free for personal and commercial use with no paid plans.
Getting Started
Getting Started with tsocket is very easy, just download the version based on your OS and authenticate with the auth token.
1. Download tsocket for your operating system
Download the appropriate version for your operating system. tsocket is avaliable for all major operating systems and also works on raspberryPi.
2. Unarchive and the program
tar xzvf /path/to/download/tsocket.tar.gz
Example
tar xzvf ~/Downloads/tsocket.tar.gz
Move to bin folder
sudo mv ./tsocket /usr/local/bin/
Notes for Windows
For windows the binary is shipped in a zip file instead of a tar archive.
Just right click on unzip and cd into the folder to run the program tsocket.exe
Notes for WSL Users
Download the linux version of tsocket
The Download location is typically
/mnt/c/Users/<username>/Downloads
so run:
tar xzvf /mnt/c/Users/<username>/Downloads/tsocket.tar.gz
sudo mv ./tsocket /usr/local/bin/
3. Signup for a free account
Go to https://dashboard.tsocket.org/signup and signup for a free account.
To create tunnels using tsocket you need to have an account. An account is required to prevent spam.
4. Authenticate tsocket with the auth token
Once you have create an account, you will get an auth token, you can use the auth token to authenticate the tsocket cli program.
To authenticate run the command.
tsocket auth <auth_token>
5. That's it! Now you can start creating tunnels
Create HTTP Tunnel
To get a public url for your web app running locally at port 3000 run
tsocket http 3000
It will give both http
and https
URLs that you can share with anyone and they can access the web app running locally at port 3000 from the internet.
Create TCP Tunnel
You can also tunnel a tcp service running locally to the internet. For e.g if you want to temporarily allow remote desktop to a raspberryPi or share a local database with a co-worker.
⚠️ Tunnel local TCP server to internet is dangerous. Use it for quick and temporary sharing and make sure the service that you are sharing is secure and protected with a strong password.
tsocket tcp 6379
In the above example we are creating a tunnel for tcp service running at port 6379, in this case it is a redis server.
To connect to his redis server remotely we will run
redis-cli -h tcp.tsocket.net -p 1102
Use cases
Here is a list of common use cases that you use tsocket for.
Test Webhooks locally
You can use tsocket to test webhooks. Most applications that offers webhooks require a public https URL which is generally not available during testing. Using tsocket you can easily get a https public url for your application running locally.
For e.g if you app is running locally at port 3000 you can run
tsocket http 3000
You local application running at port 3000 is now accessible at https://2-d24-185-145-105-232.tsocket.net
Now you can specify this URL as webhooks URL and develop the functionality to handle webhooks.
Share your web application
If you want to share you web application running quickly with your colleagues or others you can use tsocket to quickly generate a public URL and share it with so that they can try it out and give you quick feedback.
Instead of uploading the application to a cloud server to get a public URL you can simply generate a public URL with tsocket in seconds and share it with your co-workers or colleagues.
Get https url for WebRTC testing
WebRTC application that required camera and microphone access need webpage to be server over https with a trusted SSL certificate, which is a pain to setup locally.
With tsocket you can easily get a https url of your application running locally
HTTP File Sharing
With tsocket you can share a folder and share the URL, the other person can view the files in the folder and download them.
First cd into the folder that you want to share
cd /folder/you/want/to/share
Start simple http server to serve the files in the folder using the python http.server module.
python3 -m http.server
The python http server modules, starts the server on port 8000
so we will be tunneling the port 8000 via tsocket.
tsocket http 8000
Temporarily allow SSH to local machine from remote
⚠️ Tunnel local TCP server to internet is dangerous. Use it for quick and temporary sharing and make sure the service that you are sharing is secure and protected with a strong password or public/private key.
To allow SSH to local machine from the internet run:
tsocket tcp 22
22
is the common ssh port.
You will get a public hostname and port you can use to connect to remotely.
Temporarily allow Remote Desktop to local machine from remote
⚠️ Tunnel local TCP server to internet is dangerous. Use it for quick and temporary sharing and make sure the service that you are sharing is secure and protected with a strong password.
To allow RDP to local machine from the internet run:
tsocket tcp 3389
3389
is the port for remote desktop protocol.
You will get a public hostname and port you can use to connect to remotely.
Temporarily allow access to FTP
⚠️ Tunnel local TCP server to internet is dangerous. Use it for quick and temporary sharing and make sure the service that you are sharing is secure and protected with a strong password.
To allow FTP server running locally from the internet run:
tsocket ftp 22
You will get a public hostname and port you can use to connect to remotely.
Product Roadmap
Feature | Status |
---|---|
Local web interface to view and repeat http requests | Under Development |
Ability to whitelist IP addresses | Under Development |
Stop running tunnels from the dashboard | Under Development |
Abuse
We take abuse very seriously. Do not use this service to run phishing or any other kind of scam. If we detect you are abusing the service, your account will be blacklisted. If you find anyone abusing the service please report it at abuse@tsocket.org
Your public IP is exposed in the tunnel URL. The tunnel URL is constructed in the following manner:
<unqiue-code>-<your-public-ip>.tsocket.net
Contact
You can contact us support@tsocket.org for any questions or feedback.
Terms and Privacy Policy
By using tsocket you agree to our terms and privacy policy.
Powered By Metered Video
Metered Video provides enterprise grade WebRTC video calling apis that you can use to create video conferencing applications that can scale upto thousands of simultaneous online users, with live streaming and recording capabilities.