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
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Use webrtc for coder sh#408

Merged
Emyrk merged 3 commits intomasterfromstevenmasley/ch15591/webrtc_sh
Aug 12, 2021
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Merge remote-tracking branch 'origin/master' into stevenmasley/ch1559…
…1/webrtc_sh
  • Loading branch information
@Emyrk
Emyrk committedAug 12, 2021
commit8e15d364bdb16e4f2693cf5fd20ad8cbec47175d
29 changes: 18 additions & 11 deletionsinternal/cmd/configssh.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,7 +45,6 @@ func configSSHCmd() *cobra.Command {
RunE: configSSH(&configpath, &remove, &additionalOptions),
}
cmd.Flags().StringVar(&configpath, "filepath", filepath.Join("~", ".ssh", "config"), "override the default path of your ssh config file")
cmd.Flags().StringSliceVarP(&additionalOptions, "option", "o", []string{}, "additional options injected in the ssh config (ex. disable caching with \"-o ControlPath=none\")")
cmd.Flags().BoolVar(&remove, "remove", false, "remove the auto-generated Coder ssh config")

return cmd
Expand DownExpand Up@@ -249,16 +248,24 @@ func makeNewConfigs(binPath string, workspaces []coderutil.WorkspaceWithWorkspac
return newConfig
}

func makeSSHConfig(binPath, workspaceName, privateKeyFilepath string) string {
entry := fmt.Sprintf(
`Host coder.%s
HostName coder.%s
ProxyCommand %s
StrictHostKeyChecking no
ConnectTimeout=0
IdentitiesOnly yes
IdentityFile="%s"
`, workspaceName, workspaceName, proxyCommand(binPath, workspaceName, true), privateKeyFilepath)
func makeSSHConfig(binPath, workspaceName, privateKeyFilepath string, additionalOptions []string) string {
// Custom user options come first to maximizessh customization.
options := []string{}
if len(additionalOptions) > 0 {
options = []string{
"# Custom options. Duplicated values will always prefer the first!",
}
options = append(options, additionalOptions...)
options = append(options, "# End custom options.")
}
options = append(options,
fmt.Sprintf("HostName coder.%s", workspaceName),
fmt.Sprintf("ProxyCommand %s", proxyCommand(binPath, workspaceName, true)),
"StrictHostKeyChecking no",
"ConnectTimeout=0",
"IdentitiesOnly yes",
fmt.Sprintf("IdentityFile=%q", privateKeyFilepath),
)

if runtime.GOOS == "linux" || runtime.GOOS == "darwin" {
options = append(options,
Expand Down
You are viewing a condensed version of this merge commit. You can view thefull changes here.

[8]ページ先頭

©2009-2025 Movatter.jp