Once your authentication token is setup, you are ready to share your first site with Cloakr. Cloakr creates a tunnel between your local development URLs/HTTP server and our publicly available web server. All requests to the web server get forwarded through the tunnel to your device and responses are sent back automatically.
The easiest way to share your local URLs is by calling Cloakr share
followed by the local URL that you want to share:
# Will share access to http://192.168.2.100
Cloakr share http://localhost:3000
# Will share access to http://my-local-site.dev
Cloakr share my-local-site.dev
By default, Cloakr assumes that you want to share unenecrypted local traffic through HTTP. If you want to share a local HTTPS URL append the protocol to the url, like this:
# Will share access to https://my-local-site.dev
# Note the https for tunneling locally encrypted sites
Cloakr share https://my-local-site.dev
To make your life easier, Cloakr tries to share your local URLs by using custom subdomains. This allows you to share your local URL my-local-site.dev
as permanent my-local-site.us-1.sharedwithCloakr.com
. This is super useful when working with webhooks where you need to configure your local endpoint on the third party system and always having the same URL makes this a one-time setup.
By default, Cloakr uses a slugified version of the URL that you want to share, but you can also choose your own custom subdomain.