I wrote a little gem for this....nothing for proxies but handy for checking
the domain / port availability...fork away

http://github.com/beilabs/netchecker

Jonathan

2009/11/23 Korny Sietsma <[email protected]>

> Also, if there's a risk of running inside a corporate network, you may
> well have an authenticating proxy to go through - so merely opening a
> connection to google.com might not be enough, you might need to check
> for 'http_proxy' environment variables, or platform-specific proxy
> settings, or prompt the user - which defeats the purpose of the
> automated check.
>
> I suspect that in these cases you often *won't* be able to
> automatically check for internet existence - so whatever your app
> does, you should give the user some way to override it and say "yes, I
> *do* have teh internets, but you need to access it via
> http://proxy.evilcorp.com:666 with username 'fred' and password
> 'fredNov2009'*"
>
> And, of course, your user may well have *partial* internet access -
> they might have google.com but have firewall rules blocking gmail.com.
>  So I'm with Mark, check what they *need* to access.  And allow them
> to override your check!
>
> - Korny (all too familiar with loading apps that fail, as they don't
> work with proxies)
> * of course any big corporate will 'secure' their network by forcing
> monthly password changes, resulting in lots of passwords based on the
> date.  :)
>
> On Fri, Nov 20, 2009 at 5:12 PM, Joshua Partogi
> <[email protected]> wrote:
> > Not really.The Rails app might be in an intranet server, but there's a
> > possibility that the intranet server can not connect to the internet.
> > So user would still be able to access the app locally, but the app
> > might not be able to access the internet.
> >
> > On Fri, Nov 20, 2009 at 4:17 PM, Mark Ryall <[email protected]>
> wrote:
> >> Wouldn't it be easier and more sensible to attempt what you actually
> >> want to do and handle failures appropriately?
> >>
> >> Whether you can ping google is irrelevant if the remote host you need is
> down.
> >
> >
> > --
> > Certified Scrum Master
> > http://blog.scrum8.com | http://jobs.scrum8.com |
> http://twitter.com/scrum8
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<rails-oceania%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=.
> >
> >
> >
>
>
>
> --
> Kornelis Sietsma  korny at my surname dot com
> kornys on twitter/fb/gtalk/gwave www.sietsma.com/korny
> "Every jumbled pile of person has a thinking part
> that wonders what the part that isn't thinking
> isn't thinking of"
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rails-oceania%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=.


Reply via email to