feign icon indicating copy to clipboard operation
feign copied to clipboard

Help wanted: Feign exception with VPN/proxy

Open hsiong opened this issue 2 years ago • 0 comments

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:

  1. Enable HTTP proxy, such as ClashX.
  2. Register a service in the Service Registry, for example, Nacos.
  3. Using service with @FeignClient(value = "serviceName" annotation. You can find a Java example here
  4. Start the project and make a call to the service.
  5. 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

hsiong avatar Jul 18 '23 09:07 hsiong