TYK open source API Gateway as forward proxy

Can TYK open source api gateway work as a forward proxy, can we enable domain whitelisting and port whitelisting?

Please suggest

HI @saloni512,

Tyk was designed to be a reverse proxy and I don’t think it can do forward proxy. However, I have asked internally for more information.

Tyk has inbuilt support for port whitelisting but I don’t think it can do domain whitelisting. Domain whitelisting may be something you could achieve with a plugin. Please note this response is in the context of a reverse proxy.

Maybe we can assist if we know what you really trying to do? Or what problem are we trying to solve?

@saloni512 Please find the response from out internal team

You could hack Tyk being a forward proxy advanced URL rewrites and internal API routing.

  1. Have a catch-all API (*) with smart rewrites enabled
  2. Create internal APIs for each external service you want to manage
  3. Create an internal failure API that just returns an error regardless of request
  4. Create advanced rewrite rules to capture the whitelist and proxy to the managed APIs
  5. The last rewrite rule should capture all other non-whitelisted domains and redirect to the error API
  6. Set up your network to use the proxy for everything

Please note that this scenario has not been tested and is just a theory.