您的位置:首页 > 理论基础 > 计算机网络

Ubuntu使用Charles监控Android手机网络请求

2016-05-24 14:22 543 查看
核心思想是Android手机使用ubuntu pc中的网络代理Charles,然后手机的网络数据都会先到Charles, 然后使用Charles的网络数据分析工具分析网络


安装Charles

下面代码来源https://gist.github.com/heyalexej/,并做了精简

#!/usr/bin/env sh
set -e
# install charles proxy from deb sources.
# http://www.charlesproxy.com sudo sh -c 'echo "deb http://www.charlesproxy.com/packages/apt/ charles-proxy main" > /etc/apt/sources.list.d/charles-proxy.list'
wget -q http://www.charlesproxy.com/packages/apt/PublicKey -O - | sudo apt-key add -

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y charles-proxy
# or for the brave
#sudo apt-get install -y charles-proxy-beta


运行charles

执行./charles即可

配置手机代理

1)连接一个wifi网络 (比如 ‘itleaks’)

2)进入setting,选择wifi选项

3)长按已经连接的wifi网络 ‘itleaks’

4) Modify network config-> Show advanced options.

Set proxy settings.

ip: 设置为pc的ip

port:8888
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息