Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: magic-wormhole-mailbox-server
3 Version: 0.5.1
4 Summary: Securely transfer data between computers
5 Home-page: https://github.com/warner/magic-wormhole-mailbox-server
6 Author: Brian Warner
7 Author-email: [email protected]
8 License: MIT
9 Classifier: Development Status :: 4 - Beta
10 Classifier: Environment :: Console
11 Classifier: License :: OSI Approved :: MIT License
12 Classifier: Topic :: Security :: Cryptography
13 Classifier: Topic :: System :: Networking
14 Classifier: Topic :: System :: Systems Administration
15 Classifier: Topic :: Utilities
16 Description-Content-Type: text/markdown
17 Provides-Extra: dev
18 Provides-Extra: release
19 License-File: LICENSE
20
21 # Magic Wormhole Mailbox Server
22 [![PyPI](http://img.shields.io/pypi/v/magic-wormhole-mailbox-server.svg)](https://pypi.python.org/pypi/magic-wormhole-mailbox-server)
23 ![Tests](https://github.com/magic-wormhole/magic-wormhole-transit-relay/workflows/Tests/badge.svg)
24 [![codecov.io](https://codecov.io/github/magic-wormhole/magic-wormhole-transit-relay/coverage.svg?branch=master)](https://codecov.io/github/magic-wormhole/magic-wormhole-transit-relay?branch=master)
25
26 This repository holds the code for the main server that
27 [Magic-Wormhole](http://magic-wormhole.io) clients connect to. The server
28 performs store-and-forward delivery for small key-exchange and control
29 messages. Bulk data is sent over a direct TCP connection, or through a
30 [transit-relay](https://github.com/magic-wormhole/magic-wormhole-transit-relay).
31
32 Clients connect with WebSockets, for low-latency delivery in the happy case
33 where both clients are attached at the same time. Message are stored to
34 enable non-simultaneous clients to make forward progress. The server uses a
35 small SQLite database for persistence (and clients will reconnect
36 automatically, allowing the server to be rebooted without losing state). An
37 optional "usage DB" tracks historical activity for status monitoring and
38 operational maintenance.
39
40 ## Installation
41
42 ```
43 pip install magic-wormhole-mailbox-server
44 ```
45
46 You either want to do this into a "user" environment (putting the ``twist``
47 and ``twistd`` executables in ``~/.local/bin/``) like this:
48
49 ```
50 pip install --user magic-wormhole-mailbox-server
51 ```
52
53 or put it into a virtualenv, to avoid modifying the system python's
54 libraries, like this:
55
56 ```
57 virtualenv venv
58 source venv/bin/activate
59 pip install magic-wormhole-mailbox-server
60 ```
61
62 You probably *don't* want to use ``sudo`` when you run ``pip``, since the
63 dependencies that get installed may conflict with other python programs on
64 your computer. ``pipsi`` is usually a good way to install into isolated
65 environments, but unfortunately it doesn't work for
66 magic-wormhole-mailbox-server, because we don't have a dedicated command to
67 start the server (``twist``, described below, comes from the ``twisted``
68 package, and pipsi doesn't expose executables from dependencies).
69
70 For the installation from source, ``clone`` this repo, ``cd`` into the folder,
71 create and activate a virtualenv, and run ``pip install .``.
72
73 ## Running A Server
74
75 Note that the standard [Magic-Wormhole](http://magic-wormhole.io)
76 command-line tool is preconfigured to use a mailbox server hosted by the
77 project, so running your own server is only necessary for custom applications
78 that use magic-wormhole as a library.
79
80 The mailbox server is deployed as a twist/twistd plugin. Running a basic
81 server looks like this:
82
83 ```
84 twist wormhole-mailbox --usage-db=usage.sqlite
85 ```
86
87 Use ``twist wormhole-mailbox --help`` for more details.
88
89 If you use the default ``--port=tcp:4000``, on a machine named
90 ``example.com``, then clients can reach your server with the following
91 option:
92
93 ```
94 wormhole --relay-url=ws://example.com:4000/v1 send FILENAME
95 ```
96
97 ## Using Docker
98
99 Dockerfile content:
100 ```dockerfile
101 FROM python:3.8
102 RUN pip install magic-wormhole-mailbox-server
103 CMD [ "twist", "wormhole-mailbox","--usage-db=usage.sqlite" ]
104 ```
105 > Note: This will be running as root, you should adjust it to be in user space for production.
106
107 Build and run:
108 ```shell
109 docker build -t magicwormhole Dockerfile
110 docker run -p 4000:4000 -d magicwormhole
111 ```
112
113 Connect:
114 ```shell
115 wormhole --relay-url=ws://localhost:4000/v1 send FILENAME
116 ```
117
118 ## License, Compatibility
119
120 This library is released under the MIT license, see LICENSE for details.
121
122 This library is compatible with python2.7, and python3 (3.5 and higher).