Giter Site home page Giter Site logo

imambareesh / kong-forward-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tfabien/kong-forward-proxy

0.0 0.0 0.0 33 KB

A Kong plugin that allows access to an upstream url through a forward proxy (eg. squid).

Lua 59.19% Makefile 40.81%

kong-forward-proxy's Introduction

kong-forward-proxy

A Kong plugin that allows access to an upstream url through a forward proxy (eg. squid).

---

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.

$ curl -X POST http://kong:8001/apis/{api}/plugins \
    --data "name=forward-proxy" \
    --data "config.proxy_host=proxy.mycorp.org" \
    --data "config.proxy_port=8080"

Installation

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

make install

Edit your kong.yaml to include the plugin like so:

custom_plugins:
  - forward-proxy

Restart Kong.

Test with Docker

A sample docker-compose is included for testing purpose. Running it will spin-up a Cassandra database and Kong instance with the plugin installed and activated.

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

$ docker-compose up -d

Wait for the startup and migration of the database to complete and check plugin availability:

$ curl -X POST http://localhost:8001
{
  "plugins": {
    "enabled_in_cluster": [],
    "available_on_server": {
      // ...
      "forward-proxy": true,
      // ...
    }
  }
  // ...
}

Limitation

Untested behaviors include:

  • HTTPS forward proxy
  • Upstream load balancing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.