Code Monkey home page Code Monkey logo

bisonrelay's Introduction

Bison Relay

Build Status ISC License GoDoc

Bison Relay (BR) is a suite of programs to enable private and secure communications between any number of parties.

The server is oblivious to the contents of individual messages (i.e. all messages are E2E encrypted) and Lightning Network payments are required in order to send and receive messages.

Building

Building the software in this repository requires Go version 1.18+. Proceed with the standard method for building and installing Go binaries.

Quick Start

The following assumes there is a suitable version of the Go toolset installed.

CLI Client

The basic CLI client is available in the brclient package. It can be installed and ran by with the following commands in a checked out copy of this repository:

$ go install ./brclient
brclient

If this is the first time the client is being executed, it will by default go through the initial setup wizard and will create a file named ~/.brclient/brclient.conf to hold the config.

During the setup wizard, the user will be asked to create a dcrlnd wallet if it can't provide connection details to one. In this case, brclient will run an embedded LN wallet, including with the on-chain services necessary to fully operate it. The client will not be usable until the initial sync completes and the LN wallet is fully operational.

Note that in order to send and receive messages with other users, the associated LN wallet (either the embedded or an external one) MUST be actively managed by the user, including by having active channels and enough outbound bandwidth to be able to make the payments required by the server.

Basic Commands

The entire list of supported commands can be found by typing /help after the client is fully setup. Further information about a command be obtained by typing /help <command>.

  • /ln <subcommand>: perform operations in the underlying LN wallet. Including:
    • /ln info: show info about the current LN wallet.
    • /ln newaddress: generate a deposit address for DCR that can be used to fund the on-chain wallet operations.
    • /ln openchannel: open an outbound channel to a target peer.
    • /ln requestrecv: request inbound capacity by having a remote node open a channel back to the local node (requires paying the remote node).
  • /invite <filename>: generate an "invitation" file that can be sent to another user to start communicating with them.
  • /add <filename>: accept the invitation to communicate with a user.
  • /msg <user> <message> send a private message to a previously known user.

Client Automation

Automation (bots, integrations, etc) of a brclient instance can be done by using the clientrpc interface.

Simple Store

More information about running a simple store can be found in the /doc subdir.

Server

A private server can be executed by running:

$ go install ./brserver
$ brserver

The sample config file for a server install is available in the brserver.conf file in this repository.

Further Reading

More information about the internal architecture of bison relay can be found in the /doc subdir.

Verifying Binaries

For your security, we recommend that you verify binaries before running them. Each release contains a manifest file with SHA-256 hashes for each released binary. To ensure your downloads are authentic, you should verify that the manifest file is signed by [email protected], and that your hashed binary matches the manifest.

Detailed instructions can be found in the Decred Documentation: Verifying Binaries. New users should start there.

If you've already done this before and you still have the Decred Release keys on your GnuPG keyring, the following shorthand instructions are provided as a quick refresher:

  1. Download:

    • The zip/tarball for your specific OS / architecture
    • The file manifest and hashes, ending in -manifest.txt
    • The signature for the manifest, ending in -manifest.txt.asc
  2. Verify that the manifest was directly signed by the Decred project:

    $ gpg --verify <your manifest.txt.asc file>
    

    Example output:

    gpg: assuming signed data in 'brclient-v0.1.8-manifest.txt'
    gpg: Signature made 01/29/20 15:17:58 Eastern Standard Time
    gpg:                using RSA key F516ADB7A069852C7C28A02D6D897EDF518A031D
    gpg: Good signature from "Decred Release <[email protected]>" [unknown]
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: FD13 B683 5E24 8FAF 4BD1  838D 6DF6 34AA 7608 AF04
       Subkey fingerprint: F516 ADB7 A069 852C 7C28  A02D 6D89 7EDF 518A 031D
    

    If you see Good signature from "Decred Release <[email protected]>", then you're successful! You can trust that the manifest.txt came directly from the Decred project.

  3. Verify that the hash of your downloaded zip/tarball matches the manifest hash:

    • Windows:

      • If you have 7-Zip installed, simply open up Windows Explorer, right click on the file, mouseover CRC SHA, then click SHA-256.

      • $ certutil -hashfile <your file> SHA256

    • macOS

      • $ shasum -a 256 <your file>
    • Linux

      • $ sha256sum <your file>

    Example output:

    0c43caffa428cebb8a4d3c8efb2a341220fd1c232640ff3b4403ff67e1873e1a  brclient-linux-amd64-0.1.8
    

If your output hash matches the hash from the manifest, you're done! The binary for your platform is now verified and you can be confident it was generated by the Decred Project. It's safe to install the software.

Disclaimer

BR has not been audited yet. Use wisely.

License

BR is licensed under the copyfree ISC License.

bisonrelay's People

Contributors

