simple-vpn-demo
simple-vpn-demo copied to clipboard
tcp
hello, i want to run this on tcp instead of udp.
I understand that it is slower but nonetheless i want to do it
i replaced all udp and UDP text in the vpn.c file with tcp or TCP but now on run i get this:
gcc -o vpn vpn.c -g -Wall vpn.c: In function ‘tcp_bind’: vpn.c:142:23: error: ‘IPPROTO_tcp’ undeclared (first use in this function) hints.ai_protocol = IPPROTO_tcp; ^ vpn.c:142:23: note: each undeclared identifier is reported only once for each function it appears in Makefile:2: recipe for target 'vpn' failed make: *** [vpn] Error 1
I want to use tcp because i cannot figure out how to get the app to pick from a list of ip's (servers)
so instead i have a load balancer that will round robin the servers.
but it only work on tcp
Oh, you can't simply replace udp to tcp in source code. Google UNIX Network Programming, read about it, then change the code accordingly.
On 2 June 2018 at 04:21, MrBenFTW [email protected] wrote:
I want to use tcp because i cannot figure out how to get the app to pick from a list of ip's (servers)
so instead i have a load balancer that will round robin the servers.
but it only work on tcp
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lxdcn/simple-vpn-demo/issues/9#issuecomment-393932373, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkQ8aoSv0h4-3rRqMNDPZy7ejWu11Zkks5t4WoHgaJpZM4UW973 .