Giter Club home page Giter Club logo

radical-native's Introduction

Radical Native

Radical Native Matrix room #radical-webext:matrix.org

Extending Riot Web with native capabilities

Features

  • Search functionality in encrypted rooms using seshat
  • Secure OS key storage for pickle keys using keytar
  • OS global keyboard shortcuts (e.g. push to talk)
  • Tray icon

Supported Browsers

  • Firefox
  • Chrome

Install

1. Radical Native

  • Ubuntu/Debian: .deb
  • Arch: AUR
  • MacOS: .pkg
    • Note: Requires Ctrl+Click on the .pkg since the installer isn't signed yet
  • Windows: .exe

Hint: The event store is saved into the radical-native directory inside your local user data directory.

2. Radical Native Add-on

The Radical Native Firefox Add-on facilitates the communication between Riot Web and the Radical Native Binary.

Usage

  • Open any Riot website in your browser
  • Click the Radical Native icon in the toolbar (RAM icon)
  • Riot website should reload and the toolbar icon should have an "on" badge
  • Check Riot's "Settings > Security & Privacy > Message search > Manage", it should show ongoing work

Troubleshooting

  • Try to execute the radical-native binary directly - it should respond with "ready: true"
  • Check the Radical Native Add-on console for error logs: about:debugging#/runtime/this-firefox > Radical Native Inspect
  • If indexing gets stuck you can safely disable and enable it in the "Manage" dialog

Development

  • cargo install cargo-watch
  • Ubuntu/Debian: apt install libsqlcipher0 libsqlcipher-dev libsecret-1-dev
  • MacOS: brew install libsqlcipher
npm install
npm run dev

Firefox

  • Load the build located in build/firefox as Temporary Add-on via about:debugging#/runtime/this-firefox

Chrome

  • Load the build located in build/chrome as Unpacked extension via chrome://extensions/

Tests

# watcher
npm run test:watch

# once
npm run test

# once & coverage
npm run test:coverage

Attribution

Icon made by Freepik from www.flaticon.com

radical-native's People

Contributors

532910 avatar ashkitten avatar dependabot[bot] avatar pwr22 avatar stoically avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

radical-native's Issues

Retry connecting to port

Otherwise if the Add-on is installed before the binary it'll never work unless the Add-on is dis/enabled or FF restarted

Incoming messages should get buffered for a while before dropping them

Also relevant for updating scenarios

Multiple browser profiles

Currently RN uses the same EventStore if the same domain/path in the same container is used in multiple browser profiles. To mitigate this it should generate an UUID that's unique per installation and use that as an additional prefix for the event store directory name.

Archived

No support from upstream, makes it hard to keep this thing functional.

Release Linux binary

  • Linux binary is build anyway, so that helps with non-debian based distros
  • Add some notes on how to manually add the required native manifest

Hijack matrix.to and well-known riot.im urls

When you self-host riot its sometimes neccecary to a little copy paste dance when you see a matrix.to url, or if someone posts a link to riot.im/app#sometimestamp in riot.

Having Radical Native hijack the urls and maybe just opening them in the already opened tab would be a great feature!

Custom config.json

Similar to Radical it might be nice to expose an Add-on preference to customize Riot's config.json

Logging too noisy

Reported in #radical-webext:matrix.org

any way to tell radical-native extension to shut up? it's spamming the console too much when I'm trying to debug my e2ee
(is it supposed to be constantly logging 5 messages per second when nothing is happening?)

Currently only the background has logging disabled by default. Makes sense to do it for the client-side (contentscript and bundle) as well.

Enabling for already logged in account breaks Element because of pickle key

Element seems to no longer fall back to the default / local storage key if none is found in the system keychain, hence it refuses to work correctly

Workarounds

  • Log in with radical-native active
  • or create the correct keychain entry

Related codepoints

Installation steps

Since there is no instruction to install without a package, I'm pasting here a little script to run.

#!/bin/bash

USERPATH="$HOME/bin"
FFNATIVE="$HOME/.mozilla/native-messaging-hosts"
BINNAME="radical-native_v0.1beta15_x86-amd64"

native_manifest() {
    cat <<-END
{
    "name": "radical.native",
    "description": "Radical Native",
    "path": "$1",
    "type": "stdio",
    "allowed_extensions": [ "@radical-native", "@riot-webext" ]
}
END
}

mv "$BINNAME" "$USERPATH/$BINNAME"
ln -s "$USERPATH/$BINNAME" "$USERPATH/radical-native"
chmod +x "$USERPATH/radical-native"
mkdir -p "$FFNATIVE"
native_manifest "$USERPATH/radical-native" > "$FFNATIVE/radical.native.json"

On Fedora, sqlcipher needs to be installed, and a symlink to be done to get rid of error while loading shared libraries. (Is it related to #17 and #18 ? ldd radical-native may help)

# dnf install sqlcipher
# ln -s /lib64/libsqlcipher.so /lib64/libsqlcipher.so.0
# ln -s /lib64/libsqlcipher-3.15.2.so.0.8.6 /lib64/libsqlcipher.so # may be needed

Snap compatibility

Snap related issues when trying to use native messaging:

Might need an interface: https://snapcraft.io/docs/interface-management

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.