From localhost to public HTTPS: a complete ProxVN client walkthrough

· ProxVN

Start with an empty folder on your computer and finish with a web page that a friend can open through a public HTTPS link. We will make a small test page, install ProxVN on that same computer, check the link from another network, and then apply the steps to your own project.

This tutorial uses an existing public ProxVN server, so you do not install a server on a VPS. Your own computer runs two programs: Python serves the sample page, and ProxVN makes it reachable from outside. Keep both running and keep the computer awake and online. Your friend only needs a web browser to view this sample.

Open three command windows: PowerShell on Windows, or Terminal on Linux/macOS. We will label them A, B and C so you know which program to leave open. You need a supported 64-bit system, an Internet connection and Python 3 for the sample page; ProxVN itself does not require Python. Windows examples use Python’s py launcher. For Android, follow the Termux ARM64 installation in the handbook. Keep a second device or network ready for the final check. If the service requires an account, complete step 6 before opening the tunnel.

A few words, in plain language

  • Client: The ProxVN program you install and run on your own computer. Its command is proxvn.
  • Local server: Your website, API or game program running on your computer. Later sections may call this the app or backend; it is separate from the public ProxVN server.
  • Tunnel: The connection that carries visitors’ requests through ProxVN to your running app. It does not move your project to a hosting server.
  • localhost / 127.0.0.1: An address meaning “this same machine” from the program using it. It is not your public Internet address.
  • Port: A number identifying which program to reach on a machine. If your page opens at http://localhost:3000, its local port is 3000.
  • Config file: A file of saved settings, such as the server address and port, so you do not have to type them every time.
  • API key: A private code that lets ProxVN link a tunnel to your account. Keep it secret like a password; it is not the public link you send to visitors.

Open the plain-language glossary for more terms and examples.

The path is: your friend’s browser → the public ProxVN server → ProxVN on your computer → your page. Your project stays on your computer; this is not an upload to a hosting service.

1. Install once and check the exact executable

Linux/macOS: download the installer, read it and run it. It verifies the executable against the published SHA-256 manifest. On Debian/Ubuntu install curl, ca-certificates, coreutils and less first with the following commands. macOS normally includes curl, shasum and less, so skip the apt-get commands there.

sudo apt-get update
sudo apt-get install -y curl ca-certificates coreutils less

less lets you read the downloaded script; press q to leave it. If it is unavailable, use cat /tmp/proxvn-install.sh or open that file in a text editor instead. Inspect the script before running the following sh command.

curl -fsSL https://proxvn.io.vn/install.sh -o /tmp/proxvn-install.sh
less /tmp/proxvn-install.sh
sh /tmp/proxvn-install.sh
export PATH="$HOME/.local/bin:$PATH"
command -v proxvn
proxvn version

On Linux/macOS, a normal-user install goes to ~/.local/bin; running the installer as root uses /usr/local/bin. The installer does not invoke sudo. The PATH command above makes the normal-user installation available in this shell.

Windows: inspect the downloaded script before executing it, then open a new PowerShell window for its updated user PATH.

$installer = Join-Path $env:TEMP 'proxvn-install.ps1'
Invoke-WebRequest -UseBasicParsing 'https://proxvn.io.vn/install.ps1' -OutFile $installer
Get-Content -LiteralPath $installer
powershell.exe -NoProfile -ExecutionPolicy Bypass -File $installer
& "$env:LOCALAPPDATA\ProxVN\proxvn.exe" version

The current release reports proxvn 9.1.1. If your shell still runs a different copy, check Get-Command proxvn -All on Windows or command -v proxvn on Unix. Upgrade an old client before proceeding: 8.x cannot communicate with this server. For command-line installation, SHA-256 checks, PATH setup, macOS architectures and Termux, use the complete client handbook.

2. Make a safe local page

In terminal A, create a new temporary folder containing only this demo page. Never run a directory HTTP server from your home folder or a repository that contains secrets. This command deliberately binds the page to loopback.

# Terminal A: create a separate, disposable project directory.
demo_dir=$(mktemp -d)
cat > "$demo_dir/index.html" <<'HTML'
<!doctype html>
<html lang="en"><meta charset="utf-8">
<title>ProxVN demo</title><h1>My first ProxVN tunnel</h1>
<p>This page is served from my own computer.</p></html>
HTML
python3 -m http.server 3000 --bind 127.0.0.1 --directory "$demo_dir"

Windows alternative for terminal A:

$demo = Join-Path $env:TEMP ('proxvn-demo-' + [Guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory $demo | Out-Null
$html = @'
<!doctype html>
<html lang="en"><meta charset="utf-8">
<title>ProxVN demo</title><h1>My first ProxVN tunnel</h1>
<p>This page is served from my own computer.</p></html>
'@
[IO.File]::WriteAllText((Join-Path $demo 'index.html'), $html, (New-Object Text.UTF8Encoding($false)))
py -3 -m http.server 3000 --bind 127.0.0.1 --directory $demo

Leave this process running. Expected output includes “Serving HTTP” and port 3000. If port 3000 is in use, choose 3001 and use that same port in every later local check and client command.

3. Check localhost before touching the tunnel

In terminal B, request the page locally. Windows users should explicitly run curl.exe; curl can be a PowerShell alias with different behavior.

curl -i http://127.0.0.1:3000/
curl.exe -i http://127.0.0.1:3000/

You need HTTP/1.0 200 OK (or another successful HTTP 200 status) and your demo heading in the body. Connection refused means the sample server is not running/listening at that address. A tunnel cannot fix a backend that fails this test.

4. Open the public HTTPS tunnel

proxvn http 3000 --host 127.0.0.1 --ui=false

Keep terminal B open. --ui=false gives plain logs that are easy to inspect. Wait for the online message; it includes a public URL and the local target. The exact subdomain is allocated by the server. An illustrative message is:

[client] HTTP tunnel online: https://assigned-name.proxvn.io.vn -> 127.0.0.1:3000

Copy your actual printed URL, not assigned-name from this article. If the connection times out, check outbound TCP 8882 to tunnel.proxvn.io.vn. HTTPS on the website’s port 443 and the tunnel control port are separate network paths.

5. Prove it works from outside your network

On a phone using mobile data, open the printed HTTPS URL. You should see your demo heading. In terminal C, replace YOUR-ASSIGNED-NAME below with the real name and check the response headers too:

curl -i https://YOUR-ASSIGNED-NAME.proxvn.io.vn/

Expect HTTP 200 and the same page body as localhost. Terminal A should log the incoming GET. Together these checks show that the local app, client, public routing and browser-facing TLS all work. If localhost succeeds but the public request fails, examine client logs and the assigned URL before changing your app.

Edit only the demo HTML, refresh the public URL, and observe that it changes without uploading files to ProxVN. Your own machine is serving the content. Anyone with the public URL can reach this page; put authentication in a real application before exposing private data.

6. Attach the tunnel to your account

Create/sign in to your account in Console on the same service, then obtain the API key in Account. Do not use your login password. Stop terminal B with Ctrl+C before replacing its tunnel. For a persistent local login the supported command is proxvn login YOUR_ACCOUNT_API_KEY; it saves the key in the home config and the next tunnel checks it with the server.

For this exercise you can avoid storing the key in command history or a file by entering it privately into the process environment. The Linux/macOS block below explicitly launches Bash, so it also works when your current shell is Zsh. Run it in an interactive terminal; the hidden-input read options belong to Bash, not generic sh.

bash -c '
read -r -s -p "API key: " PROXVN_TOKEN || exit 1
printf "\n"
export PROXVN_TOKEN
proxvn http 3000 --host 127.0.0.1 --subdomain my-demo --ui=false
unset PROXVN_TOKEN
'

PowerShell equivalent:

$secureKey = Read-Host 'API key' -AsSecureString
$env:PROXVN_TOKEN = [System.Net.NetworkCredential]::new('', $secureKey).Password
try {
  proxvn http 3000 --host 127.0.0.1 --subdomain my-demo --ui=false
} finally {
  Remove-Item Env:PROXVN_TOKEN -ErrorAction SilentlyContinue
  $secureKey = $null
}

The key still exists in the process environment while the client runs; do not expose diagnostic dumps. my-demo is a requested name, not a promise. Check the actual URL and the account label in logs. If it falls back, the name may be unavailable, disallowed or reserved for someone else. Where supported, reserve an available name in Console and request that same name using its owner’s key. See accounts and reserved names.

7. Replace the demo with your real project

Stop the demo tunnel before creating another one. Start your project with its normal development or production command, discover its actual listening port, and repeat the localhost check. For a Vite server on port 5173:

curl -i http://127.0.0.1:5173/
proxvn http 5173 --host 127.0.0.1 --ui=false

For a service on another LAN machine, explicitly set --host. Do not write http 192.168.1.50:8080: the client expects the port as a numeric argument.

proxvn http 8080 --host 192.168.1.50 --ui=false

If your framework rejects the public Host header, add only your assigned hostname to its documented allowlist. Configure callbacks, webhooks, OAuth redirect URLs and secure cookies for the actual public HTTPS origin. Those app settings are not changed by a tunnel. A raw HTTPS backend or an arbitrary non-HTTP protocol needs its own compatible setup; use TCP for raw byte streams.

For SSH use proxvn tcp 22, for Minecraft Java usually proxvn tcp 25565, and for Minecraft Bedrock usually proxvn udp 19132. Read the public host:port printed by each mode rather than treating it as a web URL. For folders use proxvn share ./public-files --permissions r and share the separately printed username/password only with intended recipients. The handbook includes executable TCP, UDP echo and WebDAV checks.

8. Make it repeatable and leave a clean stopping point

Before background operation, create an explicit private JSON config with your server, protocol, local host and port, then test that exact config in the foreground. The following complete example is for the demo guest tunnel; stop the prior client first. It writes only tutorial.json at the shown path, so first check that this is not an existing file you need to keep. For your real app, change port before starting.

mkdir -p "$HOME/.config/proxvn"
chmod 700 "$HOME/.config/proxvn"
cat > "$HOME/.config/proxvn/tutorial.json" <<'JSON'
{
  "server": "tunnel.proxvn.io.vn:8882",
  "host": "127.0.0.1",
  "port": 3000,
  "proto": "http",
  "ui": false,
  "lang": "en"
}
JSON
chmod 600 "$HOME/.config/proxvn/tutorial.json"
proxvn --config "$HOME/.config/proxvn/tutorial.json"

PowerShell alternative:

$dir = Join-Path $env:USERPROFILE '.proxvn'
New-Item -ItemType Directory -Force $dir | Out-Null
$config = Join-Path $dir 'tutorial.json'
$json = @'
{
  "server": "tunnel.proxvn.io.vn:8882",
  "host": "127.0.0.1",
  "port": 3000,
  "proto": "http",
  "ui": false,
  "lang": "en"
}
'@
[IO.File]::WriteAllText($config, $json, (New-Object Text.UTF8Encoding($false)))
$identity = [Security.Principal.WindowsIdentity]::GetCurrent().Name
icacls.exe $config /inheritance:r /grant:r "${identity}:F"
proxvn --config $config

Configuration files are not merged: explicit --config hides the home token created by login. For account authentication, add token to that same private JSON or supply PROXVN_TOKEN to this process/service; the temporary environment from step 6 has already been cleared after you stopped it. Do not assume a previously successful login applies to every config.

Follow the complete Linux user-systemd or Windows Task Scheduler procedure for startup and restart handling. The backend needs its own lifecycle too. If your self-hosted website has valid public HTTPS and its connection-discovery endpoint is configured, you can let it provide both the tunnel address and the control-certificate fingerprint. For a guest test, run proxvn http 3000 --host 127.0.0.1 --discovery-url https://your-site.example/api/public/connection --token= --insecure=false --ui=false; replace the site with yours. No --server is needed with --discovery-url. If discovery is not available, use the direct pinned command in the client handbook: verify the control pin independently, then provide --server, --cert-pin, --token= and --insecure=false. An account tunnel must use a key issued by that same private server. The self-host guide covers deployment, HTTPS and discovery.

For this temporary exercise, press Ctrl+C in the client terminal and in the Python server terminal, clear any temporary token environment variable, and remove only the demo folder you created after checking its path. The public page should then stop loading. A remembered session can help recover a still-valid reservation on the next run; it does not keep a stopped app reachable.

Keep these four checks for every future setup: the local request succeeds, the client reports the intended target/account, the public request returns the expected app, and stopping the client removes access. They catch the common wrong-port, wrong-config, stale-binary and duplicate-process mistakes before you share a link.

Complete client handbook · CLI reference · Troubleshooting · Self-host tutorial