Skip to main content

Clients

The Webrelay client acts as a bridge between services declared on your virtual network and a local port. Its main function is to facilitate a safe and secure connection between the virtual service and your local machine, essentially making the service appear as though it's executing locally.

webrelay client -n <servicename> -p <port>
  • -n or --name refers to the name of the service you want to bind. This should be the same name you used when defining the service using the webrelay service start command.
  • -p or --port port is the local port you want to bind the service to. Once the command is run, the service can be accessed on this port as if it were running locally.

Here's an example of how to use the client command:

webrelay client -n postgres -p 5000

In this example, the "postgres" service will be accessible on local port 5000. Any application on the local machine can now interact with the database as if it were running on the same machine, even though it might be running remotely.

Functioning

Webrelay works in the background to establish and maintain the connection between the local port and the service. It takes care of all the networking details, including handling disconnections and reconnections, and ensures the connection is secure.

When the command is run, Webrelay will:

  • Connect to the Webrelay server and authenticate.
  • Request a connection to the named service.
  • Once the server confirms the service is available, it will establish a connection and bind it to the specified local port.

Security Considerations

Webrelay handles security in several ways:

  • All connections are encrypted, ensuring data is protected in transit.
  • Users can only see services they have created

Since the services are accessed via local ports, There are no ports to be opened on your firewall, and no additional network rules need to be configured to access the service.