# Can mitmproxy terminate TLS for itself?

**URL:** https://discourse.mitmproxy.org/t/can-mitmproxy-terminate-tls-for-itself/1627
**Category:** help
**Created:** [August 3, 2019, 7:09pm UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-terminate-tls-for-itself/1627 "2019-08-03T19:09:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mdz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mdz/32/455_2.png) [@mdz](https://discourse.mitmproxy.org/u/mdz)
#### Post date: [August 3, 2019, 7:09pm UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-terminate-tls-for-itself/1627/1 "2019-08-03T19:09:54Z")

</div>

I want clients to connect to mitmproxy using TLS, i.e. http\_proxy=https://mitmproxy.example.com/

I know mitmproxy has support for intercepting HTTPS connections through the proxy, but I’m talking about the incoming connection to the proxy. Where would I configure the certificate for this?

---

<div class="post-metadata">

### Author: ![mdz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mdz/32/455_2.png) [@mdz](https://discourse.mitmproxy.org/u/mdz)
#### Post date: [August 9, 2019, 12:46am UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-terminate-tls-for-itself/1627/2 "2019-08-09T00:46:43Z")

</div>

I see, I can use `--cert=mitmproxy.example.com=/path/to/cert.pem` and connect via HTTPS to the proxy
