Giter Site home page Giter Site logo

meinto / whatsapp-signal-bridge Goto Github PK

View Code? Open in Web Editor NEW
54.0 7.0 4.0 45 KB

Forward your Whatsapp messages to a separate Signal chat and reply to Whatsapp by quoting received messages.

License: MIT License

Go 98.01% Shell 1.99%
whatsapp whatsapp-bot signal

whatsapp-signal-bridge's Introduction

Whatsapp Signal Bridge

This application lets you forward all messages which you receive in your Whatsapp account to Signal. Big thanks to all contributors of the Rhymen/go-whatsapp and signal-cli.

How it works

For this application to work you need a separate phone number for your bot. The bot sends the Whatsapp messages to your main Signal number. So you receive all Whatsapp messages in a separate Signal chat.

The messages you receive in this Signal chat include the Whatsapp chat-id, the name or the number of the sender, the group name, the message and the attachments.

Example text message structure:

chatid:[email protected]
chat:Chat with friends
sender:Mike
---
Hi there

You can reply to the messages by quoting them. The reply will be sent back through the bot in the corresponding Whatsapp chat including attachments.

Requirements

You need to install signal-cli.

(Native Library) (Use Correct Libsignal-client Version) (Maybe useful)

After installation you have to register your separate phone number.

Build

go build -o bot .

First Run

On the first run you have to connect your Whatsapp account to the application. This is done by adding the application as Whatsapp-Web client.

On the first run you have to scan the qr-code which will be presented on your terminal.

./bot --bot=<bot-number> --receiver=<signal-receiver-number>
# now scan the presented qr-code

After the qr-code was scanned the connection should be established and the session is stored in a file. On the next run of this application, the session will be loaded directly. You don't have to scan the qr-code again.

Start Bridge for Production

# this script starts the application in the background
./start.sh <bot-numer> <signal-receiver-number>
# stopping the background script
./stop.sh

Remember that only one concurrent Whatsapp-Web connection can be active!

Skills

You can control the application with a couple of commands. Type @bot help in Signal or Whatsapp for more information.

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Whatsapp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.

License

The MIT License (MIT)

Copyright (c) 2021

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

whatsapp-signal-bridge's People

Contributors

meinto avatar

Stargazers

 avatar  avatar Iván Moreno avatar Nicolas Fleiter avatar  avatar Martin Scheiber avatar aadi. avatar UserCr4ig avatar Maximilian Wittenburg avatar Marti McFly avatar  avatar Ukasha Zia avatar Johannes Plunien avatar  avatar Leonhard Masche avatar  avatar  avatar Alberto Calore avatar Jonathan Schumann avatar Sean Stevens avatar Roman avatar  avatar tux avatar DoubtfulTurnip avatar  avatar  avatar Andreas Huppert avatar Leo avatar FinnLab avatar Ole Timmers avatar Shai Almog avatar Radiumatic avatar  avatar Ro Bin-Wan Känobi avatar Simon Schneider avatar  avatar Jendrik Scherf avatar Alexandre Meirelles avatar Josh avatar Daniyal Ansari avatar Rachid tessoudali  avatar Oskar Börjesson avatar  avatar  avatar Aron avatar Khaled Mohamed avatar Konstantin Hirschfeld avatar Jonas Siedentop avatar Peter Griffin avatar  avatar James Haggerty avatar  avatar Parrot avatar Luana avatar

Watchers

James Cloos avatar  avatar Claas Flint avatar  avatar Aron avatar Ro Bin-Wan Känobi avatar  avatar

whatsapp-signal-bridge's Issues

Cannot connect to WhatsApp

On first startup I get the following error:

$ ./bot --bot="+NUM1" --receiver="+NUM2" 
2021-10-16 18:14:39	debug	client	[signal] new subscription to whatsapp
2021-10-16 18:14:39	debug	queue	new subscription
error during login: error decoding login resp: json: cannot unmarshal array into Go value of type map[string]interface {}

I see this error message being discussed in the repos for go-whatsapp. Perhaps a fix from there must be ported here?

Support sending messages from signal and implement WhatsApp reply information

Hi
this project is really useful , But are you planning to support vise-versa sending messages?
like sending messages to a chat using chat id and ability to reply with message id
also it would be great if you implement a way of finding out if a message is reply and what original message contains
and does this support files?
thank you very much

I need some more information about this project and it's working

  • Does it require PC to setup that needs to active all the time? I assume yes. If not, clarify.
  • If yes to the above query, is it possible to host/deploy this bridge on server? Like heroku that can be set active 24/7?
  • Or is it possible to get the job done on termux on an Android if I install go packages?

error creating connection: couldn't dial whatsapp web websocket: websocket: bad handshake

It looks like the whatsapp-library used for this repo is not up to date anymore.

Therefore this repo looks like it is not working at this moment.
See: Rhymen/go-whatsapp#651, nikoksr/notify#274

I found out by getting the following error:
error creating connection: couldn't dial whatsapp web websocket: websocket: bad handshake

Does anyone here have more information about those issues, and the further effect they have on this repo?
Thanks!

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.