How to create a vpn client (part 1 ) packet cache

I will directly jump to code I ran it in wsl , so good to say that it will work for linux.