blob: 6ed04145950031e0ae563704fc57d4f0dc236da0 [file] [log] [blame]
Allow the agent-id to be changed in the UI.
https://github.com/rpwoodbu/mosh-chrome/pull/210
TODO(vapier): Merge with the logic in nassh to extract the default on the fly.
--- a/mosh_app/mosh_client.html
+++ b/mosh_app/mosh_client.html
@@ -99,6 +104,10 @@ td {
</select>
</td>
</tr>
+ <tr id="ssh-agent-id-row">
+ <td>SSH agent id:</td>
+ <td><input id="ssh-agent-id" type="text" placeholder="beknehfpfkghjoafdifaflglpjkojoco"></td>
+ </tr>
<tr>
<td>
DNS settings:
--- a/mosh_app/mosh_client.js
+++ b/mosh_app/mosh_client.js
@@ -230,6 +232,8 @@ function onConnectClick(e) {
break;
}
}
+ args['ssh-agent-id'] = form['ssh-agent-id'].value ||
+ form['ssh-agent-id'].placeholder;
// Define an ID that should, usually, uniquely define a connection to a
// server. This will preserve the window position across sessions. But still
--- a/mosh_app/mosh_window.js
+++ b/mosh_app/mosh_window.js
@@ -71,8 +75,7 @@ mosh.CommandInstance = function(argv) {
this.agentPort_ = null;
// App ID of an SSH agent.
- // TODO: Make this a user setting.
- this.agentAppID_ = 'beknehfpfkghjoafdifaflglpjkojoco';
+ this.agentAppID_ = argv.args['ssh-agent-id'];
};
mosh.CommandInstance.prototype.run = function() {