mike820324 / microProxy

A http/https interceptor written in pure python.
MIT License
17 stars 3 forks source link

[Proposal]: Support response streaming #50

Open mike820324 opened 8 years ago

mike820324 commented 8 years ago

In some condition, we should not buffer the data in our proxy, but instead just stream the data to the client.

It is related to Issue #49.

For more reference, checkout http://docs.mitmproxy.org/en/latest/features/responsestreaming.html

chhsiao90 commented 8 years ago

I think change to response stream depend on the response size is reasonable. So maybe we should just follow how mitmproxy doing to do with this!

mike820324 commented 8 years ago

mitmproxy has the following ways to enable dest stream.

If one specify the command line options, than every connection will use stream mode. The drawback is that, we can not modify the response content since it it already gone, but we can still view it.

mike820324 commented 8 years ago

https://http2.golang.org/clockstream also supper from this issue.

mike820324 commented 8 years ago

There are some factors that we can consider to use response streaming.

If using the response streaming, some of the functionality of plugin script may work properly, which may need to disabled.

chhsiao90 commented 8 years ago

Agreed! Just the same way how mitmproxy doing

mike820324 commented 8 years ago

I think this feature should wait for #119 complete.

chhsiao90 commented 8 years ago

Completely agreed!