Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on.destination is not triggered #7

Open
cjrobbertse opened this issue Jul 23, 2020 · 2 comments · May be fixed by #20
Open

on.destination is not triggered #7

cjrobbertse opened this issue Jul 23, 2020 · 2 comments · May be fixed by #20

Comments

@cjrobbertse
Copy link

I have this:

const Traceroute = require('nodejs-traceroute');

try {
    const tracer = new Traceroute();
    tracer
        .on('pid', (pid) => {
            console.log(`pid: ${pid}`);
        })
        .on('destination', (destination) => {
            console.log(`destination: ${destination}`);
        })
        .on('hop', (hop) => {
            console.log(`hop: ${JSON.stringify(hop)}`);
        })
        .on('close', (code) => {
            console.log(`close: code ${code}`);
        });

    tracer.trace('www.google.com');
} catch (ex) {
    console.log(ex);
}

My output:

pid: 29895
hop: {"hop":1,"ip":"192.168.1.254","rtt1":"4.481 ms"}
hop: {"hop":2,"ip":"*","rtt1":"*"}
hop: {"hop":3,"ip":"*","rtt1":"*"}
hop: {"hop":4,"ip":"31.55.185.184","rtt1":"29.203 ms"}
hop: {"hop":5,"ip":"195.99.127.146","rtt1":"32.910 ms"}
hop: {"hop":6,"ip":"109.159.252.158","rtt1":"63.543 ms"}
hop: {"hop":7,"ip":"109.159.253.69","rtt1":"31.889 ms"}
hop: {"hop":8,"ip":"*","rtt1":"*"}
hop: {"hop":9,"ip":"172.253.71.200","rtt1":"28.291 ms"}
hop: {"hop":10,"ip":"108.170.246.144","rtt1":"26.056 ms"}
hop: {"hop":11,"ip":"172.217.169.36","rtt1":"30.695 ms"}
close: code 0

there is no destination logged to the console. What is wrong?

@chenxiaoyao6228
Copy link

have the same issue

@alls7554
Copy link

I have the same issue on MacOS, but if you use windowsOS, you can see destination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants