Skip to content
Merged
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
e84725f
setup proto crate
wojcik91 Jun 2, 2026
36276c0
migrate proto conversion module
wojcik91 Jun 2, 2026
9fdc334
use new proto crate
wojcik91 Jun 2, 2026
cf5cc20
scaffold core crate
wojcik91 Jun 2, 2026
2f18bd7
migrate shared code to core crate
wojcik91 Jun 2, 2026
f63e445
extract version constants and into_location into core crate
wojcik91 Jun 2, 2026
b7aea8c
move app_config and wg_config into core, decouple AppHandle from conf…
wojcik91 Jun 2, 2026
d3fb797
extract proxy HTTP client
wojcik91 Jun 2, 2026
ff984ce
extract daemon gRPC client
wojcik91 Jun 2, 2026
8f944c8
extract non-macOS connection setup into core
wojcik91 Jun 2, 2026
82ea64d
split macOS-only extension management into a dedicated module in core
wojcik91 Jun 2, 2026
0109aeb
setup unified connection interface
wojcik91 Jun 2, 2026
3f47bea
setup entirprise crates directory and migrate posture checks
wojcik91 Jun 2, 2026
abf6282
migrate provisioning module
wojcik91 Jun 2, 2026
b864dd9
migrate config sync module to a crate
wojcik91 Jun 2, 2026
07d4e8c
migrate service locations
wojcik91 Jun 2, 2026
1481fa3
scaffold service daemon crate
wojcik91 Jun 2, 2026
7b8ee78
migrate service binary
wojcik91 Jun 2, 2026
28e39fd
cleanup
wojcik91 Jun 2, 2026
59368a5
fix tauri build
wojcik91 Jun 2, 2026
bc99b93
cleanup
wojcik91 Jun 2, 2026
d7cae12
merge nix package update from main
wojcik91 Jun 2, 2026
894ae75
cleanup
wojcik91 Jun 2, 2026
8c8e570
expose other binaries as nix packages
wojcik91 Jun 2, 2026
5552408
make config polling independent from tauri
wojcik91 Jun 3, 2026
a078f81
consolidate crate names and workspace dependencies
wojcik91 Jun 3, 2026
6211261
add a shared connection layer skeleton
wojcik91 Jun 3, 2026
e0ca2ad
migrate desktop client to shared interface
wojcik91 Jun 3, 2026
9b76d3e
add an active interface state command
wojcik91 Jun 3, 2026
057eae7
setup base CLI structure & status command
wojcik91 Jun 4, 2026
d70d72c
WIP: non-MFA connect/disconnect commands
wojcik91 Jun 5, 2026
c739c9a
update protos
wojcik91 Jun 5, 2026
dc8ff76
implement list_interfaces RPC
wojcik91 Jun 5, 2026
b40cad0
update protos
wojcik91 Jun 5, 2026
22fd81a
use new RPC to determine active state
wojcik91 Jun 5, 2026
c6315c1
configure logging verbosity
wojcik91 Jun 5, 2026
9e6006c
make the connect process idempotent
wojcik91 Jun 5, 2026
1298eaa
update disconnect logic
wojcik91 Jun 5, 2026
93a782b
clippy lint fixes
wojcik91 Jun 5, 2026
38fbe4a
attempt to fix pubkey matching
wojcik91 Jun 5, 2026
d823b8d
implement basic MFA handling
wojcik91 Jun 5, 2026
4bc29b1
handle no-argument disconnect
wojcik91 Jun 5, 2026
c69b5fa
fix list formatting
wojcik91 Jun 5, 2026
332dffd
update location list formatting
wojcik91 Jun 5, 2026
a59a8b7
adjust list formatting
wojcik91 Jun 5, 2026
d1e15d8
remove clippy warnings
wojcik91 Jun 5, 2026
a994b0e
cleanup
wojcik91 Jun 8, 2026
387065c
add new CLI as nix package output
wojcik91 Jun 8, 2026
3758afe
extract more shared methods
wojcik91 Jun 9, 2026
b5bb28d
use model methods instead of raw queries
wojcik91 Jun 9, 2026
2168855
remove more raw queries
wojcik91 Jun 9, 2026
7148474
wire up unimplemented flags
wojcik91 Jun 9, 2026
7865b97
respect configured MTU
wojcik91 Jun 10, 2026
8208493
support posture+MFA combined flow
wojcik91 Jun 10, 2026
151b03d
handle daemon unavailable error
wojcik91 Jun 10, 2026
f58a704
avoid exposing mfa codes
wojcik91 Jun 10, 2026
5f223aa
add a shared output trait
wojcik91 Jun 10, 2026
b2ee5f5
cleanup
wojcik91 Jun 10, 2026
fd59344
Merge remote-tracking branch 'origin/dev' into cli_interface
wojcik91 Jun 10, 2026
d82cbc7
refresh query cache
wojcik91 Jun 10, 2026
4b1aab3
add unit tests
wojcik91 Jun 10, 2026
29e025e
add mock proxy tests
wojcik91 Jun 10, 2026
93b25ae
add mock daemon test
wojcik91 Jun 11, 2026
bae1d73
initial review cleanup
wojcik91 Jun 11, 2026
8c088da
add macOS-specific temporary error messages
wojcik91 Jun 11, 2026
f8e24cb
handle routing override flags
wojcik91 Jun 11, 2026
72e279f
add find_by_name queries
wojcik91 Jun 11, 2026
b2e6132
add shortened command aliases
wojcik91 Jun 11, 2026
891def6
add CommandOutput trait
wojcik91 Jun 11, 2026
13f3ed3
migrate status command
wojcik91 Jun 11, 2026
ecf1874
migrate list command
wojcik91 Jun 11, 2026
cb33080
migrate connect command
wojcik91 Jun 11, 2026
d10d014
migrate disconnect command
wojcik91 Jun 11, 2026
c209493
migrate location list
wojcik91 Jun 11, 2026
76c45c3
migrate location set command
wojcik91 Jun 11, 2026
fda78f1
remove unused
wojcik91 Jun 11, 2026
d244e26
cleanup
wojcik91 Jun 11, 2026
cb0543c
add instance and tunnel commands
wojcik91 Jun 11, 2026
4b9b1b8
add missing connection type matching
wojcik91 Jun 11, 2026
48128f1
add missing const
wojcik91 Jun 11, 2026
4bae09b
add missing flags
wojcik91 Jun 11, 2026
332fec4
fix typo
wojcik91 Jun 11, 2026
4df227d
remove data dir override
wojcik91 Jun 12, 2026
d4d42e0
avoid holding read lock
wojcik91 Jun 12, 2026
98d5c35
will it compile on macOS?
wojcik91 Jun 12, 2026
fd580ed
Merge branch 'dev' into cli_interface
wojcik91 Jun 12, 2026
a97336d
linter fix
wojcik91 Jun 12, 2026
a094490
update nix flake inputs
wojcik91 Jun 12, 2026
a46619f
cleanup connect command
wojcik91 Jun 12, 2026
d6d8243
get the nix package to build with new ui
wojcik91 Jun 12, 2026
e30d446
cleanup disconnect
wojcik91 Jun 12, 2026
e4cfe5b
reenable tray behavior on linux
wojcik91 Jun 12, 2026
0e8d1e8
more cleaning up
wojcik91 Jun 12, 2026
ae36788
display new windows on linux
wojcik91 Jun 12, 2026
186915a
clarify const names
wojcik91 Jun 12, 2026
f564dcf
cleaning up, up, up
wojcik91 Jun 12, 2026
5461d6e
remove duplicate connect logic
wojcik91 Jun 12, 2026
caf03d7
suprise, more cleaning up
wojcik91 Jun 12, 2026
6883123
Merge branch 'dev' into cli_interface
wojcik91 Jun 12, 2026
1d6d938
update lockfile
wojcik91 Jun 12, 2026
4972a1e
macOS in not happy
wojcik91 Jun 12, 2026
e6c3aed
update proto submodule
wojcik91 Jun 12, 2026
883c6b1
support version subcommand
wojcik91 Jun 12, 2026
16c1c19
fix nix package
wojcik91 Jun 12, 2026
42bdba6
add flake output
wojcik91 Jun 12, 2026
b3cd1a1
macOS whoopsie
wojcik91 Jun 12, 2026
6652208
who knows, maybe this time
wojcik91 Jun 12, 2026
4e968a5
unused variables
wojcik91 Jun 12, 2026
2b75fcb
nix package fix
wojcik91 Jun 12, 2026
59d3ec9
hide unimplemented command
wojcik91 Jun 12, 2026
ef42759
add warning for non-https proxy
wojcik91 Jun 12, 2026
42f71b6
add invalid input error
wojcik91 Jun 12, 2026
d79832a
filter inactive peers
wojcik91 Jun 12, 2026
76edb67
add missing mapping
wojcik91 Jun 12, 2026
1f59cce
pass new frontend deps derivation for easier workflow integration
wojcik91 Jun 12, 2026
d1f0b68
restart service on update
wojcik91 Jun 12, 2026
f4f5893
add missing dir error
wojcik91 Jun 12, 2026
d6f0399
ensure proper json formatting in fallback
wojcik91 Jun 12, 2026
155e325
fail before I/O
wojcik91 Jun 12, 2026
b34af29
use shared label
wojcik91 Jun 12, 2026
b84b97c
cleaning up here and there
wojcik91 Jun 12, 2026
d07aa1d
improve mock test setup
wojcik91 Jun 12, 2026
c00304d
add comment
wojcik91 Jun 12, 2026
42b25d5
add banner
wojcik91 Jun 15, 2026
eb836ca
leave a fixme for reference
wojcik91 Jun 15, 2026
b1f1be7
fix ID overlap edge case
wojcik91 Jun 15, 2026
783a2ba
revert ui changes
wojcik91 Jun 15, 2026
979528c
update logs
wojcik91 Jun 15, 2026
dc4bced
review fixes
wojcik91 Jun 15, 2026
b240bbe
typo
wojcik91 Jun 15, 2026
d3721e1
update nix package
wojcik91 Jun 15, 2026
caf1303
adjust windows pipe concurrency limit
wojcik91 Jun 15, 2026
52b8c16
Merge branch 'dev' into cli_interface
wojcik91 Jun 15, 2026
21a1110
update hashes
wojcik91 Jun 15, 2026
b4a777d
add missing dependency
wojcik91 Jun 15, 2026
8e1d981
Merge branch 'dev' into cli_interface
wojcik91 Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ jobs:
- name: Check format
run: |
rustup component add rustfmt
cargo fmt -- --check
cargo fmt --all -- --check

