I am trying to do a debug session on my App (Android) by monitoring the outbound/inbound HTTP traffic.
I have followed these steps for the setup,
Made sure that my phone and laptop are in same network.
My laptop runs Ubuntu. So, I took my laptop's IP address from ifconfig. Let's say it was 172.x.x.x.
Configured this IP as the Proxy IP in my mobile, with port 8888.
Then, finally, having Charles Application running, I was hoping that my HTTP traffic would get routed via Charles Application on my laptop and I would be able to see the URLs referred.
Issues,
I cannot see my traffic in Charles Proxy application.
When I look into Help -> Local IP Address, I see that the IP is 127.0.0.1 and not 172.x.x.x.
But in my friend's laptop, who also has same setup, we see 172.x.x.x as the Local IP Address.
What am I doing wrong here? Does /etc/hosts affect this setup in anyway?
I have found couple of solutions for this. Both will work -
Note down your actual IP address from the IFConfig.
My actual IP here is 172.16.16.22.
In your mobile wifi's proxy connection, enter this above IP address and 8888 as port value. You will start seeing traffic in the charle's proxy application.
If you are in office WIFI, it is probable that VPN has some issue. In such cases, connect to the VPN from the VPN software provided to you by your office. This will follow same procedure as you would connect to your office network (VPN) from your Home WIFI.
Related
edit: I found my answer
I already know that if I would have a smartphone with an internet connection, I can share the connection through the Every Proxy app. This app allows to have an http proxy, and when you share your internet through usb cable, you can enter the proxy that the app has given, on windows. It's actually more helpful if you want to share your vpn connection.
I want to do the same, but in nox. I turn on my vpn and install Every Proxy on nox. The IP address the app give is 172.16.24.15. but trying this in windows; has no result.
I also used Fing to see my simulator IP address and it is 172.16.25.2 for the simulator router and 172.16.25.15 for the android itself.
in the system settings of nox > device > enable network bridge mode > DHCP, I get the IP address 192.168.1.3. now when I turn on Every Proxy, I set the IP address 192.168.1.3 instead of the previous 172.16.24.15. so I can use this new IP in windows settings and it works.
I am trying to intercept server requests from a mobile app using charles proxy. I have used charles proxy intensively , But for some reason I am not able to record the sessions on a local wifi. One thing which I noticed is selecting Help--> Local Ip address from the menu doesn't show up the local IP address. I am not able to figure out the issue.
You need to put the IP address of your computer that is running Charles into the Android device's Wifi Settings. Also ensure that both the device and your computer are on the same subnet.
I'm trying to access localhost from my android device. I've tried 192.168.1.5:80 (which is my localhost ip address in my laptop). Both my android device and my laptop are on same gateway.
Can anyone tell me what i've done wrong or is there any firewall that is blocking my localhost from being accessed?
Help me out guys. Thank you in advance.!!
USB doesn't provide network to mobile device. If it's connected to your wifi, then hit your laptop address provided by the router. If it's connected to your mobile network, then first find out your router external IP address, then forward some port to that 10.0.2.2:portno and finally you'll be able to see that server from your device.
Edited:
I use my local ip for that i.e. 192.168.0.1 and it works.
and Let me know !
I try to deploy a worklight application into my android device (HTC Desire), without any hope I get the following error:-
Request timeout for [ANDROID IP :8080/console/apps/services
Default options: on failure timed out for
http://ANDROIDIP:8080/console/apps/services...
Make sure the host address is available to the app (especially relevant for android and iphone apps]
I find my android IP address via whatip.com and I configure my application descriptor xml file with it.
it works with android emulator when I use the following
<worklightServerRootURL>http://10.0.2.2:8080</worklightServerRootURL>
but not with the mobile device
any advice?
worklightServerRootURL should point to the public IP address of the host machine, not to the device IP.
The device and Worklight Server must be in the same network (public Internet, wifi...).
10.0.2.2 is a special address that only works on the android emulator. On the emulator, it is routed to the host where the emulator is running. On an actual device, this address won't be routed anywhere.
As Idan said, the Worklight server must be reachable from the Android device. This usually means that either the Worklight server has an address that is reachable from the internet, or that the android device has a wifi connection to the LAN where the worklight server is running.
Assuming that you are trying to test using the test server in worklight studio, first determine your computer's IP address. If you are behind a NAT router, whatip.com returns the IP of the router, not of your computer. Use ifconfig (ipconfig on windows) at a command line to determine your computer's IP address. Your computer may have several IP addresses. It is important that you choose the ones that corresponds to the LAN where you will be connecting your Android device. If you are unsure which one this is, you may need to look at your router's configuration. Next, verify that your computer's firewall has port 8080 open. Then connect your android device via wifi to the same LAN as your computer.
To verify that your device can reach the worklight server, try opening the worklight console in the phone's browser. (http://[IP of computer]:8080/console) Once that works, you should be able to use the same IP in the worklightServerRootURL to build the app so that it will work on that device.
I have a Tomcat 7.0 server running on my PC, I access the servlet via Emulator through Url
http://10.0.2.2:8084/MyServer
I am struggling with this for few hours now. I have understood the following steps to achieve this
I need to have a Static IP address? So I am using No-IP Free to covert dynamic IP (I have a dial-up connection) to Static IP.
I need to change the firewall rules in Windows 7. I tried changing Inbound Rules for 'port 8084', but it did not work.
My Question is how to access the same server on my PC via a real Android device having GPRS connection?
Thanks so much.
wifi is the best answer. Get your machine and phone on the same network. If that isn't an option, I'd suggest local tunnel: http://progrium.com/localtunnel/
As long as your server has a public IP address, you'll be fine. The first you should try is to access it from your device using the known IP address and then go for the name resolution, for which DynDNS or No-IP Free will be valid options.
Let's say your pablic IP at any given time is 1.2.3.4, just try
http://1.2.3.4:8084/MyServer
and it should work. Then configure any of the mentioned services and try using the host and domain name.
Firewall rules on your Windows PC and wired/wireless router will both need to allow incoming connections to port 8084.
On the router, set up incoming connections to 8084 to redirect to your Windows PC's local IP address (127.0.0.1). This is called "port forwarding" – look into your router's manual on how to do it.
Once your router forwards incoming port 8084 requests to your Windows machine, you can access it from the outside:
http://your-dynamic-address.com:8084/MyServer