Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.
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

Description

@gyzerok

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.

Activity

  1. Merith-TK commented on May 9, 2020

    @Merith-TK
    Contributor

    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

  2. gyzerok commented on May 10, 2020

    @gyzerok
    Author

    @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 😅 )?

  3. Merith-TK commented on May 10, 2020

    @Merith-TK
    Contributor

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions