How it works: looking inside the unique AdGuard VPN protocol

For years, we were concentrating on developing all flavors of ad blocking apps and browser extensions. And two years ago we resolved to develop our own VPN service, seemingly out of nowhere. When in reality, there were a few reasons that prompted us to do so.

  • AdGuard mobile apps had compatibility issues with VPN apps. That's why we saw the development of an in-house VPN as the only feasible solution that could guarantee compatibility: after we apply some magic, the two apps are able to work together as one VPN service.
  • Secondly, VPN seemed more than relevant to our philosophy and priorities.
  • Finally, during years of developing AdGuard software, we have become experts in filtering network traffic. This was to allow us to bring in something new instead of becoming another wishy-washy VPN.

From the outset, we decided that AdGuard VPN would have one key difference from its competitors — we shall develop and deploy an in-house VPN protocol instead of picking one of the ready-made solutions.

Why go to all that trouble, you could ask. In this article, we'll tell you why we weren't satisfied with existing protocols and created our own, and share our roadmap.

Spoiler: AdGuard VPN protocol is harder to detect and it's quicker than its analogs.

But first we'll need to dig deep into some technical aspects and figure out:

How Internet works

Have no fear: we won't dare to explain the whole Internet here, but we will cover the fundmamentals of how it works. Now, all communication on the Internet is based on transmission of small data "packets" from a computer to a server and back. There are several different types of packets, each serving its purpose. Rules of packet encapsulation and processing are called a protocol.

IP protocol

I'm sure you've heard about the IP address, haven't you? So, IP address is a part of IP protocol — the principal mechanism of the network data transmission. Each packet consists of three parts: data itself, IP addresses of the sender and recipient.

The receiver knows who has sent the packet, and therefore can send some data back. However, the "pure" IP protocol is virtually unused, but two other protocols based on it are used everywhere — TCP and UDP.

TCP protocol

TCP is the main "work horse" of the Internet. When you open a website, it is very likely that TCP is used for data transmission.

A TCP packet consists of four parts:

  • IP packet header, including source and destination addresses.
  • Port numbers of the sender and recipient. This number is needed for the operating system to understand which program to send the packet to for processing.
  • Packet sequence number. Packets may not arrive to the recipient in the order they were sent. Sequence numbers allow the correct sequence to be restored.
  • Packet type. This property is needed to implement "guaranteed delivery," which is discussed below.

Whichever network you use, there's a chance that some sent packets might get lost on their way. TCP protocol ensures that they succeed in reaching the destination: in response to each packet sent, the receiver sends a small TCP packet confirming receipt. If the sender does not obtain confirmation, it will resend the packet until the confirmation is finally received.

UDP protocol

UDP is another known, though less popular, IP-based protocol. Compared to the IP protocol, the only difference is that except for data itself and addresses of the sender and the recipient, it transmits information about port numbers (see the description of port numbers in TCP section) distinguish UDP from IP. As you can see from the animation, data packet flow moves faster than in case of TCP — and no wonder, there is no delivery confirmation in UDP. Unlike TCP, UDP doesn't guarantee anything. But it also does not send extra packets of confirmation, which makes it faster.

How VPN protocols work

When you send a letter or email to someone, you can do without the contents, the header, the signature, but not without the recipient's address. The Internet works the same way — you need an IP address to send data.

When you visit a website, your IP address is visible to it, and knowing the IP address, it's not that difficult to figure out the user's location. A VPN allows your data to be routed through an encrypted connection from your home/workplace or smartphone to another point on the Internet, perhaps in another country, and then onto the public Internet. Like a sneaky rabbit diving into a hole that leads to the exit to the looking glass.

As a result of encryption, your data is assigned an IP address from the other end of the tunnel instead of your home or work address. Now, when you connect to a web server, what it sees is not your home IP address, but someone else's, belonging to the VPN endpoint. Thus, if you go to a website, your data won't be disclosed.

Probably, you already knew that, but a recap wouldn't hurt, right? Now let's actually dig into the technical details. For a VPN to function, it needs to transmit and encrypt data from your device to the VPN server and back. The rules for transmitting and encrypting this data are called a VPN protocol. The most common VPN protocols are OpenVPN, WireGuard and IPSec. They all work roughly the same, and functionally they are very similar, but the devil is in the details (of encryption and connection establishment).

Let's look at how they work. Say you want to visit a website. If you have a VPN enabled, the VPN server mediates between you and the website. Initially, an encrypted IP packet is sent to the server. The VPN server decrypts it, changes the "sender address" (i.e. your IP) and sends the packet to the recipient (i.e. the website). This is usually performed using UDP as a transport as it is generally "faster" since it does not require waiting for confirmation.

Limitations of existing VPN protocols

All popular VPN protocols (OpenVPN, WireGuard, IPSec etc.) are united by two shortcomings:

  • They can be easily detected and blocked on the network level.
  • If you try to "hide" them, the performance will drop.

