mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 21:22:31 +00:00
Created Protocol Encryption Configuration (markdown)
@@ -0,0 +1,68 @@
|
||||
Overview of Commands
|
||||
--------------------
|
||||
|
||||
The encryption policy applies separately to handshake and (full) message stream behavior, and applies the same policy to both incoming and outgoing connections.
|
||||
|
||||
| Command | Description |
|
||||
| :--- | :--- |
|
||||
| `protocol.encryption` | Returns the current handshake and stream encryption settings. |
|
||||
| `protocol.encryption.set` | Configures global encryption policies using legacy or unified strings. |
|
||||
| `protocol.encryption.handshake` | Returns the current handshake encryption settings. |
|
||||
| `protocol.encryption.stream` | Returns the current handshake encryption settings. |
|
||||
|
||||
---
|
||||
|
||||
## Configuration Methods
|
||||
|
||||
You can configure encryption in rTorrent using either a **unified command** or by configuring the **handshake and stream behaviors individually**.
|
||||
|
||||
Default is `allow`, which defaults to plaintext while allowing encrypted handshake and message stream
|
||||
|
||||
```libtorrent
|
||||
protocol.encryption.set = <policy>
|
||||
```
|
||||
|
||||
*Or with explicit sub-settings:*
|
||||
|
||||
```libtorrent
|
||||
protocol.encryption.set = handshake_<policy>, stream_<policy>
|
||||
```
|
||||
|
||||
|
||||
#### Available Policies
|
||||
|
||||
* **`deny`**: Disables encryption.
|
||||
* **`allow`**: Allows encrypted connections if initiated by the peer, but prefers unencrypted.
|
||||
* **`prefer`**: Attempts to use encryption by default, but falls back to unencrypted if the peer does not support it.
|
||||
* **`require`**: Forcefully requires encryption. Connections with peers that do not support encryption will be dropped.
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
Add these to your `~/.rtorrent.rc` configuration file.
|
||||
|
||||
### Example 1: Standard Encryption (Highly Compatible)
|
||||
|
||||
This configuration prefers encryption for both handshakes and data streams, but will fall back to plaintext to maintain high peer availability.
|
||||
|
||||
```libtorrent
|
||||
protocol.encryption.set = prefer
|
||||
```
|
||||
|
||||
### Example 2: Strict/Forced Encryption
|
||||
|
||||
This configuration completely disables unencrypted traffic. It will block all incoming and outgoing connections that do not support encryption.
|
||||
|
||||
```libtorrent
|
||||
protocol.encryption.set = require
|
||||
```
|
||||
|
||||
### Example 3: Mixed/Asymmetric Setup
|
||||
|
||||
In this setup, you require an encrypted handshake to establish the connection, but allow the actual message stream to fall back to unencrypted if necessary.
|
||||
|
||||
```libtorrent
|
||||
protocol.encryption.set = handshake_require, stream_prefer
|
||||
```
|
||||
Reference in New Issue
Block a user