Open rola0411 opened 3 years ago
I don`t understand this proxy-uid or how to do?
Transparent proxy works by installing iptables rules that redirect all inbound and outbound traffic to Envoy. Envoy itself must not be subject to this redirection, otherwise when it initiate an outgoing connection, the connection would be redirected back to itself.
In order to avoid this redirect loop, Envoy must run under a different Unix user account than the account used to spawn the application. The -proxy-uid
allows you to specify the Unix user identifier under which the proxy is running so that the UID can be exempted from traffic redirection.
my case is : curl demo-one/demo , and demo-one will access demo-two by transparent_proxy
in the VM , I want springboot project : demo-one ----> demo-two
This should be easier to accomplish with Consul 1.11 by accessing the service using the new virtual IP service lookup (e.g., curl demo-two.virtual.consul/demo
) and by using the following connect_service
config in the service registrations.
{
"connect": {
"sidecar_service": {
"proxy": {
"mode": "transparent"
}
}
}
}
docker exec -it ead27e00dbe5 consul connect redirect-traffic \ -proxy-id="demo-two-0-sidecar-proxy" \ -proxy-uid="???" \
I don`t understand this proxy-uid or how to do?
I install dnsmasq to consul dns: 8600. config content is : server=/#/192.168.103.238#8600
my case is : curl demo-one/demo , and demo-one will access demo-two by transparent_proxy
in the VM , I want springboot project : demo-one ----> demo-two