Make a forward proxy plugin

Hello everyone.

I’m making a forward proxy plugin using Kong, and I need some help.

I try to make it simple. Currently all of my clients and APIs are in the same network (say network A), with Kong as explicit portal. I have one extra API in another network (say network B). So a consumer from network A can either request an API in network A or B. The request must go through a Squid forward proxy in order to reach the network B from A.

A service (HTTPS only) may be hosted in A and B, so the idea is to put a forward proxy plugin on routes, making an explicit redirection. The idea is to tunnel to the proxy via the HTTP CONNECT method, by using functions such as connect_proxy().

I am developing this plugin for a few days now, using the community version of Kong, with no results. I am aware that a plugin already exists in the Enterprise edition, but I can’t use it now. And when I read its description, I found:

Currently only transparent HTTP proxies are supported; TLS connections (via CONNECT ) are not yet supported.

So my questions are: Does that mean that the LUA API doesn’t allow to complete this kind of connection at all? A proxy within Kong would apply to all requests to all APIs?

Best regards.

P.S. I apologize if I posted in the wrong section of the forum.

Still in trouble, no one can help me?