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(), ]
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(), ]
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(), ]
def test_prior_knowledge(self): with taddons.context() as tctx: a = disable_h2c.DisableH2C() tctx.configure(a) b = io.BytesIO(b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n") f = tflow.tflow() f.request = http.HTTPRequest.wrap(http1.read_request(b)) f.intercept() a.request(f) assert not f.killable assert f.reply.value == Kill
def test_upgrade(self): with taddons.context() as tctx: a = disable_h2c.DisableH2C() tctx.configure(a) f = tflow.tflow() f.request.headers['upgrade'] = 'h2c' f.request.headers['connection'] = 'foo' f.request.headers['http2-settings'] = 'bar' a.request(f) assert 'upgrade' not in f.request.headers assert 'connection' not in f.request.headers assert 'http2-settings' not in f.request.headers
def test_prior_knowledge(self): with taddons.context() as tctx: a = disable_h2c.DisableH2C() tctx.configure(a) f = tflow.tflow() f.request = tutils.treq( method=b"PRI", path=b"*", http_version=b"HTTP/2.0", ) f.intercept() a.request(f) assert not f.killable assert f.error.msg == flow.Error.KILLED_MESSAGE
def default_addons(): return [ core.Core(), anticache.AntiCache(), anticomp.AntiComp(), check_ca.CheckCA(), #clientplayback.ClientPlayback(), disable_h2c.DisableH2C(), #onboarding.Onboarding(), #proxyauth.ProxyAuth(), #replace.Replace(), #script.ScriptLoader(), #serverplayback.ServerPlayback(), #setheaders.SetHeaders(), #stickyauth.StickyAuth(), #stickycookie.StickyCookie(), #streambodies.StreamBodies(), #readfile.ReadFile(), #upstream_auth.UpstreamAuth(), ]
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(), ]