-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
bin/ | ||
gen/ | ||
local.properties | ||
*.iml | ||
.idea | ||
.cxx | ||
target/ | ||
obj/ | ||
libs/armeabi/redsocks | ||
libs/armeabi/shadowsocks | ||
libs/armeabi/shrpx | ||
gen-external-apklibs/ | ||
classes/ | ||
.gradle | ||
build/ | ||
app/release |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
# proxydroid | ||
编译版https://github.com/madeye/proxydroid | ||
修改自https://github.com/madeye/proxydroid | ||
|
||
# remark | ||
- Android代理软件大多不支持认证,而从google play上下载的proxydroid apk有广告,所以去掉广告编译了下 | ||
# 用途 | ||
- 通过配置Android iptables代理,捕获所有APP数据包(包括Proxy.NO_proxy设置) | ||
- 增加自动导入证书到system功能,使得代理可以解码https协议 | ||
- 下载[Proxydroid.apk](https://github.com/zzzzfeng/proxydroid/releases) | ||
|
||
# 步骤 | ||
###########2020/02/13版代码支持gradle编译,使用Android studio即可########### | ||
源码使用maven编译 | ||
|
||
- 首先要编译android-sdk-deployer工具下载android相关依赖 | ||
``` | ||
git clone https://github.com/mosabua/maven-android-sdk-deployer.git | ||
pushd maven-android-sdk-deployer | ||
export ANDROID_HOME=【/path/to/android/sdk】 | ||
mvn install -P 【4.1】 | ||
popd | ||
``` | ||
需要修改pom.xml中的android.sdk.platform为本地sdk版本,并查看profile是否存在对应版本。然后mvn install -P version | ||
|
||
- 然后编译proxydroid | ||
- 修改proxydroid pom.xml的`<sdk><platform>` | ||
- 注释掉com.google.android.gms和com.flurry.android依赖 | ||
- 搜索源码(包括androidmanifest.xml)中的flurry、android.gms、AdView,去掉相关代码 | ||
- 最后mvn clean install编译 | ||
|
||
如果编译脚本出现命令执行错误,可直接执行命令获得错误详细信息 | ||
# 注意 | ||
- 将代理证书(一般pem格式)转成`<hash>.0`格式,然后adb push到手机/data/local/tmp/目录 | ||
``` | ||
(openssl x509 -inform DER -in your_cacert.der -out cacert.pem) | ||
openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1 | ||
mv cacert.pem <hash>.0 | ||
``` | ||
- app会导入/data/local/tmp/目录下所有符合格式的证书 | ||
- 代理推荐使用mitmproxy,若使用fiddler,需要执行`prefs set fiddler.network.https.SetCNFromSNI true`开启SNI才行 | ||
- 另外一种可以抓到全局包的方案是使用[VPN模式](https://github.com/raise-isayan/TunProxy),使用[appstarter](https://github.com/zzzzfeng/appstarter)工具辅助导入证书 |