feat: move web endpoint into a first-party plugin

This commit is contained in:
LukeGus committed 2026-09-22 12:30:35 -05:00
1 parent 6f0dff58a3
commit 6e058f6e9e
26 files changed
+496 -121

No files matched your search

+4 -2
View File
@@ -21,7 +21,7 @@ import {
} from "./c2s-relay.js";
import { registerTunnelRoutes } from "./routes.js";
import { registerWebEndpointRoutes } from "./web-endpoint-routes.js";
import webEndpointDispatch from "./web-endpoint-dispatch.js";
import { initializeAutoStartTunnels } from "./manager.js";
import { attachServicePortConflictHandler } from "../../utils/service-listen.js";
@@ -39,7 +39,9 @@ app.use((_req, res, next) => {
});
registerTunnelRoutes(app);
registerWebEndpointRoutes(app);
// Always mounted; the Web Endpoint plugin registers its router behind this on
// activate and clears it on deactivate. See web-endpoint-dispatch.ts.
app.use("/ssh/tunnel/web-endpoint", webEndpointDispatch);
const PORT = 30003;
const server = createServer(app);