Skip to content

--link fails possibly because of the binding address #3989

@aghasemi

Description

@aghasemi

Hello,
I tried to run code-server with the --link option, and it ran without printing any errors into console, pointing me to some https://****.cdr.co/ address. However, opening that address did not work for me, with the error message "cannot connect to instance.." printed on the Browser screen. Still no error in the console.

I guess the failure to connect is because --link uses 127.0.0.1 as the binding address, whereas in the VPS I use, it must be 0.0.0.0, and that's how I manage to run code-server without --link.

Is there a way to tell --link to use 0.0.0.0 as the binding address and then some random port, instead of 127.0.0.1 and some random port? I have already set bind-addr to 0.0.0.0 in config.toml, but it is apparently ignored by --link.

Many thanks.

OS/Web Information

  • Web Browser: Chrome 92
  • Local OS: ChromeOS
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: AMD Ryzen
  • code-server --version: 3.11.1

Steps to Reproduce

  1. Run code-server with --link on a server that needs the binding address to be 0.0.0.0 to be accessible outside

Expected

Access code-server via cdr.io proxy link

Actual

Code-server is not accessible via proxy link

Update: I looked into the source code and it seems that line 450 of the file cli.ts can do the trick. No?

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedThis issue cannot proceed due to external factors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions