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/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx index d245f470..ffe8c0fc 100644 --- a/src/app/[orgId]/settings/sites/create/page.tsx +++ b/src/app/[orgId]/settings/sites/create/page.tsx @@ -79,9 +79,7 @@ interface RemoteExitNodeOption { } type Commands = { - mac: Record; - linux: Record; - freebsd: Record; + unix: Record; windows: Record; docker: Record; kubernetes: Record; @@ -90,13 +88,11 @@ type Commands = { }; const platforms = [ - "linux", + "unix", "docker", "kubernetes", "podman", - "mac", "windows", - "freebsd", "nixos" ] as const; @@ -190,7 +186,7 @@ export default function Page() { const [loadingPage, setLoadingPage] = useState(true); - const [platform, setPlatform] = useState("linux"); + const [platform, setPlatform] = useState("unix"); const [architecture, setArchitecture] = useState("amd64"); const [commands, setCommands] = useState(null); @@ -250,47 +246,11 @@ PersistentKeepalive = 5`; : ""; const commands = { - mac: { + unix: { All: [ `curl -fsSL https://pangolin.net/get-newt.sh | bash`, `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` ] - // "Intel x64 (amd64)": [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ] - }, - linux: { - All: [ - `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - ] - // arm64: [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ], - // arm32: [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ], - // arm32v6: [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ], - // riscv64: [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ] - }, - freebsd: { - All: [ - `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - ] - // arm64: [ - // `curl -fsSL https://pangolin.net/get-newt.sh | bash`, - // `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ] }, windows: { x64: [ @@ -353,9 +313,6 @@ WantedBy=default.target` All: [ `nix run 'nixpkgs#fosrl-newt' -- --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` ] - // aarch64: [ - // `nix run 'nixpkgs#fosrl-newt' -- --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}` - // ] } }; setCommands(commands); @@ -363,11 +320,7 @@ WantedBy=default.target` const getArchitectures = () => { switch (platform) { - case "linux": - // return ["amd64", "arm64", "arm32", "arm32v6", "riscv64"]; - return ["All"]; - case "mac": - // return ["Apple Silicon (arm64)", "Intel x64 (amd64)"]; + case "unix": return ["All"]; case "windows": return ["x64"]; @@ -377,11 +330,7 @@ WantedBy=default.target` return ["Helm Chart"]; case "podman": return ["Podman Quadlet", "Podman Run"]; - case "freebsd": - // return ["amd64", "arm64"]; - return ["All"]; case "nixos": - // return ["x86_64", "aarch64"]; return ["All"]; default: return ["x64"]; @@ -392,20 +341,18 @@ WantedBy=default.target` switch (platformName) { case "windows": return "Windows"; - case "mac": - return "macOS"; + case "unix": + return "Unix & macOS"; case "docker": return "Docker"; case "kubernetes": return "Kubernetes"; case "podman": return "Podman"; - case "freebsd": - return "FreeBSD"; case "nixos": return "NixOS"; default: - return "Linux"; + return "Unix / macOS"; } }; @@ -440,16 +387,14 @@ WantedBy=default.target` switch (platformName) { case "windows": return ; - case "mac": - return ; + case "unix": + return ; case "docker": return ; case "kubernetes": return ; case "podman": return ; - case "freebsd": - return ; case "nixos": return ; default: