随笔分类 - 开发Vtun源码分析
基于虚拟网卡的VPN源码分析
摘要:在tun_dev.c中定义: int tun_write(int fd, char *buf, int len){ return write(fd, buf, len);} int tun_read(int fd, char *buf, int len){ return read(fd, buf, len);}
阅读全文
摘要:一般步骤: #gcc –g test.c #l #break <行号> #r #n 要用gdb调试,在编译时要加-g选项。 如: #gcc –g test.c #gdb a.out 运行时要加入参数: 进入gdb后输入(gdb)run 参数1 参数2 ….即可 对应vtun即 #gdb vtund (gdb)r server [vtun服务器地址]
阅读全文
摘要:#gdb vtund (gdb)break 57 (gdb)r (gdb)n … vtund[4904]: Unknown option 'pass' line 12vtund[4904]: No hosts defined 原因:默认读/usr/local/etc/vtund.conf,此文件中的12行pass应该为passwd, 解决:将配置成功的的文件替换默认读的文件
阅读全文
摘要:3.0.3 双系统 #./configure –-disable-lzo #make install vm安装提示找不到strip 解决方法:cp /usr/bin/strip /usr/local/bin vm安装3.0.1同上
阅读全文
摘要:一、客户端 options{port5000;#Listenonthisport.ppp/usr/sbin/pppd;ifconfig/sbin/ifconfig;route/sbin/route;firewall/sbin/iptables;}server{passwdMa&^TU;#Passwordkeepaliveyes;#Keepconnectionalivetypetun;protoud...
阅读全文
摘要:前期配置http://bbs.chinaunix.net/thread-3768139-1-1.html 1、根据文章http://blog.csdn.net/wangxing1018/article/details/3349557 里有这么一段话 “ 当然了,如果还想访问服务器的内网,可可以再添加路由项如下: route "add -net 192.168.0.0 netmask 25...
阅读全文

浙公网安备 33010602011771号