The UDP protocol of snmp4j does not support parsing the Nginx proxy protocol.

An external server uses the UDP protocol to request the system. The system entry is Nginx. Nginx uses the reverse proxy ngx_stream_proxy_module module to request the internal snmp4j of the system. When the Nginx reverse proxy UDP protocol is used, If the transmission of the source IP address of the external server requires the privilege, but neither Nginx nor snmp4j of the system has the privilege, snmp4j cannot obtain the source IP address of the external server. How can snmp4j obtain the source IP address of an external server instead of the IP address of Nginx when it does not have the privilege?

SNMP4J cannot detect the source IP because it is not in the UDP stream if the nginx does not use

proxy_bind $remote_addr transparent 

and to use that, you need CAP_NET_RAW and TPROXY / IP_TRANSPARENT compiled into the kernel running nginx.

Most likely a DNAT approach would be simpler. If you want to use

proxy_protocol on;

on nginx to forward the source IP to the SNMP4J agent, then you need to implement your own UdpTransportMapping that understands the proxy protocol.