{"id":18430737,"url":"https://github.com/bleenco/bproxy","last_synced_at":"2025-04-07T17:33:54.731Z","repository":{"id":146184134,"uuid":"125200403","full_name":"bleenco/bproxy","owner":"bleenco","description":"high-performance minimal HTTP reverse proxy","archived":false,"fork":false,"pushed_at":"2018-08-07T09:47:54.000Z","size":11273,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-22T22:24:17.858Z","etag":null,"topics":["gzip","libuv","openssl","proxy","proxy-server","reverse-proxy","server"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bleenco.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.md","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-03-14T11:09:53.000Z","updated_at":"2024-05-30T23:59:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"73253166-1299-469e-b4a7-a1b47879f42a","html_url":"https://github.com/bleenco/bproxy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleenco%2Fbproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleenco%2Fbproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleenco%2Fbproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleenco%2Fbproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleenco","download_url":"https://codeload.github.com/bleenco/bproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247698185,"owners_count":20981315,"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":["gzip","libuv","openssl","proxy","proxy-server","reverse-proxy","server"],"created_at":"2024-11-06T05:22:13.294Z","updated_at":"2025-04-07T17:33:54.725Z","avatar_url":"https://github.com/bleenco.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/1796022/39833139-8497ece0-53c9-11e8-8fc4-12517a2d303b.png\" width=\"300px\"\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\n[![AbstruseCI](https://ci.bleenco.io/badge/15)](https://ci.bleenco.io/repo/15)\n\nBproxy is a lightweight **super-fast** **minimal-configuration** proxy server written in C.\n\n\u003e It supports `gzip` compression and `SSL` out-of-the-box.\n\n### Benchmarks: bproxy vs. nginx\n\nWe tested simple whoami app on Golang web server using [Wrk](https://github.com/wg/wrk). The tests have been performed on MacBook Pro Late 2016 with 16GB memory using following commands:\n\n1. `nginx`\n\n```\n$ wrk -t20 -c1000 -d10s http://whoami.home.local.net\nRunning 10s test @ http://whoami.home.local.net\n  20 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    95.03ms   55.24ms 594.79ms   85.69%\n    Req/Sec    78.38     47.01   230.00     65.43%\n  7786 requests in 10.06s, 2.85MB read\n  Socket errors: connect 0, read 872, write 0, timeout 92\n  Non-2xx or 3xx responses: 52\nRequests/sec:    774.08\nTransfer/sec:    290.10KB\n```\n\n2. `bproxy`\n\n```\n$ wrk -t20 -c1000 -d10s http://whoami.home.local.net\nRunning 10s test @ http://whoami.home.local.net\n  20 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency   274.84ms  117.52ms   1.05s    71.95%\n    Req/Sec    97.55     55.21   515.00     71.70%\n  19292 requests in 10.10s, 6.66MB read\n  Socket errors: connect 0, read 970, write 0, timeout 0\nRequests/sec:   1910.05\nTransfer/sec:    675.23KB\n```\n\nThe results suggest that `nginx` handles requests with more than 50% less latency, while `bproxy` handles more than twice as much requests in the same period.\n\nWhen this sounds promising, feel free to use it on your server and help us improve this project further!\n\n### Building project\n\nThis step assumes you have Node.JS installed on your system.\n\nInstall dependencies.\n\n```sh\n$ npm install --prod\n```\n\nRun the build.\n\n```sh\n$ npm run build\n```\n\nBuild artifacts will be stored in `out/Release/` directory.\n\n\n### Install\n\nScript will install `bproxy` in `/usr/local/bin`.\n\n```sh\n$ sudo make install\n```\n\n### Running server\n\n```sh\n$ ./bproxy\n```\n\nor\n\n```\n$ ./bproxy -c /path/to/bproxy-config.json\n```\n\n### Sample configuration\n\n```json\n{\n  \"port\": 80,\n  \"secure_port\": 443,\n  \"gzip_mime_types\": [\"text/css\", \"application/javascript\", \"application/x-javascript\"],\n  \"log_file\": \"bproxy.log\",\n  \"templates\": {\n    \"status_400_template\": \"\",\n    \"status_404_template\": \"templates/404.html\",\n    \"status_502_template\": \"\"\n  },\n  \"proxies\": [\n    {\n      \"hosts\": [\n        \"bleenco.io\",\n        \"www.bleenco.io\"\n      ],\n      \"certificate_path\": \"certs/bleenco.io.crt\",\n      \"key_path\": \"certs/bleenco.io.key\",\n      \"ip\": \"127.0.0.1\",\n      \"port\": 7500,\n      \"force_ssl\": true\n    },\n    {\n      \"hosts\": [\"*.bleenco.io\"],\n      \"ip\": \"127.0.0.1\",\n      \"port\": 4550,\n      \"ssl_passthrough\": true\n    }\n  ]\n}\n```\n\n`force_ssl` property enables redirect from http to https by responding with 301 http status.\n\n`ssl_passthrough` property enables proxying SSL/TLS servers. That means data is not decrypted or parsed, but is just forwarded to server and vice-versa. This also enables redirection from http to https.\n### Building Docker Image\n\n```sh\n$ make docker_image\n```\n\n### Using Docker\n\nYou can pull image from Docker Hub as `docker pull bleenco/bproxy` or build from source as stated in previous section.\n\nThen on your server:\n\n```\n$ docker run -it --name bproxy --net host -v ~/path/to/bproxy.json:/bproxy/bproxy.json -v /var/log/bproxy.log:/var/log/bproxy.log --restart always bleenco/bproxy\n```\n\n### Running Tests\n\n```sh\n$ npm install\n$ npm test\n```\n\n### LICENSE\n\n```\nThe MIT License\n\nCopyright (c) 2018 Bleenco GmbH http://bleenco.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleenco%2Fbproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleenco%2Fbproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleenco%2Fbproxy/lists"}