'how to tunnel all my network traffic to vpn server

I'm trying to write a VPN model with client and server and I came across the problem of tunneling all the packets which are meant to go to the internet to my server. In the beginning, I tried to use TUN/TAP device but I didn't succeed to configure my routing table properly, so now I'm trying to use SSH tunneling. I would very much appreciate any help or examples of how to do this with sshtunnel library if it's impossible at all. I know my English is not very good but I hope you understood my intention. Thank you in advance

P.S - My operating system is Windows 10



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source