Skip to the content
Veto for Windows is here. Free, with no sign up and no email.
How it worksPricingServersPrivacyGuidesAccountDownload for Windows
Guide 002 ยท How it works

What does a VPN do, and how does it work?

The quick answer

A VPN seals each packet you send, wraps it in a new packet addressed to a VPN server, and lets that server send it on from its own address. On our New York server on 15 November 2026, that took a 148 byte handshake, a 92 byte answer and 30 sealed data packets for one page load.

Each step in the order it happens, using WireGuard, the tunnel Veto runs, with the packet sizes we measured on our own server.

Steps
Keys, handshake, routing, sealing, exit, replies
Tunnel used
WireGuard
Handshake
148 bytes out, 92 bytes back
Added to each packet
32 bytes of WireGuard, inside UDP
Lookups outside the tunnel
0 in our test
Test
One page load, New York server
Last checked
15 November 2026
Guide 002

What a VPN does, in six steps

Every VPN does the same job in the same order. The details below are WireGuard's, which is what Veto uses, and the numbers are from a test on our New York server on 15 November 2026.

  1. Keys are made. Your device and the server each hold a private key and know the other's public key.
  2. They shake hands. Two short messages agree on fresh keys for this session.
  3. Your device routes everything to the tunnel. Every packet, for every site, goes to one virtual network card instead of out to your provider directly.
  4. Each packet is sealed and wrapped. It is encrypted and placed inside a new packet addressed to the VPN server.
  5. The server unwraps it and sends it on. It checks the seal, takes the original packet out and sends it to the site from its own exit address.
  6. Replies come back the same way. The site answers the server, and the server seals the answer and sends it down the tunnel to you.

The sections below take each step in turn, with what we measured.

Step 1: the keys

A WireGuard device has one key pair. The private half never leaves the device. The public half is given to the server, and the server's public key is given to the device. That exchange of public keys is what joins a device to a server.

WireGuard's protocol page names its building blocks exactly: Curve25519 to agree on shared secrets, ChaCha20Poly1305 to seal data, and BLAKE2s to hash. There are no options to pick from. Both ends always use the same fixed set, which removes a whole class of mistakes where two ends agree on something weak.

On Veto, your device's public key is one of the few things the server keeps on disk. It is how the server tells your device from anyone else's. The privacy policy lists it with the rest.

Step 2: the handshake

Before any data moves, the device sends a handshake message and the server answers. In our capture these were the first two packets in the tunnel.

Our own capture on 15 November 2026, on the New York server, over WireGuard.
PacketDirectionSizeWhat it does
Handshake startDevice to server148 bytesProves who the device is and starts agreeing on keys
Handshake answerServer to device92 bytesCompletes the agreement. Both ends now hold the same fresh keys

The keys agreed here are short lived. WireGuard starts a new handshake every few minutes while you stay connected, so a key that leaked later would not open traffic from earlier.

The handshake also holds a defence against floods. A server under load can answer with a small cookie instead of doing the expensive key work, and only continue when the device sends the cookie back. WireGuard's protocol page describes this as a way to fend off attempts to exhaust the server's processor.

Step 3: everything goes to the tunnel

Once connected, the device gains a new network card that exists only in software. On Veto it gets a private tunnel address, such as 10.64.0.2. The device's routing table is changed so that traffic for every address on the internet goes to that card.

This step is what separates a VPN from a browser extension. It covers every app on the device, not just one. It also covers name lookups. In our test the device sent its lookups to the resolver on the Veto server, inside the tunnel, and the count of lookups sent outside the tunnel was 0.

If the tunnel drops and the routing goes back to normal, traffic leaves the ordinary way again. A kill switch is the setting that stops that: it blocks traffic until the tunnel is back.

Step 4: each packet is sealed and wrapped

Your original packet, with its real destination, is encrypted whole. The encrypted packet is then put inside a new UDP packet addressed to the VPN server. From the outside, all anyone sees is the new packet.

