diff --git a/server/lib/serverIpService.ts b/server/lib/serverIpService.ts index eb987e0f..8c16fd43 100644 --- a/server/lib/serverIpService.ts +++ b/server/lib/serverIpService.ts @@ -1,3 +1,4 @@ +import logger from "@server/logger"; import axios from "axios"; let serverIp: string | null = null; @@ -13,8 +14,8 @@ export async function fetchServerIp() { try { const response = await axios.get(url, { timeout: 5000 }); serverIp = response.data.trim(); - console.log("Detected public IP:", serverIp); - return; + logger.debug("Detected public IP: " + serverIp); + return; } catch (err: any) { console.warn(`Failed to fetch server IP from ${url}: ${err.message || err.code}`); } diff --git a/src/app/[orgId]/settings/clients/create/page.tsx b/src/app/[orgId]/settings/clients/create/page.tsx index 392c417e..b7194526 100644 --- a/src/app/[orgId]/settings/clients/create/page.tsx +++ b/src/app/[orgId]/settings/clients/create/page.tsx @@ -72,12 +72,11 @@ interface TunnelTypeOption { } type Commands = { - mac: Record; - linux: Record; + unix: Record; windows: Record; }; -const platforms = ["linux", "mac", "windows"] as const; +const platforms = ["unix", "windows"] as const; type Platform = (typeof platforms)[number]; @@ -128,8 +127,8 @@ export default function Page() { number | null >(null); - const [platform, setPlatform] = useState("linux"); - const [architecture, setArchitecture] = useState("amd64"); + const [platform, setPlatform] = useState("unix"); + const [architecture, setArchitecture] = useState("All"); const [commands, setCommands] = useState(null); const [olmId, setOlmId] = useState(""); @@ -148,43 +147,15 @@ export default function Page() { version: string ) => { const commands = { - mac: { - "Apple Silicon (arm64)": [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ], - "Intel x64 (amd64)": [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ] - }, - linux: { - amd64: [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ], - arm64: [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ], - arm32: [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ], - arm32v6: [ - `curl -fsSL https://pangolin.net/get-olm.sh | bash`, - `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ], - riscv64: [ + unix: { + All: [ `curl -fsSL https://pangolin.net/get-olm.sh | bash`, `sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}` ] }, windows: { x64: [ - `# Download and run the installer`, `curl -o olm.exe -L "https://github.com/fosrl/olm/releases/download/${version}/olm_windows_installer.exe"`, - `# Then run olm with your credentials`, `olm.exe --id ${id} --secret ${secret} --endpoint ${endpoint}` ] } @@ -194,10 +165,8 @@ export default function Page() { const getArchitectures = () => { switch (platform) { - case "linux": - return ["amd64", "arm64", "arm32", "arm32v6", "riscv64"]; - case "mac": - return ["Apple Silicon (arm64)", "Intel x64 (amd64)"]; + case "unix": + return ["All"]; case "windows": return ["x64"]; default: @@ -209,12 +178,12 @@ export default function Page() { switch (platformName) { case "windows": return "Windows"; - case "mac": - return "macOS"; + case "unix": + return "Unix & macOS"; case "docker": return "Docker"; default: - return "Linux"; + return "Unix & macOS"; } }; @@ -249,8 +218,8 @@ export default function Page() { switch (platformName) { case "windows": return ; - case "mac": - return ; + case "unix": + return ; case "docker": return ; case "kubernetes": diff --git a/src/app/[orgId]/settings/general/page.tsx b/src/app/[orgId]/settings/general/page.tsx index 72d1ff08..70694805 100644 --- a/src/app/[orgId]/settings/general/page.tsx +++ b/src/app/[orgId]/settings/general/page.tsx @@ -51,16 +51,8 @@ import { useTranslations } from "next-intl"; import { build } from "@server/build"; import { SwitchInput } from "@app/components/SwitchInput"; import { SecurityFeaturesAlert } from "@app/components/SecurityFeaturesAlert"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger -} from "@app/components/ui/dropdown-menu"; -import { ChevronDown } from "lucide-react"; import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext"; import { useSubscriptionStatusContext } from "@app/hooks/useSubscriptionStatusContext"; -import { Alert, AlertDescription } from "@app/components/ui/alert"; // Session length options in hours const SESSION_LENGTH_OPTIONS = [ @@ -284,11 +276,6 @@ export default function GeneralPage() { } } - const getLabelForValue = (value: number) => { - const option = LOG_RETENTION_OPTIONS.find((opt) => opt.value === value); - return option ? t(option.label) : `${value} days`; - }; - return ( - - -