P4VPN · Technical Reference

VPN protocols and routing explained

Protocols determine how data travels; routes determine where it goes. First identify which layer is causing the issue, then compare connection speed, interruptions and battery use.

Haven’t finished installing and importing your configuration? Follow the Quick Start Guide to make your first connection. This guide assumes you’re already connected and is for reference when changing protocols or routes, or troubleshooting an issue. The protocols discussed here are for technical comparison; not every route supports every option. Check the user panel and your client for the options actually available.

Protocols, transport and exit routes

Know what you’re comparing first

A route name in a client often combines the protocol, underlying transport, access address and exit region. Switching it may change the access data center, network path and address seen by the destination service all at once. Even if the new route works much better, that only shows the whole combination is a better fit—not that a particular protocol made the connection faster. Conversely, large performance differences between routes using the same protocol don’t mean the protocol has failed.

When reviewing a configuration, ask in order: how does the client authenticate with the access server, what transport carries the data, and where does the traffic exit? The first affects whether the two sides can communicate; the second affects handshakes, flow control and recovery after packet loss; the third determines which networks the traffic crosses. Once these are clear, consider whether the app makes frequent short requests or keeps long-lived connections to identify which differences are worth comparing.

Distinguish proxy access, system-wide routing and app requests

A working proxy entry only proves that it can send the relevant kinds of requests to the entry point; it doesn’t mean all traffic from the device goes through it. System proxies are generally used by apps that follow the system settings. A client’s virtual network interface can route more traffic at the system level, but split tunneling and routing rules still apply. If a browser loads pages but a meeting app disconnects, first check whether the latter uses the expected route, then whether that route carries the datagrams the app needs.

Name resolution follows its own path, too. The browser, operating system and proxy client may each determine how domain names are resolved, and each may keep its own cache. If the first attempt fails but a retry works, don’t attribute the difference entirely to the protocol. First verify the actual exit and routing rules, then identify whether the error occurred during DNS resolution, while connecting to the access server, or after the destination service responded. The last case—an account lacking permission, for example—is usually not a transport-layer fault.

Put speed test results in context

Round-trip latency measures how long a request and its response take to cross the network. It isn’t the time from clicking a link to seeing a page. A page may also wait on DNS resolution, handshakes, backend processing and browser rendering. If the speed test server uses a different access network from the service you actually use, the test can look great while your real traffic takes a longer route. For voice calls and remote control, the least predictable delays often explain the experience better than one unusually smooth result.

Throughput also varies by direction and over time. Average download speed may be high, yet a large upload can saturate the uplink and make calls or remote keystrokes stutter. Fast playback startup doesn’t guarantee a steady supply of data throughout the stream. More useful notes include when the wait began, whether it happened during connection setup or data transfer, what else the device was doing, and whether the task eventually failed.

Set up a comparison you can repeat

Start on the same device and access network, at roughly the same time of day, and run the tasks you normally do. Note the client mode, selected exit and any app errors. Reproduce the issue with the current setup, then change one condition and see whether the symptom changes with it. If the panel doesn’t offer another protocol on the same route, record honestly that you changed the entire route combination. That comparison can still help you choose what works better, but it can’t establish how the protocol performs on its own.

Keep a verified working setup before troubleshooting so you can switch back quickly. That gives you a baseline before changes to the system proxy, DNS settings or client rules muddy the picture. Don’t test a new exit using a connection that’s already established: some apps reuse existing sessions. If needed, close the app’s connections and reopen it to make sure it connects over the new route, then repeat the same test.

When comparing protocols, keep the route as consistent as possible. When comparing routes, keep the protocol consistent. If you can’t, your conclusion applies only to the combinations you tested.

Common stream-based proxy protocols

Shadowsocks: a straightforward encrypted proxy

Shadowsocks encrypts and forwards requests between the client and proxy server; it doesn’t directly take over system routing. Modern deployments typically use authenticated encryption, allowing the receiver to detect whether data has been altered. It’s often used where complex transport encapsulation isn’t needed. If the configuration adds a plugin or forwarding layer, connection overhead includes those components, too, so account for them when troubleshooting.

