|
|
|
|
|
|
130
|
echo dd$(head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' ')
|
130
|
echo dd$(head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' ')
|
|
131
|
```
|
131
|
```
|
|
132
|
|
132
|
|
|
|
|
133
|
+If you want to enforce the usage of secure mode, please pass `-s` or
|
|
|
|
134
|
+`--secure-only` flags. In that case, clients which do not use dd-secrets
|
|
|
|
135
|
+are going to be disconnected from the proxy.
|
|
|
|
136
|
+
|
|
|
|
137
|
+
|
|
133
|
## Environment variables
|
138
|
## Environment variables
|
|
134
|
|
139
|
|
|
135
|
It is possible to configure this tool using environment variables. You
|
140
|
It is possible to configure this tool using environment variables. You
|
|
|
|
|
|
|
156
|
| `MTG_STATSD_TAGS` | `--statsd-tags` | | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs. |
|
161
|
| `MTG_STATSD_TAGS` | `--statsd-tags` | | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs. |
|
|
157
|
| `MTG_BUFFER_WRITE` | `-w`, `--write-buffer` | `65536` | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram. |
|
162
|
| `MTG_BUFFER_WRITE` | `-w`, `--write-buffer` | `65536` | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram. |
|
|
158
|
| `MTG_BUFFER_READ` | `-r`, `--read-buffer` | `131072` | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client. |
|
163
|
| `MTG_BUFFER_READ` | `-r`, `--read-buffer` | `131072` | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client. |
|
|
|
|
164
|
+| `MTG_SECURE_ONLY` | `-s`, `--secure-only` | `false` | Support only clients with secure mode (i.e only clients with dd-secrets). |
|
|
159
|
|
165
|
|
|
160
|
Usually you want to modify only read/write buffer sizes. If you feel
|
166
|
Usually you want to modify only read/write buffer sizes. If you feel
|
|
161
|
that proxy is slow, try to increase both sizes giving more priority to
|
167
|
that proxy is slow, try to increase both sizes giving more priority to
|