# HTTPS inspection

**URL:** <https://discourse.mitmproxy.org/t/https-inspection/560>\
**Category:** development\
**Created:** [July 27, 2017, 9:00am UTC](https://discourse.mitmproxy.org/t/https-inspection/560 "2017-07-27T09:00:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lior\_Checkpoint](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@Lior\_Checkpoint](https://discourse.mitmproxy.org/u/Lior_Checkpoint)\
**Post date:** [July 27, 2017, 9:00am UTC](https://discourse.mitmproxy.org/t/https-inspection/560/1 "2017-07-27T09:00:57Z")

</div>

I would like to implement SSL inspection module using mitmproxy.

Is it possible to intercept every HTTPS **packet** after decryption, before sending it to the other side (client/server),  
forward it to another service, which makes the inspection.  
get the service’s response,  
and finally send a new packet to the other side with the inspection changes?

It is important to the inspection service that the scope of the inspection will contain the entire packet. (HTTP request/response is not enough)

Thanks

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [July 27, 2017, 2:27pm UTC](https://discourse.mitmproxy.org/t/https-inspection/560/2 "2017-07-27T14:27:33Z")

</div>

Hi @Lior_Checkpoint,

Mitmproxy internally does not work with packet-level granularity. We just open a regular TCP socket, so we don’t have access to individual packet information. You can use mitmproxy to do TLS interception, log TLS master secrets, and use the original PCAP, but doing this live is highly impractical and requires additional tools.
