]> khamidou — GitHub mirrors - electron.git/commitdiff
docs: Document the chrome command switches we support.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 15 Aug 2014 05:06:52 +0000 (13:06 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 15 Aug 2014 05:06:52 +0000 (13:06 +0800)
docs/README.md
docs/api/chrome-command-line-switches.md [new file with mode: 0644]
vendor/brightray

index dd55059e218e0d44c10837b4fa954500ffd272bd..6d2ec76a73db68bbd860ee0f75a333427ae6dfe6 100644 (file)
@@ -8,6 +8,7 @@
 
 * [Synopsis](api/synopsis.md)
 * [Process object](api/process.md)
+* [Supported Chrome command line switches](api/chrome-command-line-switches.md)
 
 Modules for browser side:
 
diff --git a/docs/api/chrome-command-line-switches.md b/docs/api/chrome-command-line-switches.md
new file mode 100644 (file)
index 0000000..e374398
--- /dev/null
@@ -0,0 +1,45 @@
+# Supported Chrome command line switches
+
+Following command lines switches in Chrome browser are also Supported in
+atom-shell, you can use [app.commandLine.appendSwitch](append-switch) to append
+them in your app's main script before the [ready](ready) event of [app](app)
+module is emitted:
+
+```javascript
+var app = require('app');
+app.commandLine.appendSwitch('remote-debugging-port', '88315');
+app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1');
+
+app.on('ready', function() {
+});
+```
+
+## --remote-debugging-port=`port`
+
+Enables remote debug over HTTP on the specified `port`.
+
+## --host-rules=`rules`
+
+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.
+
+[app](app.md)
+[append-switch](app.md#appcommandlineappendswitchswitch-value)
+[ready](app.md##event-ready)
index 85c66fe32557cb55ba4cc3370accd6f6c05fb06d..41cb4ad321634dd3474b24c18f161f303ee41dfc 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 85c66fe32557cb55ba4cc3370accd6f6c05fb06d
+Subproject commit 41cb4ad321634dd3474b24c18f161f303ee41dfc