anthonycr / Lightning-Browser

A lightweight Android browser with modern navigation
http://acrdevelopment.org
Mozilla Public License 2.0
2.18k stars 797 forks source link

Proxy support in LightningWebClient is broken #115

Closed alt-grr closed 10 years ago

alt-grr commented 10 years ago

Variable mDoLeakHardening is always false: https://github.com/anthonycr/Lightning-Browser/blob/532d6adbea29002841b15e34c4d6e139b6c2bb08/src/acr/browser/lightning/LightningView.java#L595 so this condition is always true: https://github.com/anthonycr/Lightning-Browser/blob/532d6adbea29002841b15e34c4d6e139b6c2bb08/src/acr/browser/lightning/LightningView.java#L601 and code after it is dead code.

anthonycr commented 10 years ago

Not sure how I missed this, but anyway, the NetCipher library sets the Proxy for the whole app (which is done in BrowserActivity using the code WebKitProxy.setProxy(...) ), so the code you see in the WebViewClient isn't even necessary. I could take it out completely without any effect on the Orbot proxy, but I want to leave it in just in case I experiment with it in the future.

The purpose of that proxy code is to manually do the network requests so you can be absolutely sure the request is made through the proxy. For Lightning's simple case, it's fine just to set the global proxy on the app.

alt-grr commented 10 years ago

I want to leave it in just in case I experiment with it in the future.

Ok, but in that case it should be documented in code to avoid confusing.

anthonycr commented 10 years ago

Yes, I think I'm going to comment it out and put a note in there explaining the issue. Thanks for pointing this out.