mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 22:44:21 +01:00
Added tools section
This commit is contained in:
116
tools/hypershell.md
Normal file
116
tools/hypershell.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Hypershell
|
||||
|
||||
A command-line interface for generating and connecting to peer-to-peer, end-to-end encrypted shells.
|
||||
|
||||
>[Github (Hypershell)](https://github.com/holepunchto/hypershell)
|
||||
|
||||
* [Installation](hypershell.md#installation)
|
||||
* [Basic usage](hypershell.md#basic-usage)
|
||||
|
||||
### Installation
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```bash
|
||||
npm install -g hypershell
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
|
||||
**Create a P2P shell server.**
|
||||
|
||||
```bash
|
||||
hypershell-server [options]
|
||||
```
|
||||
|
||||
`options` include:
|
||||
|
||||
| Options | Description | Default |
|
||||
| --------------------------- | --------------------------------- | -------------------------------- |
|
||||
| **`-f <filename>`** | Filename of the server seed key. | `~/.hypershell/peer` |
|
||||
| **`--firewall <filename>`** | List of allowed public keys. | `~/.hypershell/authorized_peers` |
|
||||
|
||||
**Connect to a P2P shell.**
|
||||
|
||||
```bash
|
||||
hypershell [options] <server public key>
|
||||
```
|
||||
|
||||
`options` include:
|
||||
|
||||
| Options | Description | Default |
|
||||
| ------------------- | --------------------------------- | -------------------- |
|
||||
| **`-f <filename>`** | Filename of the client seed key. | `~/.hypershell/peer` |
|
||||
|
||||
**Create keys of type ed25519 for use by the holepunch-protocol.**
|
||||
|
||||
```bash
|
||||
hypershell-keygen [options]
|
||||
```
|
||||
|
||||
`options` include:
|
||||
|
||||
| Options | Description |
|
||||
| ------------------- | ------------------------------ |
|
||||
| **`-f <filename>`** | Filename of the seed key file. |
|
||||
| **`-c <comment>`** | Provides a new comment. |
|
||||
|
||||
### Setup
|
||||
|
||||
First, create a key with the default filename:
|
||||
|
||||
```bash
|
||||
hypershell-keygen
|
||||
```
|
||||
|
||||
**Client**
|
||||
|
||||
Now, you can connect to servers (provided they allow your public key):
|
||||
|
||||
```bash
|
||||
hypershell <server public key>
|
||||
```
|
||||
|
||||
**Server**
|
||||
|
||||
To create a server:
|
||||
|
||||
```bash
|
||||
hypershell-server
|
||||
```
|
||||
|
||||
`~/.hypershell/firewall` will be automatically created as an empty file. That means all connections are denied by default.
|
||||
|
||||
> You can allow public keys in real time by adding them to the firewall list.
|
||||
|
||||
### Known peers
|
||||
|
||||
There will be a file named `~/.hypershell/known_peers`.
|
||||
|
||||
Add named peers to the file, for example:
|
||||
|
||||
```bash
|
||||
# <name> <public key>
|
||||
home cdb7b7774c3d90547ce2038b51367dc4c96c42abf7c2e794bb5eb036ec7793cd
|
||||
```
|
||||
|
||||
Utilize `hypershell home` to eliminate the need for constantly providing the full public key.
|
||||
|
||||
### Multiple keys
|
||||
|
||||
To have multiple servers, you need multiple keys.
|
||||
|
||||
Generate another key:
|
||||
|
||||
```bash
|
||||
hypershell-keygen -f ~/.hypershell/my-server
|
||||
```
|
||||
|
||||
Create a new shell server:
|
||||
|
||||
|
||||
```bash
|
||||
hypershell-server -f ~/.hypershell/my-server --firewall ~/.hypershell/my-server-firewall
|
||||
```
|
||||
|
||||
The client also accepts `-f` if required.
|
||||
Reference in New Issue
Block a user