There’s no built-in way to replace the remote address with the value from a header, but there is a plugin that can do it: GitHub - kirsch33/realip: realip module for Caddy v2. Keep in mind, the plugin has a couple known bugs.
I seem to have come across a new situation, I removed caddy with old version from /etc/caddy, /usr/bin/caddy and /usr/share/caddy. And also I removed caddy-fury.list from /etc/apt/sources.list.d and then I followed the following steps install caddy
And I get the information, it seems that caddy is installed successfully.
Reading package lists... Done
Building dependency tree
Reading state information... Done
caddy is already the newest version (2.4.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
But I can’t find the caddy, which caddy returns caddy not found and whereis caddy returns caddy:.
BTW, if I already have caddy installed on my system and I want to install a third party caddy plugin from github, like this one https://github.com/kirsch33/realip how do I install it? Thank you so much.
Sorry, I missed something, in your reply you mean if I want to add a third party plug to caddy that has been installed on a server, I should remove caddy and rebuild it with some tools, such as xcaddy, right?