For developersHere you can find few examples how to programatically control the traffic using NetLimiter 2 API. More information will be available soon on our forums.
Example 1: How to set limitThe following code sample shows how to switch on download limit for Internet Explorer. The size of the limit is set to 1024 Bytes. JavaScript: How to switch on the limit
var vc = new ActiveXObject("NetLimiter.VirtualClient");
vc.Connect("localhost"/*addr*/, ""/*port or pipe*/);
var newRuleId = vc.SetRule(
"C:\\Program Files\\Internet Explorer\\iexplore.exe",
"limit",// rule type
"in", // for download (incoming)
"Internet",// zone
true, // rule is enabled
"1024", // 1024 Bytes
"");
And the following code sample switches off the limit. JavaScript: How to switch off the limit
var vc = new ActiveXObject("NetLimiter.VirtualClient");
vc.Connect("localhost"/*addr*/, ""/*port or pipe*/);
var newRuleId = vc.SetRule(
"C:\\Program Files\\Internet Explorer\\iexplore.exe",
"limit",// rule type
"in", // for download (incoming)
"Internet",// zone
false, // rule is disabled
"1024", // 1024 Bytes
"");
Example 2: Firewall rulesThe following sample shows how to deny Internet Explorer to connect to the Internet zone. JavaScript: How to deny outgoing connections
var vc = new ActiveXObject("NetLimiter.VirtualClient");
vc.Connect("localhost"/*addr*/, ""/*port or pipe*/);
var newRuleId = vc.SetRule(
"C:\\Program Files\\Internet Explorer\\iexplore.exe",
"fw",// rule type
"out", // outgoing
"Internet",// zone
true, // rule is enabled
"deny", // deny
"");
The following sample shows how to allow Internet Explorer to connect to the Internet zone. JavaScript: How to allow outgoing connections
var vc = new ActiveXObject("NetLimiter.VirtualClient");
vc.Connect("localhost"/*addr*/, ""/*port or pipe*/);
var newRuleId = vc.SetRule(
"C:\\Program Files\\Internet Explorer\\iexplore.exe",
"fw",// rule type
"out", // outgoing
"Internet",// zone
true, // rule is enabled
"allow", // allow
"");
|
|