change local port to rand select, and support at cmd to updata