Archived
1
0
Commit Graph

74 Commits

Author SHA1 Message Date
Dean Sheather
1046fc192e
Merge branch 'master' into log-failed-logins 2019-07-09 01:01:20 +00:00
Dean Sheather
5e8c3f8ff3
Merge pull request #698 from 8sd/patch-1
Fix formatting issue
2019-07-08 10:06:09 +00:00
Sebastian Duda
d950e3c9de
Fix missing comma in cli-help 2019-07-08 09:20:29 +02:00
Dean Sheather
a65773338c
add failed authentication attempt logger
When `isAuthed()` is called and the password cookie is not what we
expected, the failed login attempt is logged with the provided password,
remote address and user agent.

To allow for logging failed attempts with a reverse proxy, the
`--trust-proxy` argument has been added to trust the `X-Forwarded-For`
header. This implementation of an `X-Forwarded-For` parser uses the last
value in the list, therefore only trusting the nearest proxy.
2019-07-07 16:50:43 +10:00
Asher
28c93612e6
Move address output to the listen callback
Since listening is asynchronous, this guarantees the address will be
filled out.
2019-06-17 13:44:24 -05:00
Dean Sheather
a9d17882e7 use port from server.address() when printing URL (#780)
This allows the use of port 0, which is interpretted automatically to
mean "random port".

Additional logging consistency fixes.
2019-06-17 12:20:20 -05:00
Asher
cf63bbd003
Fix "no authentication" message with custom password
Fixes #757.
2019-06-11 12:08:02 -05:00
Asher
c020cd2f2c
Don't try to create builtin extensions directory
Since this will be a path in the binary that we don't want to create on
the user's system. I also removed the option to override it; it doesn't
seem like a great idea since you'd always want those builtin extensions.
This way we also don't have to check if the option was passed and only
create it if that was the case.
2019-05-19 19:49:05 -05:00
Asher
aa1474b675
Extra extensions directories (#694)
* Allow setting paths for builtin exts and extra dirs

The extra directories aren't used yet, just available from the
environment service and to the shared process.

* Utilize extra builtin extensions path

* Utilize extra extensions directory

* Fix cached mtimes for extra extension dirs

* Simplify extension cache equality check
2019-05-19 17:58:47 -05:00
Anmol Sethi
bb5836ec61
Rename codercom/code-server to cdr/code-server 2019-05-02 11:25:50 -04:00
Asher
cdb900aca8
Make preserveEnv return a new object
Modifying the object didn't feel quite right, plus this makes the code a
bit more compact.
2019-04-29 11:49:59 -05:00
Fedor Kalugin
1622fd4152 Preserve environment when forking shared process (#545) 2019-04-29 10:47:45 -05:00
Asher
a3ac4567e3
Only output password if it was generated 2019-04-25 14:08:46 -05:00
John McCambridge
6b887dcc9c Fix no-auth to still use HTTPS, set default for no-auth to false (#573) 2019-04-23 16:38:49 -05:00
John McCambridge
41c7d98b7b Offer https/http url based on schema (#572)
* Let people know when telemetry is disabled, change url to https if secure connection

* Remove --no-auth as a http candidate

* Rename variable, change let to const
2019-04-23 16:38:34 -05:00
Kyle Carberry
d073622629 Add --socket flag (#564)
* Add --socket flag

* Add msg for already bound socket
2019-04-22 12:47:27 -05:00
Asher
55bfeab208
Deprecate password flag in favor of an environment variable 2019-04-18 11:10:55 -05:00
Kyle Carberry
4d576ab4d4
Trigger configuration update when loaded 2019-04-17 21:01:23 -04:00
Kyle Carberry
c3a38e3fea
Add telemetry and option to disable (#519)
* Add telemetry and option to disable

* Update readme and getting-started guide

* Update lockfile

* Update getting started guide
2019-04-17 17:18:35 -05:00
Asher
cc8c7e2cee Make assets unique (#518)
* Make all assets unique

All CSS and JavaScript files have unique names now. I also moved the
login to the /login path in order to ensure the HTML for each page is
also unique.

* Explicitly include assets to cache
2019-04-17 17:18:20 -05:00
Asher
630ccfcacc Add flag to install an extension from the command line (#504) 2019-04-17 16:30:50 -05:00
Patrick Smith
c4c26058ef Use port from PORT env variable if available (#502) 2019-04-17 16:30:39 -05:00
Asher
aabb2ecda7
Update node to 10.15.1 (#472)
* Update Node to 10.15.1

* Remove string replace that was used for oclif

* Update nbin

* Package node-pty and spdlog with nbin

* Label stderr/stdout from shared process

* Remove fork override

* Prevent "already disposed" errors when trying to kill disposed proxies

* Include spdlog dependencies

* Shim /node_modules

* Add node_modules to Docker ignore

It keeps using my already-built .node files which results in a
mismatching GLIBC version error.

* Update nbin
2019-04-15 19:48:12 -05:00
Asher
7047be859c
Fix some open file/folder issues
- "Open folder" now says "open folder" instead of "open file"
- "Open folder" won't allow you to open files
- "Open file" won't allow you to open directories

Fixes #249.
2019-04-11 14:55:06 -05:00
Kyle Carberry
4af84fcaf6 Add flags for customizing user data dir and extensions dir (#420)
* Add flags for customizing extensions directory

* Update @coder/nbin
2019-04-03 17:07:47 -05:00
John McCambridge
217515344e Add port in use message (#418)
* Add clear error message if port is in use

* Add bold function for text/numbers

* remove unused dependency:

* remove unused line break

* Change logger message

* Use NodeJS.ErrnoException type

* Add back check for error code
2019-04-03 15:50:52 -05:00
Asher
3a672d725a Convert fully to protobuf (was partially JSON) (#402)
* Convert fully to protobuf (was partially JSON)

* Handle all floating promises

* Remove stringified proto from trace logging

It wasn't proving to be very useful.
2019-04-02 17:44:28 -05:00
Kyle Carberry
4eb5331ddc
Fixes #121 2019-03-27 10:36:32 -04:00
Kyle Carberry
3bb5c0bbe5
Fixes #351 2019-03-27 09:56:05 -04:00
Kyle Carberry
1697cc32a3
Use commander instead of oclif 2019-03-26 16:21:03 -04:00
Asher
dc2253e718 Refactor evaluations (#285)
* Replace evaluations with proxies and messages

* Return proxies synchronously

Otherwise events can be lost.

* Ensure events cannot be missed

* Refactor remaining fills

* Use more up-to-date version of util

For callbackify.

* Wait for dispose to come back before removing

This prevents issues with the "done" event not always being the last
event fired. For example a socket might close and then end, but only
if the caller called end.

* Remove old node-pty tests

* Fix emitting events twice on duplex streams

* Preserve environment when spawning processes

* Throw a better error if the proxy doesn't exist

* Remove rimraf dependency from ide

* Update net.Server.listening

* Use exit event instead of killed

Doesn't look like killed is even a thing.

* Add response timeout to server

* Fix trash

* Require node-pty & spdlog after they get unpackaged

This fixes an error when running in the binary.

* Fix errors in down emitter preventing reconnecting

* Fix disposing proxies when nothing listens to "error" event

* Refactor event tests to use jest.fn()

* Reject proxy call when disconnected

Otherwise it'll wait for the timeout which is a waste of time since we
already know the connection is dead.

* Use nbin for binary packaging

* Remove additional module requires

* Attempt to remove require for local bootstrap-fork

* Externalize fsevents
2019-03-26 13:01:25 -05:00
Kyle Carberry
2169045377
Fix debugging 2019-03-19 12:53:05 -04:00
Asher
f7c1ebf667
Fix moving data directory across devices 2019-03-12 15:45:44 -05:00
Asher
ba37a34fa2
Create data directory path before moving old directory there 2019-03-12 15:05:47 -05:00
Asher
e597d49912
Fix issues with configuration directories
- Move the old data directory if possible.
- Fix extension path to not use a hard-coded path and instead use the
  data directory.
- Create every part of the path during startup.
- Create each path when a connection is made as well in case they are
  deleted while the server is running.
- Create every part of the path before saving settings or writing a file
  using the resource endpoint.
2019-03-12 11:44:56 -05:00
Asher
0a9f5d8eee
Pass env as actual env instead of as a flag 2019-03-11 17:50:35 -05:00
Asher
736feaba51
Add proper version to --version 2019-03-11 17:38:11 -05:00
Forest Hoffman
30d14eeab4 Adhere to XDG base directory spec for dataDir and logDir (#156) 2019-03-09 09:11:30 -08:00
Asher
3d654a8df7
Resolve paths
Fixes #19.
2019-03-07 11:25:26 -06:00
Takayosi Amagi
87d2e22a6b Open localhost URL with --open (#28)
* Open localhost URL with --open

* Catch errors on opn

Co-Authored-By: fand <fand@users.noreply.github.com>
2019-03-07 09:23:54 -08:00
Michael Desantis
e20b79b5cc Generate secure passwords, fixes issue #26 (#51) 2019-03-06 16:25:44 -08:00
Asher
994531d8bb
Add task for packaging release (#6)
* Add task for packaging release

* Modify package task to package a single binary

This is so it can be used as part of the build/release script.

* Package release as part of Travis deploy

* Set platform env var

* Add arch env var

* Make version available to the code

* Use tar for Linux and zip for Mac & Windows
2019-03-06 18:15:52 -06:00
Icebob
3fbdb2e46c Implement #4 - fix password via CLI (#5) 2019-03-06 00:08:43 -08:00
Asher
63f7c57b4e
Randomly generate password 2019-03-04 11:46:34 -06:00
Kyle Carberry
e2ec010a1d
Add allow-http flag 2019-03-04 07:45:35 +00:00
Kyle Carberry
185c811354
Update default port to 8443 2019-03-01 16:55:31 -06:00
Kyle Carberry
06855adaa5
Create working directory if it doesn't exist 2019-03-01 10:33:16 -06:00
Kyle Carberry
e8174095ca
Add windows support (#41)
* Add windows support

* Improve multi-platform support

* Install with network-concurrency 1

* Use file-glob to upload windows binary

* Don't install packages in parallel if on windows

* Rename vscode-remote to code-server

* Add output at intervals so CI doesn't kill build

* Update all tasks to provide timed output

* Don't perform tasks sync otherwise we can't log
2019-02-28 14:04:19 -06:00
Kyle Carberry
be3f0c437f
Fixes browser app, adds no-auth (#38)
* Add no-auth flag

* Install packages for app dir
2019-02-26 16:03:42 -06:00
Kyle Carberry
0c2c957312 Fix readdir for root path (#35)
* Fix readdir for root path

* Fix merge of webpack conf

* Fix travis.yml to deploy on master

* Remove windows platform from travis.yml

* Enable caching

* mkdirpSync

* Fix build script
2019-02-25 16:29:34 -06:00