I want to write a tcp client/server application to create a VPN tunnel.

The idea is I want the client (on windows) to connect to the server (on linux) and it would generate a virtual network connection in windows. Then it would handle all the traffic for that Ip range or ranges (it would need to modify routing tables). The packets would then be encapsulated and sent to the tunnel then on the other end they'd be decapsulated and sent, and vise versa.

how hard would this be to code and what is involved?

Basically I want a simple vpn client/server application. this would be for my own use but I would maybe release it if it turns out decent. I would probably leave out encryption and just use it through SSH tunnel. Been trying to get openvpn working and it's super complicated. there needs an easy to use vpn application out there.