Hello Ruslan,
I do not use custom templates, I tried to use them but $ipAddress->proxyEscapedAddress has the same value as $OPT['ipAddress']->escapedAddress which is the public IP, so it has no difference on the generated configuration. As I understand on your first post, this is normal...