Last Comment Bug 807659 - B2G 3G: Support HTTPS proxy
: B2G 3G: Support HTTPS proxy
Status: RESOLVED FIXED
: b2g-testdriver, unagi
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: x86_64 Gonk (Firefox OS)
: -- normal (vote)
: mozilla20
Assigned To: Stefan Arentz [:st3fan]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-01 07:50 PDT by Hubert Figuiere [:hub]
Modified: 2013-05-06 04:53 PDT (History)
17 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
fixed
fixed
fixed


Attachments
Bug 807659 - Set proxy from APN for https. (1.07 KB, patch)
2012-11-28 20:14 PST, Hubert Figuiere [:hub]
no flags Details | Diff | Splinter Review
Bug 807659 - Also configure HTTPS proxy from APN settings. r= (1.97 KB, patch)
2012-11-30 18:46 PST, Stefan Arentz [:st3fan]
philipp: review+
Details | Diff | Splinter Review
687342: Bug 807659 - Also configure HTTPS proxy from APN settings. r=philikon (1.98 KB, patch)
2012-12-03 12:11 PST, Stefan Arentz [:st3fan]
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Hubert Figuiere [:hub] 2012-11-01 07:50:37 PDT
https does not work if APN requires proxy

I use Speakout wireless (see bug 807312)

http works through the proxy. https seems to be like other protocol and not routed through the proxy. This make things like twitter or other sites that require https not work at all. I can't dogfood.
Comment 1 Hubert Figuiere [:hub] 2012-11-21 13:22:16 PST
in short, no twitter, no facebook (like if I care), nor anything requiring https. Works fine from Fennec on Android with the same carrier / APN settings (Nightly only)
Comment 2 Stefan Arentz [:st3fan] 2012-11-28 19:09:57 PST
Same with Petro Canada Mobility. Requires a proxy and does not work with HTTPS currently.
Comment 3 Stefan Arentz [:st3fan] 2012-11-28 20:12:42 PST
This should fix it.

diff --git a/dom/system/gonk/NetworkManager.js b/dom/system/gonk/NetworkManager.js
index a5e7869..30a9aa9 100644
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -449,8 +449,10 @@ NetworkManager.prototype = {
      // Do not use this proxy server for all protocols.
      Services.prefs.setBoolPref("network.proxy.share_proxy_settings", false);
      Services.prefs.setCharPref("network.proxy.http", this.active.httpProxyHost);
+      Services.prefs.setCharPref("network.proxy.ssl", this.active.httpProxyHost);
      let port = this.active.httpProxyPort == "" ? 8080 : this.active.httpProxyPort;
      Services.prefs.setIntPref("network.proxy.http_port", port);
+      Services.prefs.setIntPref("network.proxy.ssl_port", port);
    } catch (ex) {
       debug("Exception " + ex + ". Unable to set proxy setting for "
             + this.active.name + " network interface.");
Comment 4 Hubert Figuiere [:hub] 2012-11-28 20:14:23 PST
Created attachment 686418 [details] [diff] [review]
Bug 807659 - Set proxy from APN for https.

Proposed patch by sarentz
Comment 5 Stefan Arentz [:st3fan] 2012-11-28 20:38:09 PST
I manually applied the above patch to my 2012-11-28 build by patching /system/b2g/omni.ja

I can now load HTTPS sites in the browser and also use applications that use HTTPS (like for example the Market Place)

This would be great to have for testers.

 S.
Comment 6 Mike Conley (:mconley) 2012-11-29 06:44:05 PST
So who should we set to review this?
Comment 7 Hubert Figuiere [:hub] 2012-11-29 07:20:01 PST
wait for an updated patch. It is coming soon. I'll get things moving.
Comment 8 Stefan Arentz [:st3fan] 2012-11-30 18:46:55 PST
Created attachment 687342 [details] [diff] [review]
Bug 807659 - Also configure HTTPS proxy from APN settings. r=
Comment 9 Hubert Figuiere [:hub] 2012-11-30 18:53:09 PST
Right now bug 817036 is preventing anything from working. But this patch should be ok.
Comment 10 Hubert Figuiere [:hub] 2012-11-30 18:56:39 PST
Comment on attachment 687342 [details] [diff] [review]
Bug 807659 - Also configure HTTPS proxy from APN settings. r=

Philip, if you know a better reviewer, please chime in. Thanks.
Comment 11 Hubert Figuiere [:hub] 2012-11-30 18:58:23 PST
Comment on attachment 687342 [details] [diff] [review]
Bug 807659 - Also configure HTTPS proxy from APN settings. r=

Adding blake.
Comment 12 Stefan Arentz [:st3fan] 2012-11-30 19:44:29 PST
This bug is followup work for the following bug that Jose worked on:

	B2G 3G: Support HTTP proxy
	https://bugzilla.mozilla.org/show_bug.cgi?id=740640

Note the HTTP vs HTTPS.

The problem is that the original work only configures the HTTP proxy while having a proxy configured for the APN actually explicitly means that it should also be used for HTTPS.

My small patch corrects this by also configuring network.proxy.ssl and network.proxy.ssl_port.

Without this, HTTPS will simply not work, which leads to a bad user experience as many sites (including our own like the Marketplace) require HTTPS.

Initially I thought that the HTTP and HTTPS proxy maybe should be specified separately. But this does not seem to be the case. To confirm that I have looked at iOS and Android: both only allow you to set the proxy hostname and port and then use those settings to configure both the HTTP and HTTPS proxy.

This fix is probably not super important for Telefonica, but in Canada we happen to use two (cheap, prepaid) providers for the dogfooding program that both require a proxy to go online. I have tested the patch on my B2G phone with one of those providers and things seem to work well. I can now fully use the web.

Also note that many providers listed in the APN presets that we ship require a proxy host. So this fix would apply to all of those networks too.
Comment 13 Hubert Figuiere [:hub] 2012-11-30 19:47:43 PST
Requesting blocking-basecamp. See comment 12.
Comment 14 Philipp von Weitershausen [:philikon] 2012-12-03 10:14:40 PST
Comment on attachment 687342 [details] [diff] [review]
Bug 807659 - Also configure HTTPS proxy from APN settings. r=

Review of attachment 687342 [details] [diff] [review]:
-----------------------------------------------------------------

r=me. Thanks for the patch, Stefan!

This should definitely block basecamp and should land in v1.
Comment 15 Stefan Arentz [:st3fan] 2012-12-03 12:11:52 PST
Created attachment 687898 [details] [diff] [review]
687342: Bug 807659 - Also configure HTTPS proxy from APN settings. r=philikon

Updated the reviewer in the commit message.
Comment 16 [:fabrice] Fabrice Desré 2012-12-03 12:19:27 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/310c028ec15d
Comment 17 Kai-Chih Hu [:khu] 2012-12-04 02:10:32 PST
Stefan, it looks like you're working on this. 
So, I assigned you as the owner. If you're not, please remove your name. :)
Thanks.
Comment 18 Hubert Figuiere [:hub] 2012-12-04 07:08:12 PST
Comment on attachment 687898 [details] [diff] [review]
687342: Bug 807659 - Also configure HTTPS proxy from APN settings. r=philikon

[Approval Request Comment]

Blocking basecamp
b2g only.
Comment 19 Ryan VanderMeulen [:RyanVM] 2012-12-04 19:09:46 PST
https://hg.mozilla.org/mozilla-central/rev/310c028ec15d

Note You need to log in before you can comment on or make changes to this bug.