malai tcp
: Share a TCP Service Using malai
malai-0.2.3
.
You can share your local TCP server with the world. This can be your database
server or ssh server for example.$ malai tcp 5432 --public
Malai: Sharing port 5432
Run malai tcp-bridge <id52> <some-port>
to connect to it from any machine.
malai tcp-bridge
:$ malai tcp-bridge <id52> 9091
Listening on 127.0.0.1:9091
This will start a TCP server on their computer and they'll use this TCP server as if they're connecting to your real TCP server running on port 5432.
So if it's a postgres server, they can connect to it using the following command:psql 'postgresql://user:passwd@localhost:9091/db_name'
malai tcp
$ systemctl status sshd
You don’t need to expose port 22 publicly — malai
connects to it locally on
this machine.
malai tcp
, run:$ malai tcp 22 --public
Malai: Sharing port 22
Run malai tcp-bridge <id52> <some-port>
to connect to it from any machine.
$ malai tcp-bridge <id52> 9090
Listening on 127.0.0.1:9090
Replace <id52>
with the ID shown by the malai tcp
command.
$ ssh -p 9090 user@localhost
user
that exists on the remote machine. The SSH
connection goes to localhost:9090
, where tcp-bridge
is listening. It then
forwards the traffic to the remote machine via the Kulfi network using
<id52>
.