feign
feign copied to clipboard
Help wanted: Feign exception with VPN/proxy
Describe the issue
I encountered an issue where Feign would throw a 404 FeignException when using an HTTP proxy with a VPN (e.g., ClashX).
Feign only functions properly when I disable the HTTP proxy setting. Even if I configure the HTTP proxy strategy to DIRECT, Feign doesn't work correctly.
Expected behavior
Use Feign with HTTP proxy
Actually behavior
feign.FeignException$NotFound: [404 ] during [POST] to [http://service-test/api] [functionName]: [<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} ... (431 bytes)]
How to Reproduce Steps to reproduce the behavior:
- Enable HTTP proxy, such as ClashX.
- Register a service in the Service Registry, for example, Nacos.
- Using service with
@FeignClient(value = "serviceName"annotation. You can find a Java example here - Start the project and make a call to the service.
- See errors
Desktop (please complete the following information):
- OS: MacOS Ventura 13.4.1
- Environment: Spring Boot 2.6.8, JDK 17, ClashX 1.91.1
- Version: spring-cloud-openfeign-core-3.1.3