The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
/**
* Privacy utilities — route all external requests through local proxies
* so external servers never see the user's IP or browsing behavior.
*/
import { isTauri } from '../api/backend'
/** Proxy an external image URL through the local server */
export function proxyImageUrl(url: string | undefined): string | undefined {
if (!url) return undefined
// Already local — no proxy needed
if (url.startsWith('/') || url.startsWith('blob:') || url.startsWith('data:')) return url
// In Tauri mode: CSP allows these domains directly (images loaded via img tag, no CORS)
if (isTauri()) return url
// Dev mode: route through local proxy
return `/local-api/proxy-image?url=${encodeURIComponent(url)}`
}