fix: initialize provider gateway config constants before read
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@unidesk/provider-gateway",
|
"name": "@unidesk/provider-gateway",
|
||||||
"version": "0.2.28",
|
"version": "0.2.29",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -58,6 +58,13 @@ interface RuntimeConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
|
const gatewayMetadata = readGatewayMetadata();
|
||||||
|
const defaultMasterServer = "http://74.48.78.17/";
|
||||||
|
const defaultProviderToken = "unidesk-dev-token-change-me";
|
||||||
|
const microserviceHttpMaxBodyTextLength = 8 * 1024 * 1024;
|
||||||
|
const sshDataProtocol = "unidesk-host-ssh-tcp-pool-v1";
|
||||||
|
const sshDataMaxHeaderBytes = 64 * 1024;
|
||||||
|
const sshDataMaxPayloadBytes = 16 * 1024 * 1024;
|
||||||
const config = readConfig();
|
const config = readConfig();
|
||||||
const logger = createLogger("provider-gateway", config.logFile);
|
const logger = createLogger("provider-gateway", config.logFile);
|
||||||
let socket: WebSocket | null = null;
|
let socket: WebSocket | null = null;
|
||||||
@@ -138,13 +145,6 @@ const hostSshSessions = new Map<string, HostSshSession>();
|
|||||||
const microserviceHttpCache = new Map<string, MicroserviceHttpCacheEntry>();
|
const microserviceHttpCache = new Map<string, MicroserviceHttpCacheEntry>();
|
||||||
const microserviceHttpInFlight = new Map<string, Promise<JsonValue>>();
|
const microserviceHttpInFlight = new Map<string, Promise<JsonValue>>();
|
||||||
let providerEgressProxy: ProviderEgressProxyHandle | null = null;
|
let providerEgressProxy: ProviderEgressProxyHandle | null = null;
|
||||||
const gatewayMetadata = readGatewayMetadata();
|
|
||||||
const defaultMasterServer = "http://74.48.78.17/";
|
|
||||||
const defaultProviderToken = "unidesk-dev-token-change-me";
|
|
||||||
const microserviceHttpMaxBodyTextLength = 8 * 1024 * 1024;
|
|
||||||
const sshDataProtocol = "unidesk-host-ssh-tcp-pool-v1";
|
|
||||||
const sshDataMaxHeaderBytes = 64 * 1024;
|
|
||||||
const sshDataMaxPayloadBytes = 16 * 1024 * 1024;
|
|
||||||
const sshDataChannels = new Map<string, SshDataChannel>();
|
const sshDataChannels = new Map<string, SshDataChannel>();
|
||||||
let sshDataPoolDesired = false;
|
let sshDataPoolDesired = false;
|
||||||
let sshDataChannelSeq = 0;
|
let sshDataChannelSeq = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user