alexlyp avatar artikozel avatar dajohi avatar davecgh avatar miki-totefu avatar tiagoalvesdulce avatar vctt94 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

Watchers

 avatar  avatar  avatar  avatar

bisonrelay's Issues

Unable to request inbound liquidity during initial onboarding

Attempting to request inbound liquidity while you are also opening a channel, which is the exact scenario during onboarding, results in: channel creation policy error: already has pending open channel request.

This is almost positively protection against opening multiple channels because you think something is wrong since it takes time for confirmations, but it gives the impression that something is wrong to new users and they don't know how to proceed.

Here are three potential solutions:

  • Make an exception to allow both channels to be in flight
  • Queue up the channel creation (and make it clear with a message that it will be opened once the initial channel is active)
  • Disable the button to request inbound liquidity (with a nice instructive message explaining why) until the initial channel is opened

bruig: Text displays very small

I'm using global scaling in Linux but bruig does not seem to be scaling and as such the text is nearly illegible at my current display resolution. It will probably need some option to scale the user interface similar to what Telegram has.

image

bruig: New messages cause automatic scroll to the bottom when reviewing history

Reproduce:

  1. Go to the logs or any chat with enough entries to scroll up
  2. Scroll up to look at historical entries
  3. Wait for a new entry and observe the view automatically scrolls you down to the most recent entry.

It should only automatically scroll when a new entry arrives if the previous last entry was already visible. This ensures new messages never cause you to lose your position when you're reviewing historical entries, but still automatically scrolls new entries whenever you're already at the bottom.

bruig: Partial text entry not saved when changing views.

If you start to type a message, change views, and return to the original view, the text you had already entered is no longer available.

It would be much nicer if the view saved any pending text and automatically repopulated it into the text entry box.

bruig: Make notifications more prominent

While the current red dot next to elements looks nice, it is not visible when you have enough items such that the relevant item is not visible in the current view (aka it's scrolled out of view). I also personally find it a bit hard to see on high resolution displays (such as 1440p and 4k). I would suggest all of the following:

  1. Make the affected item bold in addition to the dot next to it
  2. Add a "Rooms" and "People" header to the two relevant panes under "Chats" and put an indicator next to the text in the appropriate header
  3. Put an indicator in the overall tab view on the left for "Chats" or "News Feed" whenever an item relevant to that section has activity.

The combination of these three things should make it much more prominent that there is activity as well as aid in quickly finding it.

bruig: Chat history is cleared on restart

As the title indicates, restarting the GUI clears all chat history. It should automatically be available on reload.

I'm aware the information is in the logs on the file system, but that is not very user friendly or expected from a GUI.

I've seen several people comment about this.

cli: File send being logged to wrong brclient window

If I am in a chat with person A and I do /ft send person B <file> the notification gets logged in the chat with person A.

Also the notification lacks information about the user the file was sent to and only says:
Sending file "br.jpg" to user

Create example

Please create a self contained repository that shows how to use the APIs of bisonrelay to create an online forum. I want to use bisonrelay in Python to write an online forum.

bruig: distinguish notification dot between new DM and post

The little red dot next to a contact's name could indicate a new post or a new direct message.
It would be nice to have a way to tell if it's just a post or if it's a DM that you might want to check more urgently (blue vs red? two separate dots?)

bruig: loading and accepting an invite causes the app window to go completely white

Loading an invite file and accepting a user invitiation causes the app window to go completely white and featureless and does not recover. Restart is required.
Ubuntu 22.04, bisonrelay-debian-amd64-0.1.1

A different user reported a similar issue, but his window turned to black and featureless upon loading an invite.
v0.1.1 on windows x64 GUI

Windows AppData being set to something strange

for Users that are using the msix it appears the appdata location for bruig they are given is rouhgly "%LOCALAPPDATA%\Packages\decred.br.gui_ywj3797w5q8tj\LocalCache\Local\bruig" instead of just "%LOCALAPPDATA%\bruig"

bruig: Pay to input box does not accept enter to perform the default action

It is customary for input boxes to treat "enter" the same as clicking the button for the default action. In the case of the "Pay Tip" flow, that means it should actually make the payment when you hit "enter". Instead, it currently just removes the input focus from the text entry box and does nothing.

bruig: Click action in context menu should close the menu

Currently, when you click an item in a contextual action menu, for example by clicking on a GC avatar, and then clicking "Manage GC", the context menu stays open and you have to manually close it afterwards. This is a bit cumbersome and pretty non-standard behavior.

bruig: links often have trailing character

e.g.

image

This happens randomly. The last character there is always just a dup of the last character in the clickable link. The correct link goes to the browser, and it does not include that extra digit.

bruig: Messages not received until bruig restart

After doing a KX with two different individuals and receiving confirmation of success from the app the messages I sent were not displayed.

Only upon the users restarting did my new messages begin to display for them, both were on bruig one Windows one Mac.

Subscribing hangs

For certain individuals when I click "Subscribe to Posts" I get a message that says "..Subscribing to posts" but it never completes even after a day. In the logs I just see a message that says "[INF] SRVR: Adding preimage=XXXX to witness cache" but nothing after.
This doesn't happen with everyone.
For most users I get subscribed to them after a second or two without issue, but for a handful of specific users I cannot get subscribed to them no matter whether I wait or restart.

bruig: Clicking on a chat group or person for DMs does not actively capture input focus

Currently, whenever you click on a group chat or a person to send direct messages, the input focus is not automatically captured meaning you have to manually go click in the input area. This is quite cumbersome when you switch channels a lot. It should automatically capture the input focus and be ready for you to type whenever you click on something that will result in input.

Sidebar Text disappears with certain actions

Hide the panel manually with the arrow. Then resize the window so it is small enoughso the left pane would ordinarily be hidden automatically. Then, while it's still
automatically hidden, hit the arrow to expand it. Now resize the window larger again and the text disappears.

bruig: Changing view resets scroll

Switching between views causes the scroll state of chats to be lost.

Reproduce:

  1. Start with a channel / private chat that has enough messages in it that you have to scroll down to view it all
  2. Scroll to the bottom on the channel
  3. Click on News Feed
  4. Navigate back to the original chat
  5. Observe the content pane is back at the top which forces you to scroll to the bottom again

brclient: panic: runtime error when relaying news feed post

Getting the following when relaying a news feed post. The app crashes, but upon relaunching the post appears as successfully relayed.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x1121943]

