0.0.10 • Published 10 years ago

ipgen v0.0.10

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

NodeJS wrapper arround the steerapi c code, of same name https://github.com/steerapi/ipgen

Instalation

npm install ipgen

How to use?

You can send an json object to the generate method, containing:

require("ipgen").generate({
	host: 'localhost',
	port: '5556',
	bandwidth: 1000, // 1 kbps
	time: 10000 // for how long? in miliseconds
})

Or even supply with a callback!

require("ipgen").generate({
	host: 'localhost',
	port: '5556',
	bandwidth: 1000, // 1 kbps
	time: 10000 // for how long? in miliseconds
}, function(err,succ){
	if (err) throw err;
	console.log("Network flush is over!")
});

For a less verbose output, please, start with silent parameter:

require("ipgen").generate({
	silent: true,
	host: 'localhost',
	port: '5556',
	bandwidth: 1000, // 1 kbps
	time: 10000 // for how long? in miliseconds
}, function(err,succ){
	if (err) throw err;
	console.log("Network flush is over!")
});

You can also specify the source IP address for an execution(Default is 127.0.0.1):

require("ipgen").generate({
	silent: true,
	host: 'localhost',
	port: '5556',
	bandwidth: 1000, // 1 kbps
	time: 10000, // for how long? in miliseconds
	srcIp: '1.1.1.1' // Will generate packages with source ip address like 1.1.1.1
}, function(err,succ){
	if (err) throw err;
	console.log("Network flush is over!")
});

Credits

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago

0.0.0

11 years ago