added support to get server ip in CLI mode, close #126