|
|
@@ -51,40 +51,26 @@ cloak-port = 443
|
|
51
|
51
|
# Pass filepath here or '-' if you want to dump into stdout.
|
|
52
|
52
|
access-file = "-"
|
|
53
|
53
|
|
|
54
|
|
-# FakeTLS can compare timestamps to prevent probes. Each message has
|
|
55
|
|
-# encrypted timestamp. So, mtg can compare this timestamp and decide if
|
|
56
|
|
-# we need to proceed with connection or not.
|
|
|
54
|
+# network defines different network-related settings
|
|
|
55
|
+[network]
|
|
|
56
|
+# please be aware that mtg needs to do some external requests. For
|
|
|
57
|
+# example, if you do not pass public ips, it will request your public ip
|
|
|
58
|
+# address from some external service.
|
|
57
|
59
|
#
|
|
58
|
|
-# Please ensure that you have some ntp active on this host. Otherwise,
|
|
59
|
|
-# you can endup with badly performing proxy.
|
|
60
|
|
-[probes.time]
|
|
61
|
|
-# You can enable/disable that. A good idea is always enable.
|
|
62
|
|
-enabled = true
|
|
63
|
|
-# Time can be skewed by many reasons. So, this is a time interval
|
|
64
|
|
-# when message is cosidered as a good one.
|
|
65
|
|
-allow-skewness = "5s"
|
|
66
|
|
-
|
|
67
|
|
-# Some countries do active probing on Telegram connections. This technique
|
|
68
|
|
-# allows to protect from such effort.
|
|
|
60
|
+# As for 2.0, if you set a public-ip on your own, mtg won't issue any
|
|
|
61
|
+# network requests except of those required for Telegram.
|
|
69
|
62
|
#
|
|
70
|
|
-# mtg has a cache of some connection fingerprints. Actually, first bytes
|
|
71
|
|
-# of each connection. So, it stores them in some in-memory LRU+TTL cache.
|
|
72
|
|
-# You can configure this cache here.
|
|
73
|
|
-[probes.anti-replay]
|
|
74
|
|
-# You can enable/disable this feature.
|
|
75
|
|
-enabled = true
|
|
76
|
|
-# max size of such a cache. Please be aware that this number is
|
|
77
|
|
-# approximate we try hard to store data quite dense but it is possible
|
|
78
|
|
-# that we can go over this limit for 10-20% under some conditions and
|
|
79
|
|
-# architectures.
|
|
80
|
|
-max-size = "16mb"
|
|
81
|
|
-# TTL for each cache record.
|
|
82
|
|
-ttl = "8h"
|
|
|
63
|
+# so, in order of doing them, it needs to do DNS lookup. mtg ignores DNS
|
|
|
64
|
+# resolver of the operating system and uses DOH instead. This is a host
|
|
|
65
|
+# it has to access.
|
|
|
66
|
+#
|
|
|
67
|
+# By default we use Quad9.
|
|
|
68
|
+doh-hostname = "9.9.9.9"
|
|
83
|
69
|
|
|
84
|
70
|
# public ip addresses of the server. Actually, it is required only to
|
|
85
|
71
|
# generate a correct access file. if you use default values here, mtg
|
|
86
|
72
|
# will try to resolve these IPs on its own.
|
|
87
|
|
-[public-ip]
|
|
|
73
|
+[network.public-ip]
|
|
88
|
74
|
ipv4 = ""
|
|
89
|
75
|
ipv6 = ""
|
|
90
|
76
|
|
|
|
@@ -109,10 +95,40 @@ ipv6 = ""
|
|
109
|
95
|
# ignored.
|
|
110
|
96
|
#
|
|
111
|
97
|
# If telegram dialer is not defined, a default one is going to be used.
|
|
112
|
|
-[dialers]
|
|
|
98
|
+[network.dialers]
|
|
113
|
99
|
telegram = ""
|
|
114
|
100
|
default = ""
|
|
115
|
101
|
|
|
|
102
|
+# FakeTLS can compare timestamps to prevent probes. Each message has
|
|
|
103
|
+# encrypted timestamp. So, mtg can compare this timestamp and decide if
|
|
|
104
|
+# we need to proceed with connection or not.
|
|
|
105
|
+#
|
|
|
106
|
+# Please ensure that you have some ntp active on this host. Otherwise,
|
|
|
107
|
+# you can endup with badly performing proxy.
|
|
|
108
|
+[probes.time]
|
|
|
109
|
+# You can enable/disable that. A good idea is always enable.
|
|
|
110
|
+enabled = true
|
|
|
111
|
+# Time can be skewed by many reasons. So, this is a time interval
|
|
|
112
|
+# when message is cosidered as a good one.
|
|
|
113
|
+allow-skewness = "5s"
|
|
|
114
|
+
|
|
|
115
|
+# Some countries do active probing on Telegram connections. This technique
|
|
|
116
|
+# allows to protect from such effort.
|
|
|
117
|
+#
|
|
|
118
|
+# mtg has a cache of some connection fingerprints. Actually, first bytes
|
|
|
119
|
+# of each connection. So, it stores them in some in-memory LRU+TTL cache.
|
|
|
120
|
+# You can configure this cache here.
|
|
|
121
|
+[probes.anti-replay]
|
|
|
122
|
+# You can enable/disable this feature.
|
|
|
123
|
+enabled = true
|
|
|
124
|
+# max size of such a cache. Please be aware that this number is
|
|
|
125
|
+# approximate we try hard to store data quite dense but it is possible
|
|
|
126
|
+# that we can go over this limit for 10-20% under some conditions and
|
|
|
127
|
+# architectures.
|
|
|
128
|
+max-size = "16mb"
|
|
|
129
|
+# TTL for each cache record.
|
|
|
130
|
+ttl = "8h"
|
|
|
131
|
+
|
|
116
|
132
|
# statsd statistics integration.
|
|
117
|
133
|
[stats.statsd]
|
|
118
|
134
|
# enabled/disabled
|