{"id":43408054,"url":"https://github.com/zengzhuozhen/benchmark-proxy","last_synced_at":"2026-02-02T16:19:47.613Z","repository":{"id":52187231,"uuid":"520808357","full_name":"zengzhuozhen/benchmark-proxy","owner":"zengzhuozhen","description":"a proxy tool for HTTP/HTTPS benchmark test","archived":false,"fork":false,"pushed_at":"2025-05-23T03:46:45.000Z","size":55756,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T04:41:07.185Z","etag":null,"topics":["benchmark","http-proxy","load-test"],"latest_commit_sha":null,"homepage":"","language":"Go","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/zengzhuozhen.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,"zenodo":null}},"created_at":"2022-08-03T09:02:00.000Z","updated_at":"2025-05-23T03:46:48.000Z","dependencies_parsed_at":"2022-08-13T01:21:44.877Z","dependency_job_id":"79041d02-faec-4563-8ec3-9d1ca2720d0a","html_url":"https://github.com/zengzhuozhen/benchmark-proxy","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.05405405405405406,"last_synced_commit":"41d5d27ecff3af27ecc53693777f0cda4634d2b6"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/zengzhuozhen/benchmark-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zengzhuozhen%2Fbenchmark-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zengzhuozhen%2Fbenchmark-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zengzhuozhen%2Fbenchmark-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zengzhuozhen%2Fbenchmark-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zengzhuozhen","download_url":"https://codeload.github.com/zengzhuozhen/benchmark-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zengzhuozhen%2Fbenchmark-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29015147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T16:17:30.374Z","status":"ssl_error","status_checked_at":"2026-02-02T15:58:50.469Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["benchmark","http-proxy","load-test"],"created_at":"2026-02-02T16:19:46.794Z","updated_at":"2026-02-02T16:19:47.599Z","avatar_url":"https://github.com/zengzhuozhen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [中文](README_ZH.md)\n\n# Overview\n\nA powerful HTTP/HTTPS proxy tool designed for API benchmark testing and performance analysis.\n\n## Key Features\n\n- Full HTTP/HTTPS proxy support\n- Comprehensive API benchmark testing capabilities\n- Detailed performance metrics tracking (response time, success/error counts)\n- Dynamic request data replacement via template tags\n- Flexible response validation for both status codes and response bodies\n\n# SSL Certificate Setup (Optional)\n\nFor HTTPS support, you can generate self-signed certificates using the following commands:\n\n1. `openssl genrsa -out ca.key 2048`\n2. `openssl req -new -x509 -key ca.key -out ca.crt -days 1095`\n3. `mv ca.* resources/`\n4. Add the generated certificate to your system's trusted certificates\n\n# Usage\n\nStart the proxy server:\n```bash\nbenchmark-proxy --port {port}\n```\n\n# Request Example\n\n\u003e curl -x 127.0.0.1:9900 https://www.baidu.com -H 'Benchmark-Proxy-Times:1' -H 'Benchmark-Proxy-Concurrency:1'\n\n# CustomHeaders\n\n| Header                              | Meaning                                                              |\n|-------------------------------------|----------------------------------------------------------------------|\n| Benchmark-Proxy-Times               | indicate how many times exec in each http request                    |\n| Benchmark-Proxy-Duration            | indicate how much second exec in each http requests                  |\n| Benchmark-Proxy-Concurrency         | concurrency in running                                               |\n| Benchmark-Proxy-Check-Result-Status | indicate the response status to determine whether request is success |\n| Benchmark-Proxy-Check-Result-Body   | indicate the response body to determine whether request is success   |\n\n### Response Checker\n\nexample :\n\n1. `Benchmark-Proxy-Check-Result-Status: 200` — Success if response status is 200\n2. `Benchmark-Proxy-Check-Result-Status: 200,201` — Success if response status is 200 or 201\n3. `Benchmark-Proxy-Check-Result-Status: 200-299` — Success if response status is in [200,299]\n4. `Benchmark-Proxy-Check-Result-Body: hello world` — Success if response body equals 'hello world'\n5. `Benchmark-Proxy-Check-Result-Body: @Contains[success]` — Success if response body contains 'success'\n6. `Benchmark-Proxy-Check-Result-Body: @Reg[\\w+]` — Success if response body matches regexp `\\w+`\n\n**Supported status check expressions:**\n- `200` (equal)\n- `200,201` (multi-value)\n- `200-299` (range)\n\n**Supported body check expressions:**\n- `hello world` (equal)\n- `@Contains[success]` (contains)\n- `@Reg[pattern]` (regexp)\n\n# CustomizeTag\nProvide the following label in request data, and the program will replace it with the real value.\n\n**Supported tags and examples:**\n\n| Tag         | Example / Usage                        | Description                                      |\n|-------------|----------------------------------------|--------------------------------------------------|\n| ${uuid}     | d035581b-53a3-48e5-9461-ba24709f06c9   | Random UUID                                      |\n| ${int}      | 77                                     | Random integer                                   |\n| ${int:10,20}| 15                                     | Random integer in [10,20]                        |\n| ${float}    | 0.94                                   | Random float                                     |\n| ${float:1.5,2.5} | 2.01                              | Random float in [1.5,2.5]                        |\n| ${string}   | 762edb6805                             | Random string (default 10 chars)                 |\n| ${string:8} | 1a2b3c4d                               | Random string of length 8                        |\n| ${bool}     | true                                   | Random boolean                                   |\n| ${date:2006-01-02} | 2024-05-01                      | Current date with format                         |\n| ${timestamp}| 1714550400                             | Current unix timestamp                           |\n| ${incr}     | 1                                      | Auto-increment integer (default start 1)         |\n| ${incr:100,2}| 100,102,104...                        | Auto-increment from 100, step 2                  |\n| ${range:1,5}| 1,2,3,4,5                              | Range auto-increment in [1,5]                    |\n| ${list:[a,b,c]} | b                                  | Randomly pick one from list                      |\n| ${const:hello}| hello                                | Constant value                                   |\n\nYou can use these tags anywhere in your request body, headers, or URL parameters. The program will replace them with generated values for each request.\n\n# Architecture\n\n![alt 数据流图](./doc/sequence-diagram.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzengzhuozhen%2Fbenchmark-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzengzhuozhen%2Fbenchmark-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzengzhuozhen%2Fbenchmark-proxy/lists"}