Added support for change the hostname

I work over proxy network and I need change the hostname, this fix solve this issue.