Choosing a Tunnel Protocol When the Network Fights Back

In an unrestricted network, almost any tunnel protocol works and the choice is about throughput and convenience. In a network that inspects and blocks, the protocol’s wire format becomes the deciding factor, because some formats are trivially identifiable and some are designed to look like something else.

The short version: match the protocol to the adversary. If the network blocks by port and protocol signature, obfuscation is enough. If it probes actively and correlates behaviour, the design must withstand that, and the trade is throughput and operational complexity.

What gets detected

Three layers of detection matter. Port and protocol blocking is the crudest: a tunnel on an unusual port with a distinctive handshake pattern is easy to classify. Deep packet inspection looks at the handshake and the packet size and timing distribution, which distinguishes many tunnels from ordinary TLS. Active probing connects to the endpoint and tries to make it behave like the service it claims to be; a server that only speaks tunnel protocol fails immediately.

Each layer requires a different answer, and a protocol that defeats the first may be defenceless against the third. Choosing without knowing which layer is in play is guesswork with a subscription attached.

Camouflage inside TLS

Tunnels that present a genuine TLS handshake to a real web server are harder to classify, because the traffic is ordinary HTTPS to an ordinary host. Variants differ in how convincingly they do this: some proxy to a real site for unauthenticated probes, some terminate TLS with a valid certificate for a domain that exists, some merely imitate the handshake.

The ones that proxy to a real site survive active probing best, at the cost of complexity on the server side. The ones that imitate survive casual inspection only, and the difference is not visible in a configuration menu.

Obfuscation layers and their cost

Wrapping a tunnel in an obfuscation layer adds header rewriting, padding, or traffic shaping. Padding costs bandwidth; shaping costs latency; both reduce throughput. The cost is real but usually modest compared with the alternative of no connectivity.

Measure it rather than assume: run the same transfer with and without obfuscation over the same path. A layer that halves throughput is worth knowing about before it is deployed across a team, and the numbers vary more by path than by protocol.

Fallbacks and the shape of failure

Any single protocol will eventually be blocked on some network. A stack that can present several different shapes — a plain tunnel on one port, a TLS-camouflaged endpoint on 443, and a fallback through a content delivery path — degrades rather than fails. The operational cost is more endpoints to maintain and more client configuration to distribute.

The client side matters as much as the server: a fallback that requires the user to edit a configuration file in a locked-down network is not a fallback. Prefer clients that try endpoints in order and settle on whichever works, without user decisions.

Legal and policy reality

Using a tunnel is lawful in most places and restricted in some. That is a fact to establish before configuring anything, not a detail to discover afterwards. The technical design cannot make an unlawful act lawful, and a provider’s marketing is not legal advice.

Endpoint hygiene

The endpoint is the observable part. A server that answers on a unusual port, presents a certificate with a generic name, and only accepts one protocol is a server that can be classified in a single probe. Sharing an address with an ordinary website, answering standard requests with standard responses, and looking unremarkable is the property that survives.

Rotating addresses helps only until the address is classified, and a shared address carries the risk of other users’ behaviour. Both choices are trade-offs, and neither is a substitute for an endpoint that behaves plausibly under inspection.

The client is the weakest link

Client fingerprints differ: TLS parameters, packet sizes, and timing give away an application that is not what it claims. Some clients mimic a browser’s parameters closely; others do not, and the difference is visible to anything inspecting the handshake. Test the client against a fingerprint checking site before relying on it in a restrictive network.

Also test the fallback path in the actual environment. A configuration that works at home and fails behind a hotel captive portal has not been tested, and the portal is the environment most travellers actually face.

Operational cost of stealth

Camouflaged endpoints need real domains, valid certificates, renewal automation, and someone watching when they stop working. That is a small but permanent operational load, and it is the part that quietly ends most self-built setups. Plan for it or buy the service, but do not plan as if the configuration were static.

What to check before you commit

  • Identify which detection layer you actually face.
  • Prefer tunnels that proxy to a real site over ones that imitate TLS.
  • Measure obfuscation overhead on the real path.
  • Keep two or three endpoint shapes for fallback.
  • Choose clients that fail over without user intervention.
  • Establish the legal position before deployment.

Protocol choice under blocking is a study of the adversary, not a comparison of cipher suites. The correct answer is the one whose traffic shape survives the specific inspection in front of it.

Photo: Jacek Rużyczka, via Wikimedia Commons (CC BY-SA 4.0).

What to keep recorded

Record, per endpoint: the address, the port, the protocol shape, the last date it worked from each network you use, and the date it was last verified. Blocking is discovered by testing, and a log of when each endpoint last worked turns a mysterious failure into a schedule of endpoints that need replacement.

Also record the client version and its configuration profile. A profile that works with one client and fails with another is a difference that costs hours to rediscover, and one line in a note prevents it.

The fallback that survives a captive portal

A hotel or airport network that intercepts all traffic will break most tunnel clients, because the client cannot complete its handshake until the portal is passed, and the portal only passes traffic to a browser. The practical answer is to complete the portal in a browser first, then start the tunnel, and to prefer a client that tolerates the brief period where connectivity is one-way. Testing that sequence once, at home, removes a class of failure that otherwise appears as “the tunnel does not work in hotels”.

After deployment, keep a working baseline

Keep one endpoint that is ordinary, unremarkable, and known to work, and treat it as the baseline for testing. When a new shape fails, comparing against the baseline separates “the network changed” from “the new configuration is wrong”, which is the first question every incident asks and the last one answered.

Leave a Comment