Added autoconfig of ip and port