Field sizes from the data message on WireGuard's protocol page.
Part of a data packetSizeWhat it holds
Type and reserved bytes4 bytesMarks the packet as data
Receiver index4 bytesTells the server which session the packet belongs to
Counter8 bytesA number that only goes up, so an old packet cannot be replayed
Your packet, encryptedVariesThe original packet, padded, then sealed
Seal16 bytesProves the packet was not changed on the way

So each packet carries 32 bytes of WireGuard on top of your own data, inside an ordinary UDP packet. In our capture the 30 data packets ranged from 96 to 1,452 bytes.

This wrapping is also why a VPN cannot hide that it is running. All 32 packets on the provider's side of our test were UDP, between one pair of addresses, on one port. WireGuard's own list of known limits says it does not focus on disguising this.

Step 5: the server sends it on

At the server, the packet's seal is checked first. A packet with a bad seal is dropped without an answer. A good one is unwrapped, and the original packet comes out.

Its sender is still the private tunnel address, which means nothing on the internet. So the server swaps it for its own exit address, notes the swap, and sends the packet to the site. To the site, the visitor is the server.

On Veto each server has two addresses. Your app connects to the entry address. The site sees the exit address. In our test, every one of the 27 packets on the site's side ran between the exit address and the site, and none carried the device's own address.

This is also where a VPN's rules apply. Before a packet leaves, our server checks it against a short list: no outgoing mail on port 25, no Windows file sharing ports, no private addresses, and a cap on how fast one device opens new connections. The home page explains each.

Step 6: the replies come back

The site answers the exit address. The server looks up the swap it noted, sees that the reply belongs to your device, seals it with your session's keys and sends it down the tunnel. Your device checks the seal, unwraps the reply and hands it to the app that asked.

For the whole round trip, the server has to hold three things about your device in memory: the address you connected from, the time of your last handshake and a count of bytes. Without them it could not send replies back. On Veto these stay in memory and are never written to disk.

One page load, in numbers

Our own test on 15 November 2026, on the New York server. The test device ran in a separate network space on the server itself.
MeasureResult
Page loadedA small public test page of 577 bytes
Packets in the tunnel32: 2 for the handshake, 30 for data
Bytes through the tunnel11,456
Packets between the server and the site27, all from the exit address
Name lookups outside the tunnel0
Packets on the provider's side naming the site0

The page itself was 577 bytes, and the tunnel carried 11,456. The rest was the work of setting up the secure connection to the site, which happens inside the tunnel like everything else, plus the tunnel's own messages.

One page load is a small sample. It shows what each step does. It does not measure speed, and we quote no speed figure until we have measured one from outside.

Questions about how a VPN works

What does a VPN do, in one sentence?

It seals every packet your device sends inside an encrypted wrapper, sends it to a VPN server, and lets that server send it on to the internet as if it were its own.

How does a VPN encrypt data?

With keys that only your device and the server hold. WireGuard, the tunnel Veto uses, agrees on fresh keys in a two message handshake and then seals each packet with ChaCha20Poly1305, which both scrambles the data and lets the other end prove nobody changed it.

Why does a VPN need a handshake?

So both ends can prove who they are and agree on keys that are used for a short time and then thrown away. In our capture the handshake was two packets: 148 bytes from the device and 92 bytes back.

How does the VPN know where to send replies?

Your device sends from a private tunnel address that only the server knows. The server swaps it for its own exit address on the way out, remembers the swap, and reverses it when the reply comes back.

Does a VPN use more data?

A little. Each packet gains a small header and a seal: in WireGuard that is 32 bytes inside the outer packet, plus the outer packet's own header. Loading a 577 byte page moved 11,456 bytes through our tunnel, most of it the secure connection to the site being set up.

Can a VPN work without an app?

Yes. Windows, Android and iPhone all have VPN support built into the system, and a VPN can be set up by hand from the settings. An app does the same set up for you and adds features such as a kill switch.

Is WireGuard safe?

Its design is published in full on its own site, and its code is open to read. Its own documentation lists its known limits, including that it does not try to disguise that a tunnel is running.

Written by VetoVPNVeto is run by Outline Technologies LLC. The figures in this guide come from a packet capture on our own server, and the protocol details from WireGuard's own published pages. Found a mistake? Write to info@vetovpn.com.