# Transparent proxy issues. Resolver no attribute 'wfile'

**URL:** <https://discourse.mitmproxy.org/t/transparent-proxy-issues-resolver-no-attribute-wfile/895>\
**Category:** help\
**Created:** [March 6, 2018, 7:01pm UTC](https://discourse.mitmproxy.org/t/transparent-proxy-issues-resolver-no-attribute-wfile/895 "2018-03-06T19:01:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GHXST01](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@GHXST01](https://discourse.mitmproxy.org/u/GHXST01)\
**Post date:** [March 6, 2018, 7:01pm UTC](https://discourse.mitmproxy.org/t/transparent-proxy-issues-resolver-no-attribute-wfile/895/1 "2018-03-06T19:01:12Z")

</div>

For some reason when launching and then putting mitmweb into transparent mode, I receive a 502 bad gateway on my clients and the following error in the terminal:

```
192.168.178.40:41150: clientconnect
192.168.178.40:41150: Transparent mode failure: AttributeError("'Resolver' object has no attribute 'wfile'",)
192.168.178.40:41150: clientdisconnect

```

The reason I have to launch mitmweb in regular mode, and then switch it to transparent mode, is because `mitmweb --mode transparent` throws the error:

```
C:\Users\Admin>mitmweb --mode transparent
Error starting proxy server: PermissionError(13, 'Access is denied.', None, 5)

```

In order to fix this, I need to navigate to the `config.yaml` in `C:\Users\Admin\.mitmproxy` and set the mode back to `regular` manually.

Somewhere it seems that transparent mode is failing to initiate correctly.

Can anyone take a look with me?

---

<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:** [March 6, 2018, 9:15pm UTC](https://discourse.mitmproxy.org/t/transparent-proxy-issues-resolver-no-attribute-wfile/895/2 "2018-03-06T21:15:44Z")

</div>

You currently cannot change the proxy mode during execution - this is what gives you the first weird error. Transparent mode on Windows requires admin privileges, so the second invocation should work if you run it as Administrator.
