Просмотр исходного кода

Decrease defaults

tags/v1.0.4^2
9seconds 6 лет назад
Родитель
Сommit
91726d461f
2 измененных файлов: 7 добавлений и 4 удалений
  1. 5
    2
      README.md
  2. 2
    2
      main.go

+ 5
- 2
README.md Просмотреть файл

194
 | `MTG_STATSD_PREFIX`           | `--statsd-prefix`            | `mtg`                             | Which bucket prefix we should use. For example, if you set `mtg`, then metric `traffic.ingress` would be send as `mtg.traffic.ingress`.                                                                                                                                         |
194
 | `MTG_STATSD_PREFIX`           | `--statsd-prefix`            | `mtg`                             | Which bucket prefix we should use. For example, if you set `mtg`, then metric `traffic.ingress` would be send as `mtg.traffic.ingress`.                                                                                                                                         |
195
 | `MTG_STATSD_TAGS_FORMAT`      | `--statsd-tags-format`       |                                   | Which tags format we should use. By default, we are using default vanilla statsd tags format but if you want to send directly to InfluxDB or Datadog, please specify it there. Possible options are `influxdb` and `datadog`.                                                   |
195
 | `MTG_STATSD_TAGS_FORMAT`      | `--statsd-tags-format`       |                                   | Which tags format we should use. By default, we are using default vanilla statsd tags format but if you want to send directly to InfluxDB or Datadog, please specify it there. Possible options are `influxdb` and `datadog`.                                                   |
196
 | `MTG_STATSD_TAGS`             | `--statsd-tags`              |                                   | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs.                                                                                                                                                                                 |
196
 | `MTG_STATSD_TAGS`             | `--statsd-tags`              |                                   | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs.                                                                                                                                                                                 |
197
-| `MTG_BUFFER_WRITE`            | `-w`, `--write-buffer`       | `64KB`                           | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram.                                                                                                                                                         |
198
-| `MTG_BUFFER_READ`             | `-r`, `--read-buffer`        | `128KB`                          | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client.                                                                                                                                                                           |
197
+| `MTG_BUFFER_WRITE`            | `-w`, `--write-buffer`       | `24KB`                            | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram.                                                                                                                                                         |
198
+| `MTG_BUFFER_READ`             | `-r`, `--read-buffer`        | `24KB`                            | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client.                                                                                                                                                                           |
199
 | `MTG_ANTIREPLAY_MAXSIZE`      | `--anti-replay-max-size`     | `128MB`                           | Max size of antireplay cache.                                                                                                                                                                                                                                                   |
199
 | `MTG_ANTIREPLAY_MAXSIZE`      | `--anti-replay-max-size`     | `128MB`                           | Max size of antireplay cache.                                                                                                                                                                                                                                                   |
200
 | `MTG_CLOAK_PORT`              | `--cloak-port`               | `443`                             | Which port we should use to connect to cloaked host in FakeTLS mode.                                                                                                                                                                                                            |
200
 | `MTG_CLOAK_PORT`              | `--cloak-port`               | `443`                             | Which port we should use to connect to cloaked host in FakeTLS mode.                                                                                                                                                                                                            |
201
 | `MTG_MULTIPLEX_PERCONNECTION` | `--multiplex-per-connection` | `50`                              | How many client connections can share a single Telegram connection in adtag mode                                                                                                                                                                                                |
201
 | `MTG_MULTIPLEX_PERCONNECTION` | `--multiplex-per-connection` | `50`                              | How many client connections can share a single Telegram connection in adtag mode                                                                                                                                                                                                |
202
+| `MTG_NTP_SERVERS`             | `--ntp-server`               | default pool                      | A list of NTP servers to use.                                                                                                                                                                                                                                                   |
203
+| `MTG_PREFER_DIRECT_IP`        | `--prefer-ip`                | `ipv6`                            | Which IP protocol to prefer if possible. Works mostly in direct mode.                                                                                                                                                                                                           |
204
+
202
 
205
 
203
 Usually you want to modify only read/write buffer sizes. If you feel
206
 Usually you want to modify only read/write buffer sizes. If you feel
204
 that proxy is slow, try to increase both sizes giving more priority to
207
 that proxy is slow, try to increase both sizes giving more priority to

+ 2
- 2
main.go Просмотреть файл

92
 		"Write buffer size. You can think about it as a buffer from client to Telegram.").
92
 		"Write buffer size. You can think about it as a buffer from client to Telegram.").
93
 		Short('w').
93
 		Short('w').
94
 		Envar("MTG_BUFFER_WRITE").
94
 		Envar("MTG_BUFFER_WRITE").
95
-		Default("64KB").
95
+		Default("24KB").
96
 		Bytes()
96
 		Bytes()
97
 	runReadBufferSize = runCommand.Flag("read-buffer",
97
 	runReadBufferSize = runCommand.Flag("read-buffer",
98
 		"Read buffer size. You can think about it as a buffer from Telegram to client.").
98
 		"Read buffer size. You can think about it as a buffer from Telegram to client.").
99
 		Short('r').
99
 		Short('r').
100
 		Envar("MTG_BUFFER_READ").
100
 		Envar("MTG_BUFFER_READ").
101
-		Default("128KB").
101
+		Default("24KB").
102
 		Bytes()
102
 		Bytes()
103
 	runTLSCloakPort = runCommand.Flag("cloak-port",
103
 	runTLSCloakPort = runCommand.Flag("cloak-port",
104
 		"Port which should be used for host cloaking.").
104
 		"Port which should be used for host cloaking.").

Загрузка…
Отмена
Сохранить