def default_addons(): return [ core.Core(), browser.Browser(), block.Block(), anticache.AntiCache(), anticomp.AntiComp(), check_ca.CheckCA(), clientplayback.ClientPlayback(), command_history.CommandHistory(), cut.Cut(), disable_h2c.DisableH2C(), export.Export(), onboarding.Onboarding(), proxyauth.ProxyAuth(), script.ScriptLoader(), serverplayback.ServerPlayback(), mapremote.MapRemote(), modifybody.ModifyBody(), modifyheaders.ModifyHeaders(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), streambodies.StreamBodies(), save.Save(), upstream_auth.UpstreamAuth(), ]
async def test_cert(self, client, ext, tdata): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob, confdir=tdata.path("mitmproxy/data/confdir")) resp = client.get(f"/cert/{ext}") assert resp.status_code == 200 assert resp.data
def default_addons(): return [ core.Core(), core_option_validation.CoreOptionValidation(), allowremote.AllowRemote(), anticache.AntiCache(), anticomp.AntiComp(), check_alpn.CheckALPN(), check_ca.CheckCA(), clientplayback.ClientPlayback(), cut.Cut(), disable_h2c.DisableH2C(), export.Export(), onboarding.Onboarding(), proxyauth.ProxyAuth(), replace.Replace(), script.ScriptLoader(), serverplayback.ServerPlayback(), setheaders.SetHeaders(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), streambodies.StreamBodies(), save.Save(), upstream_auth.UpstreamAuth(), ]
async def test_cert(self, ext): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob) resp = self.app("/cert/%s" % ext) assert resp.status_code == 200 assert resp.content
async def test_cert(self, client, ext): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob) resp = client.get(f"/cert/{ext}") assert resp.status_code == 200 assert resp.data
def default_addons(): return [ core.Core(), browser.Browser(), block.Block(), blocklist.BlockList(), anticache.AntiCache(), anticomp.AntiComp(), clientplayback.ClientPlayback(), command_history.CommandHistory(), comment.Comment(), cut.Cut(), disable_h2c.DisableH2C(), export.Export(), onboarding.Onboarding(), proxyauth.ProxyAuth(), proxyserver.Proxyserver(), script.ScriptLoader(), next_layer.NextLayer(), serverplayback.ServerPlayback(), mapremote.MapRemote(), maplocal.MapLocal(), modifybody.ModifyBody(), modifyheaders.ModifyHeaders(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), save.Save(), tlsconfig.TlsConfig(), upstream_auth.UpstreamAuth(), ]
async def test_head(self, client, ext, tdata): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob, confdir=tdata.path("mitmproxy/data/confdir")) resp = client.head( f"http://{tctx.options.onboarding_host}/cert/{ext}") assert resp.status_code == 200 assert "Content-Length" in resp.headers assert not resp.data
async def test_head(self, ext): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob) p = self.pathoc() with p.connect(): resp = p.request( f"head:'http://{tctx.options.onboarding_host}/cert/{ext}'") assert resp.status_code == 200 assert "Content-Length" in resp.headers assert not resp.content
def default_addons(): return [ onboarding.Onboarding(), anticache.AntiCache(), anticomp.AntiComp(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), script.ScriptLoader(), filestreamer.FileStreamer(), streambodies.StreamBodies(), replace.Replace(), setheaders.SetHeaders(), serverplayback.ServerPlayback(), clientplayback.ClientPlayback(), ]
def default_addons(): return [ onboarding.Onboarding(), proxyauth.ProxyAuth(), anticache.AntiCache(), anticomp.AntiComp(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), script.ScriptLoader(), streamfile.StreamFile(), streambodies.StreamBodies(), replace.Replace(), setheaders.SetHeaders(), serverplayback.ServerPlayback(), clientplayback.ClientPlayback(), upstream_auth.UpstreamAuth(), disable_h2c_upgrade.DisableH2CleartextUpgrade(), ]
def default_addons(): return [ core.Core(), browser.Browser(), block.Block(), anticache.AntiCache(), anticomp.AntiComp(), check_ca.CheckCA(), clientplayback.ClientPlayback(), cut.Cut(), disable_h2c.DisableH2C(), export.Export(), onboarding.Onboarding(), proxyauth.ProxyAuth(), replace.Replace(), script.ScriptLoader(), serverplayback.ServerPlayback(), setheaders.SetHeaders(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), streambodies.StreamBodies(), save.Save(), upstream_auth.UpstreamAuth(), ]
async def test_basic(self, client): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob) assert client.get("/").status_code == 200
def addons(self): return [onboarding.Onboarding()]
async def test_basic(self): ob = onboarding.Onboarding() with taddons.context(ob) as tctx: tctx.configure(ob) assert self.app("/").status_code == 200