HaxorPort Documentation

Your guide to exposing localhost securely with HTTP and TCP tunnels.

Introduction

HaxorPort is a secure tunneling service that allows you to easily expose your local services to the internet. HaxorPort supports HTTP, HTTPS, and TCP tunnels with various configuration options and authentication.

Key features of HaxorPort include:

  • HTTP/HTTPS Tunnels with custom subdomains
  • TCP Tunnels for services like SSH, databases, and more
  • Authentication to protect your tunnels
  • Automatic reconnection if connections are dropped
  • Easy configuration through CLI

Getting Started

  1. Install HaxorPort using the installer script:
    curl -sSL https://raw.githubusercontent.com/alwanandri2712/haxorport-go-client/main/install.sh | bash
  2. Configure your auth token:
    haxorport config set auth_token your-auth-token
    haxorport config set tls_enabled true
    Get your auth token from your HaxorPort account dashboard.
  3. Start using HTTP tunnel:
    haxorport http --port 8080 --subdomain myapp

For more detailed installation instructions, visit the installation page.

HTTP Tunneling

HaxorPort supports HTTP tunnels with various configuration options:

  • HTTP Tunnel with Custom Subdomain:
    haxorport http --port 8080 --subdomain myapp
  • HTTP Tunnel with Basic Authentication:
    haxorport http --port 8080 --subdomain myapp --auth basic --username user --password pass
  • HTTP Tunnel with Header Authentication:
    haxorport http --port 8080 --subdomain myapp --auth header --header "X-API-Key" --value "secret-key"

HTTPS tunnels are supported automatically with a reverse connection architecture. The server detects whether requests come via HTTP or HTTPS and forwards them to the client through a WebSocket connection.

TCP Tunneling

HaxorPort supports TCP tunneling to expose local TCP services (such as SSH, databases, or other services) to the internet:

  • TCP Tunnel for SSH:
    haxorport tcp --port 22 --remote-port 2222
    # Access: ssh user@haxorport.online -p 2222
  • TCP Tunnel for MySQL:
    haxorport tcp --port 3306 --remote-port 3306
    # Access: mysql -h haxorport.online -P 3306 -u user -p
  • TCP Tunnel for PostgreSQL:
    haxorport tcp --port 5432 --remote-port 5432
    # Access: psql -h haxorport.online -p 5432 -U user -d database

If --remote-port is not specified, the server will assign a remote port automatically.

Configuration

You can add tunnels to the configuration for later use:

haxorport config add-tunnel --name web --type http --port 8080 --subdomain myapp
haxorport config add-tunnel --name ssh --type tcp --port 22 --remote-port 2222

To view the current configuration:

haxorport config show

Troubleshooting

If you see too many INFO log messages when running the application, you can change the log level to warn as follows:

# Edit configuration file
sudo nano /etc/haxorport/config.yaml  # For Linux
nano ~/.haxorport/config/config.yaml  # For Windows (WSL)
nano ~/Library/Preferences/haxorport/config.yaml  # For macOS

Change the line log_level: info to log_level: warn, then save the file.

FAQ

Q: How do I get an auth token?
A: You need to register first at https://haxorport.online/Register. After registering and logging in, you can find your auth token in your account dashboard.
Q: Does HaxorPort support custom subdomains?
A: Yes, you can use the --subdomain flag for HTTP tunnels as shown above.
Q: How do I access TCP services through the tunnel?
A: After creating a TCP tunnel, you can access the service using the haxorport.online hostname and the specified remote port.