Whether it can forward the datagrams you need depends on the client implementation, access server and configuration. If TCP browsing works but voice or another real-time app doesn’t, don’t jump to conclusions from the route name. First confirm the client is handling the app’s traffic, then check whether the forwarding path supports UDP. If the same settings fail in a different client, verify that both sides support the selected authenticated encryption method—not just that the names match.

VMess: authentication and proxy messages in one format

VMess defines authentication and message formatting between a client and proxy server, and can be paired with different underlying transports. Two configurations labeled VMess don’t necessarily have the same connection overhead: one may negotiate TLS after the underlying connection is established, while another may also set up a WebSocket session. Each additional layer requires compatible support on the access server and can introduce issues such as idle connections being closed by an intermediary.

When troubleshooting, distinguish between failing to reach the entry point, an underlying handshake failure and proxy authentication failure. If the entry point accepts the connection but authentication fails, check that the configuration came from the current panel and that the device clock is correct. For time-dependent authentication, an inaccurate system clock can make an otherwise correct configuration unusable. If the first request fails after idle periods but then works, check whether the session was closed before reinstalling the app.

Trojan: TLS as the basis for the connection

A common Trojan deployment first establishes a TLS session, then sends authentication and proxy requests through it. The domain, certificate and system clock all affect certificate validation. If another transport layer is involved, both sides must also use matching settings. For certificate errors, check the device time and connection configuration first, then use the official entry point to confirm whether the server certificate was updated. Don’t disable validation just to get a temporary connection.

A successful TLS handshake isn’t the whole story. It only confirms that the client established an outer secure connection; it doesn’t guarantee proxy authentication succeeded or that the remote app is responding normally. If only one destination service fails while others work through the same configuration, check whether the failed request went to the expected address and whether the app or server returned a specific error. This helps avoid mistaking a destination-side issue for a connection protocol problem.

VLESS: separating proxy format from session protection

To understand a VLESS configuration, consider the proxy messages, authentication and transport protection separately. Common deployments add TLS protection outside the proxy layer or use another protected transport. Seeing VLESS in a configuration doesn’t prove every part of the data path uses the same encryption, and the absence of an encryption setting at the proxy layer doesn’t mean there’s no protection outside it. Check the trusted configuration and the negotiated connection to keep the layers straight.

If switching the underlying transport introduces delays, first ask whether the entry handshake is still in progress or the connection is established but data isn’t moving. For the former, check authentication, certificates and transport options. For the latter, check whether the app’s traffic is being routed through the client, whether retransmissions are ongoing, and whether the destination is responding slowly. From Shadowsocks, VMess and Trojan to VLESS, everyday performance depends on the complete combination supported by both ends and how reliably it handles tasks on the networks you use.

QUIC-based proxy transport

UDP is the foundation—not a guarantee against packet loss

Hysteria2 and TUIC are based on QUIC, which typically runs over UDP. Individual UDP datagrams aren’t retransmitted, but QUIC’s reliable streams acknowledge receipt and recover lost data. Some implementations may also use application datagrams that aren’t retransmitted, depending on the protocol and configuration. Calling the entire setup “non-retransmitting” misrepresents how it delivers traffic such as files and web pages that must arrive intact.

Independent numbering for reliable streams means one stream doesn’t necessarily have to wait for another to recover missing data before delivering what it has received. This reduces delays between separate streams; it doesn’t let a stream deliver its own data to an app out of order. They still share the same path, sending queue and congestion control. If the bottleneck is already backed up, multiple streams won’t create more bandwidth.

Hysteria2: look at sustained transfer and queues

A Hysteria2 deployment may estimate link capacity and adapt how it sends data. On a network with fluctuating capacity or occasional packet loss, check whether its strategy can sustain the task over the time window that matters—not just whether it reaches a high momentary speed. An overly aggressive setting may queue data at the bottleneck, making a call worse while a download runs at full speed. A conservative setting may leave some available capacity unused.

For everyday use, start with the settings provided for the service. Try a real task, then see whether another task running at the same time affects it—for example, play a stream continuously while opening pages and watch for reduced video quality or noticeably slower requests. If high throughput holds only when the network is idle, check access conditions and the actual route during peak periods instead of using more aggressive sending settings to mask queueing.

TUIC: look at session reuse and real-time data

