{"id":16541744,"url":"https://github.com/thyrlian/charles-proxy-mobile-guide","last_synced_at":"2025-08-01T19:07:41.819Z","repository":{"id":141702754,"uuid":"91375716","full_name":"thyrlian/Charles-Proxy-Mobile-Guide","owner":"thyrlian","description":"The mobile hackers' guide to Charles Proxy :thumbsup:","archived":false,"fork":false,"pushed_at":"2018-07-07T12:43:00.000Z","size":1188,"stargazers_count":149,"open_issues_count":3,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T00:14:38.019Z","etag":null,"topics":["android","charles","charles-proxy","config","configuration","debug","guide","ios","mobile","monitor","proxy","setup","sniffer","tutorial"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thyrlian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-15T19:16:41.000Z","updated_at":"2025-03-31T06:23:04.000Z","dependencies_parsed_at":"2024-04-19T05:32:24.749Z","dependency_job_id":null,"html_url":"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thyrlian/Charles-Proxy-Mobile-Guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyrlian%2FCharles-Proxy-Mobile-Guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyrlian%2FCharles-Proxy-Mobile-Guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyrlian%2FCharles-Proxy-Mobile-Guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyrlian%2FCharles-Proxy-Mobile-Guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thyrlian","download_url":"https://codeload.github.com/thyrlian/Charles-Proxy-Mobile-Guide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyrlian%2FCharles-Proxy-Mobile-Guide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268281829,"owners_count":24225159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","charles","charles-proxy","config","configuration","debug","guide","ios","mobile","monitor","proxy","setup","sniffer","tutorial"],"created_at":"2024-10-11T18:55:47.518Z","updated_at":"2025-08-01T19:07:41.793Z","avatar_url":"https://github.com/thyrlian.png","language":null,"readme":"# Charles Proxy Mobile Guide\nThe mobile hackers' guide to Charles Proxy :thumbsup:\n\n## Intro\n\n[Charles](https://www.charlesproxy.com/) is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information).\n\n## SSL Proxying\n\n### Computer (macOS)\n\n* **Charles** -\u003e **Proxy** -\u003e **SSL Proxying Settings...** -\u003e **SSL Proxying**\n    * Check \"**Enable SSL Proxying**\"\n    * Add location matcher \"**Host: \u0026ast;**\", \"**Port: \u0026ast;**\"\n    \n    \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/macOS/SSL-Proxying-Settings.png\" width=\"600\"\u003e\n    \n* **Charles** -\u003e **Help** -\u003e **SSL Proxying** -\u003e **Install Charles Root Certificate**\n    * It would install the certificate to **Keychain**, and open it up automatically\n    * Double click the certificate in Keychain\n    * Expand **Trust**, select **Always Trust** for **When using this certificate**\n    \n    \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/macOS/Root-Certificate-not-trusted.png\" width=\"400\"\u003e\n    \n    \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/macOS/Root-Certificate-trusted.png\" width=\"400\"\u003e\n    \n* Get the **IP address** that Charles is listening to\n    * **Charles** -\u003e **Help** -\u003e **Local IP Address**\n    * Or get the WLAN IP address via command line (right into your clipboard)\n        ```shell\n        ifconfig | tr \"\\n\" \"→\" | tr \"\\r\" \"→\" | grep -Eo \"→en0.*?→en[[:digit:]]\" | grep -Eo \"inet[[:blank:]+]([0-9]{1,3}\\.){3}[0-9]{1,3}\" | cut -d' ' -f2 | tr -d \"\\n\" | pbcopy \u0026\u0026 pbpaste\n        ```\n    * Or get the LAN IP address via command line (right into your clipboard)\n        ```shell\n        ifconfig | tr \"\\n\" \"→\" | tr \"\\r\" \"→\" | grep -Eo \"→en[[:digit:]].*?active→\" | grep -v \"en0\" | grep -Eo \"inet[[:blank:]+]([0-9]{1,3}\\.){3}[0-9]{1,3}\" | cut -d' ' -f2 | tr -d \"\\n\" | pbcopy \u0026\u0026 pbpaste\n        ```\n\n### Android\n\n* Launch **Charles** and keep it running\n* Get the **IP address**\n* Make sure the Android device uses the same network as Charles\n* On **Android** device\n    * Go to **Settings** -\u003e **Wi-Fi** -\u003e long click the **network** in use -\u003e **Modify network** -\u003e **Advanced options** -\u003e **Proxy** -\u003e **Manual**\n        * **Proxy hostname** = **IP address**\n        * **Proxy port** = **8888**\n        \n        \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/Android/Wi-Fi.png\" width=\"256\"\u003e\n    \n    * Launch **Browser**, visit https://chls.pro/ssl, save the certificate\n    \n    \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/Android/certificate.png\" width=\"256\"\u003e\n    \n    * The system would ask you to set a lock screen **PIN** or **password**, just set one and save it\n    * Now the certificate is installed\n    * Open an application and monitor the traffic on Charles\n* A dialog pops up on computer asking \"A connection attempt to  Charles has been made from the host ...\", just click **Allow** button\n\n#### Android N (7.0, API level 24) and afterwards\n\n* Open your Android project with Android Studio\n* **Android Studio** -\u003e **File** -\u003e **New** -\u003e **Android resource directory**\n    * **Directory name** = **xml**\n    * **Directory type** = **xml**\n    * **Source set** = **debug**\n* **Android Studio** -\u003e **File** -\u003e **New** -\u003e **XML resource file**\n    * **File name** = **network_security_config**\n    * **Root element** = **network-security-config**\n* Above step would generate a XML file with the given root element.  Now paste below content to replace the existing content in the generated XML file.\n    ```xml\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \u003cnetwork-security-config xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n        \u003cdebug-overrides\u003e\n            \u003ctrust-anchors\u003e\n                \u003c!-- Trust user added CAs while debuggable only --\u003e\n                \u003ccertificates src=\"user\" /\u003e\n            \u003c/trust-anchors\u003e\n        \u003c/debug-overrides\u003e\n    \u003c/network-security-config\u003e\n    ```\n* Then go to **debug** source set, create a blank **AndroidManifest.xml** file if you don't have one for the debug build variant, and add content like below (eventually the manifest merger will merge it with the main manifest).  When you already have one, simply add the `networkSecurityConfig` attribute under `application`.\n    ```xml\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \n    \u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:tools=\"http://schemas.android.com/tools\"\u003e\n    \n        \u003capplication\n            android:networkSecurityConfig=\"@xml/network_security_config\"\u003e\n        \u003c/application\u003e\n    \n    \u003c/manifest\u003e\n    ```\n\nNow the SSL proxying should work for your app's debug build variant, but not for release build variant.\n\n### iOS\n\n* Launch **Charles** and keep it running\n* Get the **IP address**\n* Make sure the iOS device uses the same network as Charles\n* On **iOS** device\n    * Go to **Settings** -\u003e **Wi-Fi** -\u003e click the **network** in use -\u003e set **HTTP PROXY** to **Manual**\n        * **Server** = **IP address**\n        * **Port** = **8888**\n        \n        \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/iOS/Wi-Fi.png\" width=\"256\"\u003e\n    \n    * Launch **Safari**, visit https://chls.pro/ssl (if it doesn't work, try http://www.charlesproxy.com/getssl), install the certificate\n    \n    \u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/iOS/certificate.png\" width=\"256\"\u003e\n    \n    * Open an application and monitor the traffic on Charles\n* A dialog pops up on computer asking \"A connection attempt to  Charles has been made from the host ...\", just click **Allow** button\n\n#### iOS 10.3 and afterwards\n\n* After the certificate is installed\n* Go to **Settings** -\u003e **General** -\u003e **About** -\u003e **Certificate Trust Settings** -\u003e **Enable Full Trust For Root Certificates** -\u003e enable Charles' certificate\n\n\u003cimg src=\"https://github.com/thyrlian/Charles-Proxy-Mobile-Guide/blob/master/Screenshots/iOS/Certificate-Trust-Settings.png\" width=\"256\"\u003e\n\n### Terminal\n\nIn case you need to debug via curl in a terminal:\n\n* To set Charles as the proxy\n\n    ```shell\n    export http_proxy=http://127.0.0.1:8888 \u0026\u0026 export https_proxy=$http_proxy\n    ```\n\n* To remove the proxy\n\n    ```shell\n    unset http_proxy https_proxy\n    ```\n\n### SSL CA Certificate\n\n* Charles Proxy running on the same computer provides the same SSL certificate.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthyrlian%2Fcharles-proxy-mobile-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthyrlian%2Fcharles-proxy-mobile-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthyrlian%2Fcharles-proxy-mobile-guide/lists"}