Skip to content

A Kong plugin that allows access to an upstream url through a forward proxy.

Notifications You must be signed in to change notification settings

jichangfeng/kong-http-proxy

Repository files navigation

kong-http-proxy

A Kong plugin that allows access to an upstream url through a http proxy.

---

Configuration

Add this plugin globally or attached to an API. All calls to the API's upstream URL will then be proxied through the specify proxy host and port.

# Common usage
$ curl -X POST http://kong:8001/apis/{api}/plugins \
    --data "name=http-proxy" \
    --data "config.host=127.0.0.1" \
    --data "config.port=8118" \
    --data "config.log_enable=false"
#
# Client certificates can be configured
$ curl -X POST http://kong:8001/apis/{api}/plugins \
    --data "name=http-proxy" \
    --data "config.host=127.0.0.1" \
    --data "config.port=8118" \
    --data "config.ssl_client_cert=/path/to/client/cert" \
    --data "config.ssl_client_priv_key=/path/to/client/key" \
    --data "config.log_enable=false"

Installation

Clone the repository, navigate to the root folder and run:

make install

Add the custom plugin’s name to the plugins list in your Kong configuration (on each Kong node):

plugins = bundled,http-proxy

Restart Kong to apply the plugin:

kong restart

Or, if you want to apply a plugin without stopping Kong, you can use this:

kong prepare
kong reload

About

A Kong plugin that allows access to an upstream url through a forward proxy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published