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

freenet: URI for use with custom Freenet browser #670

Open
sanity opened this issue Jun 9, 2023 · 1 comment
Open

freenet: URI for use with custom Freenet browser #670

sanity opened this issue Jun 9, 2023 · 1 comment
Labels
A-os-integration Area: OS integration C-feature Category: New feature or request C-proposal Category: A proposal seeking feedback E-easy Experience needed to fix/implement: Easy / not much

Comments

@sanity
Copy link
Collaborator

sanity commented Jun 9, 2023

Register a URI handler in the OS for "freenet:" that launches the custom Freenet browser.

Notes

Yes, it's possible to create custom URI schemes on Windows, MacOS, and Linux, and associate them with an application. This allows you to launch that application from a browser or another application using a URI that starts with your custom scheme.

Here's a general idea on how you can do this in each OS:

  1. Windows: You need to add some keys to the Windows registry to create a new protocol. Then, in the command key, specify the command line that should be used to launch your application. You can refer to the Microsoft documentation on Registering an Application to a URI Scheme for more details.

  2. MacOS: It requires you to add some keys to the Info.plist file of your application's bundle, specifically CFBundleURLTypes, CFBundleURLSchemes, and potentially CFBundleURLName. Check out Apple's documentation on Configuring Custom URL Schemes for Your App.

  3. Linux: Linux doesn't have a central mechanism for this, but many desktop environments, like Gnome or KDE, support xdg-open, which delegates to the environment's default browser or file opener. You'll need to add a .desktop file for your app in /usr/share/applications or ~/.local/share/applications, and define a MimeType entry that includes x-scheme-handler/your-uri.

Remember, in all these cases, your application will need to be able to parse the URIs that it is given and take appropriate action. And there's no guarantee that every browser will respect these settings, although the major ones generally do.

Lastly, be aware that creating custom URL schemes can have security implications. Make sure to validate and sanitize all inputs to your application. You may not want to allow any arbitrary URL to be used to launch your app, as this could potentially be exploited by an attacker.

@sanity sanity added C-feature Category: New feature or request E-easy Experience needed to fix/implement: Easy / not much C-proposal Category: A proposal seeking feedback A-os-integration Area: OS integration labels Jun 9, 2023
@Destroyinator69420
Copy link

I think that a custom locutus browser would just add more hassle. I would recommend a simpler solution of using the users preferred browser with a custom browser extension, perhaps called locutus buddy, which would isolate locutus tabs from http tabs. It would also integrate jShelter on strict mode to lock down javascript so that it cannot be exploited. Firefox makes this very easy with container tabs, more work will be needed with chrome and its derivatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-os-integration Area: OS integration C-feature Category: New feature or request C-proposal Category: A proposal seeking feedback E-easy Experience needed to fix/implement: Easy / not much
Projects
None yet
Development

No branches or pull requests

2 participants