1.0 能用
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package net.bluemangoo.indpjsk.data
|
||||
|
||||
import java.io.File
|
||||
|
||||
data class CaptureProfile(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val steps: List<CaptureProfileStep>
|
||||
)
|
||||
|
||||
data class CaptureProfileStep(
|
||||
val id: String,
|
||||
val name: String,
|
||||
/** 该步骤可能命中的上游域名;TW/KR 的 cdn / https 两个域名都会出现 */
|
||||
val hosts: List<String>,
|
||||
/** 匹配 path + query 的正则(Rust 侧 Regex::is_match) */
|
||||
val path: String,
|
||||
val fileName: String,
|
||||
/**
|
||||
* 该步骤抓成功后异步执行(不阻塞下一步的监听)。
|
||||
* 没有填上传码时会走这里;参数是本次抓包的结果。
|
||||
*/
|
||||
val postAction: suspend (CaptureResult) -> Unit = {},
|
||||
)
|
||||
|
||||
/** 一步抓包完成后的结果,交给 postAction 用 */
|
||||
data class CaptureResult(
|
||||
val profile: CaptureProfile,
|
||||
val step: CaptureProfileStep,
|
||||
/** 命中的原始完整 URL(https://host/path?query,MySekai 的 flag 已改写为 True) */
|
||||
val url: String,
|
||||
/** 抓到的响应体文件 */
|
||||
val file: File,
|
||||
)
|
||||
Reference in New Issue
Block a user