LogoLogo
  • Getting Started
  • CLI
    • Docker
    • Config.yaml
  • GUI (SOON)
  • Tunnels Types
    • HTTP/s
      • HTTP/s plugins
      • HTTP/s apps
    • TLS
    • TCP
    • UDP
  • Reservations
    • Domain
    • Endpoint
  • Troubleshoot
    • Common errors
  • Tutorials
    • Expose a local web server
    • Expose Apache/Nginx web server
    • Share files from localhost
    • Use LocalXpose with Traefik
    • Expose PocketBase backend
    • Create a custom domain name
    • Make Let's Encrypt certificate
    • Access your IP camera remotely
    • Access your Raspberry Pi remotely
    • Sync your Keepass password manager
    • Expose localhost RASA chatbot for Telegram Integration
    • Expose your local Netdata Instance
    • Testing Stripe webhook
    • Expose localhost Kubernetes
    • Expose database server (PostgreSQL)
    • Exposing local Minecraft server
    • More Tutorials
Powered by GitBook
On this page
  • Usage
  • Tunnel with custom temporary subdomain
  • Tunnel with custom reserved domain or subdomain
  • Tunnel with custom wildcard domain

Was this helpful?

  1. Tunnels Types

HTTP/s

PreviousGUI (SOON)NextHTTP/s plugins

Last updated 2 years ago

Was this helpful?

HTTP tunnels allows you to expose your local web servers to the internet, you will be given a shareable URL that is accessible from the internet, This tunnel will be running in HTTP/s.

Example: Creating HTTP tunnel with random subdomain in United State and forward the traffic by default to 127.0.0.1:8080

loclx tunnel http

If the domain is sub.loclx.io then LocalXpose servers will do the TLS termination and forward the traffic for you through secure tunnel, if you use your own custom domain like example.com then LocalXpose will generate Let's Encrypt certificate for you automatically and your tunnel will be end-to-end encrypted.

For every HTTP connection from the public internet to your machine, a header X-Forwarded-For and X-Real-Ip will be added to the headers so you can get the real IP address of your clients.

Usage

Tunnel with custom temporary subdomain

loclx tunnel http --subdomain hello

Tunnel with custom reserved domain or subdomain

loclx tunnel http --reserved-domain hello.example.com 
# or hello.loclx.io or '*.example.com'

Make sure to reserve the domain before using it, check .

Tunnel with custom wildcard domain

loclx tunnel http --reserved-domain api.example.com

You can also run the tunnel with the wildcard domain itself:

loclx tunnel http --reserved-domain '*.example.com'

This will start HTTP/s tunnel with the wildcard custom domain *.example.com, you will be able to access it through the internet using:

  • sub.example.com

  • sub1.sub2.example.com

  • sub1.sub2.sub3.example.com

  • ..etc

example.com itself will not be tunneled to your wildcard custom domain, it needs to be reserved too and create a separate tunnel for it.

You can reserve multiple wildcard custom domains for the same domain name for example you can reserve *.example.com, *.uat.example.com and *.test.example.com.

The precedence here will be for the nearest match for example:

Public URL
Matched Tunnel

sub.example.com uat.example.com test.example.com sub1.sub2.example.com

*.example.com

sub.uat.example.com sub1.sub2.uat.example.com

*.uat.example.com

sub.test.example.com sub1.sub2.test.example.com

*.test.example.com

example.com

No match

First reserve a , for this example we will assume our wildcard domain is *.example.com, you can run HTTP/s tunnel with any subdomain of the mentioned wildcard domain (e.g. api.example.com or dev.example.com...etc)

here
wildcard custom domain