Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/desktop/src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { randomUUID } from "node:crypto"
import { EventEmitter } from "node:events"
import { existsSync } from "node:fs"
import * as http from "node:http"
import { createServer } from "node:net"
import { homedir } from "node:os"
import { join } from "node:path"
Expand Down Expand Up @@ -77,6 +78,7 @@ setupApp()

function setupApp() {
ensureLoopbackNoProxy()
useEnvProxy()
app.commandLine.appendSwitch("proxy-bypass-list", "<-loopback>")
if (!app.isPackaged) app.commandLine.appendSwitch("remote-debugging-port", "9222")
Comment thread
Hona marked this conversation as resolved.

Expand Down Expand Up @@ -133,6 +135,15 @@ function useSystemCertificates() {
}
}

function useEnvProxy() {
try {
const setGlobalProxyFromEnv = (http as typeof http & { setGlobalProxyFromEnv: () => void }).setGlobalProxyFromEnv
setGlobalProxyFromEnv()
} catch (error) {
logger.warn("failed to load proxy environment", error)
}
}

function emitDeepLinks(urls: string[]) {
if (urls.length === 0) return
pendingDeepLinks.push(...urls)
Expand Down
Loading