Coder Social home page Coder Social logo

hoehermann / purple-signal Goto Github PK

View Code? Open in Web Editor NEW
24.0 6.0 3.0 280 KB

Pidgin/libpurple plugin for signal using libsignal-service-java (and parts of signal-cli).

License: GNU General Public License v3.0

CMake 9.82% C 8.53% Java 31.08% Shell 1.43% C++ 49.14%
pidgin-plugins libpurple-plugin pidgin libpurple instant-messaging signal textsecure textsecure-client signal-client

purple-signal's Introduction

purple-signal

A libpurple/Pidgin plugin for signal (formerly textsecure). Using modified parts of signal-cli which in turn is employing a fork of the official implementation.

Instant Message

State

This plug-in is no longer being developed. The author writes:

This plug-in essentially was a C/C++ wrapper around the (official) Java implementation libsignal-service-java. However, Signal itself is moving away from their own reference implementation. They now favour libsignal-client, which implements the same functionality in Rust. This plug-in ended up as a C wrapper around a Java compatibility layer around a Rust binary which is hard to build. Everything is moving in different directions and nothing is stable. Even nodejs seems to be involved at some point.

Moving away from the platform-independent Java implementation, Signal has pulled support win32 so hard not even third parties can maintain it. Maybe purple-signald will be revived so at least Linux users can have Signal in Pidgin again.

Download

Binaries once were availiable at https://buildbot.hehoe.de/purple-signal/builds/.

See INSTALL on how to install this plug-in.
If you want to build the plug-in yourself see BUILD.

Concept

libpurple plug-ins are written in C.
The signal client library is written in Java.
This project uses JNI to create a Java VM instance within the C part of the plug-in. An instance of the Java Class implementing the signal client is created. Upon receival of a message, a static method is called. This call-back method is a native method implemented in C. It forwards the data to libpurple.
This may be considered dark magic by some.

Please note this is the third purple plugin I have ever written. I still have no idea what I am doing.

Alternative Backends

These back-ends were considered, but not used:

Features

This plug-in is a proof-of-concept with very little features:

  • Register a new account (without captcha only)
  • Link to an existing account
    Use the provided code text with signal-cli
    or
    Scan the provided QR code with with the official app
  • Simple Messaging
    • one-to-one conversation
    • group conversations (linked only)
    • receiving attachments
  • Contact list download

Please note that, as of now, you have to add your contacts manually and they appear "offline" in the buddy list.

For more functionality, check out purple-signald. It offers more features, but it depends on a third-party service and thus is Linux only.

Missing Features

  • Retry failed messages
  • Sending attachments
  • Proper group chats
  • Group chat management (explicit join, leave, administration, …)
  • everything else

Known Problems

  • May require new link or registration after a crash. Your number can be banned temporarily.
  • If the plug-in crashes while handling a message, the message is lost.
  • The message cache is not implemented and I have no idea what that may entrail. Probably the above.
  • First message from purple-signal to official signal is not sent properly.
  • Avatars are downloaded into working directory.
  • It takes two minutes for the internal JVM to shut down. Or it crashes when terminating Pidgin. This issue disappears and reappears erratically.

purple-signal's People

Contributors

hoehermann 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

purple-signal's Issues

signal-cli submodule commit not available

I wanted to give purple-signal a try but I get this error:

