Thank you for your answers.
In search of ease way, I took closer look to Openfire server, that is written on Java. I have set up proxy using internal Java settings. And this settings applied both to traffic and to DNS. So my problem got solved without proxychains either. Anyway, thank you. With your help I got clear understanding.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your answers.
In search of ease way, I took closer look to Openfire server, that is written on Java. I have set up proxy using internal Java settings. And this settings applied both to traffic and to DNS. So my problem got solved without proxychains either. Anyway, thank you. With your help I got clear understanding.