To "conceal" the use of VPN, the data flow is often "wrapped" in a TCP connection, and sometimes it is additionally encrypted to make the traffic look like a normal website connection. Unfortunately, this approach has a disadvantage – due to the use of TCP, there is a need for additional confirmation of delivery.

So, using any popular VPN protocol, we are always facing a trade-off: fast but easy to detect vs. slow.

What's great about AdGuard VPN protocol

We developed the AdGuard VPN protocol seeing the disadvantages of previous protocols and not willing to deal with them. So what are its strengths?

  • It's nearly impossible to distinguish from normal HTTPS traffic, that is, the connection to the AdGuard VPN server looks exactly the same as the connection to a normal website.
  • For encryption we use HTTPS (TLS), which copes with this task perfectly. It is the most popular encryption method in the world, and the libraries that implement it are constantly audited for security.

Some existing VPN protocols also handle the encryption task, and they (and thus, the fact of using a VPN) are hard to detect. But this usually comes at the price of reduced speed. This is not our case, thanks to several solutions.

  • We use the HTTP/2 transport protocol, which makes it virtually impossible to detect AdGuard VPN protocol while maintaining high speed.
  • Unlike others, AdGuard VPN protocol operates with data and not with packets. This means that AdGuard VPN establishes a separate "tunnel" for each connection, each HTTP/2 stream corresponds to one connection. AdGuard VPN transfers data through this tunnel. This allows us to speed up the operation by saving on confirmation packets, because we can buffer the data of several packets into one before sending it to the VPN server (or from the server to the client). And the fewer packets, the fewer confirmations are needed.

Plans for the future

Switching to HTTP/3 and QUIC

The first thing we intend to do is switch to using the HTTP/3 and QUIC protocols to communicate with the server. HTTP/3 is the latest, most advanced version of HTTP. Unfortunately, the new protocols won't affect speed when the connection is fine and stable, but their benefits will show up when the connection is worse – for example, on mobile devices or when connecting to public Wi-Fi. There are several obvious advantages of the new protocols – they won't cause packet retransmissions and Head of Line Blocking (or HoLB) queues, and they will also allow connection migration. Without being too technical, the main advantage is the already mentioned improvement of connection quality in non-ideal conditions.

TCP and other protocols working over it (TLS, SSL, HTTP /1.1 and HTTP/2) have been around for a while and are great at what they do, but there's just one thing: they need near-perfect conditions to work smoothly. This means that they perform well on a network with a stable and high-quality connection (say, a home Wi-Fi network). But stepping out into the outside world with its mobile networks, you can't safeguard against weak signals, slow connections, and other woes that cause packet loss. These losses lead to the above-mentioned retransmissions and HoLB. Even 5G is not almighty, and the connection will be worse in elevators and long subway sections between stations. With VPN over HTTP/3 the problem is magically solved: the VPN connection won't get broken, even if you go into an elevator, or the network changes for some other reason.

We are currently testing a prototype of this new implementation. Expect it to be ready in a couple of months.

Оpen source

If you've been familiar with AdGuard for a long time, you already know how many of our products are open-source. The concept of open-source software is close to us because we believe that such projects help people and contribute to the development of technology. But our approach is privacy-friendly, so we make products open-source only where possible.

We are going to make our protocol implementation publicly available in the future. Sadly, right now we don't have enough time to prepare the project, because it is a lot of work. But we hope that by the end of this year we can find enough time and publish the code of both the server and client implementations.

Our protocol is used by all AdGuard VPN mobile and desktop applications. Download any of our products (or several ones!) now and use it knowing that your data is protected in the most secure way. And if you wish to, share your impressions with us — in the comments section of the blog post or on social networks.

Bu gönderiyi beğendiniz mi?
AdGuard VPN AdGuard DNS AdGuard Mail AdGuard Wallet
AdGuard VPN AdGuard DNS AdGuard Mail AdGuard Wallet
Windows için AdGuard'ın ana ekranı
Windows için AdGuard'ın koruma özelliklerini ve ayarlarını gösteren koruma ekranı
Windows için AdGuard'ın engellenen reklamların ve izleyicilerin istatistiklerini gösteren İstatistik ekranı
Windows için AdGuard'ın uygulama yönetimi ekranı, cihazda yüklü uygulamalar için koruma yönetimi seçeneklerini göstermektedir
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard: Windows için reklam engelleyici

Windows için AdGuard, bir reklam engelleyiciden daha fazlasıdır. Reklamları engelleyen, tehlikeli sitelere erişimi kontrol eden, sayfanın açılışını hızlandıran ve çocukları uygunsuz içerikten koruyan çok amaçlı bir araçtır
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Microsoft Mağazası
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Windows için AdGuard v8.0, 14 gün deneme süresi
Mac için AdGuard'ın ana ekranı
Mac için AdGuard'ın Gizlilik Modu ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard: Mac için reklam engelleyici

