A simple way will be to say: If option enable then initialyse value of htonl(conn_elt->tracking.saddr) with value of ((struct tls_buffer_read *)userdata)->ipv4_addr (I have to find how write this in C)
The best way will be to do this just for users authorized to be nated (with a new config file , ACL or database): If option enable and user authorized to be nated then replace the ip else normal test fi
Isn't a good thing to include this in futur versions? The option will be in nuauth.conf with default value to 0, and the administrator have to take this responsability.
I can write the simple way but for the other way It's not very easy (for my knowledges). But with some time. (I'm an french Unix administrator, I use often shell and perl but for C... )