GithubHelp home page GithubHelp logo

Comments (5)

wuchangming avatar wuchangming commented on September 10, 2024

应该是可以直接调整这里 requestOptions 的参数。
https://github.com/wuchangming/node-mitmproxy#requestinterceptor

    requestInterceptor: (requestOptions, clientReq, clientRes, ssl, next) => {
        next();
    }

可以参考下:https://github.com/wuchangming/spy-debugger/blob/master/src/proxy/spyProxy.js#L102

from node-mitmproxy.

lang233 avatar lang233 commented on September 10, 2024

我是想修改post请求里的form参数,我看参考代码好像只是修改header吧

from node-mitmproxy.

lang233 avatar lang233 commented on September 10, 2024

查看了您的代码看到如下:
https://github.com/wuchangming/node-mitmproxy/blob/master/src/mitmproxy/createRequestHandler.js#L77

req.on('aborted', function () {
      proxyReq.abort();
 });
req.pipe(proxyReq);

客户端的request请求(read stream)经过管道传输给了代理proxyReq(writeable stream),这就导致我没办法通过prxoyReq.write()修改原有的参数(会在原有的参数上加上write里的值),而且在requestInterceptor是没有proxyReq这个对象更是没办法操作。

from node-mitmproxy.

wuchangming avatar wuchangming commented on September 10, 2024

@lang233 ,确实。
抱歉,这个项目写完后,由于本人没别的需求场景就没太维护了。”年久失修“的项目,欢迎PR或者仅供参考吧,😂。同时,还是感谢反馈问题。

from node-mitmproxy.

LordJD avatar LordJD commented on September 10, 2024

@lang233 为什么要重写,拿到header和data,直接重发不就好了吗?

from node-mitmproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.