Default route for local address, squid for non-local

Hi,
Maybe this question is pretty simple, but I could not find anyone with a similar problem.

Basically what I would need is HAProxy routing traffic depending on the destination. That is, if the destination IP is internal, then HAProxy sends to the original destination, however in case IP is not internal, then HAProxy should send traffic to a squid box acting as an internet proxy.

Any idea on how to structure ACLs and backends to do this?

Thanks