Java, does proxy setting affect received data?

2019-09-06 16:53发布

问题:

I'd asked a question about How to bypass Web Proxy setting?

However, i didn't get my desired response. Therefore, I want to change my question.

My question is, when i set proxy for surfing Internet (this is set automatically by mobile 3g operator), I can't get correct data. Correct data is in XML format while I get it wrapped in HTML code. I have no idea this HTML comes from where! "Server returns XML data not HTML code", as mentioned by server side programmer.

I really confused what is happening here?

  • Application works fine when its connected to Internet through Wifi (I think its working because proxy doesn't apply to it)
  • Application doesn't work just with some limited types of devices (for example it doesn't work with Xperia neo and SG2 while application works in SGS). All of this devices are connecting to same mobile operator.

What is you idea? Did you face with this problem before? Any suggestion would be appreciated.

回答1:

There is a possibility that the request is being manipulated by the proxy which is injecting ads or something similar. Could you perhaps capture the response and see what has changed?

Something you could try is to make the request of a secure connection, that way the proxy should not be able to modify the content of the response.