public function allowProtocol($protocol)
    {
        if (is_array($protocol))
        {
            foreach ($protocol as $proto)
                $this->allowed_protocols[$proto] = true;
        }
        else
            $this->allowed_protocols[$protocol] = true;
        return $this;
    }