unseenet-gui 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- unseenet_gui-0.1.0/LICENSE +177 -0
- unseenet_gui-0.1.0/PKG-INFO +281 -0
- unseenet_gui-0.1.0/README.md +258 -0
- unseenet_gui-0.1.0/pyproject.toml +47 -0
- unseenet_gui-0.1.0/setup.cfg +4 -0
- unseenet_gui-0.1.0/src/unseenet_gui/__init__.py +3 -0
- unseenet_gui-0.1.0/src/unseenet_gui/__main__.py +126 -0
- unseenet_gui-0.1.0/src/unseenet_gui/boot.py +180 -0
- unseenet_gui-0.1.0/src/unseenet_gui/opening.py +122 -0
- unseenet_gui-0.1.0/src/unseenet_gui/selftest.py +121 -0
- unseenet_gui-0.1.0/src/unseenet_gui/server.py +291 -0
- unseenet_gui-0.1.0/src/unseenet_gui/splash.py +105 -0
- unseenet_gui-0.1.0/src/unseenet_gui/static/app.css +546 -0
- unseenet_gui-0.1.0/src/unseenet_gui/static/app.js +2356 -0
- unseenet_gui-0.1.0/src/unseenet_gui/static/icon-ink.svg +18 -0
- unseenet_gui-0.1.0/src/unseenet_gui/static/icon.svg +18 -0
- unseenet_gui-0.1.0/src/unseenet_gui/static/index.html +16 -0
- unseenet_gui-0.1.0/src/unseenet_gui/system.py +88 -0
- unseenet_gui-0.1.0/src/unseenet_gui/update.py +60 -0
- unseenet_gui-0.1.0/src/unseenet_gui/winfix.py +52 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/PKG-INFO +281 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/SOURCES.txt +26 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/dependency_links.txt +1 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/entry_points.txt +2 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/requires.txt +9 -0
- unseenet_gui-0.1.0/src/unseenet_gui.egg-info/top_level.txt +1 -0
- unseenet_gui-0.1.0/tests/test_gui_extension.py +112 -0
- unseenet_gui-0.1.0/tests/test_server.py +110 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: unseenet-gui
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The graphical client for Unseenet: groups and chat in a window, Tor and keys stay in the unseenet core
|
|
5
|
+
Author: Andreas Lorensen
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/unseenet/unseenet-gui
|
|
8
|
+
Project-URL: Unseenet, https://unseenet.org/
|
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Communications :: Usenet News
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: unseenet[api]<0.5,>=0.4.1
|
|
16
|
+
Requires-Dist: aiohttp>=3.9
|
|
17
|
+
Provides-Extra: window
|
|
18
|
+
Requires-Dist: pywebview>=5; extra == "window"
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<picture>
|
|
26
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/img/logo-dark.svg">
|
|
27
|
+
<img src="docs/img/logo-light.svg" alt="Unseenet" width="320">
|
|
28
|
+
</picture>
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
<p align="center"><b>Usenet, unseen - now in a window.</b><br>
|
|
32
|
+
Discussions you read and answer, chats you chat in, over Tor. Portable on Windows, macOS and Linux, booted from a USB stick - or in any browser, on a phone too, through a web entrance.</p>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src="docs/img/demo.gif" alt="Unlocking the vault, reading down a thread post by post, replying with a quote, chatting, the command palette and the light theme" width="880">
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
A modern client for [Unseenet](https://unseenet.org), the decentralised,
|
|
39
|
+
encrypted discussion network over Tor onion services, built on the
|
|
40
|
+
[unseenet](https://github.com/unseenet/unseenet) core with the look of
|
|
41
|
+
[unseenet.org](https://unseenet.org).
|
|
42
|
+
|
|
43
|
+
> **Pre-alpha prototype.** Neither this client nor the unseenet core has had a
|
|
44
|
+
> security review. Play with it, pick it apart - do not rely on it to protect
|
|
45
|
+
> anyone yet.
|
|
46
|
+
|
|
47
|
+
A discussion is not a chat. Discussion groups work like a newsreader - the
|
|
48
|
+
same way as unseenet's terminal client: the posts as a tree, the selected one
|
|
49
|
+
below to read, `↑` `↓` through the thread and `Space` to the next unread, and
|
|
50
|
+
`R` to answer in a compose window with the post quoted and your signature
|
|
51
|
+
below. Chat groups are chats. The group's owner decides which a group is, and
|
|
52
|
+
`V` lets you see it the other way.
|
|
53
|
+
|
|
54
|
+
| Read a discussion | Answer it, quoting |
|
|
55
|
+
|---|---|
|
|
56
|
+
|  |  |
|
|
57
|
+
| **Chat where it is a chat** | **Light, or dark** |
|
|
58
|
+
|  |  |
|
|
59
|
+
|
|
60
|
+
### Booted from a stick
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<img src="docs/img/boot.gif" alt="The boot splash, then the client full screen with network, keyboard and power at the top" width="880">
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
The bootable image starts with the Unseenet splash and then the client full
|
|
67
|
+
screen - network, Wi-Fi, keyboard and power at the top. The splash is the
|
|
68
|
+
image's own; the picture of the client is taken by the image's self-test, which
|
|
69
|
+
boots it in QEMU on every build.
|
|
70
|
+
|
|
71
|
+
### In a browser, on a phone or a computer
|
|
72
|
+
|
|
73
|
+
The same client runs in an ordinary browser, with nothing to install, through
|
|
74
|
+
a **web entrance** ([unseenet-entrance](https://github.com/unseenet/unseenet-entrance),
|
|
75
|
+
UN-RFC 0043) - for example the project's own, **https://129.151.209.26/**.
|
|
76
|
+
There the client's Python backend - this repository's server code and the
|
|
77
|
+
unseenet core - runs in the browser itself (WebAssembly), so the keys stay in
|
|
78
|
+
the browser; the entrance only carries the connections to the nodes over Tor.
|
|
79
|
+
It can be added to the home screen like an app, keeps the vault on the
|
|
80
|
+
device if you want, and updates itself to signed versions. The entrance sees
|
|
81
|
+
your IP address (not in Tor Browser), and the page says so at all times: for
|
|
82
|
+
the hidden way in, use the portable client or the stick.
|
|
83
|
+
|
|
84
|
+
On a narrow screen - a phone - the client shows one thing at a time: your
|
|
85
|
+
groups, then a group, then a post or the chat. **⋯** holds what does not fit,
|
|
86
|
+
and the compose window has its Send button at the top, above the keyboard.
|
|
87
|
+
|
|
88
|
+
## How it works
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
browser window ──HTTP/WebSocket──▶ unseenet-gui ──▶ unseenet core ──Tor──▶ nodes
|
|
92
|
+
(127.0.0.1 only) (local server) vault, keys, postage
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`unseenet-gui` is a small local server around the core's `Session` - the same
|
|
96
|
+
one the TUI uses. (On the web the same server code runs inside the browser
|
|
97
|
+
instead, see above; nothing in this repository is different for it.) It opens the same encrypted vault, starts the same bundled
|
|
98
|
+
Tor and talks to the same nodes. The browser only draws what you would see on
|
|
99
|
+
screen: **keys, signing, encryption and postage never leave Python**, and the
|
|
100
|
+
passphrase is only sent once, to unlock.
|
|
101
|
+
|
|
102
|
+
The client follows the terminal client's way of working, so you can switch
|
|
103
|
+
between them without learning anything new: the same keys, the same icons
|
|
104
|
+
(`≡` discussion, `»` chat, `∩` closed), the same compose window.
|
|
105
|
+
|
|
106
|
+
## Download
|
|
107
|
+
|
|
108
|
+
Every push to `main` is built and self-tested; the newest builds are the
|
|
109
|
+
[development pre-release](https://github.com/unseenet/unseenet-gui/releases/tag/dev).
|
|
110
|
+
|
|
111
|
+
- **Portable** - unzip and start, from a USB stick or a folder. Tor is included,
|
|
112
|
+
and everything stays in `data/` beside the programs.
|
|
113
|
+
`unseenet-gui-…-usb.zip` has every platform; or take only yours:
|
|
114
|
+
- Windows: `Unseenet Graphical.exe` (an app window through WebView2, no console)
|
|
115
|
+
- macOS: `Start Unseenet Graphical.command` (an app window)
|
|
116
|
+
- Linux: `sh start-graphical-linux.sh` (Chromium, Chrome, Edge or Brave without
|
|
117
|
+
tabs if you have one, else your browser)
|
|
118
|
+
- **Bootable** - `unseenet-gui-…-x86_64.img.xz`: write it to a USB stick (for
|
|
119
|
+
example with Raspberry Pi Imager, balenaEtcher or
|
|
120
|
+
`xz -dc FILE | sudo dd of=/dev/sdX bs=4M`), boot from it, and Unseenet starts
|
|
121
|
+
full screen and runs from memory. Set up Wi-Fi and the keyboard on the first
|
|
122
|
+
screen. The same stick also starts the portable client on a running
|
|
123
|
+
computer, with the same `data/`. It needs 4 GB of memory; "safe graphics" in
|
|
124
|
+
the boot menu helps if the screen stays black, and "text only" starts
|
|
125
|
+
unseenet's terminal client instead.
|
|
126
|
+
|
|
127
|
+
Both use the same `Unseenet/` folder and `data/` as unseenet's own portable
|
|
128
|
+
build, so the terminal client and this one can share a stick and a vault.
|
|
129
|
+
|
|
130
|
+
## From source
|
|
131
|
+
|
|
132
|
+
You need Python 3.11+.
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
pip install unseenet-gui
|
|
136
|
+
unseenet-gui # opens your browser
|
|
137
|
+
unseenet-gui --vault /path/to/unseenet.vault
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
It uses the same vault as the TUI (`unseenet.vault` in the current folder, or
|
|
141
|
+
the portable build's `data/`), so your identity, groups and read marks are the
|
|
142
|
+
same in both. Do not run both on the same vault at the same time.
|
|
143
|
+
|
|
144
|
+
### In its own window
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
pip install "unseenet-gui[window]"
|
|
148
|
+
unseenet-gui --window
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
This uses [pywebview](https://pywebview.flowrl.com/): the system's web view
|
|
152
|
+
(WebView2 on Windows, WebKit on macOS and Linux) in private mode, so nothing
|
|
153
|
+
ends up in your browser's history or cache. On Linux it needs the GTK WebKit
|
|
154
|
+
libraries.
|
|
155
|
+
|
|
156
|
+
### A playground without Tor
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
git clone https://github.com/unseenet/unseenet-gui && cd unseenet-gui
|
|
160
|
+
pip install -e .
|
|
161
|
+
tools/dev.sh # a local node, three people, groups and a closed chat
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Passphrase `test`. Everything is in `./dev`; `tools/dev.sh clean` deletes it.
|
|
165
|
+
|
|
166
|
+
## Keys
|
|
167
|
+
|
|
168
|
+
| Key | |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `Ctrl K` or `Ctrl P` | Commands and groups |
|
|
171
|
+
| `N` | New post |
|
|
172
|
+
| `R` | Reply: a compose window with the post quoted |
|
|
173
|
+
| `↑` `↓` | Previous / next post in the tree |
|
|
174
|
+
| `Space` | Next unread post (then the next group with unread posts) |
|
|
175
|
+
| `Enter` | Read the post full screen (`Esc` goes back); in a chat: write |
|
|
176
|
+
| `M` | Write to someone (paste their key) |
|
|
177
|
+
| `V` | Switch between chat and threads |
|
|
178
|
+
| `G` | Find groups on your nodes |
|
|
179
|
+
| `K` | Show your key |
|
|
180
|
+
| `?` | About this group |
|
|
181
|
+
| `Ctrl S` | Send, in the compose window |
|
|
182
|
+
| `Esc` | Leave the text box, close a dialog |
|
|
183
|
+
|
|
184
|
+
## Security
|
|
185
|
+
|
|
186
|
+
The local server is reachable from your own computer, so it guards itself.
|
|
187
|
+
These are the rules of UN-RFC 0046, kept by the core's local API:
|
|
188
|
+
|
|
189
|
+
- It listens on **127.0.0.1 only**, on a random port.
|
|
190
|
+
- Every start makes a **random token**. It is in the address the client opens
|
|
191
|
+
(`…/#t=…`, in the fragment, so it is never sent in a request line), kept in
|
|
192
|
+
that tab only and removed from the address bar. Every API call and the
|
|
193
|
+
event socket must carry it. Other programs on the computer and web pages in
|
|
194
|
+
your browser do not know it.
|
|
195
|
+
- The **Host** header must be our own address, which stops DNS rebinding, and
|
|
196
|
+
an **Origin** header, when sent, must be our own origin.
|
|
197
|
+
- A strict **Content-Security-Policy**: the page loads nothing from anywhere
|
|
198
|
+
but the local server - no fonts, images, scripts or styles from outside. A
|
|
199
|
+
post can never make the browser fetch something past Tor.
|
|
200
|
+
- Everything people wrote is put on the page as text, never as HTML, and links
|
|
201
|
+
in posts are not clickable: following one would leave Tor.
|
|
202
|
+
- Nothing is logged: the server has no access log.
|
|
203
|
+
|
|
204
|
+
What it does **not** protect against: someone who can read your screen, run
|
|
205
|
+
programs as you or read your memory. When you run it in your normal browser,
|
|
206
|
+
the window title and address can end up in its history - `--window` avoids
|
|
207
|
+
that.
|
|
208
|
+
|
|
209
|
+
## What the prototype can and cannot do
|
|
210
|
+
|
|
211
|
+
It can: unlock or create a vault, choose a name and node, follow and leave
|
|
212
|
+
groups, read threads and chats (closed groups decrypted), post, reply, chat,
|
|
213
|
+
"For you", private messages (write to anyone by key, conversations as chats,
|
|
214
|
+
private replies), contacts, create groups (open, moderated, channel, closed;
|
|
215
|
+
threads or chat; fast delivery), invite to your closed groups, your signature,
|
|
216
|
+
edit your own posts, names (@you), moderation, roles, bans and member removal, reporting, ignoring people,
|
|
217
|
+
a light and a dark theme, the command palette, and phones and other narrow
|
|
218
|
+
screens. On the bootable image also: network and Wi-Fi, keyboard layout,
|
|
219
|
+
restart and shut down. In a browser: everything above, through a web entrance.
|
|
220
|
+
|
|
221
|
+
Not yet - use the TUI: Tor bridges and several identities. **Updating**
|
|
222
|
+
a stick or portable folder of this client is not there yet either: its builds
|
|
223
|
+
are not signed yet, and unseenet's own updater does not touch them (it would
|
|
224
|
+
remove the graphical client). Download the new build from the
|
|
225
|
+
[releases](https://github.com/unseenet/unseenet-gui/releases) for now; signed
|
|
226
|
+
builds, a notice and an Update button (already in the code, switched off)
|
|
227
|
+
are coming (unseenet#264).
|
|
228
|
+
|
|
229
|
+
## Versions and releases
|
|
230
|
+
|
|
231
|
+
Versions follow [semantic versioning](https://semver.org/) on the same
|
|
232
|
+
principles as [unseenet](https://github.com/unseenet/unseenet/blob/main/docs/development.md#versioning):
|
|
233
|
+
tags `vX.Y.Z` on `main`, the changes in [CHANGELOG.md](CHANGELOG.md), and
|
|
234
|
+
releases on [PyPI](https://pypi.org/p/unseenet-gui) and here with the
|
|
235
|
+
portable builds and the image. Each release names the minor version of
|
|
236
|
+
unseenet it works with (`unseenet[api]>=0.4.1,<0.5`).
|
|
237
|
+
|
|
238
|
+
To release: move the entries under `## [Unreleased]` in `CHANGELOG.md` to a
|
|
239
|
+
new `## [X.Y.Z] - YYYY-MM-DD` section, set `__version__` in
|
|
240
|
+
`src/unseenet_gui/__init__.py`, and the core release the builds use
|
|
241
|
+
(`CORE_REF` in `.github/workflows/build.yml`); commit, then
|
|
242
|
+
`git tag -a vX.Y.Z -m "unseenet-gui X.Y.Z" && git push origin vX.Y.Z`.
|
|
243
|
+
`release.yml` publishes to PyPI and makes the release with the changelog
|
|
244
|
+
notes, `build.yml` adds the builds. Afterwards set `__version__` on main to
|
|
245
|
+
the next `.dev0`, so development builds are named after it.
|
|
246
|
+
|
|
247
|
+
## Built on the core
|
|
248
|
+
|
|
249
|
+
Everything but the page is the core's: this client is unseenet's local
|
|
250
|
+
client API (UN-RFC 0046, `unseenet.client.localapi`) with its page and a few
|
|
251
|
+
routes of its own under `/x/gui/` - the bootable image's network, keyboard and
|
|
252
|
+
power, updating, and what the page shows about this machine. The same runtime,
|
|
253
|
+
threads, names and safe Markdown tree serve every front end, so this client
|
|
254
|
+
shows what the TUI shows. [CORE-NEEDS.md](CORE-NEEDS.md) records how it got there.
|
|
255
|
+
|
|
256
|
+
## Layout
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
src/unseenet_gui/
|
|
260
|
+
__main__.py command line: how to open it, --self-test
|
|
261
|
+
opening.py app window, browser in app mode, or the browser
|
|
262
|
+
server.py the core's local API with this page, and /x/gui/
|
|
263
|
+
update.py updating a stick or portable folder (off for now)
|
|
264
|
+
system.py the bootable image's network, keyboard and power
|
|
265
|
+
boot.py the bootable image's session (cage) and its self-test
|
|
266
|
+
splash.py the boot splash, drawn on the framebuffer
|
|
267
|
+
selftest.py does this build work?
|
|
268
|
+
static/ the page: index.html, app.css, app.js (no build step)
|
|
269
|
+
tests/ the server: the core's guards, the page, /x/gui/
|
|
270
|
+
tools/
|
|
271
|
+
dev.sh a playground without Tor (seed_dev.py fills it)
|
|
272
|
+
record_demo.py the demo and screenshots in this README, from the playground
|
|
273
|
+
build_portable.py, portable/ the portable builds (with unseenet's Tor tooling)
|
|
274
|
+
image/ the bootable image (adapted from unseenet's)
|
|
275
|
+
.github/workflows/build.yml Tor, four portable builds, USB zip, image, releases
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The front end is plain JavaScript with no dependencies and no build step, so
|
|
279
|
+
the client is easy to read and audit.
|
|
280
|
+
|
|
281
|
+
Code Apache-2.0. Logo CC BY 4.0, from the Unseenet project.
|