alibaba / alibaba/anyproxy

如何针对请求定制rule的类似afterSendRequest,afterSendResponse两个方法

Open
#495 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Plese fill the template when you reporting a new issue, thanks!

想针对某个域名下的所有请求接口入参,以及接口返回值,都坐下指定方式的解密处理。处理后在浏览器中body source中展示已解密的请求入参以及接口详情返回。

但在serverResData中仍展示实际接口已加密的入参以及已加密的返回值。

#### Which platform are you running AnyProxy

Mac OS

#### The version of the AnyProxy

version:4.1.0

#### Your expected behavior of AnyProxy

拦截指定域名下的请求,将已加密的入参以及返回值,解密显示在浏览器anyproxy中。接口间的值传递还保持原始未解密的数据传递。

期望有类似afterSendRequest,afterSendResponse 方法,在已经发送请求完毕以及响应完毕后,再进行参数的解密操作。

#### The actual behavior of AnyProxy

如果使用beforeSendResponse 将原始加密返回字符串,进行解密操作后,后面其他接口会报错。

#### The log of the error

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing AnyProxy 4.1.0's existing beforeSendResponse flow and the documented serverResData behavior. Compare that path with the requested afterSendRequest and afterSendResponse hooks. Done means decrypted values can be displayed in the browser while subsequent interfaces and serverResData retain the original encrypted data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.