Repository navigation
Ports used by --link? #3236
Description
Activity
As you probably saw, running code-server with
--linkprints:info HTTP server listening on http://127.0.0.1:50924 (randomized by --link)
The port is random. I thought you might be able to explicitly set it using
PORTbut that didn't work and led to the same error message you posted 🤔As for getting around your firewalled VPS with
--link, I bet @code-asher or @bpmct may have more insight.Though it could cause other issues. We have seen issues reported when users access their code-server instance using
--linkfrom a different region to where their remote machine is. See #2734 (comment)- addedneeds-investigationThis issue needs to be further investigatedThis issue needs to be further investigated
on Apr 27, 2021 @jsjoeio Thanks for the quick reply. I noticed that and tried opening the randomized port but still couldn't get it working. I'm currently in Australia and my VPS provider is in Germany so perhaps that's it... But regardless, the ability to explicitly set the port would be really helpful for those of use behind firewalls.
Reacted by Joe PreviteYou don't need to open any ports! The cloud agent initiates a connection outward to our cloud then once that connection is established it uses it to proxy traffic. That means the only thing required to make it work is that the agent is able to connect outward to the internet.
I'm not sure there's a proper name for this kind of proxy but I've seen it called an "inverting proxy". This isn't our implementation but you can read a more detailed description of it here: https://github.com/google/inverting-proxy#inverting-proxy-and-agent
Reacted by Joe Previte- locked and limited conversation to collaborators
on Apr 28, 2021 - removedneeds-investigationThis issue needs to be further investigatedThis issue needs to be further investigated
on Jul 11, 2024
Hi guys
I'm trying to launch code-server from a firewalled VPS and can't find any information on the ports I need to open for --link to work. Port 8080 is open but that's obviously not it, because I'm getting the following message when visiting the generated URL:
Error connecting to your code-server instance
Ensure code-server is running and was properly started with the --link command line flag.
Which ports does --link use? And is the connection between my server and cdr.co fully encrypted? I got a bit worried when I saw the following in my terminal:
[2021-04-27T12:14:10.297Z] info - Authentication is disabled (disabled by --link)
[2021-04-27T12:14:10.297Z] info - Not serving HTTPS (disabled by --link)**
Thanks!