Git Product home page Git Product logo

node-tuntap's People

Contributors

dagrut avatar fmsy avatar mykiimike avatar rainlake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-tuntap's Issues

write to tun device with ip packet, bad format

i use:
tt.write(packet);
to send ip packet and than use tcp dump to capture the packet:
tcpdump -i tun8
it seems tcp dump can't recognize the packet.
here is my tun device setup:
tt = tuntap({
type: 'tun',
name: 'tun8',
mtu: 1500,
addr: '192.168.100.1',
dest: '192.168.100.2',
mask: '255.255.255.0',
ethtype_comp: 'none',
persist: true,
up: true,
running: true,
});

than i look into the code, and modify the code in
src/tuntap-itf/tuntap-itf-linux.inc.cc
while open the tun device, and add the flag as follows:

109 if(opts.mode == tuntap_itf_opts_t::MODE_TUN)
110 ifr.ifr_flags |= IFF_TUN;
111 else if(opts.mode == tuntap_itf_opts_t::MODE_TAP)
112 ifr.ifr_flags |= IFF_TAP;
113
114 //add by chengen
115 ifr.ifr_flags |= IFF_NO_PI;
116
117 MK_IOCTL(*fd, TUNSETIFF, &ifr)

line 115. and then it works. tcpdump can recognize the packet. is this a bug or i missed something on configuration?

node v4 support?

Hi,

do you think to extends this project to node v4?

The build process fail on node v4 but is working on v0.12.

Bests
Walter

Mac OSX

Would be nice to have Mac OSX support. Currently fails right off the bat with a #include <linux/if.h>.

Examples in readme

Hi,

trying to use this module, but apparently I suck at nodejs and I can't create working tun tunnel.
Could you please add some more code snippets with the example usage?

Thx.

Crash when a ipv4 packet is received

When a ipv4 packet is sent (I reply successfully to ARP), node has a crash:

*** Error in `node': double free or corruption (!prev): 0x000055a74504ab30 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7908b)[0x7f436149208b]
/lib/x86_64-linux-gnu/libc.so.6(+0x826fa)[0x7f436149b6fa]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f436149f12c]
node(_ZN2v88internal18ArrayBufferTracker18FreeDeadInNewSpaceEPNS0_4HeapE+0x13c)[0x55a74266d50c]
node(_ZN2v88internal4Heap8ScavengeEv+0x189b)[0x55a74268e43b]
node(_ZN2v88internal4Heap24PerformGarbageCollectionENS0_16GarbageCollectorENS_15GCCallbackFlagsE+0x119)[0x55a74268ecf9]
node(_ZN2v88internal4Heap14CollectGarbageENS0_16GarbageCollectorENS0_23GarbageCollectionReasonEPKcNS_15GCCallbackFlagsE+0x153)[0x55a74268f7c3]
node(_ZN2v88internal7Factory15NewFillerObjectEibNS0_15AllocationSpaceE+0x7f)[0x55a74263a9cf]
node(_ZN2v88internal26Runtime_AllocateInNewSpaceEiPPNS0_6ObjectEPNS0_7IsolateE+0x78)[0x55a742941bc8]
[0x37977ff843a7]

IPv6

Hi,

What is necessary to support ipv6?

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.