Skip to content

Commit

Permalink
move ssh-agent id selection to the UI
Browse files Browse the repository at this point in the history
This allows users to plugin other extensions if they want.
Fixes rpwoodbu#202.
  • Loading branch information
vapier committed Nov 23, 2020
1 parent 98d1a0e commit 7264261
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mosh_app/mosh_client.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
</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:
Expand Down
2 changes: 2 additions & 0 deletions mosh_app/mosh_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,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
Expand Down
3 changes: 1 addition & 2 deletions mosh_app/mosh_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,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_ = addr['ssh-agent-id'];
};

mosh.CommandInstance.prototype.run = function() {
Expand Down

0 comments on commit 7264261

Please sign in to comment.