File indexing completed on 2024-11-24 04:54:35

0001 /*
0002     SPDX-License-Identifier: MPL-2.0
0003 */
0004 
0005 /* Copyright (c) 2015 Brian R. Bondy. Distributed under the MPL2 license.
0006  * This Source Code Form is subject to the terms of the Mozilla Public
0007  * License, v. 2.0. If a copy of the MPL was not distributed with this
0008  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
0009 
0010 #ifndef PROTOCOL_H_
0011 #define PROTOCOL_H_
0012 
0013 // Checks whether the URL can be blocked by ABP, based on its protocol.
0014 //
0015 // We only apply ABP rules against certain protocols (http, https, ws, wss).
0016 // This function checks to see if the given url is of one of these protocol.
0017 // For the purposes of this function, blob indicators are ignored (e.g.
0018 // "blob:http://" is treated the same as "http://").
0019 bool isBlockableProtocol(const char *url, int urlLen);
0020 
0021 #endif  // PROTOCOL_H_