Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpond committed Nov 15, 2019
1 parent 1688107 commit e2b54f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Binary file modified chrome_elf.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/BlockTheSpot.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<ExceptionHandling>false</ExceptionHandling>
<ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
6 changes: 5 additions & 1 deletion src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

extern bool g_UseAdGuard;
extern bool g_Log;
extern bool g_Skip_wpad;

extern std::ofstream Log_DNS;
extern std::ofstream Log_GetAddr;
extern std::ofstream Log_WinHttp;
Expand All @@ -20,7 +22,9 @@ BOOL APIENTRY DllMain (HMODULE hModule,
g_UseAdGuard = true;
if (GetPrivateProfileIntA ("Config", "Log", 0, "./config.ini") == 1)
g_Log = true;

if (GetPrivateProfileIntA ("Config", "Skip_wpad", 0, "./config.ini") == 1)
g_Skip_wpad = true;

if (g_Log) {
Log_DNS.open ("log_dnsquery.txt",
std::ios::out | std::ios::app);
Expand Down
4 changes: 2 additions & 2 deletions src/hosts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

bool g_UseAdGuard = true;
bool g_Log = false;
bool openLog = false;
bool g_Skip_wpad = false;

std::ofstream Log_DNS;
std::ofstream Log_GetAddr;
Expand Down Expand Up @@ -79,7 +79,7 @@ int WINAPI getaddrinfohook (DWORD RetAddr,

if (nodename == NULL) return ret;
// Web Proxy Auto-Discovery (WPAD)
if (_stricmp (nodename, "wpad") == 0) return ret; // experimental
if (_stricmp (nodename, "wpad") == 0) return g_Skip_wpad ? WSANO_RECOVERY : ret; // experimental
// change to WSANO_RECOVERY if you want to mess with proxy.

// issue free here, in the case that
Expand Down

0 comments on commit e2b54f2

Please sign in to comment.