{"id":19174622,"url":"https://github.com/equalitie/https-proxy","last_synced_at":"2026-03-10T11:07:23.479Z","repository":{"id":85416602,"uuid":"41492341","full_name":"equalitie/HTTPS-Proxy","owner":"equalitie","description":"A Node.js proxy server that rewrites URLs in requests and retrieved documents using the HTTPS Everywhere rulesets","archived":false,"fork":false,"pushed_at":"2015-09-01T15:38:02.000Z","size":281,"stargazers_count":39,"open_issues_count":1,"forks_count":5,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-13T04:40:31.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/equalitie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-27T14:42:48.000Z","updated_at":"2024-02-09T18:15:28.000Z","dependencies_parsed_at":"2023-03-13T05:10:49.123Z","dependency_job_id":null,"html_url":"https://github.com/equalitie/HTTPS-Proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/equalitie/HTTPS-Proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2FHTTPS-Proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2FHTTPS-Proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2FHTTPS-Proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2FHTTPS-Proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equalitie","download_url":"https://codeload.github.com/equalitie/HTTPS-Proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2FHTTPS-Proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30331662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T10:18:32.911Z","updated_at":"2026-03-10T11:07:23.463Z","avatar_url":"https://github.com/equalitie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTPS Proxy\n\nThis is a simple proxy server using [request.js](https://github.com/request/request) and\n[Node.js](https://nodejs.org/)' builtin [HTTP library](https://nodejs.org/api/http.html)\nto rewrite incoming requests for sites using the HTTP protocol to use HTTPS.\n\nIt achieves this using the [Electronic Frontier Foundation](https://www.eff.org/)'s\n[HTTPS Everywhere](https://github.com/EFForg/https-everywhere) ruleset\n([official site](https://www.eff.org/HTTPS-EVERYWHERE)) and part of the codebase.\nBelow you will find a copy of the licensing information for the HTTPS Everywhere\nproject.  We ask that you kindly observe and respect existing copyrights and licensing\nterms relevant to both the MIT license used by EFF as well as the GNU Affero GPL v0.3\nlicense used by eQualit.ie.\n\n# Using this software\n\n## Dependencies\n\n### Node.js and NPM\n\nYou can download Node.js and NPM together directly from the [official site](https://nodejs.org/download/).\n\n### HTTPS Everywhere rulesets\n\nBefore you can use HTTPS-Proxy, HTTPS Everywhere's rulesets must first be downloaded and compiled\ninto a single xml file.  All of this and more is handled automatically with the `fetchrules` script.\n\n```bash\nsh tools/fetchrules.sh\n```\n### Libraries\n\nNext you must install the dependencies HTTPS-Proxy relies on.\n\n```bash\nnpm install\n```\n\n## Configuration\n\nConfiguration settings for HTTPS-Proxy are provided in `config.js`. Below are short explanations\nfor each of the available configuration options.  Note that most of the settings pertain to\noptions for the [request](https://github.com/request/request) library, which you can read more\nabout [in the request README](https://github.com/request/request#requestoptions-callback).\n\n* `port` - The port number to have HTTPS-Proxy listen on\n* `address` - The IP address HTTPS-Proxy should bind to\n* `rewritePages` - Whether or not HTTPS-Proxy should rewrite HTTP URLs to HTTPS in responses it receives\n* `aggressive` - When true, HTTPS-Proxy will overwrite URLs in all responses, otherwise only in text (html, css, ...)\n* `followRedirect` - Whether or not HTTPS-Proxy should follow a status code 304 redirect\n* `followAllRedirects` - Whether HTTPS-Proxy should follow **all** redirects\n* `maxRedirects` - The maximum number of redirects HTTPS-Proxy should follow before returning the last response\n* `useProxy` - Whether or not HTTPS-Proxy should use another proxy to send requests through\n* `proxy` - The URI of the proxy to use. Only applies if `useProxy` is true\n* `strictSSL` - Whether or not SSL certificate validity should be strictly enforced\n* `useTunnel` - Whether or not HTTPS-Proxy should tunnel CONNECT requests and websocket data\n* `tunnel` - The settings for the tunnel\n\n## Running\n\nAfter you have downloaded the HTTPS Everywhere rulesets, installed the required dependencies,\nand changed any configuration settings you'd like, running HTTPS-Proxy is very simple.\n\n```bash\nnpm start\n```\n\n## Testing\n\nHTTPS-Proxy's unit tests can be run from the `HTTPS-Proxy/` directory with the following command:\n\n```bash\nnpm test\n```\n\n### Okay, I know the tests pass, but how do I know I'm secure?\n\nIf you would like to verify that HTTPS-Proxy is doing its job and rewriting the URLs of requests you\nproxy through it, run the following commands.\n\n```bash\nnpm start # Start HTTPS-Proxy if you haven't already. Assuming it is still on port 5641\ncurl -i -x http://127.0.0.1:5641 http://reddit.com \u003e download1\ncurl -i http://reddit.com \u003e download2\n/usr/bin/diff -y download1 download2\n```\n\nSites like Reddit only use HTTPS, so trying to get it using HTTP as in the second `curl` will\nnot succeed.  When you run `diff`, you should see the headers received from the first request,\nrewritten to use HTTPS, on the left, and the headers of the request that wasn't rewritten on\nthe right.\n\n```\nHTTP/1.1 200 OK                                               | HTTP/1.1 301 Moved Permanently\nserver: cloudflare-nginx                                      | Date: Thu, 27 Aug 2015 21:16:24 GMT\ndate: Thu, 27 Aug 2015 21:16:17 GMT                           | Transfer-Encoding: chunked\ncontent-type: text/html; charset=UTF-8                        | Connection: keep-alive\ntransfer-encoding: chunked                                    | Set-Cookie: __cfduid=d49ff83163d2fa4e5151df7c33d3034181440710\nconnection: close                                             | Location: https://www.reddit.com/\nset-cookie: __cfduid=d1e297e4e5de5b53248b2b591758c67db14      | X-Content-Type-Options: nosniff\nx-ua-compatible: IE=edge                                      | Server: cloudflare-nginx\nx-frame-options: SAMEORIGIN                                   | CF-RAY: 21cacc1b97ca0f9f-YYZ\nx-content-type-options: nosniff                               \u003c\nx-xss-protection: 1; mode=block                               \u003c\nvary: accept-encoding                                         \u003c\ncache-control: max-age=0, must-revalidate                     \u003c\nx-moose: majestic                                             \u003c\nstrict-transport-security: max-age=15552000; includeSubD      \u003c\ncf-cache-status: EXPIRED                                      \u003c\ncf-ray: 21cacbdc5e880fab-YYZ                                  \u003c\n```\n\n### That's pretty cool, but what about the links in a page?\n\nIf you haven't changed the `rewritePages` configuration option from `true` to `false`,\nHTTPS-Proxy will also rewrite any URLs it finds in pages using HTTP to HTTPS where there's\na rule for that URL.  You can test that it's working properly using a simple HTTP server\nshipped with [Python](https://docs.python.org/2/library/simplehttpserver.html) and a simple\nHTML document contained in the HTTPS-Proxy tests.\n\nLoad up two terminals.\n\nIn your first terminal:\n\n```bash\nnpm start\u0026 # Start HTTPS-Proxy if you haven't already\ncd tests\npython -m SimpleHTTPServer 8080\n```\n\nIn your second terminal:\n\n```html\ncurl http://127.0.0.1:8080/contentrewrite.html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eHTTPS-Proxy Test\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003e\n      \u003ca href=\"http://reddit.com/\"\u003eThis anchor's URL should be rewritten\u003c/a\u003e\n    \u003c/p\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n\ncurl -x http://127.0.0.1:5641 http://127.0.0.1:8080/contentrewrite.html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eHTTPS-Proxy Test\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003e\n      \u003ca href=\"https://reddit.com/\"\u003eThis anchor's URL should be rewritten\u003c/a\u003e\n    \u003c/p\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nAs you can see, in the output from the first `curl` where we didn't proxy\nthrough HTTPS-Proxy, we just got the contents of `contentrewrite.html` as\nthey are.  In the second case, we do proxy through HTTPS-Proxy and we can\nsee that the URL to Reddit in the anchor tag has been rewritten to use HTTPS!\n\n# HTTPS Everywhere license\n\nHTTPS Everwyhere:\nCopyright © 2010-2012 Mike Perry \u003cmikeperry@fscked.org\u003e\n                      Peter Eckersley \u003cpde@eff.org\u003e\n                      and many others\n                      (Licensed GPL v2+)\n\nIncorporating code from NoScript,\nCopyright © 2004-2007 Giorgio Maone \u003cg.maone@informaction.com\u003e\nLicensed GPL v2+\n\nIncorporating code from Convergence\nCopyright © Moxie Marlinspike\nLicensed GPL v3+\n\nIncorporating code from URI.js\nCopyright © Rodney Rehm\nLicensed MIT, GPL V3\n\nIncorporating code from js-lru\nCopyright © 2010 Rasmus Andersson\nLicensed MIT\n\nThe build system incorporates code from Python 2.6,\nCopyright © 2001-2006 Python Software Foundation\nPython Software Foundation License Version 2\n\nNet License:  GPL v3+ (complete tree)\n              GPL v2+ (if Moxie's NSS.js is absent)\n\n\nText of MIT License:\n====================\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fhttps-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequalitie%2Fhttps-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fhttps-proxy/lists"}