On Fri, Jan 9, 2009 at 3:02 AM, freepine <[email protected]> wrote:

> yes, you are right:) It can access 62.70.27.118 successfully with
> -http-proxy option.
>
> So it seems inserting http-proxy value into db is different from using
> command line option?
>

yes, at the moment, using the -http-proxy option only rewrites HTTP queries
(and uses the CONNECT method for ports different from 80, so HTTPS works
too).
but this is done transparently so the browser is not aware of that, and will
try to resolve the host name through DNS before trying to connect to it to
make the query.

in other words, I probably need to implement some sort of DNS proxy in the
emulator to send the queries to the proxy as well, so that's my bad :-)

for the record, recent versions of the emulator provide a -tcpdump
<filepath> option to dump the virtual ethernet traffic to a file for later
analysis with WireShark and other tools. I don't know if it's in the cupcake
open-source tree yet, but it should arrive pretty soon.


> BTW: I also failed to connect to 63.233.183.101 due to the limitation of my
> local network. But http log appears from console this time, though there is
> nothing output if it can't resolve dns or if it loads the web page
> successfully.
>
> Thanks,
> -Freepine
>
> On Fri, Jan 9, 2009 at 1:14 AM, David Turner <[email protected]> wrote:
>
>> thanks, you don't need to send me the local output.
>>
>> I'm guessing something. Can you tell me if accessing a site through its IP
>> number works,
>> e.g. use -http-proxy and -debug-proxy, then launch the browser and enter a
>> numeric IP address like:
>>
>> 63.233.183.101  (www.android.com)
>> 62.70.27.118  (www.kde.org)
>>
>> if the browser loads something, it's probably a DNS resolution problem
>> (you will need to setup a
>> DNS proxy on your machine and use the -dns-server option to point to it)
>>
>>
>> On Thu, Jan 8, 2009 at 12:41 PM, freepine <[email protected]> wrote:
>>
>>> Hi David,
>>> That's all I've got from the console after launching emulator, browsing
>>> default google website, etc...
>>>
>>> Do you mean I should send the logcat output to you when I try to launch
>>> browser?
>>> Or there is some flag I can turn on to enable detailed http log?
>>> Or should I capture all network traffic with some tool like Ethereal or
>>> Sniffer? Is there a tool available within the emulator itself?
>>>
>>> Thanks for the feedback and sorry for so many questions:)
>>>
>>> On Thu, Jan 8, 2009 at 6:52 PM, David Turner <[email protected]> wrote:
>>>
>>>> thanks,
>>>>
>>>> however, I'd be more interested in the output that happens when you
>>>> actually try to connect to a site.
>>>> this should dump the HTTP queries being made, how they are rewritten,
>>>> and what kind of error the
>>>> proxy is returning...
>>>>
>>>>
>>>> On Thu, Jan 8, 2009 at 2:59 AM, freepine <[email protected]> wrote:
>>>>
>>>>> Below is the output with debug proxy, but it does work when I insert my
>>>>> proxy setting in the settings db directly.
>>>>> Anything missed from my steps? Thanks.
>>>>>
>>>>> D:\Android\android-sdk-windows-1.0_r1\tools>emulator.exe -http-proxy
>>>>> wwwgate0-ch
>>>>> .mot.com:1080 -debug proxy
>>>>> proxy_http_setup: creating http proxy service connecting to:
>>>>> wwwgate0-ch.mot.com
>>>>> :1080
>>>>> server name 'wwwgate0-ch.mot.com' resolved to 58.247.121.38
>>>>> proxy_http_setup: creating HTTP Proxy Service Footer is (len=2):
>>>>> '
>>>>> '
>>>>> http_service_free
>>>>>
>>>>> D:\Android\android-sdk-windows-1.0_r1\tools>
>>>>>
>>>>> On Thu, Jan 8, 2009 at 9:43 AM, David Turner <[email protected]>wrote:
>>>>>
>>>>>> hello,
>>>>>>
>>>>>> can you give me the output of using the -debug-proxy option when
>>>>>> starting the emulator ?
>>>>>>
>>>>>> On Wed, Jan 7, 2009 at 2:34 AM, Li Wei (Vincent) 
>>>>>> <[email protected]>wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>> I made a full build of the latest master branch(including cupcake
>>>>>>> changes), and then "make sdk" and run emulator with -http-proxy
>>>>>>> option
>>>>>>> under "tools" directory(also have -vm to specify android virtual
>>>>>>> machine). but seems I cannot access to internet behind proxy, is
>>>>>>> there
>>>>>>> anyone else ran into the same problem?
>>>>>>>
>>>>>>>
>>>>>>> thanks a lot.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to