May 25, 2021 Electron
2. --ignore-connections-limit= domains
4. --remote-debugging-port= port
6. --proxy-server= address:port
11.. --host-resolver-rules= rules
12.. --ignore-certificate-errors
14.. --ppapi-flash-version= version
16.. --ssl-version-fallback-min= version
17.. --cipher-suite-blacklist= cipher_suites
This page lists the command line switches supported by Chrome and Electron. You can also use app.commandLine.appendSwitch to add them to your app's main script before the app module's ready event is issued:
const app = require('electron').app;
app.commandLine.appendSwitch('remote-debugging-port', '8315');
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1');
app.on('ready', function() {
// Your code here
});
path
Set the client's certificate file
path
.
domains
Ignore connection
,
with
domains
lists.
Disk caching is prohibited when requesting HTTP.
port
Turn on remote
端口
via HTTP on the specified port.
flags
Specify the engine to transition to the JS engine.
When You start Electron, if you want to activate flags in the
flags
it will be converted.
$ electron --js-flags="--harmony_proxies --harmony_collections" your-app
address:port
With a specific proxy server, it will take precedence over the system settings. T his switch is only valid when using the HTTP protocol and contains HTTPS and WebSocket requests. It is important to note that not all proxy servers support HTTPS and WebSocket requests.
hosts
Let Electron use the proxy server for the semi-colon-separated hosts list provided by (se: bypass).
This switch is only valid
--proxy-server
For example:
app.commandLine.appendSwitch('proxy-bypass-list', '<local>;*.google.com;*foo.com;1.2.3.4:5678')
A proxy server will be used for all hosts except the local
localhost
,
127.0.0.1
etc.),
google.com
sub-domains,
foo.com
and all similar
1.2.3.4:5678
url
Use the
url
on the specified url.
Do not use proxy services and always use direct connections. Ignore all reasonable agent flags.
rules
A comma-separated
rule
controls how host names are mapped.
For example:
MAP * 127.0.0.1
host names to map to 127.0.0.1
MAP *.google.com proxy
all google.com sub-domains to use "proxy".
MAP test.com [::1]:77
"test.com" to use IPv6 loopback addresses.
Port 77. is also enforced.
MAP * baz, EXCLUDE www.google.com
remapped to "baz", except "www.google.com".
These maps apply to terminal network requests (TCP connections and host resolution in a direct connection,
CONNECT
proxy connections, and terminal host SOCKS
SOCKS
proxy connections).
rules
Similar
--host-rules
but
rules
suitable for host resolution.
Ignore certificate-related errors.
path
Set the path path for the Pepper Flash
path
.
version
Set the Pepper Flash plug-in version number.
path
Enable blog events to be read to
path
.
version
Set the most simplified SSL/TLS version number ("tls1", "tls1.1" or "tls1.2"), and TLS accepts fallback.
cipher_suites
Specifies comma-separated SSL crypt suite list effect.
Prevent Chromium from lowering the priority of hidden rendering processes.
This flag is globally valid for all rendering processes, and if you only want to disable it in one window, you can use the hack method playing silent audio .
Print Chromium information output to the console.
This switch will work if
app.commandLine.appendSwitch
is resolved before the
ELECTRON_ENABLE_LOGGING
environment variables to achieve the same effect.
log_level
Set the default maximum active V-logging standard; The default is 0. Usually the V-logging standard value is positive.
This switch is only
--enable-logging
is on.
pattern
Giving each module the largest V-logging levels to override
--v
gives .E.g.
my_module=2,foo*=3
my_module.*
in the code of all source files my_module.
foo*.*
Any mode that contains forward slash or backward will be tested to block the entire path name and is not only an E.g module.
*/foo/bar/*=2
level in all source file codes under
foo/bar
will be changed .
--enable-logging
is on.