Commit graph

316 commits

Author SHA1 Message Date
Vinicius Fortuna
9fc83859c2
chore(manager): clean up Manager errors (#1151)
Move errors to more appropriate places.
2022-08-23 20:19:05 -04:00
Daniel LaCosse
15cf404361
feat(devtools): partial import restrictions (#1114)
* add restrictions - bypassing for draft

* this feels like the correct list?

* this feels like the actual actual correct list?

* comment out rules for later fixing

* upgrade node setup for windows
2022-06-23 17:52:30 -05:00
Ben Schwartz
f6be0dd6b0 fix(sec): Use longer passwords 2022-05-13 15:35:14 -04:00
Ben Schwartz
733f49c891 fix: Avoid CI failure due to deprecated go get 2022-03-17 13:12:08 -04:00
dependabot[bot]
e20d7797f3
Merge pull request #1057 from Jigsaw-Code/dependabot/npm_and_yarn/node-fetch-2.6.7 2022-03-15 20:43:51 +00:00
Vinicius Fortuna
56c9fe31ec Format remaining files 2022-03-10 02:25:48 +00:00
Vinicius Fortuna
7389ce724f Migrate to eslint 2022-03-10 01:50:59 +00:00
Vinicius Fortuna
3034e59f9f Fix lint 2022-03-09 23:10:15 +00:00
dependabot[bot]
f5d7e79597
Bump node-fetch from 2.6.5 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.5 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-09 15:55:10 +00:00
Vinicius Fortuna
87feca5bb9
Merge pull request #1058 from Jigsaw-Code/fortuna-update
Pre-release updates
2022-03-09 10:53:44 -05:00
Vinicius Fortuna
7e928bb5d9 Update outline-shadowsocksconfig 2022-03-08 21:33:24 +00:00
Vinicius Fortuna
76ce87223f Update Node image 2022-03-08 21:33:03 +00:00
Daniel LaCosse
5a4966cf7c
feat(release): manager debug workflow (#1055)
* basic workflow sketch

* metrics server also needs lint

* update names

* latest?

* that's weird.

* ok that's a start. refactor next

* fix path

* oops

* ah

* no op

* make it like the other ones

* refactor scripts

* fix shellcheck

* ah okay

* upload mac artifact

* Update .travis.yml

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

* comments

* add todo

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2022-03-08 14:01:08 -05:00
Ben Schwartz
c27c82c20a Missing semicolon 2022-02-04 16:53:33 -05:00
Ben Schwartz
0219dc252b Reduce special-case behavior for short inputs 2022-02-04 16:44:32 -05:00
Ben Schwartz
328a58b292 Add a pre-routing filter
This ensures that unauthorized requests never reach the routing step.
2022-02-04 13:31:23 -05:00
Ben Schwartz
b8426b129b Use all-caps, add test cases 2022-02-03 15:13:46 -05:00
Ben Schwartz
2545b4ea09 Adjust whitespace 2022-02-02 13:19:33 -05:00
Ben Schwartz
f1c4b6b969 Add unit tests for bindService()
`bindService()` is a function exported by `manager_service` to bind the
service onto a Restify server.  This adds unit tests for this function.
2022-02-02 13:09:46 -05: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
Daniel LaCosse
fcac54df89
Improve reliability of bulk creation and deletion of access keys (#995)
* wip

* rename file and remove bogus test

* create file library and add unit tests

oh lol

formatting

* switch to node-tmp

* makes constants screaming case

* missed a 'text'

* this is what i get for trying to use the web editor

* roll back title case
2021-10-15 14:54:48 -04:00
Jonathan Cohen
c9d3a48b62
Release Outline Manager on Github Actions (#978)
Release Outline Manager on Github Actions
2021-09-23 16:28:11 -04:00
Vinicius Fortuna
b0eb85ef14
Merge pull request #868 from database64128/api-docs
📚 API doc: add missing fields
2021-09-21 18:13:44 -04:00
Jonathan Cohen
b28b4531b4
Force remove integration test logfiles (#884)
* Don't bother cleaning up integration test log files on Travis

* Update src/shadowbox/integration_test/run_action.sh

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

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2021-05-11 13:51:53 -04:00
Jonathan Cohen
e3604a28dc
Bump shadowbox to 1.6.1 (#882) 2021-04-28 16:32:42 -04:00
Jonathan Cohen
b46e1b4448
Load per key data limits from the config file (#881) 2021-04-28 14:56:59 -04:00
database64128
722c180b83
📚 API doc: add missing fields 2021-04-08 16:31:08 +08:00
Jonathan Cohen
2f2e658134
Per-Key Data Limits in the Manager (#841)
* Add per-key data limits to the UI

* Hold byte values instead of DisplayDataAmounts in OutlineServerView and OutlinePerKeyDatALimitDialog

This allows us to fix a layering issue where, at the time of converting
a server access key to a DisplayAccessKey, we couldn't compute the
'relevant transfer' for progress bar displays since we couldn't get at
the server's default data limit.

* Mayp#values() returns an Iterator, not an array

* Rename event field to defaultDataLimitBytes

* Don't reset the dialog state on failure

* Use a loop instead of Math.max in refreshTransferStats

* Unconditionally enable the default data limit in the UI after adding it to the server

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

* Consistent handling of the view's default data limit state for both addition and removal

* Use callbacks to set and remove the per key data limit

* s/_showMenu/_showDataLimit/g

* Make language a public property of the dialog

* The dialog only needs the active data limit

* Use a separate method for the handler to open the dialog

* Use _activeDataLimitBytes

* We can use the ?? operator in `refreshTransferStats`

* s/dataLimitType/dataLimitUnit/g

* Rename a couple members

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2021-03-15 10:55:41 -04:00
Ben Schwartz
8f016d460d Update outline-shadowsocksconfig 2021-03-01 14:29:48 -05:00
Benjamin M. Schwartz
eb5ac5eeb4
Merge pull request #822 from Jigsaw-Code/bemasc-shellcheck
Require scripts to be shellcheck-compliant
2021-02-19 15:21:27 -05:00
Sarah Laplante
3dcbe1499d bump ssconfig version 2021-02-19 14:10:09 -05: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
Benjamin M. Schwartz
f583c5ee81
Merge pull request #818 from Jigsaw-Code/bemasc-pre-shellcheck
Substantive shell script cleanups
2021-02-12 16:21:32 -05:00
Ben Schwartz
abc4ae8772 Substantive shell script cleanups
Running "shellcheck", and attempting to comply with the shell script
style guide, required hundreds of trivial changes, and a small number of
nontrivial ones.  For ease of review, this PR includes only the
nontrivial changes.
2021-02-12 11:48:18 -05:00
Sarah Laplante
ba1a964605 bump ssconfig version number 2021-02-11 20:29:21 -05:00
Jonathan Cohen
48e52787a8
CI Updates (#804)
* Fix broken Travis config

* Doesn't also build the Linux or Mac manager on server deploy
* Correctly builds a Windows binary on manager release (although we still have to manually upload build artifacts)
* Renames the Shadowbox deployment step

* Run Linux unit tests on Github Actions

* Run manager tests on mac, linux, and windows

* Fix syntax, use correct node version

* Don't test Shadowbox on Windows or Mac

* Don't cancel other jobs in the matrix when the build on one platform fails

* Use bash on all platforms.  This uses Git for Windows bash on Windows

* Remove Windows tests for now.  This is not a downgrade as we were only testing on linux before anyways

* Reduce code duplication

* Remove test config from Travis

* Respond to review comments:
 * Remove redundant build step in the shadowbox unit testing workflow
 * Add a testing step to the shadowbox release Travis workflow

* Pin to Ubuntu 16.04 to match our release infrastructure on Travis

* Run daily releases of the manager on all platforms

* Verbose mode on docker-compose

* try turning off Docker Content Trust

* Pin to a version of distroless Python and stop removing temp files at the end

* Remove verbose from compose

* Use Ubuntu 16.04

* Comment the pinned python image

* Add temp state cleanup back
2021-02-09 13:34:32 -05:00
Jonathan Cohen
1c5b563d0d
Internationalize units and currency (#780)
* Internationalize data transfer amounts

* Internationalize units and currency

This required updating to Typescript 4 and adding compiler changes for the server manager in order to support newer features of `Intl`.

This change also fixes it so that the server city, creation date, and data limits no longer are stuck to the old language ater changing languages.

* Remove stray log

* Respond to review comments

* Remove byte-size

* Move to `web_app`

This code is only intended to be run in a web environment, not in Node.

* Respond to review comments

* Use property binding to the app language

* Respond to review comments

* Respond to review comments

* s/get/format

* Error out on Node

* Set the persisted app language before starting the app to prevent issues with undefined language at startup

* Respond to review comments and broaden covered languages
2021-02-04 18:47:45 -05:00
Vinicius Fortuna
e99e39916b
Merge pull request #727 from Jigsaw-Code/dependabot/npm_and_yarn/node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2021-01-29 15:58:25 -05:00
Jonathan Cohen
c397229777
Document the non-experimental API endpoint for the default data limit (#794)
* Add the non-experimental path for the default data limit API endpoint

* Ref doesn't work like that

* Deprecate experimental paths

* Use the correct prefix
2021-01-14 11:58:31 -05:00
Jonathan Cohen
e8d430a376
Release Shadowbox version 1.6.0 (#791) 2021-01-12 12:58:54 -05:00
Jonathan Cohen
cf355a6fee
Per-Key Data Limits in Shadowbox (#769)
* s/AccessKeyDataLimit/DefaultDataLimit/g for shadowbox

* Implement per-key custom data limits in shadowbox

* Shadowbox integration test

* Fix the manager service test to maintain backwards compatibility with
the GET /server response

* Fix integration test for Travis

* Fix lint errors

* Implement removal of access key data limits

* Persist custom data limits

* Bump Shadowbox version number

* Add a per key dat alimit count to the feature metrics endpoint

This also involved modifying the schema of
uproxysite:uproxy_metrics_dev.feature_metrics to include the new field.
See https://cloud.google.com/bigquery/docs/managing-table-schemas#bq_1
for how this was accomplished

Tested:
  yarn do metrics_server/test && yarn do metrics_server/test_integration

* Collect usage metrics for per-key data limits

* API documentation and cleanup

* Respond to review comments

* Respond to review comments

* Don't encode the data limit in the access key url

This should have been caught in the integration test, but the
integration test was miswritten with "echo" instead of "fail", cause the
test to mistakenly pass.

Fixing this exposed other errors in the test, which were fixed.  The
test has been confirmed to both pass and fail successfully.

* Fix the manager service unit test

* Remove stray files

* Split integration test into individual functions

* Clarify comment in the AccessKey interface

* Be more explicit about behavior when no data limits are set

* Remove spuriosu import added by vscode

* DOn't bump shadowbox version number yet

* Rename to accessKeyToApiJson

* Don't export AccessKeyJson and use "StorageJson"

* Don't await data limit enforcement

* Rename the defaultDataLimit getter

* Make dataLimit in the accesskey model readonly

* Use nullish coalescing operator
2020-12-23 13:52:50 -05:00
newjett0617
c87d5bdf98 fix wrong path in readme 2020-12-23 11:38:21 +08:00
Ben Schwartz
0215f1f69b Release outline-ss-server 1.3.3 2020-11-06 13:52:45 -05:00
Vinicius Fortuna
cf45895891 Release 1.5.2 (o-ss-s 1.3.2) 2020-11-03 10:46:27 -05:00
Vinicius Fortuna
0668941722 Release outline-ss-server v1.3.1 2020-10-26 22:28:45 -04:00
Vinicius Fortuna
fdac297a46 Enable Prometheus admin API 2020-10-16 15:28:00 -04:00
dependabot[bot]
33aafa1f93
Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 17:59:47 +00:00
Vinicius Fortuna
76a8a80349 Release server 1.5.0 2020-08-31 17:30:52 -04:00