diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 1347c1af1..4641a63b8 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -169,6 +169,12 @@
"configured": "Configured",
"errored": "Errored"
},
+ "strelaysrv": {
+ "numActiveSessions": "Sessions",
+ "numConnections": "Connections",
+ "dataRelayed": "Relayed",
+ "transferRate": "Rate"
+ },
"mastodon": {
"user_count": "Users",
"status_count": "Posts",
diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx
index 5e07618b0..e9bb394db 100644
--- a/src/components/services/widget.jsx
+++ b/src/components/services/widget.jsx
@@ -27,6 +27,7 @@ import Gotify from "./widgets/service/gotify";
import Prowlarr from "./widgets/service/prowlarr";
import Jackett from "./widgets/service/jackett";
import AdGuard from "./widgets/service/adguard";
+import StRelaySrv from "./widgets/service/strelaysrv";
import Mastodon from "./widgets/service/mastodon";
const widgetMappings = {
@@ -57,6 +58,7 @@ const widgetMappings = {
prowlarr: Prowlarr,
jackett: Jackett,
adguard: AdGuard,
+ strelaysrv: StRelaySrv,
mastodon: Mastodon,
};
diff --git a/src/components/services/widgets/service/strelaysrv.jsx b/src/components/services/widgets/service/strelaysrv.jsx
new file mode 100644
index 000000000..aaf75daa8
--- /dev/null
+++ b/src/components/services/widgets/service/strelaysrv.jsx
@@ -0,0 +1,38 @@
+import useSWR from "swr";
+import { useTranslation } from "react-i18next";
+
+import Widget from "../widget";
+import Block from "../block";
+
+import { formatApiUrl } from "utils/api-helpers";
+
+export default function StRelaySrv({ service }) {
+ const { t } = useTranslation();
+
+ const config = service.widget;
+
+ const { data: statsData, error: statsError } = useSWR(formatApiUrl(config, `status`));
+
+ if (statsError) {
+ return ;
+ }
+
+ if (!statsData) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/src/pages/api/services/proxy.js b/src/pages/api/services/proxy.js
index afac23151..1cc5a244d 100644
--- a/src/pages/api/services/proxy.js
+++ b/src/pages/api/services/proxy.js
@@ -82,6 +82,7 @@ const serviceProxyHandlers = {
sabnzbd: genericProxyHandler,
jackett: genericProxyHandler,
adguard: genericProxyHandler,
+ strelaysrv: genericProxyHandler,
mastodon: genericProxyHandler,
// uses X-API-Key (or similar) header auth
gotify: credentialedProxyHandler,
diff --git a/src/utils/api-helpers.js b/src/utils/api-helpers.js
index a8112efb8..4b5b72d18 100644
--- a/src/utils/api-helpers.js
+++ b/src/utils/api-helpers.js
@@ -24,6 +24,7 @@ const formats = {
prowlarr: `{url}/api/v1/{endpoint}`,
jackett: `{url}/api/v2.0/{endpoint}?apikey={key}&configured=true`,
adguard: `{url}/control/{endpoint}`,
+ strelaysrv: `{url}/{endpoint}`,
mastodon: `{url}/api/v1/{endpoint}`,
};