Click here to Skip to main content
15,881,516 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm developing a VPN application using TUN adapter. Until now, the VPN can read from TUN and I want to encrypt the packets read from TUN and send it to VPNserver, VPNserver then changes the source IP from the packet with VPNserver's IP and send it.


The question is: How to send the packet (array of bytes) to the destination without even to know what's in there or without creating a new socket? (as a raw packet)
Posted

1 solution

One word (acronym)......... NAT....


Configure a network address translation device (handled by the kernel in linux, prob windows too) and be done with it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900