Added support for change hostname"

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