Commit graph

630 commits

Author SHA1 Message Date
Vinicius Fortuna
9a3601656d
Merge pull request #621 from Jigsaw-Code/fortuna-cleanup-3
Clean up language logic
2020-04-27 18:25:22 -04:00
Vinicius Fortuna
4a328843f9 Merge branch 'master' into fortuna-cleanup-3 2020-04-27 15:59:48 -04:00
Vinicius Fortuna
492e59c7fc Move <app-root> back to index.html 2020-04-27 15:47:10 -04:00
Vinicius Fortuna
226bd24614 Rename languagetoUse 2020-04-27 15:08:18 -04:00
Vinicius Fortuna
8d802b619b Rename normalized to normalizedLanguage 2020-04-27 15:07:50 -04:00
Vinicius Fortuna
ef6f221a70
Merge pull request #623 from Jigsaw-Code/fortuna-cleanup-1
Merge fortuna-cleanup-1 into master
2020-04-27 14:58:23 -04:00
Vinicius Fortuna
5c79a08f6f
Merge pull request #620 from Jigsaw-Code/fortuna-cleanup-2
Make AppRoot a class
2020-04-27 14:53:56 -04:00
Vinicius Fortuna
187bd5d165 Make AppRoot a class 2020-04-27 13:29:27 -04:00
Vinicius Fortuna
9710d84e59 Use es2015 instead of es6 2020-04-27 13:26:49 -04:00
Vinicius Fortuna
4ce79d240a Target ES6 2020-04-27 13:26:49 -04:00
Vinicius Fortuna
1729e16e5f Simplify index.html 2020-04-27 13:26:49 -04:00
Vinicius Fortuna
eaf201c231 Use es2015 instead of es6 2020-04-27 12:59:19 -04:00
Vinicius Fortuna
ede3057adf Clean up language logic
- Creates a i18n library with tests
- Moves logic out of ui component (it shouldn't be there)
- Removes another entry point from index.html
2020-04-25 20:04:56 -04:00
Vinicius Fortuna
85a0d54823 Make AppRoot a class 2020-04-25 19:10:55 -04:00
Vinicius Fortuna
a2f3cad7c5 Target ES6 2020-04-25 18:57:53 -04:00
Vinicius Fortuna
812d8f6426 Simplify index.html 2020-04-24 22:40:05 -04:00
mpmcroy
1859f84194
Replaces AWS EC2 with Amazon Lightsail instructions (#614)
* Replaces the EC2 instructions with Lightsail

* Updates Amazon Lightsail assets

* Addresses review comments
2020-04-14 13:58:37 -04:00
Jonathan Cohen
07ff4524b5
Fill out GCP server creation instructions (#570)
* Add a new section for the 'Create your Server' directions

* Adjust step numbers depending on which cloud provider is selected.

* Add GCP account creation instructions

Screenshots and i18n will wait until the instructions themselves have
been reviewed and finalized.

* Add directions for creating a new VM isntance.

There is still no recommendation for machine type, and i18n won't be
finished until the directions are reviewed and approved by the team

* Specify f1-micro machine type

Looking at Prometheus for some large servers showed that we never get
above a few hundred megabytes in memory usage and don't go anywhere near
the 10 GB of disk space's worth of virtual memory + persistence.

* Re-order instructions to create the firewall rule before the VM

This way there is no separate assignment step

* Format with Prettier

* Respond to code review

Most importantly, removes the recommendation of CoreOS to instead use
the default Debian image.

* Respond to review comments

Use a CSS class to select the correct dropdowns to clear
Rewrite a ternary statement

* Consolidate the GCP-specific instructions in to a single dropdown

* Internationalize new messages

* Revert accidental message change

* Removed unused messages

* Use computed properties for the step numbers

* Make the translation instructions consistent with that of pre-existing messages.

* Replace placeholder assets

* Respond to review comments

* Remove a spurious comment
* Use single quotes in messages
2020-04-13 19:08:25 -04:00
alalamav
c0ba8c0a5f
Data limits surveys (#612) 2020-04-09 13:38:50 -04:00
alalamav
1acf43e8a6
Remove Sentry API keys (#608) 2020-04-08 10:26:24 -04:00
mpmcroy
598e1ac615
Updates width of data limit usage value to fix alignment (#613) 2020-04-02 11:58:10 -04:00
mpmcroy
7545cb3466
Display server Shadowbox version (#607)
* Display server Shadowbox version

* Address review comments
2020-04-02 11:13:48 -04:00
mpmcroy
8a359a4a88
Fixes data transfer UI to always display in base 10 (GB vs GiB) (#605)
* Fixes data transfer limit calculation

* Replaces bytes library with byte-size

* Addresses review comments

* Update licenses.txt

* Fix typo
2020-04-01 13:03:57 -04:00
Jonathan Cohen
89012b84b6
Clean up API documentation (#610)
* Fix typos in the API documentation

* Fix incorrect schema

* Respond to review comments

* Formatting
2020-03-31 12:52:55 -04:00
alalamav
da0d19bad0
Increase Outline Manager version (#604) 2020-03-20 10:50:07 -04:00
alalamav
97ec7255b6
Pin electron version to 7.0.1; update electron-builder to 22.4.0 (#603) 2020-03-10 13:43:30 -04:00
alalamav
e1b268a197
Add data limits feedback survey link (#573) 2020-03-09 18:47:40 -04:00
alalamav
ed9fdd3819
Update @types/express (#602) 2020-03-09 16:06:23 -04:00
Jonathan Cohen
c6435feae5
Select newly added keys (#601)
* Select newly added keys

* Add a comment about force rendering

* Use the newest types for express and remove a conflict between multiple
versions of express between the top level node modules and the
metrics_server node modules.  Also fix node typing at major version 12
to avoid issues with typing in node 13.
2020-03-06 18:33:07 -05:00
Jonathan Cohen
a280c0e5f1
Expand buttons when their label is too wide to fit (#597) 2020-03-03 12:39:31 -05:00
Vinicius Fortuna
70e1722360
Update SS version (#593) 2020-03-02 18:26:06 -05:00
alalamav
d390f78c5f
Deprecate repository releases (#588) 2020-03-02 17:19:06 -05:00
alalamav
c1c084e1dc
Skip app notarization when packaging (#596) 2020-03-02 16:30:56 -05:00
Jonathan Cohen
fe11e885c5
Consistent orientation for the Outline logo (#571)
Maintaining consistency with https://github.com/Jigsaw-Code/outline-client/pull/743 as well as with the app logos for both the client and the manager, flip all of the Outline discs so the light side is on the right.  I didn't touch a few (such as metrics.png) which are more complicated and would require access to the file in whatever image editor was used to create them.
2020-03-02 13:26:45 -05:00
alalamav
e9eb2d30ec
Only lint HTML files with prettier (#592) 2020-02-28 17:59:32 -05:00
Vinicius Fortuna
b0a9f38390
Add rollout for the replay protection (#590) 2020-02-28 14:46:25 -05:00
Vinicius Fortuna
89eadd3a11
Merge pull request #589 from Jigsaw-Code/fortuna-run
Fix docker run action
2020-02-27 19:35:03 -05:00
fortuna
f25f110595 Fix docker run action 2020-02-27 19:11:59 -05:00
alalamav
578d44baa9
Feature metrics (#577) 2020-02-26 12:49:52 -05:00
alalamav
64b3d85a62
Notarize macOS app (#584) 2020-02-21 11:34:57 -05:00
Jonathan Cohen
565a5d9a6e
Use Prettier to format HTML and CSS files (#583)
* Use Prettier to format HTML, CSS, and Markdown files

Currently alalama uses Sublime's built-in formatter while JonathanDCohen uses VS Code.  This standardizes us on Prettier and adds formatting to our pre-commit hooks.

pretty-quick has no option to only format changed lines, so this commit will be followed by a format of the src/ directory in order to keep unrelated formatting changes from polluting diffs in upcoming commits.

Code contributors can use the instructions at https://prettier.io/docs/en/editors.html if they'd like to integrate prettier with their editor of choice

* Format html and css files in ui_components

* Fix some html errors found by Prettier
2020-02-20 18:10:04 -05:00
alalamav
35074c58e1
Restore master branch (#582) 2020-02-20 12:29:18 -05:00
Jonathan Cohen
dbd1bb522f Correctly internationalize new UI access key placeholder name (#574)
* Correctly internationalize new UI access key placeholder name

* Add back the keyID for non-English languages

This simply replicates the existing messages so we can release the Data
Limits UI without waiting for these strings to be translated.

* Specify that keyId will be a number
2020-02-19 16:13:09 -05:00
alalamav
a99d8da12f
Fix message description (#568) 2020-02-07 11:32:00 -05:00
alalamav
b1454f1bbb
Settings page improvements (#567) 2020-02-04 17:00:29 -05:00
alalamav
e1a772eea1
Data limits UI (#554) 2020-02-03 16:21:37 -05:00
Tanel Puhu
8f90acfe40
Set watchtower to update/watch only shadowbox container (#540) 2020-01-31 15:46:27 -05:00
Roland Warmerdam
9791f4dbc5
Update the watchtower image name (#431) 2020-01-31 14:32:53 -05:00
Jonathan Cohen
dafa1f5bc2
Allow users to change the hostname for new access keys (#565)
* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>
2020-01-30 15:22:57 -05:00
alalamav
4b95dbd23f
Fix formatting in shadowbox config (#562) 2020-01-23 18:18:41 -05:00