Skip to content

INFO shown on shows localhost even with host override #827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iandstanley opened this issue Jul 3, 2019 · 2 comments
Closed

INFO shown on shows localhost even with host override #827

iandstanley opened this issue Jul 3, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@iandstanley
Copy link

  • code-server version:
    v1.1156-vsc1.33.1

  • OS Version:
    Ubuntu 18.04 in an lxc container

Description

When I specify the hostname IP address on the command line with

HOST="hostname -i" && ~root/.code-server/code-server -h $HOST -o

The code-server still shows the INFO as

INFO https://localhost:8443/

Log follows. ....

HOST="hostname -i" && ~root/.code-server/code-server -h $HOST -o
(node:7041) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO code-server v1.1156-vsc1.33.1
INFO Additional documentation: http://github.com/cdr/code-server
INFO Initializing {"data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","working-dir":"/root/.code-server","log-dir":"/root/.cache/code-server/logs/20190703161159810"}
INFO Starting webserver... {"host":"100.115.92.203","port":8443}
WARN No certificate specified. This could be insecure.
WARN Documentation on securing your setup: https://github.com/cdr/code-server/blob/master/doc/security/ssl.md
INFO
INFO Password: dc507d3941a7e1626d445d7d
INFO
INFO Started (click the link below to open):
INFO https://localhost:8443/
INFO
WARN Url couldn't be opened automatically. {"url":"https://localhost:8443/","exception":{"errno":"ENOENT","code":"ENOENT","syscall":"spawn /src/packages/server/out/xdg-open","path":"/src/packages/server/out/xdg-open","spawnargs":["https://localhost:8443/"]}}
INFO Starting shared process [1/5]...
WARN stderr {"data":"(node:7054) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO Connected to shared process

Steps to Reproduce

  1. HOST="hostname -i" && ~root/.code-server/code-server -h $HOST -o
@iandstanley iandstanley added the bug Something isn't working label Jul 3, 2019
@deansheather
Copy link
Member

packages/server/src/cli.ts is where localhost is hardcoded. code-server should actually be listening on whatever you told it to listen on, and you can verify that with netstat -tulnp.

Since the last release we've changed how the URL is printed (to account for another bug), but localhost is still hardcoded. I made a PR a few days ago (#819) which changes the URL generating code to include the provided host.

@code-asher
Copy link
Member

Fixed in v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants