diff --git a/.github/pre-commit-config.yaml b/.github/pre-commit-config.yaml index 67483b660..ff7d744ea 100644 --- a/.github/pre-commit-config.yaml +++ b/.github/pre-commit-config.yaml @@ -7,9 +7,9 @@ repos: entry: codespell language: system pass_filenames: false - - id: prettier-git-files - name: Prettier (only git-tracked files) - entry: bash -c 'git grep --cached -z -l '' | xargs -0 prettier --check --ignore-unknown' + - id: prettier + name: Prettier + entry: prettier --check --ignore-unknown . language: system pass_filenames: false diff --git a/.prettierignore b/.prettierignore index 0ad18b6fd..1204d43aa 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,8 +2,9 @@ elixir/_build elixir/deps elixir/apps/web/assets rust/target -kotlin/android/build +kotlin/android/app/build website/node_modules +website/.next **/*.sh **/*.ex **/*.rs diff --git a/rust/gui-client/src-frontend/components/App.tsx b/rust/gui-client/src-frontend/components/App.tsx index d5e8b8c57..441087e08 100644 --- a/rust/gui-client/src-frontend/components/App.tsx +++ b/rust/gui-client/src-frontend/components/App.tsx @@ -94,7 +94,11 @@ export default function App() { {({ isActive }) => ( - + Diagnostics )} diff --git a/rust/gui-client/src-frontend/components/DiagnosticsPage.tsx b/rust/gui-client/src-frontend/components/DiagnosticsPage.tsx index 3f6482d96..71a38f846 100644 --- a/rust/gui-client/src-frontend/components/DiagnosticsPage.tsx +++ b/rust/gui-client/src-frontend/components/DiagnosticsPage.tsx @@ -32,18 +32,12 @@ export default function Diagnostics({
- - diff --git a/rust/gui-client/src-frontend/components/SettingsPage.tsx b/rust/gui-client/src-frontend/components/SettingsPage.tsx index 7c4bf64b7..a5d42aed8 100644 --- a/rust/gui-client/src-frontend/components/SettingsPage.tsx +++ b/rust/gui-client/src-frontend/components/SettingsPage.tsx @@ -1,5 +1,11 @@ import React, { useEffect, useState } from "react"; -import { Button, TextInput, Label, TextInputProps, Tooltip } from "flowbite-react"; +import { + Button, + TextInput, + Label, + TextInputProps, + Tooltip, +} from "flowbite-react"; import { AdvancedSettingsViewModel as Settings } from "../generated/AdvancedSettingsViewModel"; interface SettingsPageProps { @@ -45,9 +51,9 @@ export default function SettingsPage({

- WARNING: These settings are intended for internal - debug purposes only. Changing these is not supported - and will disrupt access to your resources. + WARNING: These settings are intended for internal debug + purposes only. Changing these is not supported and will + disrupt access to your resources.

- +
- +
- +
- @@ -127,10 +135,15 @@ function ManagedTextInput(props: TextInputProps & { managed: boolean }) { let { managed, ...inputProps } = props; if (managed) { - return - - + return ( + + + + ); } else { - return + return ; } } diff --git a/rust/gui-client/src-frontend/generated/AdvancedSettingsViewModel.ts b/rust/gui-client/src-frontend/generated/AdvancedSettingsViewModel.ts index e422a8297..a58eae30a 100644 --- a/rust/gui-client/src-frontend/generated/AdvancedSettingsViewModel.ts +++ b/rust/gui-client/src-frontend/generated/AdvancedSettingsViewModel.ts @@ -1,8 +1,8 @@ export interface AdvancedSettingsViewModel { - auth_url: string; - auth_url_is_managed: boolean; - api_url: string; - api_url_is_managed: boolean; - log_filter: string; - log_filter_is_managed: boolean; + auth_url: string; + auth_url_is_managed: boolean; + api_url: string; + api_url_is_managed: boolean; + log_filter: string; + log_filter_is_managed: boolean; } diff --git a/rust/gui-client/src-frontend/generated/FileCount.ts b/rust/gui-client/src-frontend/generated/FileCount.ts index fc979b927..69a5de083 100644 --- a/rust/gui-client/src-frontend/generated/FileCount.ts +++ b/rust/gui-client/src-frontend/generated/FileCount.ts @@ -1,4 +1,4 @@ export interface FileCount { - bytes: number; - files: number; + bytes: number; + files: number; } diff --git a/rust/gui-client/src-frontend/generated/Session.ts b/rust/gui-client/src-frontend/generated/Session.ts index aea319b37..ad80d2cf6 100644 --- a/rust/gui-client/src-frontend/generated/Session.ts +++ b/rust/gui-client/src-frontend/generated/Session.ts @@ -1,4 +1,4 @@ export interface Session { - account_slug: string; - actor_name: string; + account_slug: string; + actor_name: string; } diff --git a/rust/gui-client/src-frontend/initSentry.ts b/rust/gui-client/src-frontend/initSentry.ts index 7621d383f..f1314e368 100644 --- a/rust/gui-client/src-frontend/initSentry.ts +++ b/rust/gui-client/src-frontend/initSentry.ts @@ -1,5 +1,5 @@ import * as Sentry from "@sentry/react"; -import type { Client } from '@sentry/core'; +import type { Client } from "@sentry/core"; type Environment = "production" | "staging" | "on-prem" | "unknown"; @@ -22,14 +22,14 @@ export default function initSentry(apiUrl: string) { release: `gui-client@${__APP_VERSION__}`, }; - console.log("Initialising Sentry", { options }) + console.log("Initialising Sentry", { options }); client = Sentry.init(options); } function environment(url: URL | null): Environment { if (!url) { - return "unknown" + return "unknown"; } switch (url.host) { diff --git a/rust/gui-client/src-frontend/main.tsx b/rust/gui-client/src-frontend/main.tsx index 98f64ed32..16d755e9b 100644 --- a/rust/gui-client/src-frontend/main.tsx +++ b/rust/gui-client/src-frontend/main.tsx @@ -7,23 +7,24 @@ import * as Sentry from "@sentry/react"; const customTheme = createTheme({ sidebar: { - root: { inner: "rounded-none bg-white" } + root: { inner: "rounded-none bg-white" }, }, button: { color: { default: "bg-accent-450 hover:bg-accent-700 text-white", - alternative: "text-neutral-900 border border-neutral-200 hover:bg-neutral-300 hover:text-neutral-900", + alternative: + "text-neutral-900 border border-neutral-200 hover:bg-neutral-300 hover:text-neutral-900", }, }, textInput: { field: { input: { colors: { - gray: "focus:ring-accent-500 focus:border-accent-500" - } - } - } - } + gray: "focus:ring-accent-500 focus:border-accent-500", + }, + }, + }, + }, }); ReactDOM.createRoot(document.getElementById("root") as HTMLElement, { diff --git a/rust/gui-client/vite.config.ts b/rust/gui-client/vite.config.ts index efc92f718..ce753793e 100644 --- a/rust/gui-client/vite.config.ts +++ b/rust/gui-client/vite.config.ts @@ -2,12 +2,12 @@ import tailwindcss from "@tailwindcss/vite"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; import flowbiteReact from "flowbite-react/plugin/vite"; -import typescript from 'vite-plugin-typescript'; +import typescript from "vite-plugin-typescript"; import { execSync } from "child_process"; const host = process.env.TAURI_DEV_HOST; -const gitVersion = process.env.GITHUB_SHA ?? execSync('git rev-parse --short HEAD') - .toString(); +const gitVersion = + process.env.GITHUB_SHA ?? execSync("git rev-parse --short HEAD").toString(); // https://vite.dev/config/ export default defineConfig({ @@ -15,8 +15,8 @@ export default defineConfig({ define: { // mark:next-gui-version - '__APP_VERSION__': JSON.stringify("1.5.0"), - '__GIT_VERSION__': JSON.stringify(gitVersion), + __APP_VERSION__: JSON.stringify("1.5.0"), + __GIT_VERSION__: JSON.stringify(gitVersion), }, // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` diff --git a/swift/apple/README.md b/swift/apple/README.md index 8a7153c87..f83a38e97 100644 --- a/swift/apple/README.md +++ b/swift/apple/README.md @@ -265,10 +265,10 @@ Application certificates are **precious** and we only have a limited number of them. They also cannot be revoked. So do not generate them. Instead, obtain it from 1Password. -Also, the signing certificate for the package installer artifact specifically needs -to be a `Developer ID Installer` certificate, not a `Developer ID Application` or -`Apple Distribution` certificate. This is needed to sign the PKG files we distribute -that are consumed by MDMs. +Also, the signing certificate for the package installer artifact specifically +needs to be a `Developer ID Installer` certificate, not a +`Developer ID Application` or `Apple Distribution` certificate. This is needed +to sign the PKG files we distribute that are consumed by MDMs. Once you've done that, you can create the provisioning profiles and update the GitHub secrets using the same steps as above, only using the following secrets diff --git a/website/public/policy-templates/windows/README.md b/website/public/policy-templates/windows/README.md index 927343376..d56082579 100644 --- a/website/public/policy-templates/windows/README.md +++ b/website/public/policy-templates/windows/README.md @@ -1,7 +1,9 @@ # Windows policy templates -These policy templates can be imported into Intune here: https://intune.microsoft.com/#view/Microsoft_Intune_DeviceSettings/DevicesWindowsMenu/~/configuration +These policy templates can be imported into Intune here: +https://intune.microsoft.com/#view/Microsoft_Intune_DeviceSettings/DevicesWindowsMenu/~/configuration -Intune only allows a single policy template per namespace to be active at any one time. -Therefore, in order to upload (and test) a new template, you need to delete the previous one. -The menu for deleting an uploaded ADMX file is hidden behind the three dots at the end of the row. +Intune only allows a single policy template per namespace to be active at any +one time. Therefore, in order to upload (and test) a new template, you need to +delete the previous one. The menu for deleting an uploaded ADMX file is hidden +behind the three dots at the end of the row. diff --git a/website/src/app/kb/administer/logs/readme.mdx b/website/src/app/kb/administer/logs/readme.mdx index 9c9c7777b..79edb3331 100644 --- a/website/src/app/kb/administer/logs/readme.mdx +++ b/website/src/app/kb/administer/logs/readme.mdx @@ -15,7 +15,7 @@ by advanced users and admins. | Component | Log directory | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | macOS Client | `~/Library/Group Containers/47R2M6779T.dev.firezone.firezone/Library/Caches/logs` for the GUI process, and `/private/var/root/Library/Group Containers/47R2M6779T.dev.firezone.firezone/Library/Caches/logs` for the tunnel process | -| Windows GUI Client | `%LOCALAPPDATA%\dev.firezone.client\data\logs` for the GUI process, and `%PROGRAMDATA%\dev.firezone.client\data\logs` for the Tunnel service | +| Windows GUI Client | `%LOCALAPPDATA%\dev.firezone.client\data\logs` for the GUI process, and `%PROGRAMDATA%\dev.firezone.client\data\logs` for the Tunnel service | | Linux GUI Client | `$HOME/.cache/dev.firezone.client/data/logs/` for the GUI process, and `/var/log/dev.firezone.client/` for the tunnel process | | Android/ChromeOS Client | `/data/data/dev.firezone.android/caches/logs` | | iOS Client | N/A | diff --git a/website/src/app/kb/client-apps/linux-gui-client/readme.mdx b/website/src/app/kb/client-apps/linux-gui-client/readme.mdx index 56da173f8..40316ac9e 100644 --- a/website/src/app/kb/client-apps/linux-gui-client/readme.mdx +++ b/website/src/app/kb/client-apps/linux-gui-client/readme.mdx @@ -48,22 +48,23 @@ To auto-start the Client when you log in, run ### Step 1: Install repositories -These are required for both GNOME extensions and the WebKit and other dependencies -of the Firezone Client. +These are required for both GNOME extensions and the WebKit and other +dependencies of the Firezone Client. 1. `sudo dnf config-manager --set-enabled crb` 1. `sudo dnf install epel-release` ### Step 2: Install system tray -GNOME Shell in CentOS does not have a system tray by default. Use these -steps to install it. For other desktops like xfce4 or KDE, the system tray may -already work properly. +GNOME Shell in CentOS does not have a system tray by default. Use these steps to +install it. For other desktops like xfce4 or KDE, the system tray may already +work properly. 1. `sudo dnf install gnome-shell-extension-appindicator` 1. Log out and back in to restart GNOME 1. `gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com` -1. Optionally: To manage GNOME extensions via a GUI, install `gnome-extensions-app` +1. Optionally: To manage GNOME extensions via a GUI, install + `gnome-extensions-app` ### Step 3: Install Firezone @@ -155,9 +156,9 @@ To export or clear your logs: 1. Click `Diagnostic Logs`. 1. Click `Export Logs` or `Clear Log Directory`. -The Tunnel service (`firezone-client-tunnel.service`) also logs to stdout which is -captured by systemd and sent to journald. To view the logs of the Tunnel service, -use: +The Tunnel service (`firezone-client-tunnel.service`) also logs to stdout which +is captured by systemd and sent to journald. To view the logs of the Tunnel +service, use: ```bash journalctl --pager-end --follow --unit firezone-client-tunnel.service diff --git a/website/src/app/kb/client-apps/windows-gui-client/readme.mdx b/website/src/app/kb/client-apps/windows-gui-client/readme.mdx index 1089f92b2..83ba364f8 100644 --- a/website/src/app/kb/client-apps/windows-gui-client/readme.mdx +++ b/website/src/app/kb/client-apps/windows-gui-client/readme.mdx @@ -205,8 +205,9 @@ Get-DnsClientNrptRule | where Comment -eq firezone-fd0020211111 | foreach { Remo The Firezone Client is split into 2 main processes: A Tunnel service which runs the tunnel, and a GUI which allows the user to control Firezone. -- Tunnel service logs are stored at `%PROGRAMDATA%\dev.firezone.client\data\logs\`, - where `%PROGRAMDATA%` is almost always `C:\ProgramData` +- Tunnel service logs are stored at + `%PROGRAMDATA%\dev.firezone.client\data\logs\`, where `%PROGRAMDATA%` is + almost always `C:\ProgramData` - GUI logs are stored at `%LOCALAPPDATA%\dev.firezone.client\data\logs`, where `%LOCALAPPDATA%` is, e.g. `C:\Users\username\AppData\Local` diff --git a/website/src/app/kb/deploy/gateways/readme.mdx b/website/src/app/kb/deploy/gateways/readme.mdx index 6d6870d5e..859c9c4cc 100644 --- a/website/src/app/kb/deploy/gateways/readme.mdx +++ b/website/src/app/kb/deploy/gateways/readme.mdx @@ -136,6 +136,7 @@ to 10 MB. However, the actual size of the receive buffer is limited by the `net.core.rmem_max` kernel parameter. For the increased buffer size to take effect, you may need to increase the `net.core.rmem_max` parameter on the Gateway's host system. + ## Deploy a single Gateway Deploying a single Gateway can be accomplished in the admin portal. diff --git a/website/src/components/Changelog/Gateway.tsx b/website/src/components/Changelog/Gateway.tsx index 0001cb809..90e257d42 100644 --- a/website/src/components/Changelog/Gateway.tsx +++ b/website/src/components/Changelog/Gateway.tsx @@ -208,8 +208,8 @@ export default function Gateway() {
  • - Removes FIREZONE_ENABLE_MASQUERADE env variable. Masquerading is now - always enabled unconditionally. + Removes FIREZONE_ENABLE_MASQUERADE env variable. + Masquerading is now always enabled unconditionally.
  • diff --git a/website/src/components/HubspotForm/index.tsx b/website/src/components/HubspotForm/index.tsx index b1fa4bdce..ab2c8b383 100644 --- a/website/src/components/HubspotForm/index.tsx +++ b/website/src/components/HubspotForm/index.tsx @@ -10,11 +10,12 @@ export default function HubspotForm({ formId: string; title?: string; }) { - const { isScriptLoaded, isScriptError, scriptError, isFormCreated } = useHubspotForm({ - portalId: portalId, - formId: formId, - target: "#hubspot-form", - }); + const { isScriptLoaded, isScriptError, scriptError, isFormCreated } = + useHubspotForm({ + portalId: portalId, + formId: formId, + target: "#hubspot-form", + }); return (