6 ms·
Unfortunately it's not that simple. On my system with bridges for hyper-v and wireguard tunnels, the NCSI service happily ignores my default route and tries to
by r1ch 4y ago
Unfortunately it's not that simple. On my system with bridges for hyper-v and wireguard tunnels, the NCSI service happily ignores my default route and tries to establish connectivity through one of the other devices when resuming from sleep.
It wouldn't be that bad if it was just the status indicator, but several apps refuse to work properly if "internet" isn't detected. The workaround is to disable every other adapter in the system until NCSI is happy. I ended up binary patching the connection test service in memory to get it to always return true.
- qwertywert_ 4y agoCan't you disable NCSI in registry? Or does that not actually help for those other services internally?
- picture 4y agoIf you do so, which I have tried, it will just show permanently no internet
- RedShift1 4y agoLol, the developer who wrote it that way is definitely the "want to watch the world burn" type.
- justsomehnguy 4y agoYou configured it wrong - Not Jobs I had my share of troubles with it, but most of the times I found a way to force it work as I need.
- pkulak 4y agoI assume you’ve at least tried one of the other two popular operating systems? I would be desperate to not put up with that kinda thing anymore.
- jeroenhd 4y agoWhy not point NCSI to a host that's always reachable, like a local web server? There's a lot of configuration you can do to the connection check service that won't get your antivirus all anxious (i.e. https://www.ghacks.net/2014/02/07/disable-customize-windows-internet-connection-test-improve-privacy/ https://www.ghacks.net/2014/02/07/disable-customize-windows-...)
- r1ch 4y agoI've tried all of those workarounds, unfortunately none of them worked for me for whatever reason.
- still_grokking 4y ago> I ended up binary patching the connection test service in memory to get it to always return true. Well, this escalated quickly. How is this executed? I would not know how to patch binaries in memory. Is this a common way to fix bugs under Windows so they have tools for that? I'm used to just have the source, so I can recompile if ever needed.
- r1ch 4y agoAlthough there's no source code, Microsoft's public debug symbol information makes it pretty easy to determine where certain functionality lies in most of their binaries. Then you overwrite the opcodes to get the desired functionality - the APIs are pretty simple, OpenProcess, WriteProcessMemory and you're done. The harder part is finding something to signature match or similar so that each time the DLL is re-compiled your patch doesn't break since the offsets have changed.
- dixie_land 4y ago> but several apps refuse to work properly if "internet" isn't detected For me it's very bad code smell when the developers try to check some sort of a global flag ("has internet") instead of just perform the action (eg send http request) and fail gracefully
- gregoryl 4y agoYou can mess around with that description to understand the reasoning. Why maintain code to duplicate functionality that is provided by the OS? Can I be more reliable than Microsoft?
- doodlesdev 4y ago> Can I be more reliable than Microsoft? Absolutely.
- PeterStuer 4y agoUnfortunatly the inverse is also true.
- account42 4y agoThe OP isn't asking those developers to duplicate the functionality but to remove it. It's entirely pointless for most applications and only breaks things when there is something wrong with the connection check itself - you still need to handle connection errors in either case.