Pipy is a tiny, high performance, highly stable, programmable proxy written in C++

Overview

Pipy

Pipy is a tiny, high performance, highly stable, programmable proxy. Written in C++, built on top of Asio asynchronous I/O library, Pipy is extremely lightweight and fast, making it one of the best choices for service mesh sidecars.

With builtin JavaScript support, thanks to PipyJS, Pipy is highly customizable and also predictable in performance with no garbage collection overhead found in other scriptable counterparts.

At its core, Pipy has a modular design with a set of fundamental filters that can be chained together to make a pipeline, through which network data can flow and get processed along the way. The way Pipy is designed makes it versatile enough for not only service mesh sidecars but also other use cases involving intermediate message processing between network nodes.

Compatibility

Pipy is designed for high compatibility across different operating systems and CPU architectures. Pipy has been fully tested on these platforms:

  • CentOS 7
  • Ubuntu 18/20
  • FreeBSD 12/13
  • macOS Big Sur

CentOS7/REHL7 or FreeBSD are recommended in production environments.

How to Build

Build from Scratch

Before building, the following tools are required to be installed first:

  • Clang 5.0+
  • CMake 3.0+
  • Node.js v12+ (only required if the builtin web UI is turned on)

With the above tools installed, just run the build script to start building:

./build.sh

The executable is located under bin/. Type bin/pipy -h for more information.

Build the Docker Image

To build the Docker image, run the following commands:

cd pipy
sudo docker build --squash --rm -t pipy .

Note: For a smaller image, you might want to use --squash option. It is an experimental feature, so you have to add { "experimental": true } to /etc/docker/daemon.json and restart Docker daemon to enable it.

For more information about Docker's --squash option, please refer to Docker Documentation

Quick Start

Install with RPM

yum -y install http://repo.flomesh.cn/pipy/pipy-latest.el7_pl.x86_64.rpm

Show Command Line Options

$ pipy --help

List Builtin Filters and Their Parameters

$ pipy --list-filters
$ pipy --help-filters

Run on CLI

Let's take the echo server in test/001-echo/ as an example. To start a Pipy instance that echos whatever the request has in its body, say

$ pipy test/001-echo/pipy.js

Or, while developing and debugging, one can start Pipy in web UI mode by using:

$ pipy test/ --gui-port=6060

Run with Docker

Pipy Docker image can be configured with a few environment variables:

  • PIPY_CONFIG_FILE= for the location of Pipy configuration file

  • PIPY_SPAWN=n for the number of Pipy instances you want to start, where n is the number of instantces subtracted by 1. For example, you use PIPY_SPAWN=3 for 4 instances.

docker run -it --rm -e PIPY_CONFIG_FILE=/etc/pipy/test/001-echo/pipy.cfg flomesh/pipy:latest
docker run -it --rm -e PIPY_CONFIG_FILE=/etc/pipy/test/011-serve-static/pipy.cfg -e PIPY_SPAWN=1 -p 8000:6000 flomesh/pipy:latest

Pipy also supports transparent proxy in Docker environment where NET_ADMIN capability is enabled by adding --cap-add NET_ADMIN option to the startup command:

docker run -it --rm -e PIPY_CONFIG_FILE=/etc/pipy/test/001-echo/pipy.cfg --cap-add NET_ADMIN flomesh/pipy:latest

Run on Kubernetes

You can run Pipy on Kubernetes by using pipy-operator:

git clone https://github.com/flomesh-io/pipy-operator
cd pipy-operator
kubectl apply -f etc/cert-manager-v1.1.0.yaml
kubectl apply -f artifact/pipy-operator.yaml
kubectl apply -f config/samples/standalone/001-echo.yaml
kubectl apply -f config/samples/ingress/001-routing.yaml
kubectl apply -f config/samples/sidecar/007-deployment-pipy.yaml

Documentation

You can find Pipy documentation under docs/.

Copyright & License

Please see COPYRIGHT and LICENCE.

Contact

Translations

中文版

