#[non_exhaustive]pub enum Fuse {
RunAsNode,
EncryptedCookies,
NodeOptions,
NodeCliInspect,
EmbeddedAsarIntegrityValidation,
OnlyLoadAppFromAsar,
}Expand description
A representation of a fuse that Electron has built in. They are used to disable specific functionality in the application in a way that can be enforced via signature checks and codesigning at the OS level.
In the binary, fuses look like this:
| ...binary | sentinel_bytes | fuse_version | fuse_wire_length | fuse_wire | ...binary |Refer to the Electron project’s fuse documentation for more details.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RunAsNode
Disables ELECTRON_RUN_AS_NODE functionality in the application.
EncryptedCookies
Enables experimental cookie encryption support in the application.
NodeOptions
Disbles the ability to use the NODE_OPTIONS environment variable on the application.
NodeCliInspect
Disables the ability to use the [debugging command-line flags] on the application.
EmbeddedAsarIntegrityValidation
Enables the integrity validation of the app.asar file when it and resources inside are loaded by Electron.
This is designed to prevent tampering with application code on supported platforms.
To use this, an Electron packaging tool must create the correct checksum and embed it into the application. Otherwise, this will have no effect on custom Electron apps.
Note: This fuse currently only affects macOS. It is a no-op on other operating systems.
OnlyLoadAppFromAsar
Forces Electron to only load the application from app.asar. Other files and folders will be ignored
if they exist in the search path.