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

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

Closed
gyzerok opened this issue May 9, 2020 · 3 comments
Closed

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

gyzerok opened this issue May 9, 2020 · 3 comments

Comments

@gyzerok
Copy link

gyzerok commented May 9, 2020

Hello there!

First of all let me say that you are doing amazing job making this project and keeping it open-source. Thank you!

I was wondering how can I pass additional flags to the code-server instance which sshcode will start. For example, let's say I want to use --disable-telemetry flag.

My apologies if this is a dumb question, but it isn't obvious to me from sshcode --help.

@Merith-TK
Copy link
Contributor

Merith-TK commented May 9, 2020

Wow, i didnt realize that this project didnt have that
the related code for this is in sshcode.go:L147

adding a flag for this would be good, feel free to make a fork for this! I am going to look into it

@gyzerok
Copy link
Author

gyzerok commented May 10, 2020

@Merith-TK nice, thanks for pointing out the code line!

Mostly I was interested in being able to specify concrete port on the remote host on which I would like to run code-server. From the code it looks like that sshCode accepts remotePort as a parameter, but it's not made configurable in main.go.

I have almost 0 experience with Go, however I'll try to fork and fix my specific use cases for myself as you suggested. Would you like me to make a PR with that (possibly of low quality due to my lack of Go knowledge 😅 )?

@Merith-TK
Copy link
Contributor

Merith-TK commented May 10, 2020

devs pardon my language in this

I didnt know shit about any programming lang other than shell scripting, (check out akg-git,)
until i saw a feature i wanted, and dove headfirst and made the patch that allows this program to run on windows under msys2

My recomended setup for golang (because i use it, it may not be the best for you) is VScode, with the golang extension (offical MS extension)

But in theory, it looks like you can just add a variable in there in that line i posted, and have in the code earlier, check to see if you passed a flag, and set that car to the contents of that flag,

if you want, i am on Discord as Merith#5829 and Coder has a Discord, and golang has a semi-official discord server that is great for getting help in, (you will see me frequent it often)

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 a pull request may close this issue.

2 participants