0

I'm trying to connect to my Firebase backend, however, due to the proxy server on my campus, I'm unable to do so. Is there a workaround for this? The app is able to connect on 3G or my home network, but fails on campus.

I'm trying to use the following code to set proxy but it's not working.

System.setProperty("http.proxyHost", "10.2.20.17");
System.setProperty("http.proxyPort", "8080");
Rafay
  • 23,785
  • 4
  • 20
  • 27

1 Answers1

0

If you can connect from other locations, it is definitely a firewall issue. Port 8080 may be blocked in your campus; if possible, use a proxy with port 80, 443 (these are usually open).

If you cannot find a direct proxy with 80 or 443 (https) to your backend, then use a custom mediator proxy with 80, 443 that connects to your desired 8080 proxy :)

Kostas Kryptos
  • 4,081
  • 2
  • 23
  • 24
  • I'm a bit new to this, could you please elaborate what do mean by "port 8080 may be blocked" when this is how we set the proxy: http://i.stack.imgur.com/sxSmP.jpg How would I go about obtaining a mediator proxy? – Rafay Dec 24 '14 at 11:10
  • Need a clarification on this. I understand that you are you able to connect with your code when you are outside from your campus, but not when you are in your campus? am I right? – Kostas Kryptos Dec 24 '14 at 11:14
  • What about the browser? is it able to connect (inside your campus) with your 8080 proxy? – Kostas Kryptos Dec 24 '14 at 11:16
  • Yeah, the browser is able to connect as well as some apps like Snapchat while some (WhatsApp, Instagram) cannot. – Rafay Dec 24 '14 at 11:17
  • so, maybe they block certain domains/IPs (Snapchat is not in their list, while the others are). Which domain are you trying to connect to, can you access this domain from your browser? – Kostas Kryptos Dec 24 '14 at 11:22
  • Firebase connections are made using a custom URL like "https://.firebaseio.com". It's highly unlikely that they block that. I'm able to open that URL in my browser, however, it fails to connect using Android SDK. – Rafay Dec 24 '14 at 11:25
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/67611/discussion-between-konstantinos-chalkias-and-rafay). – Kostas Kryptos Dec 24 '14 at 11:29