Skip to content

Commit

Permalink
Flush dns after hosts modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Xzandro committed Feb 11, 2024
1 parent 6093dd2 commit fc150d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/proxy/SWProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Proxy = require('http-mitm-proxy');
const { differenceInMonths } = require('date-fns');
const storage = require('electron-json-storage');
const { addHostsEntries, removeHostsEntries } = require('electron-hostile');
const { exec } = require('child_process');

const { decrypt_request, decrypt_response } = require('./smon_decryptor');

Expand Down Expand Up @@ -55,6 +56,7 @@ class SWProxy extends EventEmitter {
}),
{ name: 'SWEX' }
);
exec('ipconfig /flushdns');

const proxyHost = '127.0.0.1';
const proxyPort = port;
Expand Down Expand Up @@ -255,6 +257,8 @@ class SWProxy extends EventEmitter {
}),
{ name: 'SWEX' }
);

exec('ipconfig /flushdns');
}

getInterfaces() {
Expand Down

0 comments on commit fc150d2

Please sign in to comment.