Some TUIC implementations can handle multiple proxy streams within one QUIC connection and forward UDP using the relevant mechanisms. With a mix of short requests and voice traffic, check whether small requests finish promptly and whether real-time apps stutter while other data is transferring. Datagram forwarding mode, congestion at both layers and how the client manages session lifetimes can all affect results. TUIC appearing in a client’s list alone doesn’t predict performance.

Reusing a session can avoid the delay of establishing a new connection, but it depends on the session still being available. After a long background pause—or if the upstream network has discarded an old mapping—the app may need a new handshake when reopened. Whether the session survives an address change also depends on both implementations, the network path and its policies. Evaluate cold starts, continued use and recovery after changing networks separately; one fast reconnect doesn’t guarantee consistent behavior.

Keep a fallback route for the networks you use

Some access networks handle sustained UDP traffic differently from TCP. Small packets may get through while larger ones fail because of path MTU limits or other conditions. If the client establishes a session but pages frequently fail to load fully, first check whether the issue happens in the same app only on the current network, then compare a TCP-based option with a similar access and exit path. A single timeout can’t tell you whether the problem is at the local gateway or farther along the network.

For regular use, keep a fallback that you’ve tested across your usual networks. If an issue only occurs on a particular network, switch to the fallback to finish your task and note the access method, app symptoms and time of the failure. If the same kind of configuration fails across multiple access methods, check compatibility between the client and the options shown in the panel. This is more useful than repeatedly refreshing the same route.

Connection setup and resource use

Separate first visits from subsequent requests

A first visit may involve resolving the entry point, establishing transport, authenticating or completing a security handshake, and opening a connection from the other side of the proxy to the destination. If the destination uses HTTPS, the app also has its own secure session with it. A slow first page after the panel shows the proxy as connected doesn’t necessarily mean the proxy handshake took a long time; it may already be complete, while the app waits on its own DNS lookup, security negotiation or server response.

Subsequent requests often take a different path. The system may cache DNS results, the client may keep an outer session open, and the browser may reuse a connection to the destination. Some implementations support session resumption, but it isn’t guaranteed every time and may not cover the app’s own handshake. Compare the first visit, repeated visits and a visit after idle time to tell whether the difference comes from connection setup or connection maintenance.

Compare the overhead of stream-based transport and QUIC

With TCP as the underlying transport, a TCP connection is established first, followed by any required security negotiation or proxy handshake. Over a long-distance route, each stage that waits for a response can add to the delay. QUIC combines transport and security handshakes more closely and may reduce initial round trips. But if packets can’t get through, path validation is needed or retries occur, that advantage can disappear. Protocol names alone can’t predict which setup will connect faster.

Also check whether you’re comparing the same connection state. Some clients probe the entry point ahead of time, making it seem like the connection completes immediately after a click. Another configuration may wait for the first app request before connecting. That difference in responsiveness is real, but it may come from a pre-established connection versus an on-demand one. Compare both the time from launching the client to completing the first request and the time for a later request after connection.

Connection setup and resource comparison
What to observe Common TCP transport QUIC-based transport
First connection Check transport setup and any follow-up negotiation Check the handshake and whether the path is usable
Delivery order Delivered in byte order within the same connection Each reliable stream delivers data in order
Resource use Connection state, buffers and outer-layer encryption Stream state, encryption, buffers and recovery

How CPU and memory affect performance

Encryption, packet framing, copying and retransmissions all use CPU time; memory may be needed to track connection state and queue data for forwarding. If throughput is low and the device is also getting hot, compare the client’s and app’s resource use in your desktop system monitor. Video decoding, browser rendering and disk writes also consume resources, so don’t assume high overall CPU use is caused by encryption. Keep the task and playback quality as consistent as possible during comparisons.

Connection counts and request patterns also affect overhead. Many short-lived connections can make repeated handshakes more noticeable. Sharing an outer session across apps may avoid some repeated work, but also means they share certain buffers and resources. If errors only appear as concurrency increases, note whether all requests slow down or only some connections are rejected. The former points to a shared bottleneck; the latter may also involve concurrency limits in the app or server.

Cross-check logs against what the app is doing

