Menu

Post image 1
Post image 2
1 / 2
0

The Story of How I Built a VPN protocol: Part 1

DEV Community·Smile·about 1 month ago
#44yUWUOJ
#first#second#third#client#server#packet
Reading 0:00
15s threshold

🚨🚨🚨 Disclaimer 🚨🚨🚨 This article and the VPN itself are written for educational purposes only . How It All Started I recently switched to Arch. Everything started off well: I installed all the utilities I needed, and then I decided to install the VPN I used to use. And then a problem appeared — it doesn't work on Arch (even as an AppImage). My provider also supported Shadowsocks, but instead of using it, I decided to write my own VPN. For more practice. VPN Protocol My VPN protocol is designed for maximum stealth. In my opinion, one of the most important things here is encryption from the very first packet . In my protocol, this is implemented just like in Shadowsocks — with a pre-shared key. Encryption algorithm: ChaCha20-Poly1305 . It's also worth mentioning that the protocol works over TCP . A random amount of junk bytes is added to each packet for length obfuscation. Packet Structure Each packet has a 5-byte header that is masked as encrypted data using XOR with the first 5 bytes of the key.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More