goroutine 1900 [running]:
[github.com/companyzero/bisonrelay/client.(*RemoteUser).Nick(...)](http://github.com/companyzero/bisonrelay/client.(*RemoteUser).Nick(...))
	[github.com/companyzero/bisonrelay/client/remoteuser.go:142](http://github.com/companyzero/bisonrelay/client/remoteuser.go:142)
main.newAppState.func17(0x0?, {{0xfc, 0xfe, 0x4f, 0x51, 0x21, 0xd7, 0x36, 0x59, 0x5f, ...}, ...}, ...)
	[github.com/companyzero/bisonrelay/brclient/appstate.go:2366](http://github.com/companyzero/bisonrelay/brclient/appstate.go:2366) +0x43
[github.com/companyzero/bisonrelay/client.(*Client).relayPost(0xc000bf6c40,](http://github.com/companyzero/bisonrelay/client.(*Client).relayPost(0xc000bf6c40,) {0x1a, 0x83, 0x70, 0x15, 0x73, 0xd5, 0x6d, 0x73, 0x92, ...}, ...)
	[github.com/companyzero/bisonrelay/client/client_posts.go:908](http://github.com/companyzero/bisonrelay/client/client_posts.go:908) +0x447
[github.com/companyzero/bisonrelay/client.(*Client).RelayPostToSubscribers(0xc000bf6c40,](http://github.com/companyzero/bisonrelay/client.(*Client).RelayPostToSubscribers(0xc000bf6c40,) {0x1a, 0x83, 0x70, 0x15, 0x73, 0xd5, 0x6d, 0x73, 0x92, ...}, ...)
	[github.com/companyzero/bisonrelay/client/client_posts.go:965](http://github.com/companyzero/bisonrelay/client/client_posts.go:965) +0xed
main.(*appState).relayPostToAll(0xc0003a2000, {0x1a, 0x83, 0x70, 0x15, 0x73, 0xd5, 0x6d, 0x73, 0x92, ...}, ...)
	[github.com/companyzero/bisonrelay/brclient/appstate.go:1677](http://github.com/companyzero/bisonrelay/brclient/appstate.go:1677) +0x145
created by main.postWindow.Update
	[github.com/companyzero/bisonrelay/brclient/postwin.go:792](http://github.com/companyzero/bisonrelay/brclient/postwin.go:792) +0x1cbd

Ubuntu 22.04, brclient-linux-amd64-0.1.1

bruig: Received files are not interactive.

Files that are received only print a notification Downloaded file <path to file>.

They really should be interactive, preferably showing the registered icon associated with the file type per the the operating system, so you can click on the file to launch it and/or open the folder it is in with the system explorer.

Also, the path actually displayed is the (expected) %LOCALAPPDATA%\bruig\downloads\<user>\<filename>, but the file really lives at the unexpected strange path per #6.

bruig: Pay tip input does not auto capture input focus

Along the same lines as #28, whenever you click on a user and select "Pay Tip", you have to manually go click on the entry box to enter the amount you want to send. It should automatically capture the input focus so you can simply hit pay, type the amount, and press enter / click the pay button.

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.