Oh, you said this was an electron app. There's a DOM event for network connectivity: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/Online_and_offline_events
I just tested this with my own electron app and it works. I'm not sure what it's doing under the hood, but without knowing what your proxy is doing, bypassing it will be a challenge. > navigator.onLine true [turn off wifi] > navigator.onLine false Easy! But I'm not behind a proxy... Mikkel https://www.oblivious.io/ <https://www.oblivious.io/r=googlenodejs> On Wednesday, May 2, 2018 at 9:54:36 AM UTC-7, [email protected] wrote: > > Okay maybe it's not the best module . Do you know a better one? Or do you > have a idea how to check it? > I only want to check if there is a internet connection available. > > It's the proxy of my company. So I think only save ports are allowed and > the other ones are blocked. But I'm not sure which ports are allowed. > > Martin > > > > Am Montag, 30. April 2018 21:42:46 UTC+2 schrieb Mikkel Wilson: >> >> This module is just doing a DNS query. >> https://github.com/ourcodeworld/internet-available/blob/master/internet-available.js#L25 >> >> What is your proxy doing that is blocking port 53? >> >> Mikkel >> https://www.oblivious.io/ <https://www.oblivious.io/?r=googlenodejs> >> >> >> On Monday, April 30, 2018 at 8:43:10 AM UTC-7, [email protected] >> wrote: >>> >>> Hey, >>> >>> I would like to develop a tool (angular-electron-app) which checks if an >>> internet connection exists or not and this behind a proxy. >>> >>> So first I tried this module >>> https://www.npmjs.com/package/internet-available . >>> But it does not work because I'm behind a proxy. >>> >>> So now I need a module or a solution to check the internet connection >>> through my proxy. >>> >>> Any ideas? >>> >>> >>> Thank's for help! >>> >>> >>> Martin >>> >>> >>> -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/dbbba579-d02e-4101-969e-b163c373a9ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