- name: Run clippy linter
run: |
mkdir ../dist
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
cargo clippy --workspace --all-targets --all-features -- -D warnings

- name: Install cargo extensions
uses: taiki-e/install-action@v2
with:
tool: cargo-deny
tool: cargo-deny,cargo-nextest

- name: Run cargo deny
working-directory: ./src-tauri
run: cargo deny check

- name: Run tests
run: cargo test --locked --no-fail-fast
run: cargo nextest run --workspace --locked --no-fail-fast
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ src-tauri/gen/

# nix stuff
result

target
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
mkdir -p $out/bin
cp ${defguard-client}/bin/dg $out/bin/
'';
defguard-cli =
pkgs.runCommand "defguard-cli" {
nativeBuildInputs = [pkgs.makeWrapper];
} ''
mkdir -p $out/bin
cp ${defguard-client}/bin/defguard-cli $out/bin/
'';
};

checks.default = defguard-client;
Expand Down
6 changes: 6 additions & 0 deletions new-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@
"@tanstack/router-plugin": "^1.168.18",
"@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-dialog": "^2.3.2",
"@tauri-apps/plugin-fs": "^2.3.2",
"@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-log": "^2.8.0",
"@tauri-apps/plugin-opener": "^2.3.2",
"@tauri-apps/plugin-os": "^2.3.2",
"@types/lodash-es": "^4.17.12",
"@uidotdev/usehooks": "^2.4.1",
"byte-size": "^9.0.1",
"chart.js": "^4.5.1",
"clsx": "^2.1.1",
"dayjs": "^1.11.21",
"lodash-es": "^4.17.21",
"motion": "^12.40.0",
"p-timeout": "^7.0.1",
"prettier": "^3.8.4",
Expand All @@ -39,6 +44,7 @@
"react": "^19.2.7",
"react-chartjs-2": "^5.3.1",
"react-dom": "^19.2.7",
"react-loading-skeleton": "^3.5.0",
"rxjs": "^7.8.2",
"sass": "^1.100.0",
"zod": "^4.4.3",
Expand Down
65 changes: 65 additions & 0 deletions new-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions new-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { devtools } from '@tanstack/devtools-vite';
const host = process.env.TAURI_DEV_HOST;

