mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-11 13:31:27 +02:00
Update the install and run commands to use the cli
This commit is contained in:
@@ -23,7 +23,7 @@ export const clearExitNodes: CommandModule<
|
|||||||
// Delete all exit nodes
|
// Delete all exit nodes
|
||||||
const deletedCount = await db
|
const deletedCount = await db
|
||||||
.delete(exitNodes)
|
.delete(exitNodes)
|
||||||
.where(eq(exitNodes.exitNodeId, exitNodes.exitNodeId)) .returning();; // delete all
|
.where(eq(exitNodes.exitNodeId, exitNodes.exitNodeId)).returning();; // delete all
|
||||||
|
|
||||||
console.log(`Deleted ${deletedCount.length} exit node(s) from the database`);
|
console.log(`Deleted ${deletedCount.length} exit node(s) from the database`);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -152,7 +152,7 @@
|
|||||||
"siteResourcesHowToAccess": "How to access",
|
"siteResourcesHowToAccess": "How to access",
|
||||||
"siteResourcesTargetsOnSite": "Targets on this site",
|
"siteResourcesTargetsOnSite": "Targets on this site",
|
||||||
"siteSetting": "{siteName} Settings",
|
"siteSetting": "{siteName} Settings",
|
||||||
"siteNewtTunnel": "Newt Site (Recommended)",
|
"siteNewtTunnel": "Pangolin Site (Recommended)",
|
||||||
"siteNewtTunnelDescription": "Easiest way to create an entrypoint into any network. No extra setup.",
|
"siteNewtTunnelDescription": "Easiest way to create an entrypoint into any network. No extra setup.",
|
||||||
"siteWg": "Basic WireGuard",
|
"siteWg": "Basic WireGuard",
|
||||||
"siteWgDescription": "Use any WireGuard client to establish a tunnel. Manual NAT setup required.",
|
"siteWgDescription": "Use any WireGuard client to establish a tunnel. Manual NAT setup required.",
|
||||||
|
|||||||
@@ -45,14 +45,12 @@ export type NewtSiteInstallCommandsProps = {
|
|||||||
id: string;
|
id: string;
|
||||||
secret: string;
|
secret: string;
|
||||||
endpoint: string;
|
endpoint: string;
|
||||||
version?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function NewtSiteInstallCommands({
|
export function NewtSiteInstallCommands({
|
||||||
id,
|
id,
|
||||||
secret,
|
secret,
|
||||||
endpoint,
|
endpoint
|
||||||
version = "latest"
|
|
||||||
}: NewtSiteInstallCommandsProps) {
|
}: NewtSiteInstallCommandsProps) {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const { env } = useEnvContext();
|
const { env } = useEnvContext();
|
||||||
@@ -200,10 +198,7 @@ sudo systemctl enable --now pangolin-site`
|
|||||||
Run: [
|
Run: [
|
||||||
{
|
{
|
||||||
title: t("install"),
|
title: t("install"),
|
||||||
link:
|
link: `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
||||||
version === "latest"
|
|
||||||
? `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
|
||||||
: `https://github.com/fosrl/cli/releases/download/${version}/pangolin-cli_windows_installer.msi`
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("run"),
|
title: t("run"),
|
||||||
@@ -213,15 +208,15 @@ sudo systemctl enable --now pangolin-site`
|
|||||||
Service: [
|
Service: [
|
||||||
{
|
{
|
||||||
title: t("install"),
|
title: t("install"),
|
||||||
command: `curl -fsSL https://static.pangolin.net/get-cli.sh | bash`
|
link: `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("run"),
|
title: t("run"),
|
||||||
command: `sudo pangolin service install site --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}${disableSshFlag}`
|
command: `pangolin service install site --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}${disableSshFlag}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("check"),
|
title: t("check"),
|
||||||
command: `sudo pangolin service status site`
|
command: `pangolin service status site`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -266,15 +261,15 @@ sudo systemctl enable --now pangolin-site`
|
|||||||
podman: {
|
podman: {
|
||||||
"Podman Quadlet": [
|
"Podman Quadlet": [
|
||||||
`[Unit]
|
`[Unit]
|
||||||
Description=Newt container
|
Description=Pangolin Site Container
|
||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
ContainerName=newt
|
ContainerName=pangolin-site
|
||||||
Image=docker.io/fosrl/newt
|
Image=docker.io/fosrl/pangolin-cli
|
||||||
Environment=PANGOLIN_ENDPOINT=${endpoint}
|
Environment=PANGOLIN_ENDPOINT=${endpoint}
|
||||||
Environment=SITE_ID=${id}
|
Environment=SITE_ID=${id}
|
||||||
Environment=SITE_SECRET=${secret}${!acceptClients ? "\nEnvironment=DISABLE_CLIENTS=true" : ""}
|
Environment=SITE_SECRET=${secret}${!acceptClients ? "\nEnvironment=DISABLE_CLIENTS=true" : ""}
|
||||||
# Secret=newt-secret,type=env,target=SITE_SECRET
|
# Secret=pangolin-secret,type=env,target=SITE_SECRET
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
@@ -327,9 +322,7 @@ WantedBy=default.target`
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<OptionSelect<string>
|
<OptionSelect<string>
|
||||||
label={
|
label={t("method")}
|
||||||
platform === "windows" ? t("architecture") : t("method")
|
|
||||||
}
|
|
||||||
options={getArchitectures(platform).map((arch) => ({
|
options={getArchitectures(platform).map((arch) => ({
|
||||||
value: arch,
|
value: arch,
|
||||||
label: arch
|
label: arch
|
||||||
@@ -528,11 +521,11 @@ function getPlatformName(platformName: Platform) {
|
|||||||
function getArchitectures(platform: Platform) {
|
function getArchitectures(platform: Platform) {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case "linux":
|
case "linux":
|
||||||
return ["Run", "Systemd Service"];
|
return ["Run", "Auto Systemd Service", "Manual Systemd Service"];
|
||||||
case "macos":
|
case "macos":
|
||||||
return ["Run"];
|
return ["Run", "Service"];
|
||||||
case "windows":
|
case "windows":
|
||||||
return ["x64"];
|
return ["Run", "Service"];
|
||||||
case "docker":
|
case "docker":
|
||||||
return ["Docker Compose", "Docker Run"];
|
return ["Docker Compose", "Docker Run"];
|
||||||
case "kubernetes":
|
case "kubernetes":
|
||||||
|
|||||||
@@ -26,14 +26,12 @@ export type OlmInstallCommandsProps = {
|
|||||||
id: string;
|
id: string;
|
||||||
secret: string;
|
secret: string;
|
||||||
endpoint: string;
|
endpoint: string;
|
||||||
version?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function OlmInstallCommands({
|
export function OlmInstallCommands({
|
||||||
id,
|
id,
|
||||||
secret,
|
secret,
|
||||||
endpoint,
|
endpoint
|
||||||
version = "latest"
|
|
||||||
}: OlmInstallCommandsProps) {
|
}: OlmInstallCommandsProps) {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
|
||||||
@@ -94,10 +92,7 @@ export function OlmInstallCommands({
|
|||||||
Run: [
|
Run: [
|
||||||
{
|
{
|
||||||
title: t("install"),
|
title: t("install"),
|
||||||
link:
|
link: `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
||||||
version === "latest"
|
|
||||||
? `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
|
||||||
: `https://github.com/fosrl/cli/releases/download/${version}/pangolin-cli_windows_installer.msi`
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("run"),
|
title: t("run"),
|
||||||
@@ -107,15 +102,15 @@ export function OlmInstallCommands({
|
|||||||
Service: [
|
Service: [
|
||||||
{
|
{
|
||||||
title: t("install"),
|
title: t("install"),
|
||||||
command: `curl -fsSL https://static.pangolin.net/get-cli.sh | bash`
|
link: `https://github.com/fosrl/cli/releases/latest/download/pangolin-cli_windows_installer.msi`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("run"),
|
title: t("run"),
|
||||||
command: `sudo pangolin service install client --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
command: `pangolin service install client --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("check"),
|
title: t("check"),
|
||||||
command: `sudo pangolin service status client`
|
command: `pangolin service status client`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -155,9 +150,7 @@ export function OlmInstallCommands({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<OptionSelect<string>
|
<OptionSelect<string>
|
||||||
label={
|
label={t("method")}
|
||||||
platform === "docker" ? t("method") : t("architecture")
|
|
||||||
}
|
|
||||||
options={getArchitectures(platform).map((arch) => ({
|
options={getArchitectures(platform).map((arch) => ({
|
||||||
value: arch,
|
value: arch,
|
||||||
label: arch
|
label: arch
|
||||||
@@ -225,13 +218,13 @@ export function OlmInstallCommands({
|
|||||||
function getArchitectures(platform: Platform) {
|
function getArchitectures(platform: Platform) {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case "unix":
|
case "unix":
|
||||||
return ["All"];
|
return ["Run", "Service"];
|
||||||
case "windows":
|
case "windows":
|
||||||
return ["x64"];
|
return ["Run", "Service"];
|
||||||
case "docker":
|
case "docker":
|
||||||
return ["Docker Compose", "Docker Run"];
|
return ["Docker Compose", "Docker Run"];
|
||||||
default:
|
default:
|
||||||
return ["x64"];
|
return ["Run"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user