All Projects β†’ thyrlian β†’ Charles-Proxy-Mobile-Guide

thyrlian / Charles-Proxy-Mobile-Guide

Licence: other
The mobile hackers' guide to Charles Proxy πŸ‘

Projects that are alternatives of or similar to Charles-Proxy-Mobile-Guide

V2ray Step By Step
This repo is a fork of ToutyRater/v2ray-guide, we aim to provide a new step-by-step guide of v2ray
Stars: ✭ 341 (+224.76%)
Mutual labels:  config, guide, configuration
spdlog setup
spdlog setup initialization via file configuration for convenience.
Stars: ✭ 68 (-35.24%)
Mutual labels:  config, setup, configuration
eslint-define-config
Provide a defineConfig function for .eslintrc.js files
Stars: ✭ 61 (-41.9%)
Mutual labels:  config, configuration
panzerlop
Configuration Guides for fixing things in Linux, Proton & KDE
Stars: ✭ 23 (-78.1%)
Mutual labels:  config, guide
nest-typed-config
Intuitive, type-safe configuration module for Nest framework ✨
Stars: ✭ 47 (-55.24%)
Mutual labels:  config, configuration
neovim-config
Modern NeoVim config for IDE-like development
Stars: ✭ 89 (-15.24%)
Mutual labels:  config, configuration
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🀘
Stars: ✭ 146 (+39.05%)
Mutual labels:  config, configuration
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (-23.81%)
Mutual labels:  config, configuration
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (-18.1%)
Mutual labels:  config, configuration
config-parser
A slim, fully managed C# library for reading/writing .ini, .conf, .cfg etc configuration files.
Stars: ✭ 67 (-36.19%)
Mutual labels:  config, configuration
yaask
Make your yaml configurable with interactive configurations!
Stars: ✭ 15 (-85.71%)
Mutual labels:  config, configuration
env
A lightweight package for loading OS environment variables into structs for Go projects
Stars: ✭ 24 (-77.14%)
Mutual labels:  config, configuration
installme-osx
My personal script to setup a new OSX
Stars: ✭ 57 (-45.71%)
Mutual labels:  config, setup
profig
Powerful configuration management for Scala (JSON, properties, command-line arguments, and environment variables)
Stars: ✭ 25 (-76.19%)
Mutual labels:  config, configuration
laravel-conditional-providers
THIS PACKAGE HAS BEEN DEPRECATED β€” Load Laravel service providers and facades based on the current environment.
Stars: ✭ 26 (-75.24%)
Mutual labels:  configuration, debug
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (-74.29%)
Mutual labels:  config, configuration
eRCaGuy dotfiles
.bashrc file, terminal prompt that shows current git branch, Arduino setup, Eclipse setup, git diff with line numbers, helpful scripts, improved Linux productivity, etc.
Stars: ✭ 84 (-20%)
Mutual labels:  config, configuration
tomlj
A Java parser for Tom's Obvious, Minimal Language (TOML).
Stars: ✭ 72 (-31.43%)
Mutual labels:  config, configuration
dvc dask use case
A use case of a reproducible machine learning pipeline using Dask, DVC, and MLflow.
Stars: ✭ 22 (-79.05%)
Mutual labels:  setup, guide
rails-settings-cached
Global settings for your Rails application.
Stars: ✭ 940 (+795.24%)
Mutual labels:  config, configuration

Charles Proxy Mobile Guide

The mobile hackers' guide to Charles Proxy πŸ‘

Intro

Charles 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).

SSL Proxying

Computer (macOS)

  • Charles -> Proxy -> SSL Proxying Settings... -> SSL Proxying

    • Check "Enable SSL Proxying"
    • Add location matcher "Host: *", "Port: *"
  • Charles -> Help -> SSL Proxying -> Install Charles Root Certificate

    • It would install the certificate to Keychain, and open it up automatically
    • Double click the certificate in Keychain
    • Expand Trust, select Always Trust for When using this certificate
  • Get the IP address that Charles is listening to

    • Charles -> Help -> Local IP Address
    • Or get the WLAN IP address via command line (right into your clipboard)
      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 && pbpaste
    • Or get the LAN IP address via command line (right into your clipboard)
      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 && pbpaste

Android

  • Launch Charles and keep it running

  • Get the IP address

  • Make sure the Android device uses the same network as Charles

  • On Android device

    • Go to Settings -> Wi-Fi -> long click the network in use -> Modify network -> Advanced options -> Proxy -> Manual

      • Proxy hostname = IP address
      • Proxy port = 8888
    • Launch Browser, visit https://chls.pro/ssl, save the certificate

    • The system would ask you to set a lock screen PIN or password, just set one and save it
    • Now the certificate is installed
    • Open an application and monitor the traffic on Charles
  • A dialog pops up on computer asking "A connection attempt to Charles has been made from the host ...", just click Allow button

Android N (7.0, API level 24) and afterwards

  • Open your Android project with Android Studio
  • Android Studio -> File -> New -> Android resource directory
    • Directory name = xml
    • Directory type = xml
    • Source set = debug
  • Android Studio -> File -> New -> XML resource file
    • File name = network_security_config
    • Root element = network-security-config
  • 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.
    <?xml version="1.0" encoding="utf-8"?>
    <network-security-config xmlns:android="http://schemas.android.com/apk/res/android">
        <debug-overrides>
            <trust-anchors>
                <!-- Trust user added CAs while debuggable only -->
                <certificates src="user" />
            </trust-anchors>
        </debug-overrides>
    </network-security-config>
  • 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.
    <?xml version="1.0" encoding="utf-8"?>
    
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools">
    
        <application
            android:networkSecurityConfig="@xml/network_security_config">
        </application>
    
    </manifest>

Now the SSL proxying should work for your app's debug build variant, but not for release build variant.

iOS

  • Launch Charles and keep it running

  • Get the IP address

  • Make sure the iOS device uses the same network as Charles

  • On iOS device

    • Open an application and monitor the traffic on Charles
  • A dialog pops up on computer asking "A connection attempt to Charles has been made from the host ...", just click Allow button

iOS 10.3 and afterwards

  • After the certificate is installed
  • Go to Settings -> General -> About -> Certificate Trust Settings -> Enable Full Trust For Root Certificates -> enable Charles' certificate

Terminal

In case you need to debug via curl in a terminal:

  • To set Charles as the proxy

    export http_proxy=http://127.0.0.1:8888 && export https_proxy=$http_proxy
  • To remove the proxy

    unset http_proxy https_proxy

SSL CA Certificate

  • Charles Proxy running on the same computer provides the same SSL certificate.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].