Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

add ability to select code-server port and disable telemetry - #178

Closed
gyzerok wants to merge 2 commits into
coder:masterfrom
gyzerok:add-some-code-server-flags
Closed

gyzerok wants to merge 2 commits into
coder:masterfrom
gyzerok:add-some-code-server-flags

Conversation

@gyzerok

@gyzerok gyzerok commented May 10, 2020 •

Copy link
Copy Markdown

Fixes #177

Hello!

Full disclaimer: I have a very limited Go experience. Hopefully the way I've implemented this looks reasonable. However I am willing to take any suggestions on how to improve.

Comment thread main.go
fl.BoolVar(&c.noReuseConnection, "no-reuse-connection", false, "do not reuse SSH connection via control socket")
fl.BoolVar(&c.disableTelemetry, "disable-telemetry", false, "pass --disable-telemetry flag to code-server")
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for SSH tunnel, in [HOST][:PORT] syntax (default: 127.0.0.1)")
fl.StringVar(&c.remotePort, "remote-port", "", "specify remote port on which code-server will be started")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also could be --code-server-port. Which one do you think is better?

Comment thread sshcode.go Outdated
Comment thread sshcode.go
sshCmdStr :=
fmt.Sprintf("ssh -tt -q -L %v:localhost:%v %v %v '%v %v --host 127.0.0.1 --auth none --port=%v'",
o.bindAddr, o.remotePort, o.sshFlags, host, codeServerPath, dir, o.remotePort,
fmt.Sprintf("ssh -tt -q -L %v:127.0.0.1:%v %v %v '%v'",

@gyzerok gyzerok May 10, 2020 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to 127.0.0.1 so it matches what is written in --host just for consistency.

@gyzerok gyzerok closed this May 13, 2020
@gyzerok
gyzerok deleted the add-some-code-server-flags branch May 18, 2020 00:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to pass custom flags to the code-server instance?

1 participant