Test a Local HTTP/3 and QUIC Server Remotely
Test a local QUIC endpoint over a Localtonet UDP tunnel, verify HTTP/3 negotiation, detect TCP fallback, and troubleshoot remote connectivity.
In this article 10 sections
Prove that your local server is receiving real QUIC traffic from a remote client
A browser showing an HTTP response does not prove that a local development server received HTTP/3 end to end. A valid test sends UDP-based QUIC traffic from an external network through a public endpoint to the local QUIC listener, then confirms the negotiated protocol at both ends. This guide builds a reproducible Caddy HTTP/3 test server and creates a short-lived test certificate chain. It avoids conflicts with the packaged Caddy service, verifies the server locally, and exposes its UDP listener with Localtonet. A curl destination mapping then tests it remotely without disabling certificate validation.
📋 What's in this guide
Why remote HTTP/3 testing requires protocol fidelity
HTTP/3 maps HTTP semantics onto QUIC, and QUIC runs over UDP. HTTP/2 and HTTP/1.1 normally use TCP, with TLS layered above TCP for HTTPS. The transport is defined in RFC 9000 for QUIC and the application protocol in RFC 9114 for HTTP/3.
This transport difference matters when you want to validate a local QUIC implementation, UDP reachability, QUIC-specific logging, HTTP/3 request handling, or behavior when TCP is unavailable. An HTTP response alone does not identify the transport that reached the local application.
A test can therefore appear successful while validating the wrong path. A public web endpoint might negotiate HTTP/3 with a remote browser and then talk to the local application over HTTP/2 or HTTP/1.1. That proves the public endpoint can speak HTTP/3. It does not prove that the local development server accepted QUIC packets.
For a genuine local QUIC test, UDP datagrams must reach the port on which the local server is listening. The remote client and local server must then do four things over that QUIC connection:
- Complete a QUIC handshake.
- Negotiate HTTP/3 through ALPN.
- Validate the certificate according to the client's trust policy.
- Exchange the HTTP request and response.
Record the protocol selected by the remote client and confirm the connection in the local server's QUIC or HTTP/3 logs. When possible, also inspect the local UDP listener or observe packets arriving at that port.
With Localtonet, the right tool for this test is a UDP tunnel that points to the local QUIC server's IP address and port. Our client opens an outbound connection to a Localtonet relay, so you do not need inbound router port forwarding, inbound firewall changes, VPN setup, or a public IP address. The tunnel provides a public host and port while the selected client is connected and the tunnel is running.
What this test does not automatically establish
A successful request shows that a remote client can exchange HTTP/3 traffic with the local server through the tunnel. On its own, it does not measure production latency, throughput, packet-loss behavior, maximum datagram size, or deployment capacity. Relay placement and the path through the tunnel can affect those observations.
Do not treat it as proof of representative QUIC connection migration behavior either. QUIC can keep a connection alive when a client's network path changes. Meaningful migration testing, however, depends on how addresses and connection state are observed across the complete route. The available Localtonet product evidence does not establish source-address transparency, and it does not guarantee that a relay-based path reproduces direct-client migration semantics. If migration matters to you, test it directly in the intended deployment architecture.
Understand the complete client-to-server path
A useful HTTP/3 test splits the path into components. That way you can tell whether a failure comes from name resolution, certificate validation, the remote network, the public UDP endpoint, the tunnel lifecycle, the local operating system, or the QUIC server.
The logical packet path is:
Remote HTTP/3 curl
|
| UDP and QUIC
v
Localtonet public UDP host and port
|
| Localtonet tunnel path
v
Localtonet client on the target device
|
| UDP to 127.0.0.1:8443
v
Local Caddy QUIC listener
|
| HTTP/3 request handling
v
Static test response
The last hop in this path runs from the Localtonet client to 127.0.0.1:8443. When the client targets loopback, expect Caddy to record a local address associated with the Localtonet client as the peer, not the public address of the remote curl device. Confirm this yourself in the remote address field of the Caddy access log during the test. Treat it as an observation of your setup rather than a guaranteed product property. It is also another reason the migration caveat above applies.
Keep five different names, ports, and protocol values separate
The remote command in this guide deliberately separates URL identity from connection destination. Once that distinction is clear, most certificate and routing errors disappear.
| Value | Example | Role in the test |
|---|---|---|
| Certificate hostname | quic.test |
Appears in the URL, certificate SAN, TLS server name, and certificate validation decision. |
| Local QUIC port | 8443 |
The UDP port owned by Caddy and configured as the Localtonet target. |
| Public tunnel hostname | PUBLIC_HOST |
The network destination assigned to the running Localtonet UDP tunnel. |
| Public tunnel port | PUBLIC_PORT |
The destination UDP port assigned to the running tunnel. It does not need to equal 8443. |
| ALPN | An HTTP/3 protocol identifier | Negotiated inside the QUIC TLS handshake to select HTTP/3 as the application protocol. |
DNS normally turns a hostname into an address. In this test, curl's --connect-to option changes the connection destination without changing the URL hostname. The URL still identifies quic.test, so curl uses that name for URL identity, SNI, and certificate verification. Curl then resolves the mapped public destination and sends the connection to the assigned Localtonet host and port.
The curl documentation for --connect-to describes this separation explicitly. The option redirects the network connection and leaves the hostname used for TLS and application protocols unchanged. This is more precise than editing public DNS for a temporary test. It also means you do not have to expect the Localtonet-assigned hostname to match the certificate presented by the local server.
Prepare the local and remote test environments
The example below targets a Debian or Ubuntu-compatible local host and uses Caddy as the HTTP/3 server. Caddy supports HTTP/3 for HTTPS listeners. OpenSSL creates a short-lived private test CA and server certificate. The remote device needs a curl build with HTTP/3 support.
Commands differ on Windows, macOS, and other Linux distributions. On another platform, install the same components through their official packages. Keep the Caddyfile, certificate identity, listener checks, and curl command structure shown here.
| Requirement | Where it is needed | Purpose |
|---|---|---|
| Caddy | Local server device | Provides the reproducible HTTPS and HTTP/3 listener. |
| OpenSSL | Local server device | Creates the private test CA and server certificate. |
| HTTP/3-enabled curl | Local test environment and remote client | Forces HTTP/3 and reports negotiation details. |
| Localtonet client | Server device or a device that can reach it | Connects outward to our relay and runs the UDP tunnel. |
| External network | Remote client | Exercises the public UDP path rather than only the local LAN. |
| Secure file-transfer method | Between local and remote devices | Transfers only the public CA certificate, never the CA private key. |
Install Caddy on Debian or Ubuntu
This package-repository procedure follows the official Caddy installation instructions for Debian, Ubuntu, and Raspbian. Run it on the local server device:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl gnupg openssl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
| sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
| sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg
sudo chmod o+r /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Confirm that the binaries are available:
caddy version
openssl version
The official install page states that installing this package automatically starts and runs Caddy as a systemd service named caddy. That service owns Caddy's admin endpoint, which listens on localhost:2019 by default. This tutorial runs a second Caddy process in the foreground. That second process will normally fail to start because the admin address is already in use, even when port 8443 is completely free. The local server section below shows two ways to avoid the conflict. Pick one before you run caddy run.
This tutorial runs a separate Caddy configuration in the foreground so its output stays visible. Two different conflicts are possible. The admin endpoint conflict with the packaged service is described above. A port conflict happens if another Caddy instance or another program already occupies TCP or UDP port 8443. In that case, stop that instance or choose another unused test port and use it consistently in every command.
Confirm curl has HTTP/3 support
Run this on every device that will send a protocol-verification request:
curl --version
The output ends with a line that begins with Features:. Look for the word HTTP3 in that line. If HTTP3 is listed, the build can make HTTP/3 requests. If the Features line shows HTTP2 but not HTTP3, the build cannot run this tutorial's --http3-only requests. You can filter the output on Linux or macOS:
curl --version | grep -i '^Features:.*HTTP3'
Empty output from that command means HTTP/3 is not available in this build. Curl packages vary by operating system and distribution. Install an HTTP/3-capable build through the curl project's documented packages or your platform's currently supported packaging method before you continue.
The options this guide relies on are documented in the curl --http3-only documentation, the --resolve documentation, and the --cacert documentation.
-k or --insecure as the successful test path
Those options disable certificate verification and can hide a hostname, trust-chain, or server-name error. This guide passes the private CA certificate to curl explicitly with --cacert, which keeps both hostname and chain validation in place.
Build and validate a reproducible local HTTP/3 server
This example uses quic.test as a test-only hostname and UDP port 8443. The certificate contains quic.test as a DNS Subject Alternative Name. Curl maps that name to the required local or public destination without depending on public DNS.
Create a private test CA and server certificate
Create a dedicated working directory and restrict newly created files:
mkdir -p "$HOME/quic-tunnel-test/certs"
cd "$HOME/quic-tunnel-test"
umask 077
Generate the private CA key and a short-lived self-signed CA certificate:
openssl genrsa -out certs/test-ca.key 3072
openssl req -x509 -new \
-key certs/test-ca.key \
-sha256 \
-days 30 \
-subj "/CN=QUIC Tunnel Test CA" \
-out certs/test-ca.crt
Create the server key and certificate request:
openssl genrsa -out certs/quic.test.key 2048
openssl req -new \
-key certs/quic.test.key \
-subj "/CN=quic.test" \
-out certs/quic.test.csr
Create the certificate extensions. The SAN is the identity curl will verify:
cat > certs/quic.test.ext <<'EOF'
basicConstraints=CA:FALSE
keyUsage=digitalSignature,keyEncipherment
extendedKeyUsage=serverAuth
subjectAltName=DNS:quic.test
EOF
Sign a seven-day server certificate with the test CA:
openssl x509 -req \
-in certs/quic.test.csr \
-CA certs/test-ca.crt \
-CAkey certs/test-ca.key \
-CAcreateserial \
-days 7 \
-sha256 \
-extfile certs/quic.test.ext \
-out certs/quic.test.crt
Inspect the SAN and verify the chain before starting the server:
openssl x509 -in certs/quic.test.crt -noout -subject -issuer -dates
openssl x509 -in certs/quic.test.crt -noout -ext subjectAltName
openssl verify -CAfile certs/test-ca.crt certs/quic.test.crt
The final command should report certs/quic.test.crt: OK. The private CA key, test-ca.key, can issue certificates that anyone who installs the CA will trust. Keep it on the local test machine and delete it when the experiment is complete.
Configure Caddy for HTTP/3
Create a Caddyfile in $HOME/quic-tunnel-test:
cat > Caddyfile <<'EOF'
{
servers {
protocols h1 h2 h3
}
}
https://quic.test:8443 {
tls ./certs/quic.test.crt ./certs/quic.test.key
log
respond "HTTP/3 reached local Caddy"
}
EOF
The global server option explicitly enables HTTP/1.1, HTTP/2, and HTTP/3. Keeping all three available makes the later negative comparison useful, while --http3-only stops curl from satisfying the verification request through a TCP fallback. The log directive turns on access logging for this site, so each request appears in Caddy's terminal output with its protocol and remote address. See Caddy's protocol configuration, TLS directive documentation, and log directive documentation for the underlying settings.
Validate the configuration before startup:
caddy validate --config ./Caddyfile --adapter caddyfile
Avoid a conflict with the packaged Caddy service
First check whether the packaged service is running, and note the result so you can restore the original state later:
systemctl is-active caddy
systemctl is-enabled caddy
If the first command prints active, the packaged service is holding the default admin endpoint. You can also confirm which process owns it:
sudo ss -ltnp | grep ':2019'
Then choose one of the following options.
Option A: stop the packaged service for the duration of the test. This is the simplest choice when the packaged service is not serving anything you need right now:
sudo systemctl stop caddy
stop affects only the running service. It does not change whether the service starts at boot, so a reboot during the test brings it back. If the service was active before the test, start it again during cleanup. The procedure appears at the end of the troubleshooting section. Caddy's guide to running Caddy and using the service describes how the packaged unit is managed with systemctl.
Option B: keep the packaged service running and change the test instance's admin endpoint. Use this when the packaged service must stay up, for example because it serves another site on the same machine. Add the admin global option to the test Caddyfile. Either turn the admin endpoint off:
cat > Caddyfile <<'EOF'
{
admin off
servers {
protocols h1 h2 h3
}
}
https://quic.test:8443 {
tls ./certs/quic.test.crt ./certs/quic.test.key
log
respond "HTTP/3 reached local Caddy"
}
EOF
or replace admin off with a different unused loopback address such as admin localhost:2020. The Caddy global options documentation for admin describes both forms. With admin off, the test instance cannot be reloaded or stopped through its API. That is acceptable here because you stop it with Ctrl+C in its own terminal. Run caddy validate again after editing the file.
Changing the admin endpoint only removes the admin conflict. If the packaged service's own configuration also listens on 8443, the test instance will still fail with a port conflict. In that case, use Option A or choose a different test port consistently in every command.
Start Caddy and keep its output visible
Run Caddy from the test directory:
cd "$HOME/quic-tunnel-test"
caddy run --config ./Caddyfile --adapter caddyfile
Leave this terminal open. Caddy should report that it loaded the configuration. Fix any startup error before you create the tunnel. Typical errors involve an admin endpoint already in use, a port conflict, unreadable keys, invalid certificates, or unsupported configuration. If the error mentions localhost:2019 or the administration endpoint, return to the previous step.
Inspect the UDP listener
In a second terminal, verify that a process is bound to UDP port 8443:
sudo ss -lunp | grep ':8443'
Look for a UDP socket associated with Caddy. The local address may appear as an IPv4 address, an IPv6 address, or a wildcard, depending on address-family and operating-system behavior. A TCP listener on the same numeric port is not a substitute for this result, because TCP and UDP use separate transport endpoints.
If no UDP socket appears, review Caddy's startup output and confirm that the installed build supports HTTP/3. Do not move on to the Localtonet configuration until the UDP listener exists.
Make an HTTP/3-only local request
The URL must keep quic.test because that is the certificate identity. Curl's --resolve option maps it to local loopback for this request:
cd "$HOME/quic-tunnel-test"
curl -v \
--http3-only \
--cacert ./certs/test-ca.crt \
--resolve quic.test:8443:127.0.0.1 \
https://quic.test:8443/
A successful result returns HTTP/3 reached local Caddy. Curl's verbose output should identify HTTP/3. In the Caddy terminal, a new access log entry should appear for the request, with a protocol value that indicates HTTP/3 and a loopback remote address. Because --http3-only forbids TCP fallback, an HTTP response from this command is strong client-side evidence that the local QUIC path works.
If the listener is reachable only over IPv6, use the matching loopback or reachable address. If the Localtonet client will run on a separate LAN device, repeat a direct test from that device using an address that reaches the server. A server bound only to loopback is not reachable from a different machine.
Record the local baseline
- Certificate hostname:
quic.test. - Local target:
127.0.0.1:8443when the Localtonet client runs on the same machine. - Expected response:
HTTP/3 reached local Caddy. - Trust anchor:
certs/test-ca.crt. - Required protocol: HTTP/3 with no fallback.
- Observed UDP listener and the time of the successful local request.
- Whether the packaged
caddyservice was active before the test, and which conflict option you used.
If the Localtonet client runs on the Caddy host, target the verified loopback address and UDP port. If it runs elsewhere, use a LAN address that the client device has already proven it can reach.
Expose the local QUIC listener with a Localtonet UDP tunnel
Localtonet UDP tunnels point to a local IP address and port on, or reachable from, the connected client device. Relay and region choices can vary, so read the current values from our dashboard rather than copying a server code from an older tutorial.
The steps below follow our general tunnel workflow: client, device token, relay server, tunnel configuration, start, then use of the public endpoint. Exact dashboard field labels and screen order for UDP tunnels can change between releases. Check the UDP tunnel page in the current Localtonet documentation for the authoritative sequence and field names. Where the dashboard and these steps differ, follow the dashboard and documentation.
Install and run the Localtonet client
Run the client on the Caddy host or on another device that can reach the verified UDP listener. The client opens the outbound connection that the tunnel uses.
Authenticate and select the correct device
Use the device-specific authentication token through the supported application workflow, then select that device for the tunnel. Never place the token in commands, screenshots, repositories, or shared logs.
Select a currently available relay server or region
Choose from the values currently offered in our dashboard. Availability depends on the current product configuration, so do not guess or hardcode a server code.
Create a UDP tunnel to the QUIC target
Select the UDP tunnel type and enter the verified local IP address and UDP port. For this example, use 127.0.0.1 and 8443 only when the Localtonet client and Caddy run on the same device.
Start the tunnel
Creating a tunnel does not start it. Press Start and wait until the selected client is connected and the tunnel is running.
Record the assigned public host and port
Copy the public UDP host and port shown for the running tunnel. These values become the connection destination in the remote curl command.
The public endpoint works only while the selected Localtonet client is connected and the tunnel is running. Check both states before you change the Caddy or certificate configuration.
Read current region names, server codes, endpoint assignments, and plan availability from the product rather than assuming them from this article.
Do not replace the certificate hostname with the public host
The assigned Localtonet host identifies the public network destination. It is not automatically a certificate identity for the Caddy server. If you put the public host directly in the URL, Caddy presents a certificate for quic.test while curl validates it against a different name, and the check fails.
Keep quic.test in the URL and map the connection to the assigned Localtonet destination with --connect-to. This curl test does not need a public DNS record for quic.test.
Prove that the remote request negotiated HTTP/3
Transfer only the public CA certificate
Copy test-ca.crt to the remote test device using a trusted file-transfer method. The remote device needs neither the server private key nor the CA private key. Never transfer these files:
test-ca.keyquic.test.key
Keep the CA certificate in a known test directory on the remote device. If your organization's policy allows installing development roots, you can instead add test-ca.crt to the trust store of that operating system or application runtime through its documented administrative process. Trust-store commands differ across Linux distributions, Windows, macOS, containers, browsers, and language runtimes. For that reason the portable curl example uses --cacert instead of changing system-wide trust.
For a short experiment, prefer request-scoped trust with --cacert. If you install the CA in a system trust store, remove it after testing. Never install a development CA on unmanaged or production devices without authorization.
Run the mapped remote request
From a different network, replace PUBLIC_HOST and PUBLIC_PORT with the exact endpoint assigned to the running UDP tunnel:
curl -v \
--http3-only \
--cacert ./test-ca.crt \
--connect-to quic.test:8443:PUBLIC_HOST:PUBLIC_PORT \
https://quic.test:8443/
Do not change the URL to PUBLIC_HOST. The URL stays https://quic.test:8443/, so the certificate name, URL authority, and TLS server name remain aligned. The mapping changes only the destination to which curl opens the connection.
The two ports in the mapping serve different purposes. The first, 8443, matches the port in the URL so the mapping rule applies. The second is the assigned public UDP port. Curl sends the QUIC traffic to that public port, and Localtonet forwards it to the configured local UDP port.
A successful test should produce all of the following:
- Curl completes in
--http3-onlymode. - Certificate validation succeeds using
test-ca.crt. - Curl reports HTTP/3 in its verbose protocol output.
- The response contains
HTTP/3 reached local Caddy. - A new Caddy access log entry with an HTTP/3 protocol value appears at the matching time.
- UDP traffic appears on local port 8443 during the request if packet observation is enabled.
Collect evidence at multiple layers
| Evidence layer | Successful indication | What it proves |
|---|---|---|
| Remote curl | The request succeeds in HTTP/3-only mode and reports HTTP/3. | Curl did not satisfy the request through HTTP/2 or HTTP/1.1. |
| Certificate validation | Curl accepts the chain through test-ca.crt without an insecure option. |
The certificate chain and quic.test hostname match the intended test identity. |
| QUIC negotiation | The connection negotiates an HTTP/3 ALPN value. | The endpoints selected HTTP/3 as the application protocol over QUIC. |
| Local server | Caddy returns the configured unique response and logs an HTTP/3 request during the remote test. | The request reached the intended local test service over HTTP/3. |
| Local socket or packet view | UDP datagrams arrive on port 8443 during the request. | The transport reaching the local listener is UDP. |
| Tunnel lifecycle | The selected client is connected and the UDP tunnel is running. | The assigned public destination corresponds to an active tunnel path. |
No single observation is as strong as the combined result. Client output can be misread, server output can be incomplete, and a packet capture shows encrypted UDP without necessarily revealing application semantics. Taken together, they form a defensible end-to-end test.
When you read the Caddy access log entry for the remote request, also note the recorded remote address. As described in the path section, with a loopback target it will typically be a local address rather than the remote device's public IP. That is expected for this topology and does not mean the request came from somewhere else. Correlate by time and by the unique response instead.
Observe local UDP traffic when needed
If you have authorization for packet capture and local policy permits it, run a narrowly scoped capture on the Caddy host while you send one remote request:
sudo tcpdump -ni any udp port 8443
Stop the capture with Ctrl+C after the request. The capture confirms that UDP datagrams reached the local port, and it shows their lengths. The encrypted packets alone do not prove the HTTP version, so pair this observation with curl's HTTP/3-only result and the Caddy log entry.
Run a negative control
Temporarily stop the Localtonet UDP tunnel while leaving Caddy running, then repeat the same remote command. The HTTP/3-only request should fail. Restart the tunnel and confirm that the command succeeds again against the currently assigned endpoint.
Alternatively, stop Caddy while keeping the tunnel running. If a separate TCP HTTPS listener exists, leave it untouched. The HTTP/3-only request should still fail because no local QUIC listener is available.
If the request succeeds during the negative control, check three things. The command must still contain --http3-only, its --connect-to destination must be current, and no other server can be listening on the target UDP port. Also make sure the packaged caddy service has not been started again with a configuration that uses the same port.
Detect silent fallback to TCP-based HTTP
User-facing clients usually prioritize page delivery over protocol diagnostics. If QUIC fails, they may retry over HTTP/2 or HTTP/1.1 on TCP. That is useful for browsing, but it produces a false positive when the goal is to validate the local QUIC listener.
| Test mode | Possible result | Interpretation |
|---|---|---|
| HTTP/3-only curl | Request succeeds and reports HTTP/3. | Strong client-side evidence that QUIC and HTTP/3 worked. |
| HTTP/3-preferred client | Request succeeds as HTTP/2. | The application is reachable, but the HTTP/3 attempt failed or was not selected. |
| Ordinary browser navigation | The page loads without protocol inspection. | Application reachability is proven, but the transport remains unknown. |
| TCP HTTPS request | TCP succeeds while HTTP/3-only fails. | The TCP path works, but UDP routing, QUIC, or HTTP/3 still has a problem. |
Caddy may also listen on TCP port 8443 because the example enables HTTP/1.1 and HTTP/2. That does not weaken the HTTP/3-only test, because curl's enforced mode is what prevents fallback. It also lets you compare TCP and UDP behavior without changing the application response. In the Caddy access log, an HTTP/2 or HTTP/1.1 request shows a different protocol value from an HTTP/3 request, which makes fallback easy to spot on the server side too.
A public endpoint that negotiates HTTP/3 with a browser does not show that the local application received QUIC. When end-to-end fidelity is the objective, use a UDP tunnel to the local QUIC listener and verify the protocol at the local server.
Troubleshoot remote QUIC connectivity systematically
Troubleshooting goes fastest when you work from the local server outward. Do not change certificates, listener ports, relay selections, and client options all at once. Change one layer, repeat the same HTTP/3-only request, and record the result.
Caddy fails to start
Run the validation command again and read the foreground output. Common causes include:
- A malformed Caddyfile.
- An unreadable private key.
- A certificate and key that do not match.
- The admin endpoint already being in use.
- Another process already using port 8443.
Admin endpoint already in use. If the error refers to the administration endpoint, to localhost:2019, or to an address already in use while 8443 is free, another Caddy process owns the admin address. On Debian and Ubuntu this is usually the packaged caddy service. Exact error wording varies by Caddy version. Confirm the owner:
systemctl is-active caddy
sudo ss -ltnp | grep ':2019'
Then apply one of the two options from the local server section. Either stop the packaged service with sudo systemctl stop caddy, or add admin off or a different address such as admin localhost:2020 to the test Caddyfile's global options block. Validate and start again.
Certificate and key mismatch. Check that the certificate and key belong together by comparing their public-key digests:
openssl x509 -in certs/quic.test.crt -pubkey -noout \
| openssl sha256
openssl pkey -in certs/quic.test.key -pubout \
| openssl sha256
The two digests should match.
Port 8443 already in use. Identify the existing process with sudo ss -ltnup | grep ':8443' before stopping anything. Do not terminate an unrelated production service just to run this test. Choose another test port instead.
No UDP listener appears on port 8443
Confirm that Caddy is still running and that the Caddyfile contains h3 in the protocol list. Check the installed Caddy version and startup messages. A TCP result from ss is not enough, so keep the UDP-specific -u flag in the command.
The local HTTP/3-only request reports unsupported functionality
The installed curl build probably lacks HTTP/3 support. A recent curl version number does not guarantee that its linked libraries enable HTTP/3. Run curl --version and look for HTTP3 in the Features: line. If it is missing, replace the client with an HTTP/3-capable build before changing Caddy or Localtonet.
The local request cannot resolve quic.test
Confirm that the command contains:
--resolve quic.test:8443:127.0.0.1
This per-request mapping avoids a hosts-file change. The hostname and port in --resolve must exactly match the URL authority.
The local request reports an unknown certificate authority
Confirm that --cacert points to test-ca.crt, not to the server certificate and not to the CA private key. Verify the server certificate with:
openssl verify -CAfile certs/test-ca.crt certs/quic.test.crt
If verification fails, regenerate the certificate chain rather than bypassing validation.
The certificate reports a hostname mismatch
Inspect the SAN:
openssl x509 -in certs/quic.test.crt -noout -ext subjectAltName
It must include DNS:quic.test, and the URL must also use quic.test. The Localtonet public hostname belongs only in the destination part of --connect-to.
The local test works but the remote request times out
Check the Localtonet lifecycle and destination values in this order:
- The intended device is selected.
- The Localtonet client on that device is connected.
- The UDP tunnel is running, not merely created.
- The local target matches the verified UDP listener.
- The remote command contains the currently assigned public host and port.
- The remote network permits outbound UDP.
If the Localtonet client runs on another LAN device, 127.0.0.1 refers to that client device, not to the Caddy server. Configure a reachable LAN address and make sure Caddy is bound appropriately before exposing it.
Curl cannot resolve PUBLIC_HOST
Replace the placeholder with the exact public hostname shown for the running tunnel. Do not include a scheme, path, brackets, or extra punctuation. The mapping has this structure:
--connect-to quic.test:8443:assigned-public-host:assigned-public-port
If the actual destination is an IPv6 literal, follow curl's documented IPv6 syntax. Do not guess an address for the assigned hostname.
UDP reaches Caddy but the QUIC handshake fails
This points away from basic tunnel reachability and toward TLS or QUIC negotiation. Check the certificate dates, SAN, test CA, URL hostname, Caddy protocol configuration, and curl HTTP/3 capability. Make sure the remote device received the correct test-ca.crt from this test environment.
A packet capture may show two-way UDP exchange while certificate or ALPN negotiation still fails. QUIC payloads are encrypted, so rely on endpoint diagnostics for application-level interpretation.
The handshake stalls on a path that cannot carry full-size Initial datagrams
QUIC has a minimum datagram size requirement that ordinary TCP tests never exercise. RFC 9000 Section 14 requires UDP datagrams that carry QUIC Initial packets to be at least 1200 bytes, and it states that QUIC must not be used on a network path that cannot support that size. On a path that drops or cannot deliver such datagrams, the handshake does not complete. Small UDP probes may still succeed, which makes the problem easy to misdiagnose as a certificate or server fault.
Typical signs include:
- Curl times out during the HTTP/3 handshake rather than reporting a certificate or ALPN error.
- The same command works from one external network and consistently fails from another.
- A capture on the Caddy host shows no arriving datagrams, or none of the expected size, during a failing attempt, while a working network shows datagrams arriving.
To isolate it, repeat the identical HTTP/3-only command from a second external network without touching Caddy or the tunnel. If the alternate network succeeds, record the failing network as unable to carry the required datagram size and note that limitation in your test report. Do not try to work around it by weakening the test. The 1200-byte floor is a protocol requirement, not a tunable setting.
The Localtonet evidence available for this guide does not establish a maximum datagram size for the tunnel path, so do not assume a specific figure. If the handshake stalls from every external network while the local loopback test succeeds, record that observation along with the tunnel's relay selection. Then verify the remaining layers in this section before drawing conclusions about the path.
The request fails only from one external network
Some client networks restrict or impair outbound UDP. Repeat the same command from a second external network while leaving Caddy and the tunnel unchanged. If one path consistently works and the other does not, investigate the failing network before modifying the server. The datagram-size check above is one of the first things to rule out.
A browser may hide this condition by falling back to TCP, so keep using --http3-only for the diagnostic comparison.
The browser loads a page but curl HTTP/3-only fails
The browser may have selected HTTP/2 or HTTP/1.1, reached a different endpoint, reused an existing connection, or served cached content. Inspect the exact browser request protocol, but treat the enforced curl test and the matching Caddy log entry as the primary evidence for this tutorial.
The public endpoint stopped responding
Confirm that the Localtonet client is still connected and the tunnel is still running, since the tunnel is available only while both conditions hold. Also confirm that Caddy did not exit and that the public endpoint you are using matches the running tunnel shown in the dashboard.
Stop the test server, restore the packaged service, and remove temporary trust
Return to the terminal running Caddy and press Ctrl+C. Then stop or delete the Localtonet tunnel. Confirm that port 8443 is no longer listening:
sudo ss -lunp | grep ':8443'
No output is expected if no other process uses that UDP port.
If you used Option A and the packaged service was active before the test, start it again and confirm its state:
sudo systemctl start caddy
systemctl is-active caddy
If the service was not active before the test, or you do not need it on this machine, leave it stopped. Because systemctl stop did not change its boot behavior, it may start again at the next reboot if it is enabled. Run sudo systemctl disable caddy only if you deliberately want it to stay off. If you used Option B, the packaged service was never touched and nothing needs restoring.
Remove any copy of test-ca.crt that you installed in a system trust store, using that operating system's documented trust-management procedure.
When you no longer need the test artifacts, delete the working directory securely according to your storage and organizational requirements:
rm -rf "$HOME/quic-tunnel-test"
Review the path before running the removal command. Deleting the directory removes the CA private key, server private key, certificates, and Caddy configuration created by this tutorial.
Keep public QUIC testing controlled
Publishing a development listener makes it reachable through a public endpoint for as long as the tunnel runs. Treat that endpoint as internet-accessible, even when the experiment is brief and the hostname is not advertised.
A transport certificate authenticates the configured server identity, but it does not replace application authentication or authorization. If you adapt this tutorial to an application with state-changing routes, require appropriate authorization and apply least privilege.
Do not expose debug dashboards, unauthenticated administrative endpoints, stack traces containing secrets, or unrestricted internal APIs. That includes Caddy's own admin endpoint: keep it on loopback or turn it off, and never point a tunnel at it. If the real application cannot be published safely, keep the minimal Caddy response from this tutorial or build a dedicated test service containing only what protocol validation needs.
Localtonet removes the need for inbound router port forwarding and inbound firewall changes in this workflow, but it does not remove the application's security responsibilities. You still need safe key handling, authentication, authorization, input validation, log hygiene, and a controlled tunnel lifetime.
Frequently asked questions
Can I test a local HTTP/3 server with an ordinary HTTP or HTTPS tunnel?
Not when the goal is to prove that the local server itself received QUIC. HTTP/3 uses QUIC over UDP, so protocol-fidelity testing requires UDP traffic to reach the local QUIC listener. A public HTTPS response can succeed without proving that the local connection used HTTP/3.
Why does caddy run fail even though port 8443 is free?
On Debian and Ubuntu, the Caddy package automatically starts a systemd service named caddy, and that service owns the admin endpoint on localhost:2019 by default. A second foreground instance tries to bind the same admin address and fails. Either stop the packaged service for the test with sudo systemctl stop caddy, or add admin off or a different admin address to the test Caddyfile's global options block.
How do I know whether my curl build supports HTTP/3?
Run curl --version and look for HTTP3 in the line that begins with Features:. If it is missing, that build cannot run --http3-only requests, and you need an HTTP/3-capable build.
Why use curl --connect-to for the remote request?
It separates URL identity from network destination. Curl keeps quic.test as the URL hostname, TLS server name, and certificate-validation name while connecting to the Localtonet-assigned public host and port.
Do I need a public DNS record for quic.test?
No. The local command uses --resolve, and the remote command uses --connect-to. These per-request mappings keep the certificate hostname without requiring public DNS for the test name.
Why should I use --cacert instead of --insecure?
--cacert gives curl the intended private trust root while keeping chain and hostname validation. --insecure disables those checks and can hide a certificate, SNI, or identity error.
Can HTTP/3 and HTTPS over TCP use the same port number?
Yes. UDP and TCP are separate transports, so a server can use the same numeric port for both. Verify the UDP listener directly, because a working TCP listener does not prove that a QUIC listener exists.
Does a successful browser page load prove HTTP/3 is working?
No. Browsers can fall back to HTTP/2 or HTTP/1.1 over TCP. Use an HTTP/3-only client and correlate its result with the Caddy access log and UDP listener activity.
Why does QUIC work from one network but fail from another?
The failing network may restrict or impair outbound UDP, or it may be unable to carry the 1200-byte datagrams that RFC 9000 requires for QUIC Initial packets. Repeat the same HTTP/3-only command from another external network while keeping the server and tunnel unchanged, and record the failing network's limitation. A browser may hide the difference by falling back to TCP.
Can this tunnel test validate QUIC connection migration?
It can confirm HTTP/3 connectivity through the tested relay path, but you should not treat it as proof of representative connection migration. Migration behavior can depend on source-address visibility and path characteristics that the available Localtonet product evidence does not establish. With a loopback target, Caddy typically records a local address rather than the remote client's address.
Does creating a Localtonet UDP tunnel start it automatically?
No. Creating and running a tunnel are separate lifecycle states. Start the tunnel and keep the selected Localtonet client connected. The public endpoint is available only while both conditions hold.
Do I need router port forwarding or a public IP address?
No. The Localtonet client opens an outbound connection to our relay, so this workflow does not require inbound router port forwarding, inbound firewall changes, VPN setup, or a public IP address.
What is the strongest proof that the local server handled HTTP/3?
Combine four observations: a successful remote --http3-only request, valid certificate verification for the intended hostname, the expected Caddy response with a matching HTTP/3 access log entry, and UDP traffic on the configured local port. The negative control should fail when the tunnel or QUIC listener is stopped.
Test your local QUIC listener from a real external network
Verify the HTTP/3 server locally and run our client on a device that can reach its UDP listener. Create and start a UDP tunnel, then map an HTTP/3-only curl request to the assigned public destination while keeping certificate validation intact.
Get Started Free →Corrections & updates
Substantive changes approved by the Localtonet editorial team are listed transparently below.
Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.