xiaoxuanyo commented on issue #11155:
URL: https://github.com/apache/apisix/issues/11155#issuecomment-2057116377

   > I didn't fully follow your description but it seems the real-ip plugin can 
fix your issue: https://docs.api7.ai/hub/real-ip
   
   ```
   Is the real-ip plug-in based on layer 7 proxy HTTP? But what I want is for 
apisix to obtain the real IP in the tcp request in the 4-layer proxy. For 
example, apisix proxies the tcp service of mysql or redis. At the same time, 
there is a load balancing haproxy in front of apisix that is forwarded to 
apisix through tcp send proxy. My requirement is to restrict client access 
through IP whitelisting in apisix. However, now in apisix I cannot obtain the 
source client IP address of the layer 4 proxy. I can only obtain the IP address 
of the haproxy load balancing in front of it. This doesn't fit what I want to 
achieve. The proxy_protocol block can be configured in apisix to accept tcp 
requests with proxy_protocol, but it cannot resolve the source client IP it 
carries? As shown in the picture below, this is my understanding.
   ```
   
![img_v3_029v_f1310f85-db5e-45f7-99c1-e2c065d4e34g](https://github.com/apache/apisix/assets/65661595/b9c66671-3499-4c42-b3d9-14dfa19a9f2d)
   
![img_v3_029v_4f4385eb-8d23-418a-8763-d293c0356bag](https://github.com/apache/apisix/assets/65661595/41c68cc2-0ef3-4cc2-b82e-0dfbb2b18e2c)
   
![img_v3_029v_092f9bf2-4c83-4763-b83a-9bdf624d621g](https://github.com/apache/apisix/assets/65661595/54a58c1e-c6e6-4004-9a86-65214019811c)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to