Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f6482c

Browse files
committed
impl: take into account wildcard configuration
when generating the ssh config for Coder Gateway.Up until now we just checked if the Coder deployment supportsthis feature, but now users have to option to continue touse expanded hostnames in the ssh config.
1 parenta6de12a commit4f6482c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎src/main/kotlin/com/coder/gateway/cli/CoderCLIManager.kt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class CoderCLIManager(
373373
SetEnv CODER_SSH_SESSION_TYPE=JetBrains
374374
""".trimIndent()
375375
val blockContent=
376-
if (feats.wildcardSSH) {
376+
if (settings.isSshWildcardConfigEnabled&&feats.wildcardSSH) {
377377
startBlock+System.lineSeparator()+
378378
"""
379379
Host${getHostPrefix()}--*
@@ -622,7 +622,7 @@ class CoderCLIManager(
622622
workspace:Workspace,
623623
currentUser:User,
624624
agent:WorkspaceAgent,
625-
):String=if (features.wildcardSSH) {
625+
):String=if (settings.isSshWildcardConfigEnabled&&features.wildcardSSH) {
626626
"${getHostPrefix()}--${workspace.ownerName}--${workspace.name}.${agent.name}"
627627
}else {
628628
// For a user's own workspace, we use the old syntax without a username for backwards compatibility,
@@ -638,7 +638,7 @@ class CoderCLIManager(
638638
workspace:Workspace,
639639
currentUser:User,
640640
agent:WorkspaceAgent,
641-
):String=if (features.wildcardSSH) {
641+
):String=if (settings.isSshWildcardConfigEnabled&&features.wildcardSSH) {
642642
"${getHostPrefix()}-bg--${workspace.ownerName}--${workspace.name}.${agent.name}"
643643
}else {
644644
getHostName(workspace, currentUser, agent)+"--bg"

‎src/main/kotlin/com/coder/gateway/util/LinkHandler.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ open class LinkHandler(
7474
var workspace:Workspace
7575
var workspaces:List<Workspace>= emptyList()
7676
var workspacesAndAgents:Set<Pair<Workspace,WorkspaceAgent>>= emptySet()
77-
if (cli.features.wildcardSSH) {
77+
if (settings.isSshWildcardConfigEnabled&&cli.features.wildcardSSH) {
7878
workspace= client.workspaceByOwnerAndName(owner, workspaceName)
7979
}else {
8080
workspaces= client.workspaces()

‎src/main/kotlin/com/coder/gateway/views/steps/CoderWorkspaceProjectIDEStepView.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class CoderWorkspaceProjectIDEStepView(
214214
logger.info("Configuring Coder CLI...")
215215
cbIDE.renderer=IDECellRenderer("Configuring Coder CLI...")
216216
withContext(Dispatchers.IO) {
217-
if (data.cliManager.features.wildcardSSH) {
217+
if (settings.isSshWildcardConfigEnabled&&data.cliManager.features.wildcardSSH) {
218218
data.cliManager.configSsh(emptySet(), data.client.me)
219219
}else {
220220
data.cliManager.configSsh(data.client.withAgents(data.workspaces), data.client.me)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp