diff --git a/.gitattributes b/.gitattributes
index 3ecf8f083..dd08ee53a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,2 @@
-mitmproxy/web/static/**/* -diff
+mitmproxy/tools/web/static/**/* -diff
web/src/js/filt/filt.js -diff
diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py
index f617bd085..ed95f5361 100644
--- a/mitmproxy/tools/web/app.py
+++ b/mitmproxy/tools/web/app.py
@@ -376,19 +376,22 @@ class Settings(RequestHandler):
no_upstream_cert=self.master.options.no_upstream_cert,
rawtcp=self.master.options.rawtcp,
http2=self.master.options.http2,
+ websocket=self.master.options.websocket,
anticache=self.master.options.anticache,
anticomp=self.master.options.anticomp,
stickyauth=self.master.options.stickyauth,
stickycookie=self.master.options.stickycookie,
stream=self.master.options.stream_large_bodies,
- contentViews=[v.name.replace(' ', '_') for v in contentviews.views]
+ contentViews=[v.name.replace(' ', '_') for v in contentviews.views],
+ listen_host=self.master.options.listen_host,
+ listen_port=self.master.options.listen_port,
))
def put(self):
update = self.json
option_whitelist = {
"intercept", "showhost", "no_upstream_cert",
- "rawtcp", "http2", "anticache", "anticomp",
+ "rawtcp", "http2", "websocket", "anticache", "anticomp",
"stickycookie", "stickyauth", "stream_large_bodies"
}
for k in update:
diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py
index edb124679..22cc156f5 100644
--- a/mitmproxy/tools/web/master.py
+++ b/mitmproxy/tools/web/master.py
@@ -10,6 +10,7 @@ from mitmproxy.addons import eventstore
from mitmproxy.addons import intercept
from mitmproxy.addons import termlog
from mitmproxy.addons import view
+from mitmproxy.options import Options # noqa
from mitmproxy.tools.web import app
diff --git a/mitmproxy/tools/web/static/app.css b/mitmproxy/tools/web/static/app.css
index cc3f11825..6799d23e7 100644
Binary files a/mitmproxy/tools/web/static/app.css and b/mitmproxy/tools/web/static/app.css differ
diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js
index 3c7efa080..7e3a7ea88 100644
Binary files a/mitmproxy/tools/web/static/app.js and b/mitmproxy/tools/web/static/app.js differ
diff --git a/mitmproxy/tools/web/static/vendor.js b/mitmproxy/tools/web/static/vendor.js
index 4d3c1ce2b..39361c780 100644
Binary files a/mitmproxy/tools/web/static/vendor.js and b/mitmproxy/tools/web/static/vendor.js differ
diff --git a/web/src/js/components/Footer.jsx b/web/src/js/components/Footer.jsx
index 1ae4ee739..ee26dad2a 100644
--- a/web/src/js/components/Footer.jsx
+++ b/web/src/js/components/Footer.jsx
@@ -7,7 +7,8 @@ Footer.propTypes = {
}
function Footer({ settings }) {
- let {mode, intercept, showhost, no_upstream_cert, rawtcp, http2, anticache, anticomp, stickyauth, stickycookie, stream_large_bodies} = settings;
+ let {mode, intercept, showhost, no_upstream_cert, rawtcp, http2, websocket, anticache, anticomp,
+ stickyauth, stickycookie, stream_large_bodies, listen_host, listen_port} = settings;
return (
)
}
diff --git a/web/src/js/components/Header/OptionMenu.jsx b/web/src/js/components/Header/OptionMenu.jsx
index 186a9c6a1..f1d19f48f 100644
--- a/web/src/js/components/Header/OptionMenu.jsx
+++ b/web/src/js/components/Header/OptionMenu.jsx
@@ -31,6 +31,10 @@ function OptionMenu({ settings, updateSettings }) {
checked={settings.http2}
onToggle={() => updateSettings({ http2: !settings.http2 })}
/>
+ updateSettings({ websocket: !settings.websocket })}
+ />
updateSettings({ anticache: !settings.anticache })}