1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
//! __Koibumi__ is an experimental [Bitmessage](https://bitmessage.org/) client.
//! Note that Koibumi is __NOT__ an official project of The Bitmessage Developers.
//!
//! # Features
//!
//! Koibumi can connect to the Bitmessage network
//! and relay Bitmessage objects.
//!
//! It has a GUI.
//! Configuration and monitoring can be performed on the window.
//! If you do not need any GUI, use
//! [`koibumi-daemon`](https://crates.io/crates/koibumi-daemon) instead.
//!
//! Currently, this client can send and receive chan and broadcast messages.
//!
//! By default, network connections are limited to __via Tor only__.
//! In this case, you need a Tor SOCKS5 proxy running at localhost.
//!
//! The objects loaded from the network and
//! the list of known node addresses are saved on local file system by using SQLite.
//! Configurations can be saved to the file in the user's configuration directory.
//! The data directory can be changed by specifying a `-d` option on the command line.
//!
//! # Usage
//!
//! To install the Koibumi Bitmessage client, issue the command:
//!
//! ```sh
//! cargo install koibumi
//! ```
//!
//! Or, if you want to display Japanese characters:
//!
//! ```sh
//! cargo install koibumi --features unifont_jp
//! ```
//!
//! To complete the installation successful,
//! you may need to install some extra libraries
//! such as `libvulkan-dev` on the host Linux machine.
//!
//! To run the client, run `koibumi` command, and a GUI window popups.
//! Possibly, you may need to install `mesa-vulkan-drivers` on Linux.
//! On the window, you can configure several settings.
//!
//! To connect to the Bitmessage network, push __Start__ button on the window.
//! When the client connected to some remote nodes,
//! their addresses and user agents are shown on the window.
//! You can monitor how many Bitmessage objects are downloaded and shared.
//!
//! This client is experimental and under development,
//! so many debug logs are printed on the console.
//! Adding `-v` option on the command line, more messages are printed.
//!
//! Note that since database format can be changed among versions,
//! you may have to remove database files located at `$HOME/.config/koibumi` when trying new version.
//!
//! # Settings
//!
//! These are default settings:
//!
//! * Spawn a Bitmessage server at 127.0.0.1:8444.
//! But, currently, this does not fully work,
//! and the client does not advertise its server address.
//! * Connect to the Bitmessage network via SOCKS5 proxy at 127.0.0.1:9050.
//! It is the default local Tor proxy server address.
//! Be careful, if this checkbox is turned off, no SOCKS proxy is used,
//! and all connections are directly to Clearnet.
//! * The client can connect to Bitmessage nodes that have Onion addresses.
//! * The client can connect to Bitmessage nodes that have IP addresses.
//! Be careful, if SOCKS checkbox above is turned off,
//! then all connections are directly to Clearnet.
//! * Does not connect to myself.
//! * Use a user agent of a version of PyBitmessage.
//! * At first, connect to the seed Bitmessage node on the Tor network.
//! This default address is embedded in PyBitmessage source code.
//! * Max 160 incoming connections can be accepted
//! and max 128 incoming established connections can be managed.
//! * Max 32 outgoing connections can be initiated
//! and max 8 outgoing established connections are keeped.
//!
//! You can change these settings on the GUI window.
//!
//! # Implementation details
//!
//! Some of the significant external crates which Koibumi uses:
//!
//! * [`async-std`](https://crates.io/crates/async-std) for networking
//! * [`iced`](https://crates.io/crates/iced) for GUI
//!
//! Koibumi's internal implementation is divided into several crates:
//!
//! * Applications
//! * [`koibumi`](https://crates.io/crates/koibumi):
//! An experimental Bitmessage client with GUI
//! * [`koibumi-daemon`](https://crates.io/crates/koibumi-daemon):
//! An experimental Bitmessage client without GUI
//! * Libraries
//! * [`koibumi-core`](https://crates.io/crates/koibumi-core):
//! A library that provides various types and methods
//! usable to implement Bitmessage clients
//! * [`koibumi-node`](https://crates.io/crates/koibumi-node):
//! An implementation of Bitmessage network node
//! * Other small libraries
//! * [`koibumi-base32`](https://crates.io/crates/koibumi-base32):
//! Minimal Base32 encoder/decoder for Onion addresses
//! * [`koibumi-socks`](https://crates.io/crates/koibumi-socks):
//! Minimal SOCKS5 client for Tor proxy
/// Provides a GUI implementation by using
/// [`iced`](https://crates.io/crates/iced).
use ;
use Gui;
/// The main entry point of the application.
/// The main entry point of the application.