Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(headless-client): add a placeholder IPC server for Windows #4940

Closed
wants to merge 54 commits into from

Conversation

ReactorScram
Copy link
Collaborator

@ReactorScram ReactorScram commented May 9, 2024

Before merging

Edit tasklist title
Beta Give feedback Tasklist Before merging, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Add a unit test that runs the IPC server with a stub client in CI
    Options
  2. If any files shared with Linux changed, run the manual smoke test for Linux
    Options
  3. Make sure headless Client does not busy-loop (I changed its main loop slightly)
    Options
  4. Make sure IPC service does not busy-loop
    Options
  5. Test standalone headless on Linux
    Options
  6. Test standalone headless on Windows
    Options
  7. Test debug IPC service on Linux
    Options
  8. Test debug IPC service on Windows
    Options
  9. Test GUI + systemd IPC service on Linux
    Options
  10. Test GUI + SC IPC service on Windows
    Options

Regardless of the entry point and subcommand, events must happen in this order:

  • Enter main
  • Remove the token from the environment
  • Branch on CLI subcommand if needed
  • (Windows service stuff happens here, probably)
  • If we're an IPC service or standalone Client, start a file + stderr logger
  • Else, if we're a debug IPC service, start only the stderr logger
  • Start a single-threaded Tokio runtime

Entry points:

  • firezone-client-ipc for Linux - Systemd passes CLI args, journald logs stderr for us
  • firezone-client-ipc for Windows - Windows passes CLI args, stderr doesn't work
  • headless-client for Linux -
  • linux-client - Same as ...

I'm going to want a well-known dir that the Windows IPC service writes logs to,
and that the Windows GUI can pick them up from.

I don't know how I did this for Linux last week, but it should probably be in
here too.
This has a known gap where theoretically the GUI could sign in while the
service is hung in startup, and then the service would wipe out the GUI's
DNS rules.

The workaround for that would be to restart the GUI, but in practice I think
this is almost impossible, Windows would have to give the service no CPU time
while the user was signing in, then the user would have to immediately open
Firezone before the service got running.

Closes #4899
@ReactorScram ReactorScram added the area/tauri_client The Windows and Linux Tauri GUI clients label May 9, 2024
@ReactorScram ReactorScram added this to the 06/24 milestone May 9, 2024
@ReactorScram ReactorScram self-assigned this May 9, 2024
Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 7:24pm

@github-actions github-actions bot added the kind/chore Issues related to repository cleanup or maintenance label May 9, 2024
@ReactorScram ReactorScram changed the base branch from main to chore/windows-service-poc May 9, 2024 18:52
Copy link

github-actions bot commented May 9, 2024

Terraform Cloud Plan Output

Plan: 15 to add, 15 to change, 15 to destroy.

Terraform Cloud Plan

Copy link

github-actions bot commented May 9, 2024

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 237.8 MiB (-3%) 240.0 MiB (-2%) 337 (+14%)
direct-tcp-server2client 244.2 MiB (+1%) 245.7 MiB (+1%) 100 (-79%)
relayed-tcp-client2server 227.2 MiB (+2%) 227.9 MiB (+2%) 249 (+7%)
relayed-tcp-server2client 229.9 MiB (-7%) 230.4 MiB (-7%) 474 (+52%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 500.0 MiB (+0%) 0.03ms (-27%) 39.23% (-4%)
direct-udp-server2client 500.0 MiB (-0%) 0.02ms (+68%) 22.81% (+5%)
relayed-udp-client2server 500.0 MiB (+0%) 0.03ms (-95%) 55.45% (+2%)
relayed-udp-server2client 499.5 MiB (-0%) 0.04ms (+28%) 38.92% (-12%)

@ReactorScram ReactorScram changed the base branch from chore/windows-service-poc to refactor/remove-auto-ipc May 9, 2024 19:30
@ReactorScram
Copy link
Collaborator Author

I think I was intending to base this on #4942

@ReactorScram ReactorScram changed the base branch from refactor/remove-auto-ipc to fix/windows-dns-4899 May 10, 2024 21:14
Base automatically changed from fix/windows-dns-4899 to main May 13, 2024 15:09
@ReactorScram
Copy link
Collaborator Author

Closing in favor of #4978 which is newer and isn't based on the failed refactors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tauri_client The Windows and Linux Tauri GUI clients area/windows_client Issues related to the Windows client kind/chore Issues related to repository cleanup or maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant