All Projects → bleenco → bproxy

bleenco / bproxy

Licence: MIT license
high-performance minimal HTTP reverse proxy

Programming Languages

c
50402 projects - #5 most used programming language
typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to bproxy

go-reverse-proxy
Reverse proxy with simple routing configuration and override behaviour
Stars: ✭ 21 (-25%)
Mutual labels:  proxy-server, reverse-proxy
throo
A Vert.x/Spring based HTTP reverse-proxy
Stars: ✭ 19 (-32.14%)
Mutual labels:  proxy-server, reverse-proxy
reproxy
Simple edge server / reverse proxy
Stars: ✭ 994 (+3450%)
Mutual labels:  proxy-server, reverse-proxy
json-caching-proxy
Node caching HTTP proxy built on top of express-http-proxy. Persists requests and responses to an in-memory HAR-like data structure based on HAR1.2 . Caches JSON content-type responses by default with the ability to cache an entire site; including content-types describing images. Useful for testing front end code, mocking api, and saving the cac…
Stars: ✭ 31 (+10.71%)
Mutual labels:  proxy-server, reverse-proxy
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+11882.14%)
Mutual labels:  openssl, libuv
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+1514.29%)
Mutual labels:  proxy-server, reverse-proxy
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (+128.57%)
Mutual labels:  proxy-server, reverse-proxy
p3y
A single binary reverse proxy written in go. It was developed for use in Kubernetes, to wrap services like Prometheus with simple BasicAuth and TLS encryption.
Stars: ✭ 15 (-46.43%)
Mutual labels:  proxy-server, reverse-proxy
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+792.86%)
Mutual labels:  proxy-server, reverse-proxy
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (+89.29%)
Mutual labels:  proxy-server, reverse-proxy
node-proxy
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 71 (+153.57%)
Mutual labels:  proxy-server, reverse-proxy
http-knocking
🚪HTTP-Knocking hides a Web server and open it by knocking sequence: Hide Web server until your knocks
Stars: ✭ 28 (+0%)
Mutual labels:  proxy-server, reverse-proxy
ProxyChecker
proxy checker to check the status of the ip-port proxy list
Stars: ✭ 24 (-14.29%)
Mutual labels:  proxy-server
hmac-sha1
Standalone implementation of `HMAC()` + `EVP_sha1()` in `OpenSSL`
Stars: ✭ 40 (+42.86%)
Mutual labels:  openssl
Xproxy
reverse proxy implement in java
Stars: ✭ 20 (-28.57%)
Mutual labels:  reverse-proxy
cryptocli
The ultimate tool for data transfer, manipulation and proxy.
Stars: ✭ 16 (-42.86%)
Mutual labels:  openssl
PuppyProxy
A simple HTTP proxy in C# including support for HTTP CONNECT tunneling
Stars: ✭ 37 (+32.14%)
Mutual labels:  reverse-proxy
proftpd-mod proxy
FTP proxy support for ProFTPD
Stars: ✭ 35 (+25%)
Mutual labels:  reverse-proxy
power-gzip
POWER9 gzip engine documentation and code samples
Stars: ✭ 16 (-42.86%)
Mutual labels:  gzip
detect-cloudflare-plus
True Sight Firefox extension.
Stars: ✭ 34 (+21.43%)
Mutual labels:  reverse-proxy




AbstruseCI

Bproxy is a lightweight super-fast minimal-configuration proxy server written in C.

It supports gzip compression and SSL out-of-the-box.

Benchmarks: bproxy vs. nginx

We tested simple whoami app on Golang web server using Wrk. The tests have been performed on MacBook Pro Late 2016 with 16GB memory using following commands:

  1. nginx
$ wrk -t20 -c1000 -d10s http://whoami.home.local.net
Running 10s test @ http://whoami.home.local.net
  20 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    95.03ms   55.24ms 594.79ms   85.69%
    Req/Sec    78.38     47.01   230.00     65.43%
  7786 requests in 10.06s, 2.85MB read
  Socket errors: connect 0, read 872, write 0, timeout 92
  Non-2xx or 3xx responses: 52
Requests/sec:    774.08
Transfer/sec:    290.10KB
  1. bproxy
$ wrk -t20 -c1000 -d10s http://whoami.home.local.net
Running 10s test @ http://whoami.home.local.net
  20 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   274.84ms  117.52ms   1.05s    71.95%
    Req/Sec    97.55     55.21   515.00     71.70%
  19292 requests in 10.10s, 6.66MB read
  Socket errors: connect 0, read 970, write 0, timeout 0
Requests/sec:   1910.05
Transfer/sec:    675.23KB

The 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.

When this sounds promising, feel free to use it on your server and help us improve this project further!

Building project

This step assumes you have Node.JS installed on your system.

Install dependencies.

$ npm install --prod

Run the build.

$ npm run build

Build artifacts will be stored in out/Release/ directory.

Install

Script will install bproxy in /usr/local/bin.

$ sudo make install

Running server

$ ./bproxy

or

$ ./bproxy -c /path/to/bproxy-config.json

Sample configuration

{
  "port": 80,
  "secure_port": 443,
  "gzip_mime_types": ["text/css", "application/javascript", "application/x-javascript"],
  "log_file": "bproxy.log",
  "templates": {
    "status_400_template": "",
    "status_404_template": "templates/404.html",
    "status_502_template": ""
  },
  "proxies": [
    {
      "hosts": [
        "bleenco.io",
        "www.bleenco.io"
      ],
      "certificate_path": "certs/bleenco.io.crt",
      "key_path": "certs/bleenco.io.key",
      "ip": "127.0.0.1",
      "port": 7500,
      "force_ssl": true
    },
    {
      "hosts": ["*.bleenco.io"],
      "ip": "127.0.0.1",
      "port": 4550,
      "ssl_passthrough": true
    }
  ]
}

force_ssl property enables redirect from http to https by responding with 301 http status.

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.

Building Docker Image

$ make docker_image

Using Docker

You can pull image from Docker Hub as docker pull bleenco/bproxy or build from source as stated in previous section.

Then on your server:

$ 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

Running Tests

$ npm install
$ npm test

LICENSE

The MIT License

Copyright (c) 2018 Bleenco GmbH http://bleenco.com

Permission 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:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE 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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].