Mac için AdGuard, macOS düşünülerek tasarlanmış benzersiz bir reklam engelleyicidir. Sizi tarayıcılar ve uygulamalardaki rahatsız edici reklamlardan korumanın yanı sıra, izleme, kimlik avı ve dolandırıcılıktan da korur
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
Mac için AdGuard v2.19, 14 gün deneme süresi
Android için AdGuard'ın ana ekranı
Android için AdGuard'ın İzleme koruması ekranı
Android için AdGuard'ın uygulama yönetimi ekranı, cihazda yüklü uygulamalar için koruma yönetimi seçeneklerini göstermektedir
Android için AdGuard'ın engellenen reklamların ve izleyicilerin istatistiklerini gösteren İstatistik ekranı
Android için AdGuard'ın özel tarayıcısının ana ekranı
Android için AdGuard'ı indirme QR kodu
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard: Android için reklam engelleyici

Tüm tarayıcılarda, oyunlarda ve diğer uygulamalarda reklamları ve izleyicileri engeller. Gizliliğinizi korur ve uygulamalarınızın interneti nasıl kullandığını kontrol etmenizi sağlar. APK aracılığıyla yüklenir
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
İndirmek için tara
Cihazınızda bulunan herhangi bir QR kod okuyucuyu kullanın
Android için AdGuard v4.14, 14 gün deneme süresi
iOS için AdGuard'ın ana ekranı
iOS için AdGuard'ın koruma özelliklerini ve ayarlarını gösteren koruma ekranı
iOS için AdGuard'ın engellenen reklamların ve izleyicilerin istatistiklerini gösteren İstatistik ekranı
iOS için AdGuard'ı indirme QR kodu
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard: iOS için reklam engelleyici

iPhone ve iPad için en iyi iOS reklam engelleyici. AdGuard, Safari'de her türlü reklamı ve izleyiciyi ortadan kaldırır ve DNS düzeyinde tüm uygulamalarda gizliliğinizi korur
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
İndirmek için tara
Cihazınızda bulunan herhangi bir QR kod okuyucuyu kullanın
iOS için AdGuard v4.5
AdGuard İçerik Engelleyicinin ana ekranı
AdGuard İçerik Engelleyicinin Filtreler ekranı
AdGuard İçerik Engelleyicinin Ayarlar ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard İçerik Engelleyici

AdGuard Content Blocker, içerik engelleme teknolojisini destekleyen mobil tarayıcılarda her türlü reklamı ortadan kaldırır — örneğin, Samsung Internet ve Yandex Browser. Android için AdGuard'a kıyasla özellikleri sınırlıdır, ancak ücretsiz, yüklemesi kolay ve etkilidir
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
AdGuard İçerik Engelleyici v2.8
AdGuard Tarayıcı Uzantısı'nın ana ekranı
AdGuard Tarayıcı Uzantısı'nın İzleme koruması ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Tarayıcı Uzantısı

AdGuard, tüm web sayfalarındaki tüm reklam türlerini etkili bir şekilde engelleyen en hızlı ve en hafif reklam engelleme uzantısıdır! Kullandığınız tarayıcı için AdGuard'ı seçin ve reklamsız, hızlı ve güvenli gezinmenin tadını çıkarın.
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
AdGuard Tarayıcı Uzantısı v5.5
AdGuard Asistanın ana ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Asistanı

AdGuard masaüstü uygulamaları için bir yardımcı tarayıcı uzantısıdır. Bu uzantı, sitelerde özel öğeleri engellemenize, siteleri izin listesine eklemenize ve tarayıcınızdan doğrudan bildirimler göndermenize izin verir
AdGuard Asistanı v1.4
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Home

AdGuard Home, reklamları ve izleyicileri engellemek için ağ tabanlı bir çözümdür. Ev ağınızdaki tüm cihazları kapsaması için yönlendiricinize bir kez kurun — ek istemci yazılımı gerekmez. Bu özellikle gizliliğinize tehdit oluşturan çeşitli IoT cihazları için önemlidir
AdGuard Home v0.107
iOS için AdGuard Pro'nun ana ekranı
iOS için AdGuard Pro'nun koruma özelliklerini ve ayarlarını gösteren Koruma ekranı
iOS için AdGuard Pro'nun İstatistikler ekranı, engellenen reklamlar ve izleyicilere ilişkin istatistikleri gösterir
21.373 21373 kullanıcı incelemesi
Mükemmel!

iOS için AdGuard Pro

