quite simple:
- define in your config.tcl file (startup file for the aolserver) something like
ns_section "ns/parameters"
ns_param home $homedir
ns_param debug false
ns_param ReverseProxyMode true
....
- insert the snippet above into your packages/acs-tcl/tcl/request-processor-procs.tcl
(just search for the place, where the peer_addr is set).
- make sure, your proxy inserts the x-forwarded-for header field.
When you restart the server, "ad_conn peer_addr" is set to the last x-forwarded-for addr in the header, usually the client. Some proxies have to option to drop incoming x-forwarded-for field, so spoofing this field can be avoided in general.
hope, this helps.