0.0.10 • Published 8 years ago

ipgen v0.0.10

Weekly downloads
1
License
ISC
Repository
github
Last release
8 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

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago