From d35996b4a0cfe5388f879f47110d80f235505690 Mon Sep 17 00:00:00 2001 From: heyunjiang <598119677@qq.com> Date: Tue, 8 Mar 2016 19:57:53 +0800 Subject: [PATCH] position modify --- .../zh-CN/api/chrome-command-line-switches.md | 144 ++++++++++++++++ .../zh-CN/{tutorial => api}/process.md | 0 .../tutorial/chrome-command-line-switches.md | 158 ------------------ 3 files changed, 144 insertions(+), 158 deletions(-) create mode 100644 docs-translations/zh-CN/api/chrome-command-line-switches.md rename docs-translations/zh-CN/{tutorial => api}/process.md (100%) delete mode 100644 docs-translations/zh-CN/tutorial/chrome-command-line-switches.md diff --git a/docs-translations/zh-CN/api/chrome-command-line-switches.md b/docs-translations/zh-CN/api/chrome-command-line-switches.md new file mode 100644 index 000000000..234f3c63b --- /dev/null +++ b/docs-translations/zh-CN/api/chrome-command-line-switches.md @@ -0,0 +1,144 @@ +# 支持的 Chrome 命令行开关 + +这页列出了Chrome浏览器和Electron支持的命令行开关. 你也可以在[app][app]模块的[ready][ready]事件发出之前使用[app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的main脚本里面: + +```javascript +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 +}); +``` + +## --client-certificate=`path` + +设置客户端的证书文件 `path` . + +## --ignore-connections-limit=`domains` + +忽略用 `,` 分隔的 `domains` 列表的连接限制. + +## --disable-http-cache + +禁用 HTTP 请求. + +## --remote-debugging-port=`port` + +在指定的 `端口` 通过 HTTP 开启远程调试. + +## --js-flags=`flags` + +指定引擎过渡到 JS 引擎. + +在启动Electron时,如果你想在主进程中激活 `flags` ,它将被转换. + +```bash +$ electron --js-flags="--harmony_proxies --harmony_collections" your-app +``` + +## --proxy-server=`address:port` + +使用一个特定的代理服务器,它将比系统设置的优先级更高.这个开关只有在使用 HTTP 协议时有效,它包含 HTTPS 和 WebSocket 请求. 值得注意的是,不是所有的代理服务器都支持 HTTPS 和 WebSocket 请求. + +## --proxy-bypass-list=`hosts` + +让 Electron 使用(原文:bypass) 提供的以 semi-colon 分隔的hosts列表的代理服务器.这个开关只有在使用 `--proxy-server` 时有效. + +例如: + +```javascript +app.commandLine.appendSwitch('proxy-bypass-list', ';*.google.com;*foo.com;1.2.3.4:5678') +``` + + +将会为所有的hosts使用代理服务器,除了本地地址 (`localhost`, +`127.0.0.1` etc.), `google.com` 子域, 以 `foo.com` 结尾的hosts,和所有类似 `1.2.3.4:5678`的. + +## --proxy-pac-url=`url` + +在指定的 `url` 上使用 PAC 脚本. + +## --no-proxy-server + +不使用代理服务并且总是使用直接连接.忽略所有的合理代理标志. + +## --host-rules=`rules` + +一个逗号分隔的 `rule` 列表来控制主机名如何映射. + +例如: + +* `MAP * 127.0.0.1` 强制所有主机名映射到 127.0.0.1 +* `MAP *.google.com proxy` 强制所有 google.com 子域 使用 "proxy". +* `MAP test.com [::1]:77` 强制 "test.com" 使用 IPv6 回环地址. 也强制使用端口 77. +* `MAP * baz, EXCLUDE www.google.com` 重新全部映射到 "baz", 除了 + "www.google.com". + +这些映射适用于终端网络请求 +(TCP 连接 +和 主机解析 以直接连接的方式, 和 `CONNECT` 以代理连接, 还有 终端 host 使用 `SOCKS` 代理连接). + +## --host-resolver-rules=`rules` + +类似 `--host-rules` ,但是 `rules` 只适合主机解析. + +## --ignore-certificate-errors + +忽略与证书相关的错误. + +## --ppapi-flash-path=`path` + +设置Pepper Flash插件的路径 `path` . + +## --ppapi-flash-version=`version` + +设置Pepper Flash插件版本号. + +## --log-net-log=`path` + +使网络日志事件能够被读写到 `path`. + +## --ssl-version-fallback-min=`version` + +设置最简化的 SSL/TLS 版本号 ("tls1", "tls1.1" or "tls1.2"),TLS 可接受回退. + +## --cipher-suite-blacklist=`cipher_suites` + +指定逗号分隔的 SSL 密码套件 列表实效. + +## --disable-renderer-backgrounding + +防止 Chromium 降低隐藏的渲染进程优先级. + +这个标志对所有渲染进程全局有效,如果你只想在一个窗口中禁止使用,你可以采用 hack 方法[playing silent audio][play-silent-audio]. + +## --enable-logging + +打印 Chromium 信息输出到控制台. + +如果在用户应用加载完成之前解析`app.commandLine.appendSwitch` ,这个开关将实效,但是你可以设置 `ELECTRON_ENABLE_LOGGING` 环境变量来达到相同的效果. + +## --v=`log_level` + +设置默认最大活跃 V-logging 标准; 默认为 0.通常 V-logging 标准值为肯定值. + +This switch only works when `--enable-logging` is also passed. + +## --vmodule=`pattern` + +Gives the per-module maximal V-logging levels to override the value given by +`--v`. E.g. `my_module=2,foo*=3` would change the logging level for all code in +source files `my_module.*` and `foo*.*`. + +Any pattern containing a forward or backward slash will be tested against the +whole pathname and not just the module. E.g. `*/foo/bar/*=2` would change the +logging level for all code in the source files under a `foo/bar` directory. + +This switch only works when `--enable-logging` is also passed. + +[app]: app.md +[append-switch]: app.md#appcommandlineappendswitchswitch-value +[ready]: app.md#event-ready +[play-silent-audio]: https://github.com/atom/atom/pull/9485/files \ No newline at end of file diff --git a/docs-translations/zh-CN/tutorial/process.md b/docs-translations/zh-CN/api/process.md similarity index 100% rename from docs-translations/zh-CN/tutorial/process.md rename to docs-translations/zh-CN/api/process.md diff --git a/docs-translations/zh-CN/tutorial/chrome-command-line-switches.md b/docs-translations/zh-CN/tutorial/chrome-command-line-switches.md deleted file mode 100644 index 14e4a431b..000000000 --- a/docs-translations/zh-CN/tutorial/chrome-command-line-switches.md +++ /dev/null @@ -1,158 +0,0 @@ -# 支持的 Chrome 命令行开关 - -这页列出了Chrome浏览器和Electron支持的命令行开关. 你也可以在[app][app]模块的[ready][ready]事件发出之前使用[app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的main脚本里面: - -```javascript -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 -}); -``` - -## --client-certificate=`path` - -设置客户端的证书文件 `path` . - -## --ignore-connections-limit=`domains` - -忽略用 `,` 分隔的 `domains` 列表的连接限制. - -## --disable-http-cache - -禁用 HTTP 请求的 磁盘缓存. - -## --remote-debugging-port=`port` - -在指定的 `端口` 通过 HTTP 开启远程调试. - -## --js-flags=`flags` - -Specifies the flags passed to JS engine. It has to be passed when starting -Electron if you want to enable the `flags` in the main process. - -```bash -$ electron --js-flags="--harmony_proxies --harmony_collections" your-app -``` - -## --proxy-server=`address:port` - -Use a specified proxy server, which overrides the system setting. This switch -only affects requests with HTTP protocol, including HTTPS and WebSocket -requests. It is also noteworthy that not all proxy servers support HTTPS and -WebSocket requests. - -## --proxy-bypass-list=`hosts` - -Instructs Electron to bypass the proxy server for the given semi-colon-separated -list of hosts. This flag has an effect only if used in tandem with -`--proxy-server`. - -For example: - -```javascript -app.commandLine.appendSwitch('proxy-bypass-list', ';*.google.com;*foo.com;1.2.3.4:5678') -``` - -Will use the proxy server for all hosts except for local addresses (`localhost`, -`127.0.0.1` etc.), `google.com` subdomains, hosts that contain the suffix -`foo.com` and anything at `1.2.3.4:5678`. - -## --proxy-pac-url=`url` - -Uses the PAC script at the specified `url`. - -## --no-proxy-server - -Don't use a proxy server and always make direct connections. Overrides any other -proxy server flags that are passed. - -## --host-rules=`rules` - -A comma-separated list of `rules` that control how hostnames are mapped. - -For example: - -* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1 -* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to - "proxy". -* `MAP test.com [::1]:77` Forces "test.com" to resolve to IPv6 loopback. Will - also force the port of the resulting socket address to be 77. -* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for - "www.google.com". - -These mappings apply to the endpoint host in a net request (the TCP connect -and host resolver in a direct connection, and the `CONNECT` in an HTTP proxy -connection, and the endpoint host in a `SOCKS` proxy connection). - -## --host-resolver-rules=`rules` - -Like `--host-rules` but these `rules` only apply to the host resolver. - -## --ignore-certificate-errors - -Ignores certificate related errors. - -## --ppapi-flash-path=`path` - -Sets the `path` of the pepper flash plugin. - -## --ppapi-flash-version=`version` - -Sets the `version` of the pepper flash plugin. - -## --log-net-log=`path` - -Enables net log events to be saved and writes them to `path`. - -## --ssl-version-fallback-min=`version` - -Sets the minimum SSL/TLS version ("tls1", "tls1.1" or "tls1.2") that TLS -fallback will accept. - -## --cipher-suite-blacklist=`cipher_suites` - -Specifies comma-separated list of SSL cipher suites to disable. - -## --disable-renderer-backgrounding - -Prevents Chromium from lowering the priority of invisible pages' renderer -processes. - -This flag is global to all renderer processes, if you only want to disable -throttling in one window, you can take the hack of -[playing silent audio][play-silent-audio]. - -## --enable-logging - -Prints Chromium's logging into console. - -This switch can not be used in `app.commandLine.appendSwitch` since it is parsed -earlier than user's app is loaded, but you can set the `ELECTRON_ENABLE_LOGGING` -environment variable to achieve the same effect. - -## --v=`log_level` - -Gives the default maximal active V-logging level; 0 is the default. Normally -positive values are used for V-logging levels. - -This switch only works when `--enable-logging` is also passed. - -## --vmodule=`pattern` - -Gives the per-module maximal V-logging levels to override the value given by -`--v`. E.g. `my_module=2,foo*=3` would change the logging level for all code in -source files `my_module.*` and `foo*.*`. - -Any pattern containing a forward or backward slash will be tested against the -whole pathname and not just the module. E.g. `*/foo/bar/*=2` would change the -logging level for all code in the source files under a `foo/bar` directory. - -This switch only works when `--enable-logging` is also passed. - -[app]: app.md -[append-switch]: app.md#appcommandlineappendswitchswitch-value -[ready]: app.md#event-ready -[play-silent-audio]: https://github.com/atom/atom/pull/9485/files \ No newline at end of file -- 2.34.1