$ git clone --recursive https://github.com/hoehermann/purple-signal
Cloning into 'purple-signal'...
remote: Enumerating objects: 237, done.
remote: Counting objects: 100% (237/237), done.
remote: Compressing objects: 100% (105/105), done.
remote: Total 1399 (delta 113), reused 193 (delta 88), pack-reused 1162
Receiving objects: 100% (1399/1399), 285.30 KiB | 4.08 MiB/s, done.
Resolving deltas: 100% (732/732), done.
Submodule 'c/submodules/qrcode' (https://github.com/nayuki/QR-Code-generator) registered for path 'c/submodules/qrcode'
Submodule 'c/submodules/typedjni' (https://github.com/hoehermann/TypedJNI) registered for path 'c/submodules/typedjni'
Submodule 'java/submodules/signal-cli' (https://github.com/hoehermann/signal-cli) registered for path 'java/submodules/signal-cli'
Cloning into '/tmp/purple-signal/c/submodules/qrcode'...
remote: Enumerating objects: 50, done.        
remote: Counting objects: 100% (50/50), done.        
remote: Compressing objects: 100% (30/30), done.        
remote: Total 4776 (delta 23), reused 34 (delta 13), pack-reused 4726        
Receiving objects: 100% (4776/4776), 1.05 MiB | 1.50 MiB/s, done.
Resolving deltas: 100% (2928/2928), done.
Cloning into '/tmp/purple-signal/c/submodules/typedjni'...
remote: Enumerating objects: 126, done.        
remote: Counting objects: 100% (126/126), done.        
remote: Compressing objects: 100% (59/59), done.        
remote: Total 126 (delta 80), reused 106 (delta 64), pack-reused 0        
Receiving objects: 100% (126/126), 25.21 KiB | 8.40 MiB/s, done.
Resolving deltas: 100% (80/80), done.
Cloning into '/tmp/purple-signal/java/submodules/signal-cli'...
remote: Enumerating objects: 6023, done.        
remote: Total 6023 (delta 0), reused 0 (delta 0), pack-reused 6023        
Receiving objects: 100% (6023/6023), 1.87 MiB | 6.23 MiB/s, done.
Resolving deltas: 100% (2933/2933), done.
Submodule path 'c/submodules/qrcode': checked out '8cbd1f506ac59406b18d13a199187c2756f2e06f'
Submodule path 'c/submodules/typedjni': checked out '984df3ce2ed6e75c8431590536ea5306012d9e0d'
fatal: remote error: upload-pack: not our ref 7c25e064652405907e4e9a708aedd685f88dba1b

bad class file

Even over a year later INSTALL.md has incomplete instructions but some days after trying I looked here, found issue where instructions are.
On Slackware64 15.1+current w/jdk11-11.0.14-x86_64-1_SB the below happens.

d@cosmos:~/math/src/network/chat/bitlbee/plugins/1Slackware/purple-signal/build$ cmake --build .
[  4%] Building Java objects for purple_signal.jar
src/de/hehoe/purple_signal/PurpleSignal.java:17: error: cannot access AttachmentInvalidException
import org.asamk.signal.manager.AttachmentInvalidException;
                               ^
  bad class file: /home/d/math/src/network/chat/bitlbee/plugins/1Slackware/purple-signal/build/signal-cli-0.8.0/lib/lib.jar(org/asamk/signal/manager/AttachmentInvalidException.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
gmake[2]: *** [java/CMakeFiles/purple_signal.dir/build.make:89: java/CMakeFiles/purple_signal.dir/java_compiled_purple_signal] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:117: java/CMakeFiles/purple_signal.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

get into Debian

Hey.

Would be awesome if you could get this into Debian (from which many other distros would sooner or later inherit it).

Cheers,
Chris.

Call for alpha testers

@fancypantalons @ttlmax @mooomooo In the past days, I saw you being active over at libpurple-signald. Care to help me out testing this project? Compared to libpurple-signald, purple-signal integrates way more directly with signal-service-java. My gut says, this is cool and we should focus future development on this one rather than libpurple-signald. purple-signal eliminates the need for a separately running service and offers support for Windows. Right now, only linking to an existing device and single chats are supported. I am interested in finding out whether is it usable for any of you.

Binaries are provided here: https://buildbot.hehoe.de/purple-signal/builds/ (.so is targeted Ubuntu amd64 18.04).

Installation instructions are located here: https://github.com/hoehermann/purple-signal/blob/master/INSTALL.md

Plugin does not appear

Signal is not among the options on the "Add New Account" list on a Windows 7 install

I don't imagine it's with any other dependencies than the signal .dll and .jar themselves that could cause this, so I haven't investigated too far on those

I did have pidgin installed on the default "Program Files (x86)" folder previous to discovering this plugin. I tried both the program folder and the user folder, and as you had indicated the user folder didn't fix it either.

If this is the problem, is there a workaround? A way to specify another plugin folder for pidgin to draw from, etc? Is there another issue that could be causing pidgin not to detect the plugin?

Plugin is "hard linked" to signal-cli 0.8.0

Hi,
it seems the version 0.8.0 of signal-cli stopped working. I can't even send messages any more.
So i downloaded a new cli version - 0.9.2.

But a get this error at plugin activating:
"Directory '/opt/signal-cli-0.9.2/lib' contained no signal-cli-0.8.0.jar."

I tried a softlink and get this error:
java.lang.NoClassDefFoundError: org/whispersystems/signalservice/api/SignalServiceProtocolStore

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.