# WebGL

WebGL is disabled in Camoufox by default. To enable it, set the webgl.disabled Firefox preference to false.

WebGL being disabled typically doesn't trigger detection by WAFs, so you generally don't need to be concerned about it. Only use WebGL when it's absolutely necessary for your specific use case.

Because I don't have a dataset of WebGL fingerprints to rotate against, WebGL fingerprint rotation is not implemented in the Camoufox Python library. If you need to spoof WebGL, you can do so manually with the following properties.


# Demo site

This repository includes a demo site (see here) that prints your browser's WebGL parameters. You can use this site to generate WebGL fingerprints for Camoufox from other devices.


# Properties

Camoufox supports spoofing WebGL parameters, supported extensions, context attributes, and shader precision formats.

Property Description Example
webGl:renderer Spoofs the name of the unmasked WebGL renderer. "NVIDIA GeForce GTX 980, or similar"
webGl:vendor Spoofs the name of the unmasked WebGL vendor. "NVIDIA Corporation"
webGl:supportedExtensions An array of supported WebGL extensions (full list). ["ANGLE_instanced_arrays", "EXT_color_buffer_float", "EXT_disjoint_timer_query", ...]
webGl2:supportedExtensions The same as webGl:supportedExtensions, but for WebGL2. ["ANGLE_instanced_arrays", "EXT_color_buffer_float", "EXT_disjoint_timer_query", ...]
webGl:contextAttributes A dictionary of WebGL context attributes. {"alpha": true, "antialias": true, "depth": true, ...}
webGl2:contextAttributes The same as webGl:contextAttributes, but for WebGL2. {"alpha": true, "antialias": true, "depth": true, ...}
webGl:parameters A dictionary of WebGL parameters. Keys must be GL enums, and values are the values to spoof them as. {"2849": 1, "2884": false, "2928": [0, 1], ...}
webGl2:parameters The same as webGl:parameters, but for WebGL2. {"2849": 1, "2884": false, "2928": [0, 1], ...}
webGl:parameters:blockIfNotDefined If set to true, only the parameters in webGl:parameters will be allowed. Can be dangerous if not used correctly. true/false
webGl2:parameters:blockIfNotDefined If set to true, only the parameters in webGl2:parameters will be allowed. Can be dangerous if not used correctly. true/false
webGl:shaderPrecisionFormats A dictionary of WebGL shader precision formats. Keys are formatted as "<shaderType>,<precisionType>". {"35633,36336": {"rangeMin": 127, "rangeMax": 127, "precision": 23}, ...}
webGl2:shaderPrecisionFormats The same as webGL:shaderPrecisionFormats, but for WebGL2. {"35633,36336": {"rangeMin": 127, "rangeMax": 127, "precision": 23}, ...}
webGl:shaderPrecisionFormats:blockIfNotDefined If set to true, only the shader percisions in webGl:shaderPrecisionFormats will be allowed. true/false
webGl2:shaderPrecisionFormats:blockIfNotDefined If set to true, only the shader percisions in webGl2:shaderPrecisionFormats will be allowed. true/false