|
|
@@ -237,6 +237,50 @@ For example, you've bought a VPS from [Digital
|
|
237
|
237
|
Ocean](https://www.digitalocean.com/). Then it might be a good idea to
|
|
238
|
238
|
generate a secret for _digitalocean.com_ then.
|
|
239
|
239
|
|
|
|
240
|
+
|
|
|
241
|
+### Simple run mode
|
|
|
242
|
+
|
|
|
243
|
+mtg supports 2 modes: simple and normal. Simple mode allows starting
|
|
|
244
|
+proxy with a small subset of configuration options you usually want to
|
|
|
245
|
+modify. This is quite good for oneliners that you can copy-paste and do
|
|
|
246
|
+not bother about external files whatsoever.
|
|
|
247
|
+
|
|
|
248
|
+Let's take a look:
|
|
|
249
|
+
|
|
|
250
|
+```console
|
|
|
251
|
+Usage: mtg simple-run <bind-to> <secret>
|
|
|
252
|
+
|
|
|
253
|
+Run proxy without config file.
|
|
|
254
|
+
|
|
|
255
|
+Arguments:
|
|
|
256
|
+ <bind-to> A host:port to bind proxy to.
|
|
|
257
|
+ <secret> Proxy secret.
|
|
|
258
|
+
|
|
|
259
|
+Flags:
|
|
|
260
|
+ -h, --help Show context-sensitive help.
|
|
|
261
|
+ -v, --version Print version.
|
|
|
262
|
+
|
|
|
263
|
+ -d, --debug Run in debug mode.
|
|
|
264
|
+ -c, --concurrency=8192 Max number of concurrent connection to proxy.
|
|
|
265
|
+ -b, --tcp-buffer="4KB" Size of TCP buffer to use.
|
|
|
266
|
+ -i, --prefer-ip="prefer-ipv6" IP preference. By default we prefer IPv6 with fallback to IPv4.
|
|
|
267
|
+ -p, --domain-fronting-port=443 A port to access for domain fronting.
|
|
|
268
|
+ -n, --doh-ip=9.9.9.9 IP address of DNS-over-HTTP to use.
|
|
|
269
|
+ -t, --timeout=10s Network timeout to use
|
|
|
270
|
+ -a, --antireplay-cache-size="1MB" A size of anti-replay cache to use.
|
|
|
271
|
+```
|
|
|
272
|
+
|
|
|
273
|
+So, if you want to startup a proxy with CLI only, you can do something like
|
|
|
274
|
+
|
|
|
275
|
+```console
|
|
|
276
|
+$ mtg simple-run -n 1.1.1.1 -t 30s -a 512kib 127.0.0.1:3128 7hBO-dCS4EBzenlKbdLFxyNnb29nbGUuY29t
|
|
|
277
|
+```
|
|
|
278
|
+
|
|
|
279
|
+The rest of the configuration will be taken from default values. But
|
|
|
280
|
+a simple run is fine if you do not have any special requirements or
|
|
|
281
|
+granular tuning. If you want it, please checkout the configuration
|
|
|
282
|
+files.
|
|
|
283
|
+
|
|
240
|
284
|
### Prepare a configuration file
|
|
241
|
285
|
|
|
242
|
286
|
Please checkout an example configuration file. All options except of
|