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

Handle HTTP & HTTPS URLs in dom0 & GUIVMs #226

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alimirjamali
Copy link

@alimirjamali alimirjamali commented Oct 29, 2024

A new qubes-virtual-browser tool is made to handle URLs within dom0 and/or GUIVMs. It could safely open URLs via DisposableVMs, copy them to global clipboard or discard them.

resolves: QubesOS/qubes-issues#8171

@alimirjamali alimirjamali marked this pull request as draft October 29, 2024 14:49
@alimirjamali alimirjamali force-pushed the issue-8171 branch 3 times, most recently from a81f5b2 to bc0a902 Compare October 29, 2024 16:16
@alimirjamali alimirjamali changed the title Handle HTTP(S) & FTP URLs in dom0 & GUIVMs Handle HTTP & HTTPS URLs in dom0 & GUIVMs Nov 4, 2024
@alimirjamali alimirjamali force-pushed the issue-8171 branch 5 times, most recently from 5b0a009 to 7dd090a Compare November 6, 2024 06:59
@alimirjamali
Copy link
Author

PipelineRetryFailed

@alimirjamali alimirjamali marked this pull request as ready for review November 6, 2024 07:42
@alimirjamali
Copy link
Author

@marmarta pylint and unittests for this one are green. Builds fail. I could not fully understand the logs. Advise is highly appreciated.

@marmarta
Copy link
Member

xdg-settings is not installed in the environment, so the build process fails: the package containing it must be added to the spec / control files.

@alimirjamali alimirjamali force-pushed the issue-8171 branch 5 times, most recently from 0a25e21 to dd980e9 Compare November 10, 2024 17:04
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 63.54167% with 35 lines in your changes missing coverage. Please review.

Project coverage is 93.19%. Comparing base (2b308a5) to head (0a165a1).

Files with missing lines Patch % Lines
qubes_config/global_config/global_config.py 63.44% 34 Missing ⚠️
qubes_config/policy_editor/policy_editor.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   93.43%   93.19%   -0.24%     
==========================================
  Files          57       57              
  Lines       10999    11083      +84     
==========================================
+ Hits        10277    10329      +52     
- Misses        722      754      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@alimirjamali
Copy link
Author

The CI/CD tests are finally green. I will proceed with unittests. But overall this should be ready for testing

@marmarek
Copy link
Member

marmarek commented Nov 18, 2024

It got few conflicts now... can you rebase?

@alimirjamali
Copy link
Author

It got few conflicts now... can you rebase?

Sure. Will do it this afternoon after writing the weekly newsletter.

@marmarek
Copy link
Member

Will do it this afternoon after writing the weekly newsletter.

This one will be a big one, major devices API change got merged finally, more context at QubesOS/qubes-issues#9325

@alimirjamali
Copy link
Author

Will do it this afternoon after writing the weekly newsletter.

This one will be a big one, major devices API change got merged finally, more context at QubesOS/qubes-issues#9325

Yes. I saw that when rebasing the --version patch for core-admin-linux. Only 60 PRs by Piotr were there.

A new `qubes-virtual-browser` tool is made to handle URLs within dom0
and/or GUIVMs. It could safely open URLs via DisposableVMs, copy them to
global clipboard or discard them.

resolves: QubesOS/qubes-issues#8171
@alimirjamali
Copy link
Author

alimirjamali commented Nov 21, 2024

It got few conflicts now... can you rebase?

Ok. This got finally rebased and conflicts are solved. I got busy recently and it took some time.

There are few pending minor issues.

  1. For the recently merged --open option (Add -o/--open-at option to global config #227), we should decide if the URL page of Global Config should have separate bookmarks for this tool config and the policies. Please let me know If I should add it.
  2. I did not write the unittests yet. This commit is already big and hard for review. I guess the unittests could be a separate PR or another commit in this PR.

@marmarek
Copy link
Member

Looking at this, what do you think about unifying it a bit with AppVM URL opening script? We already have a possibility (much simpler) to open URLs in another VM, and it's already configurable in the global config tool. That one won't work directly in dom0 as qrexec calls from dom0 are different. But maybe this tool can be unified to reuse more of that? I mean it both ways:

  • make it consider policy even when running in dom0 (that might need extending qrexec-policy-exec --just-evaluate tool to return more info than just allow/deny via exit code) to unify configuration
  • make it work in appvm too (without ability to list all VMs, without reading features directly etc); if running outside of dom0/guivm, action of copying to the global clipboard would need to be disabled

What do you think?

@alimirjamali
Copy link
Author

What do you think?

It should be doable. I can work on it. I appreciate if I could have some advise on the priority of this one vs the pending clipboard PRs (timeout feature and multi-paste feature). For which ones should I spend more time?

@marmarek
Copy link
Member

I'd say clipboard timeout feature should come first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "open in disposable yes/no" action to clicking on URLs in Global Config
3 participants