Skip to content
This repository has been 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
wants to merge 2 commits into from

Conversation

gyzerok
Copy link

@gyzerok gyzerok commented May 10, 2020

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.

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
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?

sshcode.go Outdated Show resolved Hide resolved
flog.Info("starting code-server...")

flog.Info("Tunneling remote port %v to %v", o.remotePort, o.bindAddr)

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'",
Copy link
Author

@gyzerok gyzerok May 10, 2020

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