code-server: Unable to connect with --link
#2704 isn’t resolved, sorry.
code-server --link
[2021-02-10T16:53:51.032Z] info HTTP server listening on http://**127.0.0.1**:32947 (randomized by --link)
There no way --link can access my server at 127.0.0.1, as it’s hosted remotely. It only works on 0.0.0.0.
I normally launch code-server using the --host 0.0.0.0 flag to enable this, however I would like to make use of --link which currently only launches with a host of 127.0.0.1 (internal/local network).
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 36 (8 by maintainers)
Yes, I would expect to run:
code-server --host 0.0.0.0 --linkThanks, Mike
Although we don’t know yet if everyone’s issues are caused by the same problem I’m going to close this in favor of https://github.com/cdr/code-server/issues/2734 for now so we can track progress in one place.
No, link is not supposed to be running behind a reverse proxy, it was created to eliminate the need for one.
On Mon, Feb 22, 2021 at 1:04 PM Mike notifications@github.com wrote:
One other detail that might help understand how this works is that the agent dials out to the cloud rather than having a request come into the server like how a traditional reverse proxy usually functions. This is why
--linkwill work even if all incoming ports are firewalled off or if it’s not even being routed to at all.Have you accessed the URL that
--linkoutputs?It is not necessary for code-server to bind to 0.0.0.0. The cloud agent proxies to code-server and runs on the same machine so it’s able to access code-server at 127.0.0.1. I hope that helps explain it!
If you have accessed the URL that
--linkoutputs and it’s not working please post details on the error you’re getting. Thanks!