HttpCanary Magisk 模块使用教程
httpcanary-magisk项目地址:https://gitcode.com/gh_mirrors/ht/httpcanary-magisk
1. 项目的目录结构及介绍
HttpCanary Magisk 模块的目录结构如下:
httpcanary-magisk/
├── module.prop
├── post-fs-data.sh
├── service.sh
├── system
│ └── etc
│ └── httpcanary
│ ├── httpcanary.jks
│ └── httpcanary.pem
└── uninstall.sh
目录结构介绍
module.prop
: 模块的元数据文件,包含模块的名称、版本、作者等信息。post-fs-data.sh
: 在系统启动时执行的脚本,用于在系统启动阶段进行一些初始化操作。service.sh
: 在系统启动后执行的脚本,用于在系统运行阶段进行一些服务启动操作。system/etc/httpcanary
: 存放 HttpCanary 证书和密钥的目录。httpcanary.jks
: HttpCanary 的 Java 密钥库文件。httpcanary.pem
: HttpCanary 的证书文件。
uninstall.sh
: 卸载模块时执行的脚本,用于清理模块安装时所做的修改。
2. 项目的启动文件介绍
post-fs-data.sh
post-fs-data.sh
文件内容如下:
#!/system/bin/sh
# 在系统启动时执行的脚本
# 复制证书和密钥到系统目录
cp -f /data/adb/modules/httpcanary/system/etc/httpcanary/httpcanary.jks /data/data/com.guoshi.httpcanary/cache/HttpCanary.jks
cp -f /data/adb/modules/httpcanary/system/etc/httpcanary/httpcanary.pem /data/data/com.guoshi.httpcanary/cache/HttpCanary.pem
# 设置权限
chmod 600 /data/data/com.guoshi.httpcanary/cache/HttpCanary.jks
chmod 600 /data/data/com.guoshi.httpcanary/cache/HttpCanary.pem
service.sh
service.sh
文件内容如下:
#!/system/bin/sh
# 在系统启动后执行的脚本
# 启动 HttpCanary 服务
am start -n com.guoshi.httpcanary/.MainActivity
3. 项目的配置文件介绍
module.prop
module.prop
文件内容如下:
id=httpcanary
name=HttpCanary Magisk Module
version=1.0
versionCode=1
author=victor141516
description=HttpCanary Magisk Module to install HttpCanary certificates and keys.
httpcanary.jks 和 httpcanary.pem
这两个文件是 HttpCanary 的证书和密钥文件,用于在设备上安装和配置 HttpCanary 的证书,以便能够拦截和分析 HTTPS 流量。
通过以上介绍,您可以了解 HttpCanary Magisk 模块的目录结构、启动文件和配置文件,从而更好地使用和配置该模块。
httpcanary-magisk项目地址:https://gitcode.com/gh_mirrors/ht/httpcanary-magisk