alireza0:dokodemo-door 只能接收 Proxy Protocol 不能发送,改由 freedom 出站携带

针对「能否让 dokodemo-door 通过 sockopt 发送 Proxy Protocol」的提问:该能力由 Xray-core 处理、x-ui 仅透传配置,dokodemo-door 只能接收 Proxy Protocol 而不能发送。替代做法是——在转发到真实入站的出站上使用 freedom 并把 proxyProtocol 设为 1 或 2,在真实入站上开启 acceptProxyProtocol,这样真实入站就能看到原始客户端 IP。若希望 dokodemo-door 本身支持 sockopt,需到 Xray-core 仓库提出。

作者原文

Thanks for the report!

This is handled by Xray-core, not x-ui. x-ui only passes the config through. dokodemo-door can only receive the Proxy Protocol, not send it.

You can try this instead:

  • On the outbound that forwards traffic to your real inbound, use freedom and set proxyProtocol to 1 or 2.
  • On the real inbound, turn on acceptProxyProtocol.

This way the real inbound sees the original client IP. If you want sockopt support on dokodemo-door itself, please ask in the Xray-core repo.