protected function getPort($default = 30000)
    {
        $ports = [];
        foreach ($this->getTunnelInfo() as $tunnel) {
            $ports[] = $tunnel['localPort'];
        }

        return PortUtil::getPort($ports ? max($ports) + 1 : $default);
    }