api/config: store tunnelPort in env

This commit is contained in:
jj
2024-11-01 17:02:29 +00:00
parent d48cc8fc07
commit 90d57ab6ea
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import { randomBytes } from "crypto";
import { strict as assert } from "assert";
import { setMaxListeners } from "node:events";
import { env, tunnelPort } from "../config.js";
import { env } from "../config.js";
import { closeRequest } from "./shared.js";
import { decryptStream, encryptStream } from "../misc/crypto.js";
import { hashHmac } from "../security/secrets.js";
@@ -102,7 +102,7 @@ export function createInternalStream(url, obj = {}) {
isHLS: obj.isHLS,
});
let streamLink = new URL('/itunnel', `http://127.0.0.1:${tunnelPort}`);
let streamLink = new URL('/itunnel', `http://127.0.0.1:${env.tunnelPort}`);
streamLink.searchParams.set('id', streamID);
const cleanup = () => {