{"id":23461159,"url":"https://github.com/hightemp/https_proxy","last_synced_at":"2026-05-03T09:10:36.493Z","repository":{"id":248262771,"uuid":"828219137","full_name":"hightemp/https_proxy","owner":"hightemp","description":"This is a simple implementation of a secure HTTP proxy server in Go. The proxy server uses basic authentication.","archived":false,"fork":false,"pushed_at":"2024-12-21T09:43:28.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T00:42:52.726Z","etag":null,"topics":["go","golang","http-proxy","https","https-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hightemp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-13T13:21:14.000Z","updated_at":"2024-12-21T10:02:22.000Z","dependencies_parsed_at":"2024-08-04T09:47:03.317Z","dependency_job_id":null,"html_url":"https://github.com/hightemp/https_proxy","commit_stats":null,"previous_names":["hightemp/https_proxy"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hightemp%2Fhttps_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hightemp%2Fhttps_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hightemp%2Fhttps_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hightemp%2Fhttps_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hightemp","download_url":"https://codeload.github.com/hightemp/https_proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514317,"owners_count":21116930,"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","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":["go","golang","http-proxy","https","https-proxy"],"created_at":"2024-12-24T07:29:38.876Z","updated_at":"2026-05-03T09:10:36.481Z","avatar_url":"https://github.com/hightemp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure HTTP Proxy Server\n\n[![Go Version](https://img.shields.io/github/go-mod/go-version/hightemp/https_proxy)](go.mod)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![GitHub release](https://img.shields.io/github/v/release/hightemp/https_proxy)](https://github.com/hightemp/https_proxy/releases)\n[![GitHub Downloads](https://img.shields.io/github/downloads/hightemp/https_proxy/total)](https://github.com/hightemp/https_proxy/releases)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/hightemp/https_proxy/release.yml)](https://github.com/hightemp/https_proxy/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hightemp/https_proxy)](https://goreportcard.com/report/github.com/hightemp/https_proxy)\n\nA secure HTTP/HTTPS proxy server in Go with Basic authentication, TLS support, and upstream proxy chaining.\n\n## Features\n\n- HTTP and HTTPS proxy modes\n- Basic authentication\n- TLS with configurable certificates\n- Upstream proxy chaining (proxy chain support)\n  - Supports HTTP and HTTPS upstream proxies\n  - Configurable via `config.yaml` or environment variables (`HTTPS_PROXY`, `HTTP_PROXY`)\n  - Basic authentication to upstream proxy\n- Configurable via YAML file\n- Systemd service support\n- Graceful shutdown\n\n## Installation\n\n### From release\n\nDownload the latest binary from the [Releases](https://github.com/hightemp/https_proxy/releases) page.\n\n### Docker\n\nhttps://hub.docker.com/repository/docker/hightemp/https_proxy/general\n\nOne-liner (HTTP proxy on port 8080, **no authentication**):\n\n```sh\ndocker run -d --name https_proxy -p 8080:8080 hightemp/https_proxy:latest\n```\n\nEnable Basic auth via env vars:\n\n```sh\ndocker run -d --name https_proxy -p 8080:8080 \\\n  -e PROXY_USERNAME=alice -e PROXY_PASSWORD=s3cret \\\n  hightemp/https_proxy:latest\n```\n\n\u003e If both `username` and `password` are empty, authentication is disabled.\n\nWith a custom config:\n\n```sh\ndocker run -d --name https_proxy -p 8080:8080 -v $(pwd)/config.yaml:/etc/https_proxy/config.yaml:ro hightemp/https_proxy:latest\n```\n\n#### Environment variables\n\nAny of these override the corresponding YAML field:\n\n| Variable | Overrides |\n|---|---|\n| `PROXY_ADDR` | `proxy_addr` |\n| `PROXY_USERNAME` | `username` |\n| `PROXY_PASSWORD` | `password` |\n| `PROXY_PROTO` | `proto` (`http` / `https`) |\n| `PROXY_CERT_PATH` | `cert_path` |\n| `PROXY_KEY_PATH` | `key_path` |\n| `PROXY_UPSTREAM_PROXY` | `upstream_proxy` |\n\n### Docker Compose (HTTP + HTTPS with Let's Encrypt)\n\nThe bundled [docker-compose.yml](docker-compose.yml) starts an HTTP proxy, an HTTPS proxy, and a `certbot` sidecar that issues and auto-renews Let's Encrypt certificates into a shared volume. All settings come from a `.env` file — no YAML editing required.\n\n1. Copy the env template and fill it in:\n\n    ```sh\n    cp .env.example .env\n    # edit DOMAIN, EMAIL, PROXY_USERNAME, PROXY_PASSWORD\n    ```\n\n2. Issue the initial Let's Encrypt certificate (port 80 must be reachable on `$DOMAIN`):\n\n    ```sh\n    docker compose run --rm --service-ports certbot issue\n    ```\n\n3. Start the stack:\n\n    ```sh\n    docker compose up -d\n    ```\n\nCertbot renews certificates automatically every 12 hours. Restart the HTTPS proxy after a renewal if needed:\n\n```sh\ndocker compose restart https-proxy\n```\n\n### Build from source\n\n1. Clone the repository:\n\n    ```sh\n    git clone https://github.com/hightemp/https_proxy\n    cd https_proxy\n    ```\n\n2. Build the project:\n\n    ```sh\n    make build\n    ```\n\n## Configuration\n\nCreate a `config.yaml` file (see `config.example.yaml`):\n\n```yaml\nproxy_addr: 0.0.0.0:8080\nusername: \"your_username\"\npassword: \"your_password\"\nproto: https\ncert_path: \"path/to/your/cert.pem\"\nkey_path: \"path/to/your/key.pem\"\n# upstream_proxy: http://user:pass@upstream-proxy:8080\n```\n\n| Parameter | Description |\n|---|---|\n| `proxy_addr` | Listen address and port |\n| `username` | Basic auth username |\n| `password` | Basic auth password |\n| `proto` | `http` or `https` |\n| `cert_path` | Path to TLS certificate (for `https` mode) |\n| `key_path` | Path to TLS private key (for `https` mode) |\n| `upstream_proxy` | Upstream proxy URL for chaining (optional) |\n\n### Upstream Proxy (Proxy Chain)\n\nTo route all traffic through an upstream proxy, set `upstream_proxy` in `config.yaml`:\n\n```yaml\nupstream_proxy: http://user:pass@upstream-proxy:8080\n```\n\nHTTPS upstream proxies are also supported:\n\n```yaml\nupstream_proxy: https://user:pass@upstream-proxy:8443\n```\n\nIf `upstream_proxy` is not set in the config, the proxy falls back to standard environment variables (`HTTPS_PROXY`, `HTTP_PROXY`, `NO_PROXY`).\n\n### TLS Certificates\n\nGenerate self-signed certificates:\n\n```bash\nbash generate_certs.sh\n```\n\nOr use Let's Encrypt:\n\n```bash\nsudo certbot certonly --standalone -d example.com\n```\n\n```yaml\ncert_path: \"/etc/letsencrypt/live/example.com/fullchain.pem\"\nkey_path: \"/etc/letsencrypt/live/example.com/privkey.pem\"\n```\n\n## Usage\n\n```sh\n./https_proxy -config config.yaml\n```\n\n### Systemd Service\n\n```sh\nsudo make install\n```\n\nManage the service:\n\n```sh\nmake start / stop / restart / status\n```\n\n## Makefile Commands\n\n| Command | Description |\n|---|---|\n| `make build` | Build the binary |\n| `make build-static` | Build a static binary (linux/amd64) |\n| `make run` | Run the proxy |\n| `make install` | Install binary, config and systemd service |\n| `make uninstall` | Remove binary and service (keep config) |\n| `make uninstall-full` | Remove everything including config |\n| `make release` | Tag version from `VERSION` file and push |\n| `make docker-build` | Build Docker image `hightemp/https_proxy:VERSION` and `:latest` |\n| `make docker-push` | Build and push image to Docker Hub |\n| `make docker-release` | Alias for `docker-push` |\n\n## Release\n\n1. Update the version in the `VERSION` file.\n2. Run:\n\n    ```sh\n    make release\n    ```\n\n   This will commit, create a git tag `vX.Y.Z`, and push it. GitHub Actions will automatically build binaries and create a release.\n\n## License\n\nThis project is licensed under the MIT License.\n\n[![](https://asdertasd.site/counter/https_proxy?a=1)](https://asdertasd.site/counter/https_proxy)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhightemp%2Fhttps_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhightemp%2Fhttps_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhightemp%2Fhttps_proxy/lists"}