Commit graph

1126 commits

Author SHA1 Message Date
Daniel LaCosse
423caa4dad
Update README.md 2025-02-26 16:23:43 -05:00
Daniel LaCosse
751f15dea7
Update README.md 2025-02-26 16:08:30 -05:00
Daniel LaCosse
1bc144f44e almost done 2025-02-26 15:56:53 -05:00
Daniel LaCosse
12631d3727 minor cleanup 2025-02-26 13:54:08 -05:00
Daniel LaCosse
e6cb646fdc ngrok works 2025-02-26 13:50:49 -05:00
Daniel LaCosse
c4e94bc779 ingress established, prometheus keeps restarting 2025-02-26 11:57:48 -05:00
Daniel LaCosse
9b9cf32c16 [DEMO] swagger client generation 2025-02-25 16:01:46 -05:00
Sander Bruens
067d0d47ae
revert(server): revert upgrade of outline-ss-server version (#1645)
* 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.
2025-02-24 18:07:13 -05:00
Daniel LaCosse
d262f5242f
feat: cache recent prometheus queries in memory (#1643)
* [DO NOT MERGE] prometheus query timer

* add cache layer

* add query result data

* ready for a look

* remove logger
2025-02-21 17:00:59 -05:00
Sander Bruens
15a9e54e5e
refactor(server): use a reusable http.Agent (#1644) 2025-02-21 16:15:14 -05:00
Sander Bruens
47f24520d3
fix(server): set empty IP to bind on all available networks (#1640)
* fix(server): set empty IP to bind on all available networks

* upgrade `outline-ss-server`
2025-02-19 08:54:25 -05:00
Sander Bruens
34b5e7a2e8
chore: remove lastConnected property and update OpenAPI spec (#1639)
* chore: remove `lastConnected` property

* Update OpenAPI spec.
2025-02-14 16:51:07 -05:00
Sander Bruens
2cc12e0cb3
feat(server): use rate() over increase() for bandwidth calculations (#1638)
* 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.
2025-02-12 12:32:25 -05:00
Sander Bruens
76a23c6e81
feat(server): add bandwidth stats to the server metrics (#1636) 2025-02-12 11:08:41 -05:00
Sander Bruens
dbca08fce3
feat(server): add connection stats to the access key metrics (#1634)
* 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()`.
2025-02-10 11:50:21 -05:00
Sander Bruens
13f62390bf
refactor(server): use the new service config format (#1628)
* 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.
2025-01-07 16:51:47 -05:00
Daniel LaCosse
bfcf59a7bb
fix(server): fix and validate open API spec (#1626)
* fix(server): fix and validate open API spec

* fix type

* Experimental tag not server
2024-12-18 10:51:02 -05:00
Daniel LaCosse
9d9f76b9a5
feat(server): unified metrics endpoint (#1616)
* 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
2024-11-22 17:33:40 -05:00
Alexey Palazhchenko
f558117b29
feat(server): allow running Outline on a server with another Watchtower (#1255)
See https://containrrr.dev/watchtower/running-multiple-instances/

`com.centurylinklabs.watchtower.enable` and `--label-enable` are kept for backward compatibility.

Closes #48.
2024-11-14 12:42:36 -05:00
Sander Bruens
e416938950
feat(server): add tunnel time metric to opt-in server usage report (#1551)
* 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.
2024-10-18 18:08:34 -04:00
Sander Bruens
845c02373b
feat(server): add ASN metric to opt-in server usage report (#1610)
* feat(server): add ASN metric to opt-in server usage report

* Rename `LocationUsage` to `ReportedUsage`.

* Add test cases for different ASN+country combinations.
2024-10-17 13:05:30 -04:00
Sander Bruens
91046e30d2
feat(sentry_webhook): handle outreachConsent Sentry tag (#1606)
* feat(sentry_webhook): handle `outreachConsent` Sentry tag

* Strict type check.
2024-10-04 14:16:28 -04:00
Sander Bruens
fa3d7c51fa
fix(server): fix version parsing (#1586)
* 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.
2024-09-03 14:00:35 -04:00
Daniel LaCosse
a1a819cb0a
chore(docs): make it clearer what the local apiUrl is (#1584) 2024-08-30 11:50:55 -04:00
Sander Bruens
b3087dd012
feat: roll out ASN metrics to all servers (#1585) 2024-08-30 09:39:44 -04:00
Sander Bruens
31a3fd48be
clean: add missing license headers and add a CI check (#1572) 2024-08-12 10:56:11 -04:00
cornzzy
ee039ca596
fix(server): block access when traffic limit is set to 0 bytes
* 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>
2024-07-24 15:21:29 -04:00
Sander Bruens
b5dbe650f5
test(server): remove custom util container (#1568) 2024-07-23 14:33:14 -04:00
Sander Bruens
69f8e02daf
chore: add lint rule to prevent unnecessary public modifiers (#1557) 2024-07-23 14:28:57 -04:00
Sander Bruens
b16fc38649
docs: update link to Taskfile (#1565) 2024-07-23 14:28:31 -04:00
Sander Bruens
6001281f43
test(server): fix integration test by downgrading to Alpine 3.18 (#1566)
* Debug docker on runner.

* Revert "Debug docker on runner."

This reverts commit bb44ceb6c3.

* Pin to alpine3.18.

* Add comment to Dockerfile.
2024-07-23 14:13:14 -04:00
Sander Bruens
9a3498112d
refactor(server): remove unneeded access key metrics ID (#1548)
* refactor(server): remove unneeded access key metrics ID

* One more.

* Remove unused imports.
2024-05-16 10:14:34 -04:00
Sander Bruens
99b1a0e39e
docs(metrics_server): add note about promoting the prod version (#1547) 2024-05-14 13:09:54 -04:00
Sander Bruens
3e9bb9af1f
feat(metrics_server): add support for ASN (#1542)
* feat(metrics_server): add support for ASN

* Change from array to number.

* Add more debug logs for invalid returns.
2024-04-26 20:08:49 -04:00
Sander Bruens
01ca585bf1
feat(metrics_server): do not invalidate legacy report types (#1532)
* 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.
2024-04-19 15:30:04 -04:00
Vinicius Fortuna
cffcf65433
Remove Makefile (#1540) 2024-04-19 10:50:43 -06:00
Vinicius Fortuna
9bb9729279
Fix on macOS (#1539) 2024-04-18 16:49:55 -04:00
Vinicius Fortuna
6556d7e595
build: use Task (#1535) 2024-04-17 19:48:23 -04:00
Sander Bruens
be0d3b3838
fix(server): handle PasswordConflict explicitly to avoid a 500 (#1536) 2024-04-17 17:55:08 -04:00
Sander Bruens
d0d9077a9a
feat(metrics_server): drop the userId (#1528)
* 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.
2024-04-04 13:04:28 -04:00
Sander Bruens
571be90bbf
feat(metrics_server): add support for tunnel time (#1527)
* 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.
2024-04-04 12:19:23 -04:00
Sander Bruens
a072cc43e1
feat(server): stop sharing key usage with metrics server (#1529)
* feat(server): stop sharing key usage with metrics server

* Update comment to reflect history.
2024-04-04 12:07:20 -04:00
Danyal
be02db89f1
chore: update api.yml (#1525) 2024-03-29 09:26:51 -06:00
Sander Bruens
2901a256f4
feat(server): add an experimental opt-in API to enable ASN metrics (#1523)
* 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.
2024-03-29 09:50:33 -04:00
Sander Bruens
37d3f33faf
chore(docs): update README to reflect manager move (#1519)
* 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.
2024-03-12 15:09:01 -04:00
Sander Bruens
78f0934f4a
chore(sentry_webhook): update UAT record ID (#1513) 2024-02-22 13:24:55 -05:00
Daniel LaCosse
cd5f91742d
chore: delete manager and update server_manager/README.md (#1511)
* delete manager and update readme

* remove scopes from commitlint

* update jobs

* Update src/server_manager/README.md

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

* Update README.md

* npx karma

* install puppeteer

* webpack, too? jeez.

* finally

---------

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2024-02-22 13:16:40 -05:00
Sander Bruens
ea81c998a7
feat(sentry_webhook): update Salesforce record IDs for new contact form (#1510)
* 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.
2024-02-22 10:45:29 -05:00
Daniel LaCosse
e2486ba9b2
chore: update reference to install script (#1512) 2024-02-21 17:11:41 -05:00
Sander Bruens
a62b25b54c
test(server): add new PUT API to the integration test (#1504) 2024-02-15 12:24:55 -05:00