avwo / whistle

HTTP, HTTP2, HTTPS, Websocket debugging proxy
https://wproxy.org/
MIT License
14k stars 1.08k forks source link

X-Forwarded-For Header 浏览器插件,配置`x-forwarded-for`字段无效 #1010

Closed luguiqing closed 7 months ago

luguiqing commented 7 months ago

谷歌插件 X-Forwarded-For Header, 可以修改如下图headers头, 但是x-forwarded-for字段修改无效;

image

请教下两个问题:

  1. 是因为 内置forwardedFor配置,所以才导致该请求头x-forwarded-for无法正常透传吗?
  2. 目前通过 reqScript 的形式来实现该效果,有其他好的推荐方式吗?
    
    # forwardedFor.js
    if (headers['x-remote-addr']) {
    rules.push('* forwardedFor://' + headers['x-remote-addr'])
    }
avwo commented 7 months ago

两者不要混用

luguiqing commented 7 months ago

好的,谢谢