Apigee as a forward proxy / accept different kind of hosts

I'm trying to create a setup where we can use Apigee as a forward proxy. According to the response to another question Apigee can act as a forward proxy. https://community.apigee.com/questions/13079/apigee-as-a-forward-proxy.html

However, when I configure my request to act as a proxy I get an error that Apigee is unable to identify proxy for host. The proxy has the base path '/' however the request never reaches the proxy and receives an error before.

└ ▶ curl -x apis.example.net:80 http://mocktarget.apigee.net/echo
{"fault":{"faultstring":"Unable to identify proxy for host: mocktarget.apigee.net and url: \/echo","detail":{"errorcode":"messaging.adaptors.http.flow.ApplicationNotFound"}}}

I believe that this error is caused by that we have apis.example.net as vhost in Apigee but Apigee tries to find a vhost by mocktarget.apigee.net even though I have specified apis.example.net to be used a proxy.

By the nature of how forward proxies works, it would need to be able to handle all the different domains that exist out on the internet. And according to the answer in this post, I cannot use * as vhost.
https://community.apigee.com/questions/12065/is-it-possible-to-wildcard-alias-in-virtual-host-c.html

0 6 3,261
6 REPLIES 6

Apigee doesn't do tunneling.

It's designed to be a reverse (transparent) proxy, not a forward (tunneling) proxy. (I checked the article you cited, and I think the fuzz around terms of "forward" and "reverse" is not helpful. I do not recommend Apigee as a forward proxy).

What are you really trying to do? What problem are we trying to solve?

If you want a tunneling proxy, maybe you can check out Envoy.

Thanks for your clarification. I was hoping to be able to use Apigee as a forward proxy since higherups have decided that Apigee should be the only tool to handle both incoming and outgoing proxies. I was hoping to be able to reduce the amount of work with outgoing proxies since we need to create a reverse proxy for each resource on the internet and the developers need to change third party SDKs so they use the Apigee domain.

I think that the article should be updated to clarify that Apigee can not act as a forward proxy. That post is one of the first results if you search for "use Apigee as a forward proxy".

Are you trying to achieve the outbound service?

Apigee CAN do what you want but not for arbitrary host endpoints. It can act as an inside-out proxy, but the endpoints must be known and named.

If you want Apigee to act as a proxy for any arbitrary host on the internet, then, no. That won't work.

Not applicable

you can try apigee forward proxy using the below configuration in target endpoint HTTP target configuration

<Property name="use.proxy">true</Property>

reference: https://docs.apigee.com/private-cloud/v4.18.01/configure-forward-proxying-edge-backend-server

That describes how you get Apigee to use a forward proxy. I want to use Apigee as a forward proxy.