Coder Social home page Coder Social logo

simple-vpn-demo's Issues

Server Software

What protocol does this server use? This server is not support multiple connections. Are there any ready server software that can provide this?

Crashes after a while

Terminal log:

write tun_fd error: Invalid argument
Execute iptables -t nat -D POSTROUTING -s 10.8.0.0/16 ! -d 10.8.0.0/16 -m comment --comment 'vpndemo' -j MASQUERADE
Execute iptables -D FORWARD -s 10.8.0.0/16 -m state --state RELATED,ESTABLISHED -j ACCEPT
Execute iptables -D FORWARD -d 10.8.0.0/16 -j ACCEPT

FD_ISSET(tun_fd, &readset) always returns false

我把这个demo deploy到本地的一个linux机器一切正常,然后我尝试把这个跑在阿里云,udp打开相关端口,但是手机端连上去以后,server 输出只有:

Writing to tun 59 bytes ...
Writing to tun 60 bytes ...
Writing to tun 81 bytes ...
Writing to tun 57 bytes ...
Writing to tun 58 bytes ...
Writing to tun 58 bytes ...
Writing to tun 71 bytes ...
Writing to tun 71 bytes ...
Writing to tun 71 bytes ...

似乎tun_fd永远没被set,请问有什么debug的想法吗

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

never actually connects

I'm having connection problem.
I set it up on DigitalOcean. But I never got a VPN connection.
What should I be server ip ? digitalocean server ip ?

ekran resmi 2017-04-30 21 19 22

img_2055

can't visit webside as google

can't visit webside as google
i make it . server and client in two linux host;
it can send udp package.
but client can't visit google webside by server

fatal error: 'linux/if_tun.h'

I am trying to compile it on macOS Sierra and getting the following error.

gcc -o vpn vpn.c -g -Wall
vpn.c:14:10: fatal error: 'linux/if_tun.h' file not found
#include <linux/if_tun.h>
^
1 error generated.
make: *** [vpn] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.