Setting up Charles proxy causes emulator to lose internet connection - android

So I'm trying to set up Charles on a Mac (running Mavericks). I have Charles installed, set up the Proxy Settings by adding * as the SSL locations (which means it should accept traffic from everywhere, right?).
Then I went into my emulated Android device running 4.4.2 and went to http://charlesproxy.com/charles.crt to get a certificate, accepted the certificate and added a pin to the emulated device for it, and it said it was installed.
The internet still works on the emulated device. I then go into my internet settings on this emulated device to set up the proxy to my machine, and after doing that, the internet dies out, and I cannot access anything. The only way to regain internet is to wipe the emulated device and start over. I've now done this a couple times to confirm the result and it is when I set my proxy settings on the device that the internet dies.
Anyone have any experience with this issue and could offer some help?

I have found the solution. My proxy settings that I was told were correct on the emulated device were actually incorrect, I was trying to use a device name instead of a local IP address. Make sure you use your local IP address, which can be found by (in Charles) going to Help->Local IP Address...

Related

Android browser doesn't see Fiddler proxy

I have a problem when connecting Fiddler and my mobile with Android 9.
I installed Fiddler (tried on Windows 7 and Windows 10) and configured it with "allow remote connections". Then configured Android device from
https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureForAndroid
Both the computer and the device are at the same network with router (wifi and cable for the computer). I use VPN. Router passes VPN connections (I see necessary sites on the computer and the device with strongSwan).
Restarted Fiddler and reconnected wifi on the device. Wifi icon is "Connected".
Through VPN I get a special part of the site configured in hosts.
Like 10.10.10.10 firstsite.com www.firstsite.com secondsite.com
On Windows when I enter firstsite.com it goes to 10.10.10.10. This is correct.
On Android when I enter firstsite.com it goes to firstsite.com, but I need it to go to 10.10.10.10.
Fiddler folder is in firewall exceptions. IP is static.
Please, help me. I tried many things found in Google but without success.
Works on Windows 10. Very wild thing: when setting wifi it is necessary to delete wifi and then setup proxy and port then password and then connect. Connect vpn on the computer and the device. If no luck restart computer, fiddler and the device (don't forget to turn on vpn). After it I was able to open the necessary site 10.10.10.10 on Android 9 pie.

Internet Connection lost when setting Charles proxy on Android

I am trying to set charles proxy on Android 8.0( S8 ). I have installed the root certificate-> Changed WIFI settings to charles proxy settings. But After connecting to proxy, Internet connection is lost. Tried multiple times. Is there any other security certificate I need to install for Android 8.0. Please suggest. Thanks
The sequence of steps is really important:
Connect the Android device and the computer that running Charles to the same LAN (WiFi) network
Start Charles
Then set the Charles machine LAN IP as manual proxy on your phone. Open the list of Wifi connections, then touch and hold the connected network, and select Modify network.
Proxy: Manual
Proxy hostname: Open the Help > Local IP Address menu in Charles and paste into it the address displayed
Proxy port: 8888 (This is the default value that can be changed in the Proxy > Proxy Settings menu.)
Open a browser on your phone and make some network traffic
After that you have to click into the Charles app window. You will see a confirmation dialog that asking you to allow network traffic from the mobile device, press Allow.
After all, open the https://chls.pro/ssl URL on your device and install the .pem file for VPN and apps (Use Chrome browser on Android, and Safari for iOS devices.)
Troubleshooting
When Charles is the background, the confirmation dialog will not be visible automatically, you have to activate (bring back to the foreground) the Charles application window to see it.
To check the device connection permission, go to Proxy > Access Control Settings. You should also see its LAN IP on the list.
To getting your Android phone LAN IP address open the Dialer and enter: *#*#4636#*#*, then select Wi-Fi information > WiFi status and refresh stats.
If anyone who is still looking for answer then try these steps. It worked for me ☺️
When you enter proxy, there will be one more option that is "Bypass for" in this field enter * as value, and thnx me later.

Android 4.2 'always on vpn' no internet access

I have configured an IPSEC vpn on my Samsung Nexus tablet (4.2), the VPN works perfectly fine when I connect it manually. I have full vpn and internet access.
However, when I set it to 'always on vpn' I lose internet connectivity. I can still access all local devices i.e servers / printers but nothing outside of the vpn network.
I can't ping any external addresses like 8.8.8.8 or access any websites that are not on the intranet.
I have been trying different things - setting forward routese etc but nothing seems to work so far.
This is bug in Android 4.2+ firewall. You can try fix, available on Google Play and called AlwaysOnVpnFix. But because this fix recover firewall rules, root access is required. Else your must wait next Android release by Google ;'(

no dns via ipsec tunnel android 4.4.2 xperiaz C6603 racoon

I've setup a racoon server on my linux router. It was working ok with my xperiaz (C6603) road warrior. However after I applied the latest update to android 4.4.2 (firmware 10.5.A.0.230) it stopped working correctly. I have ping from the phone to each ip (local ip or internet) but when I use FQDN it can't be resolved. I can ping the phone from within my local network too. VPN is IPSec Xauth RSA. Checking with adb DNS server is correctly set:
getprop net.dns1
192.168.6.1
I also tried pushing the same ip as dns2 but no change. I also noticed that after closing the connection to the vpn server net.dns1 remains 192.168.6.1 however the phone is able to correctly resolve addresses. In few minutes it gets changed back to my 3g provider setting.
I tried to redirect all traffic through the tunnel via the advanced vpn setting (Forwarding routes = 0.0.0.0/0) and tried to set DNS statically via the same settings (DNS servers = 192.168.6.1). Even setting the DNS server to my provider's DNS addres didn't work which makes me think the problem is with the android itself.
DNS server is working as far as I can tell:
$ dig #192.168.6.1 dir.bg +short
194.145.63.12
Forwarding is enabled on my router so shouldn't be the problem. I've read about a bug in android but it's in android 2.x and seems to impact wifi connections.
Have you seen similar problems and as I'm not an expert with android and adb, can you tell me what commands are available in adb/shell to trace the problem? Phone is not rooted and it's not possible for the moment to root it.
UPDATE:
the tunnel is working ok when I connect via wifi hotspot. The problem appears to show only via my 3g carrier. Any ideas how to work around this?
After updating to 4.4.4 I still got the same problem. Further testing revealed that the problem is more likely to be in the Android rather than my 3g carrier. Over wifi the VPN worked flawlessly after using wifi tethering from another phone via the same provider it worked ok again so my 3g carrier isn't blocking anything.
Yesterday I finally rooted my phone and installed SDFix to restore full access to my SD card. Now VPN is working ok again even via 3g. I hope someone can confirm/reject that solution as I see no relation between vpn and sd card at all. However I experienced initially the problem with my update to 4.4.2 where Sony started to follow Google's policy about storage access.

How can I get my android emulator use my computer's VPN interface?

My company requires VPN to connect to our dev systems and for the first time I'm trying to work on an android app from home. Turns out the emulator doesn't want to use the VPN interface so even though I have connectivity to our dev systems on my VPN-connected laptop the emulator that's running on it does not.
I have thought of 3 solutions to this:
run a VPN client on the emulator, but I was hoping for a simpler solution than that
setting up a proxy server on my local machine
forwarding a port on my local machine
2 and 3 can probably work, but I'd still like to know if there is an easy way to get the emulator to use the VPN interface without a workaround.
I'm running OS X 10.7 and I've already tried adjusting the interface priority order with network>>set service order.
I suppose I can dust off the old dell and try it there, but I would expect the same results.
First start your vpn connection and then restart the emulator, now the emulator should use the host vpn connection.
it's mostly because of the DNS issue, according to the android doc:
At startup, the emulator reads the list of DNS servers that your system is currently using. It then stores the IP addresses of up to four servers on this list and sets up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4, 10.0.2.5 and 10.0.2.6 as needed.
I encountered this issue and tried something on dns settings but I could not solve it. As #machado said in the comment section below you should boot the emulator via "Cold Boot Now" option. I hope this helps.
What I do on my mac is just make sure 'send all traffic over vpn' is checked.
You'll find this setting after you click advanced while having your vpn connection selected in network preferences.
Works well for my situation, but may not depending on the type of VPN you're connecting to.
I had the same issue and solved it by connecting to cisco vpn after the android emulator has started and connected to the internet.
Works for me in windows 7
I setup a vpn connection on Windows. Then I started the emulator. The emulator and everything on my pc started to use that vpn connection.

Categories

Resources