Target want to route the outbound traffic from mesh sidecar to egressgateway and then redirect the traffic to external proxy. I have edited the virtual service as below, seem the destination cannot be input the IP and is there any other way to do that ?
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: direct-cnn-through-egress-gateway
namespace: demo-test-1
spec:
hosts:
- edition.cnn.com
gateways:
- istio-egressgateway.istio-system.svc.cluster.local
- mesh
http:
- match:
- gateways:
- mesh
port: 80
route:
- destination:
host: istio-egressgateway.istio-system.svc.cluster.local
port:
number: 80
weight: 100
- match:
- gateways:
- istio-egressgateway.istio-system.svc.cluster.local
port: 80
route:
- destination:
host: [PROXY_IP]
port:
number: 3128
weight: 100