Commit graph

64 commits

Author SHA1 Message Date
Vinicius Fortuna
76ce87223f Update Node image 2022-03-08 21:33:03 +00:00
Daniel LaCosse
9d80b6d448
Migrate from Yarn to Node lts/gallium (#1004)
* attempt upgrade over CI

update shadowbox build node version

wild guess

try other image, not holding my breath

switch image back, try no --upgrade? lol

whoops wrong SHA

trying this tip out of hand - will make platform a env var next

apparently buildx is supposed to detect the platform - lets see

find replace yarn w/ npm

fix git hook

cache npm deps

proper lock and enforce engine

licenses are... generated by yarn lmao

some weird leftovers

explode out test workflow jobs

Title Case and check for cache hit

upgrade NPM

check version...

eh, worth a try

reinstall deps for now so we can debug downstream issues

use root bin

fix npm workspace, merge lint w/ setup

HMMM

attempt cache load

fix keys

remove restore-keys

regular install

attempt more "correct" npm approach

annoyingly caching ~/.npm doesn't cache the global npm version

less correct node_module cache, will roll back if doesn't work

er... node 15 :/, restore keys

changing key...?

permission setting so cache can properly hit

separate dependecy permission task

verbose chmod

fix sentry webhook

consistency thing

* print architecture

* attempt amd64-explicit node image

* attempt nodev16 upgrade

* ah, okay, let's try picking this hash

* fix node version reference and npm run clean

* revert untouched files caught in squash

* remove yarn from travis.yml

* testing ci

* npmrc comment, revert one of cis

* Update src/server_manager/web_app/run_gallery_action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* Update src/server_manager/web_app/run_action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* licenses change

* fix package-lock regression

* fix webpack-dev-server properly

* set install to ci in Dockerfile

* forgot to include the README

* add ci where it makes sense

* delete this part of the README

* missed one

* testing sub-node_modules

* better chmod

* prefer glob

* reset .github/workflows/test.yml

* oops, yarn in ci

* rename everything (#1006)

* Update test.yml

* check_requirements (#1008)

* reqcheck draft

* finish drafting script - need to test and add to hooks

* attempt to roll our own setup...

* remove setup script and rename a couple things

* remove this nightmare lol

* Update release_manager.yml

* Update test.yml

* 'do' -> 'action'

* run -> start

* Update src/shadowbox/docker/build.action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* Update README.md

* Update README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* rename 'action' to action

* add action list to run action itself

* Update src/shadowbox/README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update scripts/run_action.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update src/server_manager/scripts/fill_packaging_opts.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* style guide fixes

* lower case fixes

* enforce major version

* Update scripts/run_action.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update package.json

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>
2021-11-05 16:40:34 -04:00
Ben Schwartz
a08f8227d4 Respond to review comments 2021-02-17 16:56:37 -05:00
Ben Schwartz
7d1fe0205c Require scripts to be shellcheck-compliant 2021-02-17 11:57:32 -05:00
Ben Schwartz
d41833b65a Slightly nontrivial shell cleanup
These are slightly nontrivial shell cleanups discovered in the course of
attempting shellcheck compliance.
2021-02-16 21:17:47 -05:00
Vinicius Fortuna
0668941722 Release outline-ss-server v1.3.1 2020-10-26 22:28:45 -04:00
Vinicius Fortuna
cfb23b84e5 Upgrade outline-ss-server to 1.2.1 2020-08-27 16:12:59 -04:00
Vinicius Fortuna
acf826bd65 Upgrade outline-ss-server 2020-08-27 11:13:01 -04:00
Vinicius Fortuna
867366231c Upgrade outline-ss-server to v1.1.7 2020-07-07 14:21:41 -04:00
Vinicius Fortuna
ad62724d45 Update outline-ss-server to v1.1.6 2020-07-06 22:49:02 -04:00
Vinicius Fortuna
292a8328a3 Upgrade outline-ss-server to v1.1.5 2020-06-11 18:07:31 -04:00
alalamav
9abd216473
Restore Docker CMD for backwards compatibility (#681) 2020-06-03 17:38:27 -04:00
alalamav
604e34a6b5
Fix shadowbox node run action; enable shadowbox docker on macOS (#674) 2020-06-02 18:17:06 -04:00
mpmcroy
5650a66fc6
Pre-pulls shadowbox container base image before 'docker build' (#669)
* gitignore

* Pre-pulls shadowbox container base image before 'docker build'

* Addresses review comments
2020-05-30 13:55:38 -04:00
Vinicius Fortuna
1d3ad71501 Update outline-ss-server 2020-05-28 23:27:41 -04:00
Vinicius Fortuna
6345f74c7c Add link to bug 2020-05-28 12:47:27 -04:00
Vinicius Fortuna
87f9a44e94 Disable Buildkit 2020-05-28 12:45:01 -04:00
Vinicius Fortuna
387a6c9316 Upgrade outline-ss-server 2020-05-27 20:33:49 -04:00
Vinicius Fortuna
cee5d10b21 Release version 1.2.1 2020-05-19 15:31:30 -04:00
Vinicius Fortuna
5c5136b52f Optimize Dockerfile 2020-05-14 23:32:02 -04:00
Vinicius Fortuna
d9d5a02765 Merge branch 'master' into fortuna-perf 2020-05-14 21:20:26 -04:00
alalamav
554447ffd4
Build shadowbox with webpack (#645) 2020-05-14 20:14:55 -04:00
Vinicius Fortuna
3884d4ef40 Upgrade outline-ss-server 2020-05-14 18:54:12 -04:00
alalamav
fdc6cdbbbe
Update shadowbox docker node image to v12.16.3 (#643) 2020-05-08 15:53:51 -04:00
Vinicius Fortuna
70e1722360
Update SS version (#593) 2020-03-02 18:26:06 -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
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
Jonathan Cohen
c47abc4973
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
2020-01-17 16:17:19 -05:00
Jonathan Cohen
db6aba33b2
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
2020-01-16 18:08:29 -05:00
Jonathan Cohen
46b7ee0e33
Use the server config instead of env variables for the API port and the server hostname (#488)
* Get public hostname from config file

* Tidy up

* Respond to Review Comments

At some point down the line I royally screwed up my git history and
reverted a bunch of changes.  I'm not sure what or when, so I `git reset --hard 1cd28e4` and tried to redo my
past responses to comments from there.

* Export SB_PUBLIC_IP in cmd.sh

* respond to review comments

* Review response
2019-11-18 18:16:24 -05:00
alalamav
8965e2d672
Update outline-ss-server to v1.0.7 and docker node to v8.15.0 (#494) 2019-09-17 17:28:57 -04:00
alalamav
91bde00d42
Access key quotas (#456) 2019-07-19 15:01:08 -04:00
alalamav
c6b3e3a4ea
Update outline-ss-server to v1.0.4 (#390) 2019-02-01 13:13:22 -05:00
fortuna
5107b122be disable content trust for local image 2019-01-10 15:50:26 -05:00
fortuna
706854f4af Remove sudo call for docker 2019-01-10 15:45:25 -05:00
fortuna
d9d0c3c3e4 Make OUTLINE_DIR readonly 2019-01-10 11:08:54 -05:00
fortuna
e3a6538ef9 Several documentation fixes 2019-01-08 19:45:52 -05:00
fortuna
690f3be069 Update shadowbox.node_version 2018-12-19 11:18:41 -05:00
fortuna
3bd8d2a89d Upgrade outline-ss-server and node 2018-12-19 10:27:31 -05:00
Vinicius Fortuna
750fa9c0b2
Merge pull request #352 from Jigsaw-Code/fortuna-single-port
Update SS_VERSION
2018-12-17 10:45:54 -05:00
fortuna
b9e000e8a5 Update SS_VERSION to 1.0.2 2018-12-17 10:36:58 -05:00
Trevor Johnston
49fe1e02c4 lsof is not needed anymore 2018-12-14 11:34:03 -05:00
fortuna
2d9e5cfd54 Update shadowsocks version 2018-12-13 18:18:59 -05:00
fortuna
5eda24d0b9 Remove unused file 2018-12-13 17:30:47 -05:00
fortuna
f1307752f2 Merge branch 'master' into fortuna-go-only 2018-12-10 11:05:14 -05:00
trevj
d3a8fd0813
switch to outline-ss-server releases (#334) 2018-12-06 08:35:38 -05:00
Josh Soref
08fde2548c spelling: below 2018-11-25 17:05:21 -05:00
fortuna
5975cf6474 Allow group access 2018-11-15 18:46:06 -05:00
fortuna
a21bab96db Set umask for shadowbox 2018-11-15 15:19:39 -05:00