From 4af10c8108489b8f8ab848e4a38c6b4985bc9f46 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Wed, 3 Dec 2025 14:12:53 -0500 Subject: [PATCH] change to --disable-clients flag --- messages/en-US.json | 14 +++++++------- src/app/[orgId]/settings/sites/create/page.tsx | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 5e8af261..d0b9c47f 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -98,7 +98,7 @@ "siteLocalDescriptionSaas": "Local resources only. No tunneling. Only available on remote nodes.", "siteSeeAll": "See All Sites", "siteTunnelDescription": "Determine how you want to connect to your site", - "siteNewtCredentials": "Newt Credentials", + "siteNewtCredentials": "Credentials", "siteNewtCredentialsDescription": "This is how Newt will authenticate with the server", "siteCredentialsSave": "Save Your Credentials", "siteCredentialsSaveDescription": "You will only be able to see this once. Make sure to copy it to a secure place.", @@ -607,9 +607,9 @@ "unknownCommand": "Unknown command", "newtErrorFetchReleases": "Failed to fetch release info: {err}", "newtErrorFetchLatest": "Error fetching latest release: {err}", - "newtEndpoint": "Newt Endpoint", - "newtId": "Newt ID", - "newtSecretKey": "Newt Secret Key", + "newtEndpoint": "Endpoint", + "newtId": "ID", + "newtSecretKey": "Secret", "architecture": "Architecture", "sites": "Sites", "siteWgAnyClients": "Use any WireGuard client to connect. You will have to address your internal resources using the peer IP.", @@ -1445,7 +1445,7 @@ "clientNamePlaceholder": "Client name", "address": "Address", "subnetPlaceholder": "Subnet", - "addressDescription": "The internal address of the client in the Pangolin network. Must fall within the organization's subnet.", + "addressDescription": "The internal address of the client. Must fall within the organization's subnet.", "selectSites": "Select sites", "sitesDescription": "The client will have connectivity to the selected sites", "clientInstallOlm": "Install Olm", @@ -1616,9 +1616,9 @@ "createInternalResourceDialogAliasDescription": "An optional alias for this resource.", "siteConfiguration": "Configuration", "siteAcceptClientConnections": "Accept Client Connections", - "siteAcceptClientConnectionsDescription": "Allow other devices to connect through this Newt instance as a gateway using clients.", + "siteAcceptClientConnectionsDescription": "Allow user devices and clients to access resources on this site. This can be changed later.", "siteAddress": "Site Address", - "siteAddressDescription": "The internal address of the site in the Pangolin network. Must fall within the organization's subnet.", + "siteAddressDescription": "The internal address of the site. Must fall within the organization's subnet.", "autoLoginExternalIdp": "Auto Login with External IDP", "autoLoginExternalIdpDescription": "Immediately redirect the user to the external IDP for authentication.", "selectIdp": "Select IDP", diff --git a/src/app/[orgId]/settings/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx index ffe8c0fc..e5e4e25a 100644 --- a/src/app/[orgId]/settings/sites/create/page.tsx +++ b/src/app/[orgId]/settings/sites/create/page.tsx @@ -199,7 +199,7 @@ export default function Page() { const [wgConfig, setWgConfig] = useState(""); const [createLoading, setCreateLoading] = useState(false); - const [acceptClients, setAcceptClients] = useState(false); + const [acceptClients, setAcceptClients] = useState(true); const [newtVersion, setNewtVersion] = useState("latest"); const [siteDefaults, setSiteDefaults] = @@ -238,11 +238,11 @@ PersistentKeepalive = 5`; secret: string, endpoint: string, version: string, - acceptClients: boolean = false + acceptClients: boolean = true ) => { - const acceptClientsFlag = acceptClients ? " --accept-clients" : ""; - const acceptClientsEnv = acceptClients - ? "\n - ACCEPT_CLIENTS=true" + const acceptClientsFlag = !acceptClients ? " --disable-clients" : ""; + const acceptClientsEnv = !acceptClients + ? "\n - DISABLE_CLIENTS=true" : ""; const commands = { @@ -296,7 +296,7 @@ ContainerName=newt Image=docker.io/fosrl/newt Environment=PANGOLIN_ENDPOINT=${endpoint} Environment=NEWT_ID=${id} -Environment=NEWT_SECRET=${secret}${acceptClients ? "\nEnvironment=ACCEPT_CLIENTS=true" : ""} +Environment=NEWT_SECRET=${secret}${!acceptClients ? "\nEnvironment=DISABLE_CLIENTS=true" : ""} # Secret=newt-secret,type=env,target=NEWT_SECRET [Service] @@ -409,7 +409,7 @@ WantedBy=default.target` copied: false, method: "newt", clientAddress: "", - acceptClients: false, + acceptClients: true, exitNodeId: undefined } }); @@ -996,7 +996,7 @@ WantedBy=default.target`

{t( "siteAcceptClientConnectionsDescription"