code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Feat]: port proxy feature disable via cli option

Open OliverwengFiltered opened this issue 2 years ago • 9 comments

Hi there,

can we add a cli option to disable the pop up on the lower right corner when web is served under a particular port ?

Or disable the whole "Ports" feature completely ?

currently the port proxy feature seems has some "relative path" issue if the code server is already behind a reverse proxy, so better to be disabled to avoid confusion.

Thanks

Screenshot 2022-11-21 at 11 27 43 AM Screenshot 2022-11-21 at 11 28 06 AM

OliverwengFiltered avatar Dec 01 '22 03:12 OliverwengFiltered

cc @jsjoeio @code-asher

OliverwengFiltered avatar Dec 01 '22 03:12 OliverwengFiltered

Yes! Seems like we'd need to add a CLI flag and then use it here, with the default set to true https://github.com/coder/code-server/blob/main/patches/proxy-uri.diff#L178

jsjoeio avatar Dec 01 '22 17:12 jsjoeio

Does disabling the "auto forward ports" option do anything?

code-asher avatar Dec 05 '22 20:12 code-asher

Still might be a good idea to have a CLI flag to disable the proxy completely if needed for security reasons.

code-asher avatar Dec 05 '22 20:12 code-asher

auto forward ports

how to use "auto forward ports" option ? is it a cli option ? @code-asher

OliverwengFiltered avatar Dec 05 '22 20:12 OliverwengFiltered

In your VS Code Settings:

image

jsjoeio avatar Dec 05 '22 22:12 jsjoeio

@jsjoeio thanks for the direction, I will test it out.

but agreed, a cli option would be nicer to give user ability to turn it off on start

OliverwengFiltered avatar Dec 05 '22 22:12 OliverwengFiltered

confirmed the auto forward ports option works. thanks @code-asher

OliverwengFiltered avatar Dec 23 '22 19:12 OliverwengFiltered

Moving to Backlog for now. If more people want this, we can reconsider a CLI flag.

jsjoeio avatar Jan 03 '23 15:01 jsjoeio