In the client logs available to you, start with events around the time of the error. Distinguish DNS failures, connection timeouts, authentication issues and interruptions during transfer. Some logs only show a generic error, which isn’t enough to identify where packets were lost. Cross-check with the same task: if the outer connection is established but a page still takes a long time to show its first content, investigate the destination service instead of repeatedly changing the connection timeout. When reporting an issue, include only the necessary times and error details; remove authentication and subscription information.

Mobile battery use and recovery

Power use isn’t just about encryption

Apps waking the device to send data, the wireless radio staying active and the client reconnecting can all use power, just like encryption and decryption. The radio may not enter a lower-power state as soon as data transfer ends. Frequent keep-alive packets or background requests can repeatedly wake the device. This change in power use may not be obvious from total data usage, so the day’s traffic volume alone can’t identify what used the battery.

During active use, also account for screen brightness, video decoding and network conditions. If the same content plays at different quality or brightness settings, battery differences are hard to attribute to the protocol. Weak signal matters, too: the device may repeatedly retry or reconnect, while all you notice is a slow page or a warm device. Repeat the task somewhere with a steadier signal before deciding whether the client combination is involved.

Balance keep-alives against reconnecting after sleep

Keep-alives can reduce the chance that an intermediary closes a session, but they also make a device that could be sleeping do work at regular intervals. Whether frequent wake-ups are worthwhile depends on how quickly a task needs to recover. For timely messages or an active call, a dropped session can be costly. For browsing you initiate in the foreground, focus on whether the connection recovers quickly when you return to the app rather than keeping it connected at all times in the background.

Don’t change keep-alive, battery management and automatic switching all at once without a baseline. For example, some connections may be closed after the network is idle, while others are paused by the system. If you change both settings at once, you won’t know what fixed the issue even if it goes away. First check whether the client is slow to recover after the screen turns off, then investigate background app behavior or whether the app reloads its session after sleep.

Check system restrictions and network switching separately

On Android, check battery usage records and background app restrictions. If foreground use works but the client repeatedly reconnects after the screen turns off, first check whether the system is pausing it. On iOS, a system-managed connection extension and a foreground app have different lifecycles; returning to the home screen doesn’t mean the connection stops immediately. On either platform, judge by whether the app actually recovers, not just a notification or a single client toggle.

When switching from Wi-Fi to mobile data, the device’s address and upstream network mapping may change. Traditional connections may need to be re-established. QUIC offers a path migration mechanism, but it only works with a suitable implementation and network conditions; even if the outer connection survives, the app may time out and fail to recover. Test with a task that’s already working: switch networks and check whether it continues, reconnects automatically or needs to be reopened manually.

Test real workloads before judging battery use

Separate your observations into idle and foreground use. For idle tests, leave the device in the same place on the same type of network, then check system battery records and whether the client reconnected. For foreground tests, run the same task with playback quality, screen settings and background activity held as constant as possible, and note whether the connection restarted. Battery readings are rounded and affected by system activity, so a brief test or one change isn’t a reliable protocol power ranking.

A setup that delivers higher throughput on a desktop but often reconnects on your usual mobile networks may not be the best choice on the go. A practical comparison is whether apps can finish typical tasks without interruptions, whether the device wakes frequently while idle, and how much manual work is needed after a network switch. If changing routes reduces both failures and reconnects, keep that option available. If the issue occurs only in one location, investigate the local access network first.

Direct, relayed and dedicated routes

Direct: no extra relay, but not a route without network hops

Here, direct means the client connects to the server providing the exit, with no additional relay in the service topology. Traffic still crosses access networks, carrier routes and interconnection points. The simpler setup has one fewer proxy-forwarding layer to maintain. When the access carrier has good connectivity to the exit data center, removing a relay can make issues easier to investigate. But if the route between them is congested or indirect, a simpler topology won’t automatically mean lower latency.

When comparing direct routes, first confirm whether the entry and actual exit use the same link arrangement, then consider where the services you need are hosted. An exit close to you may still be far from the destination service; latency to the entry point doesn’t represent the full browsing or remote-work route. If an app slows down after switching exits, use the same client with another reliable destination to check whether the issue affects routes in that region generally or just a particular destination.

Relay: an extra link can sometimes avoid a detour

With a relay, the client connects to an entry point first, which then connects to the remote exit. Consider the route in separate parts: user to entry, entry to exit, and exit to destination service. If the first leg provides convenient local access and the second has better interconnection, the whole route may be faster or steadier than connecting directly to a remote exit. But the relay also has processing and capacity limits. If one segment suddenly queues, low latency on the first leg can’t make up for it.

An extra forwarding point is also another place where problems may occur. For example, the client may consistently reach the entry point while you still time out logging in to a destination, because the probe never checks the route beyond the entry. Keep the access network and app the same, then compare another exit direction or a route with a similar exit. If you can’t see the performance of the later segments, report the app symptoms without treating entry-point metrics as a measure of the entire route.

Dedicated routes: look at which segment they cover, not just the name

A dedicated route describes how a particular segment’s network resources are organized or delivered; it isn’t a replacement for Shadowsocks, Trojan or another proxy protocol. In a network topology, a separately delivered link may connect the entry and exit, but the network from you to the entry and from the exit to the destination still has its own conditions. Even if the middle segment uses a different path from ordinary internet interconnection, that doesn’t solve issues with wireless access or congestion at the exit.

For example, an Ethernet private line can provide a connection between agreed endpoints. Check the contract and delivery scope for the actual service details; don’t infer them from a route name in a client. First confirm whether the description refers to the access segment or the middle segment, then consider whether you care most about latency, variation during sustained use or a particular exit. If the product description doesn’t clarify the topology, treat it as unknown and decide based on how it performs for your tasks.

Use topology to explain results, not replace testing

Start by checking the regions covered on the Global Locations page. P4VPN covers 90+ countries / 150+ routes. Coverage and the current quality of a particular path are different things. Narrow down options by destination region, then check app performance during the hours you actually use them. Don’t choose a route just by comparing straight-line distances on a map: the network path chosen by carriers may not match the shortest distance.

If you need a more consistent exit, first confirm whether the displayed region refers to the exit or the access point, then check again at similar times of day. Choosing a fixed route doesn’t guarantee that its public exit IP will never change, and switching to another node doesn’t guarantee the same exit. If your work relies on IP-based authorization, confirm the requirements and actual service arrangement first, and make sure a backup route will work too. That way, a failure won’t leave you discovering an authorization mismatch at the last minute.

Packet loss, jitter and peak-time congestion

Distinguish delay from data that never arrived

When demand exceeds a link’s capacity, forwarding equipment usually queues data first. Latency may rise even before packets are lost. Once the queue can’t hold all incoming data, some packets may be dropped. Reliable transport then retransmits them and adjusts its sending rate, extending the time the task takes to finish. Real-time apps may discard data that’s no longer useful—for example, voice may skip a short segment rather than wait for old audio before continuing.

Peak time is a period when problems may be easier to reproduce, but it doesn’t identify the bottleneck. Congestion may come from a home uplink, Wi-Fi channel, access carrier interconnection or remote data center. The destination website’s own capacity can also vary with traffic. If a call stutters while a backup is uploading, stop the backup and repeat the same call before changing routes. This helps separate a local queue from a problem farther away.

Separate packet loss from probe responses

Probe packets sent by diagnostic tools aren’t always handled the same way as app traffic. Intermediate routers may rate-limit replies to diagnostic requests or not respond at all while still forwarding subsequent traffic normally. If one hop doesn’t reply but later hops respond consistently, that alone doesn’t indicate a forwarding fault at that hop. Even if the final hop doesn’t respond, consider whether the request completed and whether other similar destinations show the same behavior.

If average latency hasn’t changed but pages occasionally stall or video calls frequently break up, note latency variation and when the anomalies occur in a row. One random missing packet affects an app differently from several consecutive missing packets. The first may recover quickly; the second may drain a player’s buffer or cause you to miss a full segment of conversation. Repeat the same task to investigate issues a brief probe can’t explain.

Trace issues from local access to the exit and destination

First check whether the device is syncing files, installing system updates or competing with other apps for uplink capacity. If possible, compare wired and wireless connections or repeat the task near the access point. If multiple destinations recover, investigate the local environment first. Then keep the access network and destination fixed, switch to another route in the same region and see whether the issue follows. If only one website is affected while other tasks on the same route work, check the app’s message and service announcements before changing exits.

If a page opens normally but video quality keeps dropping after playback starts, focus on sustained throughput and buffering rather than just startup time. Players choose quality based on recent download speed and buffer headroom; a brief speed spike may not prevent a downgrade. See our guide to video quality, bitrate and bandwidth, and test with the same content and resolution settings so you don’t mistake differences in the content itself for a network issue.

Keep useful troubleshooting notes

Note the time, access method, route or exit name, task in progress and which change made the issue go away. Don’t include subscription URLs or full logs containing authentication details. If an issue persists, use these notes to check again at a similar time: report it as a peak-time issue if it only happens then, and don’t describe all connections as slow if only one app is affected. This is more useful than a single speed-test screenshot.

If switching routes only helps briefly each time, try another comparison: close and reopen the app without changing routes. If that also restores service temporarily, the issue may involve the app session, connection reuse or client reconnection—not congestion on every route you try. If repeated checks are inconclusive, keep the setup that best completes your tasks instead of changing settings with no established link to the symptoms.

Low latency to the entry point doesn’t rule out congestion farther along the route. Choose routes by whether they complete the same task and whether the issue consistently follows a particular variable.

Choose a protocol for your use case

Web browsing, developer tools and APIs

For everyday browsing, start with a combination that the client and panel explicitly support, that has matching settings and is easy to restore. For the first connection, check that setup completes smoothly; during continued use, watch for pages that occasionally appear blank. If only a developer tool fails, check whether it uses the system proxy, its own proxy settings or a separate network stack. A working browser only confirms the browser’s requests; it doesn’t verify routing or DNS for another app.

For API calls, repeat the same request to distinguish a connection failure, a timeout after the request was sent and an error response received from the service. If the server returns a quota error, focus on adjusting the request or checking the account—not switching protocols. If the request needs an allowlisted IP, first verify the actual exit. See the developer’s guide to choosing a network route and compare candidate paths with concurrency and timeout settings held constant.

On-demand video, live streams and remote interaction

On-demand video gives the player time to buffer, so check whether the connection can sustain the selected quality. Live streams have tighter timing constraints, while remote control and voice calls need traffic in both directions to arrive promptly. For on-demand video, watch for repeated quality changes. In a meeting, note whether you hear the other person breaking up or they report that your voice is choppy. The latter points to the uplink and helps avoid being misled by download speed tests.

When choosing a protocol, first check whether the client correctly routes the traffic you need, then whether a candidate route maintains service quality during the hours you use it. If a QUIC-based setup connects reliably on your network, compare it with a TCP option using the same task. If it often fails to connect, keep a working fallback rather than risking interruptions for a theoretical protocol advantage. For content availability by region or account permissions, follow the platform’s own rules and messages.

Multiple devices and frequent network changes

P4VPN supports Windows / macOS / iOS / Android / Linux, with no limit on the number of devices that can be online at the same time. That doesn’t mean every device should use the same setup. Choose a configuration that’s been tested over time for a computer you use in one place, and one that’s easier to recover for a device that frequently changes networks. When several devices share the same upstream connection at home, distinguish local network capacity and queueing from the number of online devices allowed by the service.

If a device shows as connected but some of its apps aren’t using the expected route, use the guide to checking your exit IP and DNS to test apps individually. First identify which traffic isn’t being routed through the client, then decide whether to adjust the client mode or that app’s network settings. Other devices working normally doesn’t prove this one is configured correctly.

Set a stopping point for your comparison

You don’t need to test every protocol on the list. Start by defining the task and the failures you can’t accept—for example, a dropped call, having to reopen an app after changing networks or video quality that keeps falling. If a candidate setup completes your tasks on your usual networks and at the times you typically use them, keep it as your default and verify one fallback. When a problem comes up, repeat the same task and check what changed to decide whether a new route is worthwhile or it was just a temporary fluctuation.

Once you’ve confirmed your use case, check the plans page for billing and data allowances. Protocol throughput doesn’t change how billing works; video quality, data transfers and how often you use them are what inform your everyday data needs. To move from an existing configuration, follow the Quick Start Guide to import it and verify the connection first. Then use the comparisons in this guide to choose a route—don’t mistake compatibility issues for speed problems before installation is complete.

Start Free