Issues
  • pipy容器启动时,可能会出现OOMKilled

    pipy容器启动时,可能会出现OOMKilled

    此现象是按照https://github.com/flomesh-io/service-mesh-demo 搭建demo时出现的。

    pipy镜像版本:flomesh/pipy-pjs:0.4.0-263

    image

    以pod的sidecar形式启动pipy容器时,有可能很快出现OOMKilled的情况,重启几次后,便不再报错了

    image 查看pipy容器日志时,发现日志停在这里,如果是正常启动的pipy,后续会打印更多日志

    image

    查看pipy容器的内存指标,发现内存占用500多M,这个图显示内存占用稳定在500多M,但是有时会降下去,只占用几M内存

    kind:bug 
    opened by cngdkxw 4
  • gui build fail

    gui build fail

    environment variable

    os : deepin 20.2.1

    uname info:

    Linux sxyy-PC 5.10.29-amd64-desktop #2 SMP Mon Apr 26 09:48:13 CST 2021 x86_64 GNU/Linux

    node: version v14.17.0 npm: version 7.16.0

    Generating JavaScript bundles failed
    
    Converting circular structure to JSON
        --> starting at object with constructor 'SymbolDef'
        |     property 'orig' -> object with constructor 'Array'
        |     index 0 -> object with constructor 'AST_SymbolFunarg'
        --- property 'thedef' closes the circle
    
    File: node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css
    
    
     ERROR #98123  WEBPACK
    
    Generating JavaScript bundles failed
    
    Converting circular structure to JSON
        --> starting at object with constructor 'SymbolDef'
        |     property 'orig' -> object with constructor 'Array'
        |     index 0 -> object with constructor 'AST_SymbolFunarg'
        --- property 'thedef' closes the circle
    
    File: node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css
    
    
     ERROR #98123  WEBPACK
    
    Generating JavaScript bundles failed
    
    Converting circular structure to JSON
        --> starting at object with constructor 'SymbolDef'
        |     property 'orig' -> object with constructor 'Array'
        |     index 0 -> object with constructor 'AST_SymbolFunarg'
        --- property 'thedef' closes the circle
    
    File: node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css
    
    opened by sixinyiyu 4
  • the execution cycle of  the main pipeline and fork pipeline  ?

    the execution cycle of the main pipeline and fork pipeline ?

    Version : 0.0.0 Commit : d54c0aaae262756f35ebf8256bd4dae7617b8444 Commit Date : Wed, 9 Jun 2021 13:56:10 +0800 Host : Linux-5.10.18-amd64-desktop x86_64 OpenSSL : OpenSSL 1.1.1g 21 Apr 2020

    pipy({
    })
    
    
    .listen(9000)
      .fork('invoke-A')
      .fork('invoke-B')
      .decodeHttpRequest()
      .replaceMessage(
        () => new Message({ status: 200 }, '成功!\n')
      )
      .encodeHttpResponse()
      .onMessage(
        msg => (
          console.log('main service response')
        )
      ).onSessionEnd(
        () => (
          console.log('main service session end')
        )
      )
    
      .pipeline('invoke-B')
        .decodeHttpRequest()
        .onMessageStart(
          () => console.log('invoke B service ...')
        )
        .replaceMessage(
          () => new Message(
            {
              method: 'POST',
              path: '/A',
              headers: {
                host: '127.0.0.1:8080',
                'Content-Type': 'application/json',
              },
            },
            JSON.encode({
              cmd: 'add',
              module: 'keyworld',
            })
          )
        )
        .encodeHttpRequest()
        .connect('127.0.0.1:8080')
        .print()
        .decodeHttpResponse()
        .print()
        .onMessage(
          msg => (
            console.log('Get B service response' + msg.body)
          )
        )
    
      .pipeline('invoke-A')
        .decodeHttpRequest()
        .onMessageStart(
          () => console.log('invoke A service ...')
        )
        .replaceMessage(
          () => new Message({
            method: 'GET',
            path: '/hello',
            headers: {
              host: '127.0.0.1:8080',
            },
          })
        )
        .encodeHttpRequest()
        .connect('127.0.0.1:8080')
        .print()
        .decodeHttpResponse()
        .print()
        .onMessage(
          msg => (
            console.log('Get A service response' + msg.body)
          )
        )
    ---------console------
    
    2021-06-30 10:26:22 [info] [pjs] invoke A service ...
    2021-06-30 10:26:22 [info] [pjs] invoke B service ...
    2021-06-30 10:26:22 [info] [pjs] main service response
    HTTP/1.1 200 
    Content-Type: text/plain;charset=UTF-8
    Content-Length: 5
    Date: Wed, 30 Jun 2021 02:26:22 GMT
    
    Hello
    2021-06-30 10:26:22 [info] [pjs] Get A service responseHello
    2021-06-30 10:26:22 [info] [pjs] main service session end
    
    the /A endpoint sleep for 5 seconds until retrun  response.
    
    does the main  session end when the B pipeline got the response ? 
    
    I want to know when it will print B resposne ? 
    
    use wait block the code until B got resposne?
    
    
    opened by sixinyiyu 3
  • after connect invoke onData twice

    after connect invoke onData twice

    I want to know the life cycle of pipy ,

    .listen(6081)
      .onSessionStart(
        () => (
          console.log('6081session start')
        )
      )
      .connect('127.0.0.1:6080')
      .onData(
        () => (
          _queue.push(Date.now() + 6081),
          console.log('0681 onData', JSON.stringify(_queue))
        )
      )
    

    out put

    2021-06-22 11:09:59 [info] [pjs] 6080 session end [1624331405455]
    2021-06-22 11:09:59 [info] [pjs] 0681 onData [1624331405455,1624331405456]
    2021-06-22 11:09:59 [info] [pjs] 0681 onData [1624331405455,1624331405456,1624331405456]
    
    opened by sixinyiyu 3
  • HTTPS透传代理如何实现?

    HTTPS透传代理如何实现?

    下文中描述的HTTPS透传代理,用Pipy如何实现? https://blog.xmgspace.me/archives/nginx-sni-dispatcher.html

    原理上,需要从握手包里提取SNI信息,用其中的域名信息做路由参考,原样转发对应后端的原始TCP报文到客户端,不需要解密HTTPS报文,所以也不需要源站的证书和私钥。

    pipy的API中比较像的handleTLSClientHello接口回调参数只有两个数字版本号,貌似获取不到SNI。

    这种场景能实现吗?

    另外,文档中描述的代理场景主要讲的是HTTP代理,不知道MySQL/Redis等纯TCP协议能否用pipy当代理,可能有点折腾:)

    nginx-sni-1

    opened by cfgxy 2
  • Bump cached-path-relative from 1.0.2 to 1.1.0

    Bump cached-path-relative from 1.0.2 to 1.1.0

    Bumps cached-path-relative from 1.0.2 to 1.1.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    opened by dependabot[bot] 1
  • error when running build.sh

    error when running build.sh

    [email protected]:~/openSource/pipy# ./build.sh error: unknown option `show-current' usage: git branch [] [-r | -a] [--merged | --no-merged] or: git branch [] [-l] [-f] [] or: git branch [] [-r] (-d | -D) ... or: git branch [] (-m | -M) [] or: git branch [] (-c | -C) [] or: git branch [] [-r | -a] [--points-at] or: git branch [] [-r | -a] [--format]

    opened by zengyuxing007 1
  • Add brotli decoding support

    Add brotli decoding support

    • Add brotli decoding support
    • Add brotli support to decompressHTTP , decompressMessage, http.File
    • Refactored http.File to use Decompressor class for decoding requests.
    • Updated decompressHTTP , decompressMessage documents
    • Add brotli-1.0.9 to deps folder.
    opened by naqvis 0
  • Added compressHTTP & compressMessage filters

    Added compressHTTP & compressMessage filters

    Added support for HTTP response compression and this PR adds two filters compressHTTP and compressMessage. Both of these filters are configurable via options object. Documentation for these two filters is added as well.

    Options

    There are options you can use in the options parameter to configure compression method, compression level:

    • enabled - Toggle compression mode. Boolean flag either true or false. default is true.
    • method - Compression method to use. It need to be one of deflate, gzip, and brotli. default is gzip.
    • level - Compression level settings. It need to be one of default, none, speed, best. default is default.
    kind:feature 
    opened by naqvis 0
  • Modified zlib CMake file to mark example binaries as optional

    Modified zlib CMake file to mark example binaries as optional

    • Make changes to deps/zlib-1.2.11/CMakeLists.txt to move examples under optional flag.
    • ZLIB_EXAMPLES is option added with default OFF.
    • We don't need examples created during Pipy compilation
    opened by naqvis 0
  • Bump got from 12.0.0 to 12.1.0

    Bump got from 12.0.0 to 12.1.0

    Bumps got from 12.0.0 to 12.1.0.

    Release notes

    Sourced from got's releases.

    v12.1.0

    Improvements

    Fixes

    https://github.com/sindresorhus/got/compare/v12.0.4...v12.1.0

    v12.0.4

    • Remove stream lock - unreliable since Node 17.3.0 bb8eca924c338ca12d5b90d6a26aa28dbddb42ee

    v12.0.3

    • Allow more types in the json option (#2015) eb045bf

    https://github.com/sindresorhus/got/compare/v12.0.2...v12.0.3

    v12.0.2

    • Fix encoding option with {responseType: 'json'} (#1996) 0703318

    https://github.com/sindresorhus/got/compare/v12.0.1...v12.0.2

    v12.0.1

    • Fix nock compatibility (#1959) bf39d2c
    • Fix missing export of Request TypeScript type (#1940) 0f9f2b8

    https://github.com/sindresorhus/got/compare/v12.0.0...v12.0.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(0.30.0-23)
  • 0.30.0-23(Mar 22, 2022)

    Core

    • Add flow control mechanism for throttling any types of input
    • Add asynchronous file operations
    • Support OpenSSL engines

    Filters

    • New filter tee
    • New filter throttleConcurrency
    • New filter demux (legacy demux/mux filters are renamed to demuxQueue/muxQueue)
    • Filter decodeMQTT to support protocolLevel option
    • Throttle filters support weak references as the account keys

    API

    • Support TTL option for algo.Cache
    • New method stats.Metric.valueOf() for querying current metric value
    • Data.from() rejects input types other than strings

    Major bug fixes

    • Fixed a bug where TLS requests could be stuck in the buffer
    • Fixed a dead loop when trying to read folders in codebases
    • Fixed some crashes when null is given to some cypto APIs
    • Fixed a crash when retrieving stats.Histogram sub-metrics
    • Fixed a bug where an HTTP 304 response would lead to forever waiting on the connection
    • Fixed a bug in Data::shift_while() that caused Dubbo decoding failures
    • The size of Data wasn't changed accordingly in some cases when packing

    Build

    • Support static linking to libc
    • Support linking to external zlib

    Documentation

    Tremendous growth in documentation coverage has been done since the last release in English, Chinese and Japanese.

    Source code(tar.gz)
    Source code(zip)
    pipy-0.30.0-23.alpine-aarch64.tar.gz(10.25 MB)
    pipy-0.30.0-23.alpine-x86_64.tar.gz(10.90 MB)
    pipy-0.30.0-23.ubuntu-aarch64.tar.gz(18.93 MB)
    pipy-0.30.0-23.ubuntu-x86_64.tar.gz(19.85 MB)
    pipy-pjs-0.30.0-23.el7.x86_64.rpm(2.16 MB)
    pipy-pjs-macos-12.2.1-arm64.tar.gz(19.34 MB)
  • 0.22.0-31(Jan 31, 2022)

    Core

    • Overhaul to the object lifecycle management to solve a few hardcore crashes
    • Supports LevelDB as a storage for codebases
    • New admin proxy mode
    • Retry failed codebase downloading during startup

    PipyJS

    • Full implementation to standard JavaScript Array, Math, Date API without iterators and timezones
    • Standard-conformant JavaScript String API with UTF-32 semantics and UTF-8 representation internally

    API

    • Metrics and statistics API for monitoring, with internal support for Prometheus exposition format
    • New URLSearchParams API
    • Data API supports generating arbitrary binary data
    • Handle CDATA in XML.decode() and XML.encode()
    • Support programmatically shutdown by pipy.exit()
    • Printing objects as JSON with console.log()

    Filters

    General

    • Support read/write timeouts for inbound connections
    • Support read/write/connect timeouts for outbound connections
    • Support signal driven tasks
    • Support listening address binding
    • use filter supports module(plugin) chains and round-trip filter paths
    • mux filters support objects as a weak key to the shared session
    • LoadBalancers support dynamic unhealthy target cache

    HTTP

    • Basic HTTP/2 support without flow control
    • HTTP codec standard conformance improvements
    • Support for HTTP tunneling and WebSocket
    • Actively shutdown long-lived connections around a reload
    • Automatically chunk HTTP/1 message bodies when they are too large

    TLS

    • Support mTLS between worker nodes and the repo node
    • New handleTLSClientHello filter to extract TLS client hello information
    • New detectProtocol filter for telling apart TLS and plain-TCP connections
    • Improved TLS performance
    • OpenSSL library bumped to version 1.1.1-m
    • Option to build with external OpenSSL library

    SOCKS

    • New filter connectSOCKS for the client side
    • Renamed proxySOCKS to acceptSOCKS

    MQTT

    • Simple MQTT codec filters for extracting MQTT packet information

    GUI

    • Script editor supports IntelliSense
    • Generate pipeline graph from script enclosed in a function scope
    • Builtin documentation with full tutorial and localization
    Source code(tar.gz)
    Source code(zip)
    pipy-0.22.0-31.darwin21.0-arm64.tar.gz(14.16 MB)
    pipy-0.22.0-31.darwin21.0-x86_64.tar.gz(14.41 MB)
    pipy-0.22.0-31.ubuntu20.04-static.tar.gz(4.41 MB)
    pipy-0.22.0-31.ubuntu20.10-x86_64.tar.gz(14.56 MB)
    pipy-0.22.0-32.x86_64.musl-static-no-gui.tar.gz(5.24 MB)
    pipy-0.22.0-32.x86_64.musl-static-with-gui.tar.gz(17.49 MB)
    pipy-oss-0.22.0-31.el7.x86_64.rpm(10.53 MB)
    pipy-oss-0.22.0-32.armv7.musl-static-with-gui.tar.gz(18.50 MB)
    pipy-oss-alpine-0.22.0-31-x86_64.tar.gz(34.62 MB)
  • 0.10.0-1(Oct 1, 2021)

    Release Note

    New Design

    • Start a Pipy instance remotely from HTTP endpoints
    • Builtin codebase service as a basic control plane, and its GUI too
    • Data exchange between PJS modules can be done through pipy().import() and pipy().export(), which becomes the recommended approach over the old ones

    New Filters

    • merge for interweaving multiple messages into one stream
    • pack for combining multiple messages into one
    • split for byte-wise processing of messages
    • handleXXX as aliases to onXXX
    • proxySOCKS to handle both SOCKS4 and SOCKS5 traffic
    • connectTLS and acceptTLS for TLS traffic handling, extracted from listen and connect
    • decompressMessage and decompressHTTP for message body decompression by zlib
    • demuxHTTP and muxHTTP combining HTTP codec and mux/demux
    • serveHTTP combining demuxHTTP and replaceMessage for convenience

    New API

    • Function os.writeFile() for local file writing
    • Function algo.hash() for JS value hashing
    • Class Netmask for IP address range handling
    • Class algo.Percentile for percentile calculation
    • Class PublicKey, PrivateKey, Sign, Verify, Cipher, Decipher under namespace crypto

    Improvements

    • IPv6 support
    • Number of concurrent connections can be limited on listen
    • Added size limit option to filters involving internal data buffers
    • Track data buffer usage and concurrent inbound/outbound connections and dump on SIGTSTP
    • HTTP codec overhaul, with the old 256KB fixed buffer optimized out
    • Class algo.Cache now has a limit to the number of entries, with old entries getting erased based on LRU policy
    • Dubbo request ID becomes a string for its 64-bit range to be handled in JS
    • Standard-conforming processing of object key ordering in PJS
    Source code(tar.gz)
    Source code(zip)
    pipy-oss-0.10.0-1-macos-darwin20.tar.gz(2.15 MB)
    pipy-oss-0.10.0-1-ubuntu2010.tar.gz(2.31 MB)
    pipy-oss-0.10.0-1.el7.x86_64.rpm(1.85 MB)
    pipy-oss-alpine-0.10.0-1.tar.gz(10.33 MB)
  • 0.8.0-31(Aug 31, 2021)

    [fix] Bug fix regarding HEAD request handling in HTTP codec filters [fix] Non-shared mux sessions should be freed a while after reset to avoid recursive deletion resulted from closing of parent sessions [filter] Do not show 'data discarded' message if data buffer limit is set to zero for filters handling message bodies [filter] HTTP decoder to translate transport errors into 502 responses. Also fixed a memory leak in serveHTTP [api] Support JWT verification with a PrivateKey object besides a JWK object [core] Now that we have export/import as a better approach to variable sharing between modules, the old MessageStart.context property is now removed [filter] Added serveHTTP filter that handles HTTP requests by simply providing a handler function that returns responses. The builtin GUI service changed to use this new filter internally [core] Download codebase by using http::Mux filter to better handle the lifetime of a keep-alive connection [core] Removed __argv since it is no longer needed now that we have variable export/import Updated test scripts to match with the latest filter renaming [design] HTTP filter renaming, revamping and optimization. [api] Data.toString() returns undefined when data is not in valid UTF-8 encoding [filter] New filter: split [fix] Remotely downloaded scripts should have their base URI pathname stripped off [fix] The new HTTP header encoder generated Connection and Keep-Alive headers without the value, which in turn invalidated the message [api] Added dummy deselect method to HashingLoadBalancer and RoundRobinLoadBalancer so that the 3 load balancing algorithms are fully compatible to each other in interface [filter] Added new filters demuxHTTP and muxHTTP combining HTTP codec and the functionality from the generalized demux/mux filters [filter] Replace decompressMessageBody with decompressMessage and decompressHTTP, with the former protocol-agnostic and the latter specific for HTTP messages [fix] Bug in the dump filter where the tails of data chunks are duplicated [scripting] Remote download/update script files [filter] Revamping HTTP codecs [filter] Added sizeLimit to [handle|replace][Message|MessageBody] filters for setting a maximum body size that can be buffered internally before triggering a script callback [fix] Missing file in CMakeLists.txt [fix] Rewrite tap filter to fix a potential crash that might be caused by an invalid lambda after an asynchronous operation [fix] Outbound connections should only retry on connection failures not reading/writing errors. [fix] Listeners should not even start accepting when maxConnections == 0 [FIX] Base64Url decoding failure in some ending cases. [feature] Added a new filter 'proxySOCKS' with basic non-authenticated SOCKS5 support. The old filter 'proxySOCKS4' is to be removed in the future. [feature] Added aliases for onXXX as handleXXX to avoid misunderstanding. The old onXXX naming will be removed in the future. [feature] Support one-shot tasks that can be used for initialization script. [design] Added a 'context' property to MessageStart so that context information can be passed down connected pipeline sessions from module to module. [feature] tap filter now re-evaluates its quota expression every 5 seconds [api] Added new APIs that facilitate script hot reload, including: [feature] New filter: pack, which combines multiple input messages into one output message. [feature] New filter: merge, like a mux filter working in the way of a fork filter. [feature] connect filter now can have a limit to its internal buffer size and just discard data when the buffer overflows. [feature] algo.Cache now can have a limit to its size with only a number of LRU items kept alive. [feature] New PJS features including: [fix] Dubbo request ID requires 64-bit value range so we have to handle it in JS with a string Changed DATA_CHUNK_SIZE from 16KB to 4KB for a better balance between throughput and memory usage. [fix] Fixed an infinite loop happened in console.log when output has more than one lines. [API] Added more classes to crypto including: Optimization on Hex/Base64(Url) encoding and decoding so that no intermediate buffer is needed amid conversions between Data and string. [feature]Added Netmask.next() method for generation of IPs over an address range. [feature]Constructors of algo.RoundRobinLoadBalancer and algo.LeastWorkLoadBalancer now also receive target arrays in which case targets are weighted equally. [Test] Added test/010-jwt and test/016-socks4-proxy [Feature] Added support of bodiless HTTP responses (responses to HEAD requests). [Feature] Added a new API pipy.restart() for programatic reloading of the current running pjs program [Feature] Added a new API os.writeFile() for writing to local files. [API] Added algo.Percentile for percentile calculation of things like latencies. [API] Added a new global class Netmask CIDR network address mask operations. [API] The tap filter now takes nullish quota as quota being unlimited. [API] Added a new function algo.hash() for calculation the hash of a JS value [BUG FIX] Crash on BSD due to C++ class name demangling failure. [BUG FIX] proxySOCK4 filter wasn't drawn correctly in the graph on the web UI. [BugFix] Fix rpm spec issue and adding static web service (#18) [BugFix] Fix rpm spec issue and adding static web service

    Source code(tar.gz)
    Source code(zip)
    pipy-oss-0.8.0-31-freebsd.tar.gz(2.01 MB)
    pipy-oss-0.8.0-31-ubuntu20.tar.gz(2.27 MB)
    pipy-oss-0.8.0-31.el7.x86_64.rpm(1.83 MB)
  • 0.6.0-7(Jun 7, 2021)

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to address the needs of API creators. Pushpin is transparent to clients and integrates easily into an API stack.

Fanout 3.1k Jun 22, 2022
BingBing 53 Jun 10, 2022
mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems

README mTCP is a highly scalable user-level TCP stack for multicore systems. mTCP source code is distributed under the Modified BSD License. For more

null 1.8k Jun 22, 2022
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

Oat++ 5.5k Jun 27, 2022
A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf

Maple A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf Features Configuration management Outbound network adapter

YtFlow 588 Jun 25, 2022
Phorklift is an HTTP server and proxy daemon, with clear, powerful and dynamic configuration.

Phorklift is an HTTP server and proxy daemon, with clear, powerful and dynamic configuration.

null 43 Mar 1, 2022
A Nginx module which tries to implement proxy wasm ABI in Nginx.

Status This library is under construction. Description A Nginx module which tries to implement proxy wasm ABI in Nginx. Install dependencies Download

API7 71 Jun 28, 2022
A proxy service of incremental log of OceanBase

OceanBase Migration Serivce LogProxy OceanBase增量日志代理服务,是 OMS 的一部分。基于 liboblog, 以服务的形式,提供实时增量链路接入和管理能力,方便应用接入OceanBase增量日志;能够解决网络隔离的情况下,订阅增量日志的需求;并提供多种

OceanBase 19 Apr 21, 2022
A simple SIP server (proxy) for handling VoIP calls based on SIP using C++

Sip Server A simple sip server for handling VoIP calls based on sip protocol. Features Registration Of Users The server supports registration process.

null 7 May 27, 2022
reverse proxy with web server and preview page

Reverse Proxy Dependencies Go Make Suport Termux (android/afsd kernel) linux (kernel) Install: Termux: 1 step: Install Go-lang, Git and Make pkg insta

AlbâniaSecurity-RT 7 Feb 19, 2022
A forward proxy module for CONNECT request handling

name This module provides support for the CONNECT method request. This method is mainly used to tunnel SSL requests through proxy servers. Table of Co

Xiaochen Wang 1.1k Jun 27, 2022
A flexible tool for redirecting a given program's TCP traffic to SOCKS5 or HTTP proxy.

graftcp English | 简体中文 Introduction graftcp can redirect the TCP connection made by the given program [application, script, shell, etc.] to SOCKS5 or

mingang.he 1.2k Jun 21, 2022
WARFOX is a software-based HTTPS beaconing Windows implant that uses a multi-layered proxy network for C2 communications.

An HTTPS beaconing Windows implant and multi-layered proxy C2 network designed for covert APT emulation focused offensive operations

null 92 Jun 20, 2022
Proxy that can be used in GTPS to crash and others. All commands are already in

Credit to ama6nen Real Repo This proxy can be used and modified by everyone. This proxy already has several command exploits for gtps Features: /proxy

Sersinals 15 May 25, 2022
An HTTPS beaconing Windows implant and multi-layered proxy C2 network designed for covert APT emulation focused offensive operations

WARFOX is a software-based HTTPS beaconing Windows implant that uses a multi-layered proxy network for C2 communications. This kit was designed to emulate covert APT offensive operations. This kit includes WARFOX (Windows implant), HIGHTOWER (Listening Post), and other tools to build configs and set up a proxy network.

null 93 Jun 30, 2022
We use Clash as the backend proxy, which supports Shadowsocks(R), V2Ray, and Trojan protocols.

We use Clash as the backend proxy, which supports Shadowsocks(R), V2Ray, and Trojan protocols.

Dr. Incognito 1.2k Jun 25, 2022
A modern C++ network library for developing high performance network services in TCP/UDP/HTTP protocols.

evpp Introduction 中文说明 evpp is a modern C++ network library for developing high performance network services using TCP/UDP/HTTP protocols. evpp provid

Qihoo 360 3k Jun 27, 2022
GNUWeebBot - High-performance bot Telegram, running on Linux environment.

High-performance bot Telegram, running on Linux environment, written in C. Core Features Event Debug Event Logger Modules Telegram debug info.

GNU/Weeb 11 May 8, 2022
High performance in-kernel WireGuard implementation for Windows

WireGuard for the NT Kernel High performance in-kernel WireGuard implementation for Windows WireGuardNT is an implementation of WireGuard, for the NT

WireGuard 50 Jun 17, 2022