Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Srar committed May 23, 2018
2 parents 0a1d3e9 + f696243 commit cc4ac1f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ async function main() {
if (!TAPControl.checkAdapterIsInstalled()) {
console.log("Installing driver...");
const result = TAPControl.installAdapter(path.join(process.cwd(), "driver/tapinstall.exe"));
if(result !== 0) {
if (result !== 0) {
console.error(`Driver was not successfully installed. Exit code: ${result}.`);
if(result === 2) {
if (result === 2) {
console.log(`Please run as administrator.`);
}
process.exit(-1);
Expand Down Expand Up @@ -192,7 +192,10 @@ async function main() {

if (argv.disablev6 === "true") {
console.log("IPv6 has been disabled.");
initCommands.push(["netsh", "interface", "ipv6", "set", "int", tapInfo.index.toString(), "advertise=enable", "managed=enable"]);
initCommands.push(
["netsh", "int", "ipv6", "delete", "route", "::/0", `interface=${tapInfo.index}`, `nexthop=${DeviceConfiguration.GATEWAY_IPV6_ADDRESS}`],
["netsh", "int", "ipv6", "delete", "address", `interface=${tapInfo.index}`, `address=${DeviceConfiguration.LOCAL_IPV6_ADDRESS}`]
);
} else {
initCommands.push(
["netsh", "interface", "ipv6", "set", "address", `interface=${tapInfo.index}`, `address=${DeviceConfiguration.LOCAL_IPV6_ADDRESS}`],
Expand Down

0 comments on commit cc4ac1f

Please sign in to comment.