* Revert "fix(server): set empty IP to bind on all available networks (#1640)"
This reverts commit 47f24520d3.
* Revert "refactor(server): use the new service config format (#1628)"
This reverts commit 13f62390bf.
* feat(server): use `rate()` instead of `increase()` for bandwidth calculations
* Add total data transferred a separate top-level metric so we don't have to calculate it client-side.
* Make it clear that the first value is a timestamp.
* Use `Promise.all()` to make send the network requests concurrently.
* Add a function to send a range query.
* Add `lastConnected` and `lastTrafficSeen` metrics.
* Add `peakDevices` metrics.
* Account for missing ASN or ASOrg data.
* Align `getServerMetricsAccessKeyEntry()` with `getServerMetricsServerEntry()`.
* Update test cases for manager metrics.
* Fix comment "down" -> "up".
* Remove `@throws` JSDoc comments.
* Remove duplication across query functions.
* Change from `Date` to `number` type.
* Remove the use a heap in `findPeak()`.
* refactor(server): use the new service config format
* Keep the original filter to filter out inactive keys first.
* Do the transformation at config writing time.
* draft of unified metrics endpoint
* ok, empty state works
* I think it's there?
* prefix with 'fake'
* some feedback
* continue feedback
* test refactor
* remove unused imports
* bad refactor
* partial feedback
* move time range parsing logic
* full union
* feedback
* feat(server): add ASN metric to opt-in server usage report
* feat(server): add tunnel time metric to opt-in server usage report
* Rename variable.
* Let Prometheus join the metrics.
* Use a Map.
* Revert changes to `prometheus_scraper.ts`.
* Rename `LocationUsage` to `ReportedUsage`.
* Add test cases for different ASN+country combinations.
* Use a different approach where we don't let Prometheus combine the series.
* feat(server): add ASN metric to opt-in server usage report
* Rename `LocationUsage` to `ReportedUsage`.
* Add test cases for different ASN+country combinations.
* fix(server): fix version parsing
* Revert to `SB_VERSION` and set it in the `Node.js` app build step.
* Revert port change.
* Set `SB_VERSION` env variable only where it's needed.
* Fix isOverDataLimit logic to stop allowing 0 traffic byte
issue #1515
This if statement is just wrong and doesn't block access when traffic limit is set to 0 byte. This one character fixes it.
Now if we create a new access key, set the limit to 0 before first usage, the client no longer will be able to connect.
* Rename `isOverDataLimit` to `reachedDataLimit`.
* Add a test case to prevent regression.
* Rename old variable.
* Update comment now that variable has changed meaning slightly.
Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
---------
Co-authored-by: sbruens <sbruens@users.noreply.github.com>
Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
* Check if `countries` is an array.
* Use `VALID_REPORT` in `postConnectionMetrics` test.
* Make realistic legacy reports and silently drop them during validation.
* Add more explicit support for legacy report types.
* Make diff smaller.
* Update `@typescript-eslint/eslint-plugin` dependency.
* Revert some changes.
* Revert "Update `@typescript-eslint/eslint-plugin` dependency."
This reverts commit a2f3edff09.
* Update test variables to improve readability.
* Add back in `userId` tests.
* Remove check that at least 1 of `userId` or `countries` is set.
* Remove unneeded test.
* feat(metrics_server): add support for tunnel time
* Add tests.
* Update `nodejs` runtime to 18.
* Update integration test.
* Use seconds instead of ms.
* Inline the minimun tunnel time and remove the unnecessary comment.
* Add field types to test case names.
* Make tunnel time optional.
* Add TODO to drop `userId`.
* Undo use of gdate.
* feat(metrics_server): drop the `userId`
* Update README.
* Fix bad merge.
* Fix bad merge on test.
* Revert change of country.
* Add types for the valid reports.
* Remove unrealistic test case with empty country list.
* feat(metrics_server): add support for tunnel time
* Add tests.
* Update `nodejs` runtime to 18.
* Update integration test.
* Use seconds instead of ms.
* Inline the minimun tunnel time and remove the unnecessary comment.
* Add field types to test case names.
* Make tunnel time optional.
* Add TODO to drop `userId`.
* Undo use of gdate.
* Make the test reports more realistic with 1 country.
* Update `update_mmdb.sh` script to download ASN database.
* Provide the `ASN` db file to `outline-ss-server`.
* Add an API to opt-in to the ASN metrics.
* Remove unused import.
* Add the ASN setting to the persisted server config.
* Continue trying to find other database if 1 of them fails.
* Resolve lint warning
* Use `outline-ss-server` v1.5.0.
* chore(docs): simplify and update `README` to reflect manager move
* Add pointer to shadowbox README.
* Cleanup the Shadowbox `README`
* Move around the Shadowbox instructions to make Node.js and Docker equal options for running the Shadowbox.
* Address review comments.
* Revert intro sentence to what was there before.
* Address review comments.
* chore(sentry_webhook): update Salesforce record IDs for new contact form
* Add new `accessKeySource` and `build`.
* Add new fields `subject` and `isUpdatedForm`.
* Change `type` field to new `role` field.
* Normalize `cloudProvider` value based on allowed picklist values.
* Update tests.