Closed LaikeeDu closed 1 year ago
I'm sorry but I'm not able to help with this for the time being. I've labeled the issue hoping someone will take a stab at it.
When the machine has an IPv6 address, nginx may change the original address of Proxy Protocol to IPv4-Mapped IPv6 Address, which is actually displayed as: ::ffff:123.123.123.123 All IPv4 addresses will be prefixed with "::ffff:", and go-proxyproto cannot recognize such addresses, so there will be an error of proxyproto: invalid address.
@himgoods in such case is traffic signaled as IPv6, eg TCPv6?
@himgoods in such case is traffic signaled as IPv6, eg TCPv6?
yes, it si signaled as IPv6. I used this configuration to test my patch
stream {
server {
listen [::]:2222 ipv6only=off;
#listen 2222;
proxy_pass 127.0.0.1:2022;
proxy_protocol on;
}
}
Thank you, @drakkan.
Hi, I've used Nginx as a load balance, and use example/server or example/http as backend. But I can't get real IP from nginx even if I have used the configuration of Nginx like
proxy_protocol on
The error was:
proxyproto: invalid address
or it just give me the IP of Nginx. Because I didn't find any thing relative to the problem, so I open the issue asking you for help. I will be appreciate if you can look deep into the problem.