@hackage https-everywhere-rules0.0.1
High-level access to HTTPS Everywhere rulesets.
Installation
Dependencies (13)
- attoparsec >=0.12 && <0.13
- base >=4.7 && <4.8
- errors >=1.4 && <1.5
- functor-infix >=0.0 && <0.1
- http-client >=0.3 && <0.4
- https-everywhere-rules-raw Show all…
Dependents (1)
@hackage/acme-everything
https-everywhere-rules
Haskell package providing high-level access to HTTPS Everywhere rulesets. This makes it easier to tell other programs: "I'd like if you used secure HTTP connections when possible."
λ: :m + Data.HTTPSEverywhere.Rules Network.URI
λ: let Just eff = parseURI "http://www.eff.org/document/eff-and-aclu-amicus-brief-klayman"
λ: rewriteURL eff
Just https://www.eff.org/document/eff-and-aclu-amicus-brief-klayman
λ: :m + Web.Cookie Network.HTTP.Client Data.Time.Clock Control.Applicative
λ: :set -XOverloadedStrings
λ: (now, req) <- (,) <$> getCurrentTime <*> parseUrl "https://github.com"
λ: let (Just gh, Just ck) = (parseURI "https://github.com", generateCookie (def{setCookieDomain=Just "github.com"}) req now True)
λ: rewriteCookie gh ck
Cookie {cookie_name = "name", cookie_value = "value", cookie_expiry_time = 3013-12-25 00:00:00 UTC, cookie_domain = "github.com", cookie_path = "/", cookie_creation_time = 2014-08-24 05:58:20.691866 UTC, cookie_last_access_time = 2014-08-24 05:58:20.691866 UTC, cookie_persistent = False, cookie_host_only = False, cookie_secure_only = True, cookie_http_only = False}
Rules are provided via https-everywhere-rules-raw, which is
versioned consistently with upstream releases. Thus, the version of
the rule database used here is configurable via the installed version of
that package.