Bläddra i källkod

Decrease defaults

tags/v1.0.4^2
9seconds 6 år sedan
förälder
incheckning
91726d461f
2 ändrade filer med 7 tillägg och 4 borttagningar
  1. 5
    2
      README.md
  2. 2
    2
      main.go

+ 5
- 2
README.md Visa fil

@@ -194,11 +194,14 @@ supported environment variables:
194 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 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 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 199
 | `MTG_ANTIREPLAY_MAXSIZE`      | `--anti-replay-max-size`     | `128MB`                           | Max size of antireplay cache.                                                                                                                                                                                                                                                   |
200 200
 | `MTG_CLOAK_PORT`              | `--cloak-port`               | `443`                             | Which port we should use to connect to cloaked host in FakeTLS mode.                                                                                                                                                                                                            |
201 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 206
 Usually you want to modify only read/write buffer sizes. If you feel
204 207
 that proxy is slow, try to increase both sizes giving more priority to

+ 2
- 2
main.go Visa fil

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

Laddar…
Avbryt
Spara