AdGuard Pro for iOS, tüm gelişmiş reklam engelleme koruma özellikleri etkin olarak gelir. iOS için ücretli AdGuard sürümüyle aynı araçları sunar. Safari'de reklamları engellemede mükemmeldir ve korumanızı özelleştirmeniz için DNS ayarlarını kişiselleştirmenize olanak tanır. Tarayıcılar ve uygulamalarda reklamları engeller, çocuklarınızı uygunsuz içeriklerden korur ve kişisel verilerinizi güvenli tutar
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
iOS için AdGuard Pro v4.5
Mac için AdGuard Mini'nin ana ekranı
Mac için AdGuard Mini'nin Safari koruma ekranı
Mac için AdGuard Mini'nin kural oluşturma ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Mini for Mac — Safari reklam engelleyici

Mac için AdGuard Mini, güçlü bir Safari reklam engelleyicisidir. Bu hafif uygulama reklamları kaldırır, izleyicileri engeller ve sayfa yüklemeyi hızlandırır. Safari'de Web'de dikkatiniz dağılmadan gezinmenize ve verilerinizi gizli tutmanıza yardımcı olur
Yükle
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
Mac için AdGuard Mini v2.3
Android TV için AdGuard'ın korumanın etkin olduğu ana ekranı
Android TV için AdGuard'ın özelliklerini ve ayarlarını gösteren Reklam Engelleme ekranı
Android TV için AdGuard'ın ayarlar ekranı
Android TV için AdGuard'ın reklamların ve izleyicilerin engellendiği uygulamaları gösteren Uygulama Yönetimi ekranı
21.373 21373 kullanıcı incelemesi
Mükemmel!

Android TV için AdGuard

Android TV için AdGuard, reklamları engelleyen, gizliliğinizi koruyan ve Akıllı TV'niz için bir güvenlik duvarı görevi gören tek uygulamadır. Web tehditleri hakkında uyarılar alın, güvenli DNS kullanın ve şifrelenmiş trafikten yararlanın. Birinci sınıf güvenlik; sıfır reklam ile rahatlayın ve en sevdiğiniz programlara dalın!
Android TV için AdGuard v4.14, 14 gün deneme süresi
Linux penguenini tutan AdGuard maskotu Agnar
21.373 21373 kullanıcı incelemesi
Mükemmel!

Linux için AdGuard

Linux için AdGuard, dünyanın ilk sistem genelinde Linux reklam engelleyicisidir. Reklamları ve izleyicileri cihaz düzeyinde engelleyin, önceden yüklenmiş filtrelerden seçim yapın veya kendi filtrenizi ekleyin — tüm bunları komut satırı arayüzü aracılığıyla gerçekleştirin
Linux için AdGuard v1.4
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Temp Mail

Sizi anonim tutan ve gizliliğinizi koruyan ücretsiz bir geçici e-posta adresi oluşturucu. Ana gelen kutunuzda istenmeyen posta olmaz!
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard VPN

Dünya çapında 75 konum

Herhangi bir içeriğe erişim

Güçlü şifreleme

Günlük tutmama politikası

En hızlı bağlantı

7/24 destek

Ücretsiz dene
Programı indirerek Lisans sözleşmesi şartlarını kabul etmiş olursunuz
Devamını oku
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard DNS

AdGuard DNS, herhangi bir uygulamanın yüklenmesini gerektirmeyen internet reklamlarını engellemenin kusursuz bir yoludur. Kullanımı kolay, tamamen ücretsizdir, herhangi bir cihazda kolayca ayarlanır ve reklamları, sayaçları, kötü amaçlı siteleri ve yetişkinlere yönelik içeriği engellemek için gerekli minimum işlevleri sağlar.
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Mail

Kimliğinizi koruyun, istenmeyen postadan kaçının; gelen kutunuzu takma adlarımız ve geçici e-posta adreslerimizle güvende tutun. Tüm işletim sistemleri için ücretsiz e-posta yönlendirme hizmetimizin ve uygulamalarımızın keyfini çıkarın
21.373 21373 kullanıcı incelemesi
Mükemmel!

AdGuard Wallet

Varlıklarınız üzerinde tam kontrol sağlayan güvenli ve özel bir kripto cüzdanı. Birden fazla cüzdanı yönetin ve saklamak, göndermek ve takas etmek için binlerce kripto para birimini keşfedin
AdGuard indiriliyor AdGuard'ı kurmak için okla gösterilen dosyaya tıklayın "Aç" öğesini seçin ve "Tamam" öğesine tıklayın, ardından dosyanın indirilmesini bekleyin. Açılan pencerede AdGuard simgesini "Uygulamalar" klasörüne sürükleyin. AdGuard'ı seçtiğiniz için teşekkür ederiz! "Aç" öğesini seçin ve "Tamam" öğesine tıklayın, ardından dosyanın indirilmesini bekleyin. Açılan pencerede "Kur" öğesine tıklayın. AdGuard'ı seçtiğiniz için teşekkür ederiz!
AdGuard'ı mobil cihazınıza yükleyin