Double hostname on localhost proxy

Everything about using the stand-alone Adblock Plus app on Android
Post Reply
gboudreau
Posts: 1
Joined: Wed Aug 14, 2013 12:45 am

Double hostname on localhost proxy

Post by gboudreau »

When I enable AdBlockPlus, and configure the proxy to localhost:2020, I can't connect to the internet using my own Android app.

Here's what adb logcat shows:

Code: Select all

D/Api.GET (18666): https://host.domain.com/ping.html

D/127.0.0.1(16873): new connection
I/ProxyService(16873): Request 24 CONNECT host.domain.com:443 HTTP/1.1
V/main.   (16873): invoking handler: urlmodifier
V/main.   (16873): invoking handler: adblock
W/JS      (16873): nativeExecute()
W/JS      (16873): 
W/JS      (16873): getString()
W/JS      (16873): 
I/adblock.(16873): false: http://host.domain.comhost.domain.com:443 (null)
I/Error   (16873): 500 Server Error: No response
I/ProxyService(16873): request done
D/ProxyService(16873): socket close

D/Api/ping.html(18666): Server Error: <html>
D/Api/ping.html(18666): <head>
D/Api/ping.html(18666): <title>Error: 500</title>
D/Api/ping.html(18666): <body>
D/Api/ping.html(18666): Got the error: <b>Server Error</b><br>
D/Api/ping.html(18666): while trying to obtain <b>http://host.domain.comhost.domain.com:443</b><br>
D/Api/ping.html(18666): No response
D/Api/ping.html(18666): </body>
D/Api/ping.html(18666): </html>
The D/Api/... lines are mine (my own Android app, which uses com.loopj.android.http AKA Android Asynchronous Http Client, which in turn use org.apache.http to make HTTP requests), but the rest are ABP/proxy service.
As you can see, the hostname is doubled (host.domain.comhost.domain.com) and the https request is converted into a http request... No idea why this is happening, but disabling AdBlockPlus, and removing the proxy settings fixes this.
Maybe this is a problem with the Android Asynchronous Http Client library, or with AdBlock Plus... I just don't know how the library could cause this to happen, if ProxyService seems to be receiving the correct host and port to connect:

Code: Select all

I/ProxyService(16873): Request 24 CONNECT host.domain.com:443 HTTP/1.1
Let me know if you need more details to debug further.

Good day.
Post Reply