{"id":13894322,"url":"https://github.com/romkatv/hcproxy","last_synced_at":"2025-10-03T21:51:01.718Z","repository":{"id":103726693,"uuid":"141009570","full_name":"romkatv/hcproxy","owner":"romkatv","description":"Fast HTTPS and WebSocket proxy","archived":false,"fork":false,"pushed_at":"2024-06-27T08:06:32.000Z","size":73,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T16:25:06.223Z","etag":null,"topics":["fast","https-proxy","websocket-proxy"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romkatv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-15T08:07:53.000Z","updated_at":"2024-06-27T17:27:58.000Z","dependencies_parsed_at":"2024-06-27T08:58:45.891Z","dependency_job_id":"38e3eb06-097e-4748-89e4-92aa729aefca","html_url":"https://github.com/romkatv/hcproxy","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":0.01754385964912286,"last_synced_commit":"ac97d4be258c4886cd7240e7cd9a87ef5fbbe493"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/romkatv/hcproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romkatv%2Fhcproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romkatv%2Fhcproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romkatv%2Fhcproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romkatv%2Fhcproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romkatv","download_url":"https://codeload.github.com/romkatv/hcproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romkatv%2Fhcproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278234029,"owners_count":25953075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fast","https-proxy","websocket-proxy"],"created_at":"2024-08-06T18:01:29.544Z","updated_at":"2025-10-03T21:51:01.702Z","avatar_url":"https://github.com/romkatv.png","language":"C++","readme":"# hcproxy\n**hcproxy** is a lightweight forward HTTP proxy that implements just one HTTP method -- `CONNECT`.\n\nWith decent network drivers tunneling is zero copy, which makes `hcproxy` fast and efficient. The price for this is 6 file descriptors per connection (client socket, server socket and two pipes).\n\n## Requirements\n\n*  To compile: C++17 compiler.\n*  To run: Linux, `libc`.\n*  To run as daemon: `systemd`.\n\n## Compiling\n\n```shell\ngit clone https://github.com/romkatv/hcproxy.git\ncd hcproxy\nmake\n```\n\n## Installing locally\n\nInstall `hcproxy` as a `systemd` service:\n```shell\nsudo make install\n```\n\nVerify that the service is running:\n```console\n$ systemctl status hcproxy\n● hcproxy.service - HTTP CONNECT proxy\n   Loaded: loaded (/lib/systemd/system/hcproxy.service; enabled; vendor preset: enabled)\n   Active: active (running) since Fri 2018-07-13 13:02:09 UTC; 30s ago\n   ...\n```\n\nTry it out:\n```console\n$ curl -x localhost:8889 https://www.google.com/\n\u003c!doctype html\u003e...\n```\n\nIf you want to fetch an `http` URL (rather than `https`), use `-p` to force `curl` to use `CONNECT` for proxying all traffic:\n```console\n$ curl -p -x localhost:8889 http://www.google.com/\n\u003c!doctype html\u003e...\n```\n\n## Installing remotely via SSH\n\n```shell\n./install-via-ssh certificate.pem user@12.34.56.78\n```\n\n## Configuring\n\nTo change configuration, you'll need to modify the source code of `main()` in `hcproxy.cc` and recompile. For example, here's how you can change the port on which `hcproxy` listens and the timeout for establishing outgoing connections.\n\n```diff\n   hcproxy::Options opt;\n+  opt.listen_port = 1234;\n+  opt.connect_timeout = std::chrono::seconds(30);\n   hcproxy::RunProxy(opt);\n```\n\nThe list of options, their descriptions and default values can be found in the source code.\n\nThe behavior of `hcproxy` cannot be customized through request headers. It simply ignores all headers.\n\n## Using `hcproxy` as web browser proxy\n\nYou can use `hcproxy` as web browser proxy. However, unless you can convince your browser to tunnel all traffic via HTTP `CONNECT`, fetching plain `http` URLs won't work. WebSocket (`ws` and `wss` protocols) and `https` will work fine as they always go through `CONNECT`.\n\n## Troubleshooting\n\nIf `hcproxy` doesn't like an incoming request (e.g., it's not a `CONNECT`) or cannot connect to the downstream server, it simply closes the incoming connection. It never replies with an HTTP error. The only response it ever sends to the client is HTTP 200.\n\nLogs are written to `stderr`. Severity levels:\n\n*  `INFO`: Normal operation.\n*  `WARN`: Request-related errors such as unparsable content or unresolvable hosts.\n*  `ERROR`: Abnormal conditions that may affect all requests; for example, running out of file descriptors.\n*  `FATAL`: Unexpected error or assertion failure; `hcproxy` will abort after writing the message.\n\nTo disable all logs except `FATAL` (which cannot be disabled), add `-DHCP_MIN_LOG_LVL=FATAL` compiler flag to `Makefile` and recompile.\n\nIf you've installed `hcproxy` as `systemd` service, you can read logs with `journalctl`. Start and stop events, as well as crashes and logs, are recorded there:\n\n```shell\njournalctl -u hcproxy | tail\n```\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromkatv%2Fhcproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromkatv%2Fhcproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromkatv%2Fhcproxy/lists"}