-
-
Save andrei-fedorov/f7c820628f2b1ff7d9d3a66a2545a9f8 to your computer and use it in GitHub Desktop.
Revisions
-
twaddington revised this gist
Apr 29, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Charles Proxy Android > Note: Consider using [mitmproxy](https://mitmproxy.org/) instead of Charles. There is better, more recent, documentation for [using mitmproxy on Android](https://docs.mitmproxy.org/stable/howto-install-system-trusted-ca-android/). ## Steps ### 1. Add the Network Security Configuration to your app -
twaddington revised this gist
Apr 7, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,8 @@ You should now see hostnames correctly in Charles. If not, try restarting the pr ## Notes - You may also have to enable the "Proxy -> macOS Proxy" setting in Charles. - You may have to disable WiFi in the emulator to see hostnames in Charles. ## References -
twaddington revised this gist
Mar 24, 2020 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,6 +58,10 @@ Charles should now be proxying requests but instead of hostnames you're going to You should now see hostnames correctly in Charles. If not, try restarting the proxy a few times. ## Notes You may also have to enable the "Proxy -> macOS Proxy" setting in Charles. ## References - https://developers.google.com/admob/android/charles -
twaddington revised this gist
Mar 24, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,6 +36,8 @@ - Update the "Hostname" to "127.0.0.1" and "Port number" to "8888" - Click "Apply" Your settings should now look [like this](https://user-images.githubusercontent.com/107117/77475404-ae3d3380-6e10-11ea-8ff9-9541b6883e63.png). ### 4. Install the Charles certificate - Launch Charles and enable SSL proxying. -
twaddington revised this gist
Mar 24, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Charles Proxy Android ## Steps -
twaddington revised this gist
Mar 24, 2020 . 1 changed file with 15 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,7 +43,21 @@ - You should be prompted to download a cert file. - Save the file with any name. ### 5. Create custom APN Charles should now be proxying requests but instead of hostnames you're going to see IP addresses. This makes it difficult to filter on specific hosts. To fix this you'll need to: - In Android, navigate to "Settings -> Network & Internet -> Mobile network -> (Advanced) Access point names" - Tap the "Plus" icon in the toolbar to add a new APN. - Use any name, set APN to "http://", proxy to "10.0.2.2", and port to "8888" - Tap the overflow menu in the upper right and then "Save" - Make sure to mark your new APN as active - Now you may need to toggle airplane mode on and off a few times to get it to take. You should now see hostnames correctly in Charles. If not, try restarting the proxy a few times. ## References - https://developers.google.com/admob/android/charles - https://medium.com/@daptronic/the-android-emulator-and-charles-proxy-a-love-story-595c23484e02 - https://stackoverflow.com/questions/33724755/charles-proxy-ssl-connections-wont-show-hostnames-only-ips/46054993#46054993 -
twaddington revised this gist
Mar 24, 2020 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,8 +36,14 @@ - Update the "Hostname" to "127.0.0.1" and "Port number" to "8888" - Click "Apply" ### 4. Install the Charles certificate - Launch Charles and enable SSL proxying. - In your emulator, open a web browser and navigate to https://chls.pro/ssl - You should be prompted to download a cert file. - Save the file with any name. ## References - https://developers.google.com/admob/android/charles - https://medium.com/@daptronic/the-android-emulator-and-charles-proxy-a-love-story-595c23484e02 -
twaddington created this gist
Mar 24, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ # Charlex Proxy Android ## Steps ### 1. Add the Network Security Configuration to your app ```xml <network-security-config> <debug-overrides> <trust-anchors> <!-- Trust user added CAs while debuggable only --> <certificates src="user" /> </trust-anchors> </debug-overrides> </network-security-config> ``` ### 2. Update the Android Manifest ```xml <?xml version="1.0" encoding="utf-8"?> <manifest ... > <application ... android:networkSecurityConfig="@xml/network_security_config" ... > ... </application> </manifest> ``` ### 3. Update the Emulator proxy - Launch the emulator and open "Settings -> Proxy" - Uncheck "Use Android Studio HTTP proxy settings" - Check "Manual proxy configuration" - Update the "Hostname" to "127.0.0.1" and "Port number" to "8888" - Click "Apply" ## References - https://developers.google.com/admob/android/charles - https://medium.com/@daptronic/the-android-emulator-and-charles-proxy-a-love-story-595c23484e02 -