// https://vitejs.dev/config/
export default defineConfig(async () => ({
export default defineConfig(async ({ command }) => ({
Comment thread
wojcik91 marked this conversation as resolved.
Outdated
plugins: [devtools(), tanstackRouter(), react()],
clearScreen: false,
server: {
Expand Down Expand Up @@ -43,7 +43,7 @@ export default defineConfig(async () => ({
},
},
envPrefix: ['VITE_', 'TAURI_'],
base: '/',
base: command === 'build' ? '/new-ui/' : '/',
Comment thread
wojcik91 marked this conversation as resolved.
Outdated
build: {
outDir: '../dist',
emptyOutDir: true,
Expand Down
52 changes: 45 additions & 7 deletions nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,36 @@
inherit pname version pnpm;
src = ../.;
fetcherVersion = 3;
hash = "sha256-7B5+C3q+jVQ2taKcfZkfTvH37OBDIPDM/4LLRqWPE+I=";
hash = "sha256-WjcZeKfEEjcry5dJ12yL+dz+/v5CmKSg0iHfYcoOtag=";
};

# Prefetch pnpm dependencies for the new UI (separate pnpm project).
newUiPnpmDeps = fetchPnpmDeps {
pname = "defguard-client-new-ui";
inherit version pnpm;
src = ../new-ui;
fetcherVersion = 3;
hash = "sha256-9PvWIkD+/1KLFqWvf5Kz6x3dABQILMooTC+MSqxDTlg=";
};

# Pre-build the new UI frontend so Tauri can serve it at /new-ui/.
newUiDist = pkgs.stdenv.mkDerivation {
pname = "defguard-client-new-ui";
inherit version;
src = ../new-ui;
nativeBuildInputs = [pkgs.nodejs_24 pnpm pnpmConfigHook];
pnpmDeps = newUiPnpmDeps;
buildPhase = ''
runHook preBuild
pnpm tsc -b
pnpm vite build --outDir "$out/new-ui"
runHook postBuild
'';
installPhase = "true";
};
in
craneLib.mkCargoDerivation {
inherit pname version buildInputs cargoArtifacts cargoVendorDir pnpmDeps;
inherit pname version buildInputs cargoArtifacts cargoVendorDir pnpmDeps newUiDist;

src = ../.;

Expand Down Expand Up @@ -140,9 +165,17 @@ in
buildPhase = ''
runHook preBuild

# Build the frontend first; tauri's beforeBuildCommand is suppressed
# below to avoid running pnpm build a second time.
# Build the old frontend and copy in the pre-built new UI.
pnpm build
cp -r ${newUiDist}/new-ui dist/
chmod -R u+w dist/new-ui

# Tauri loads new-ui as WebviewUrl::App("new-ui/full/") and
# "new-ui/compact/". Create index.html entry points for each so
# TanStack Router (basepath /new-ui/) can take over from there.
mkdir -p dist/new-ui/full dist/new-ui/compact
cp dist/new-ui/index.html dist/new-ui/full/
cp dist/new-ui/index.html dist/new-ui/compact/

# --config replaces the build section from tauri.linux.conf.json.
pnpm tauri build \
Expand All @@ -161,6 +194,7 @@ in
mkdir -p $out/bin
install -Dm755 "$targetDir/${pname}" $out/bin/${pname}
install -Dm755 "$targetDir/defguard-service" $out/bin/defguard-service
install -Dm755 "$targetDir/defguard-cli" $out/bin/defguard-cli
install -Dm755 "$targetDir/dg" $out/bin/dg

mkdir -p $out/lib/${pname}
Expand Down Expand Up @@ -188,10 +222,14 @@ in
SQLX_OFFLINE = "true";
doInstallCargoArtifacts = false;

# passthru attrs are ignored by the build but addressable by external tools:
# pnpmDeps — referenced by the update-pnpm-hash.yaml CI workflow
# passthru attrs are ignored by the build but addressable by external tools.
# There are TWO pnpm lockfiles, each with its own pinned hash that must be kept
# current when the corresponding lockfile changes:
# pnpmDeps - root pnpm project (../pnpm-lock.yaml)
# newUiPnpmDeps - new-ui pnpm project (../new-ui/pnpm-lock.yaml)
# Any hash-refresh automation (e.g. an update-pnpm-hash workflow) must update both.
passthru = {
inherit pnpmDeps;
inherit pnpmDeps newUiPnpmDeps;
};

meta = with lib; {
Expand Down
1 change: 1 addition & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ in
rustToolchain
trunk
sqlx-cli
cargo-nextest
vtsls
trivy
];
Expand Down
Loading
Loading