|
|
@@ -36,13 +36,6 @@ bind-to = "0.0.0.0:3128"
|
|
36
|
36
|
# All other incoming connections are going to be dropped.
|
|
37
|
37
|
concurrency = 8192
|
|
38
|
38
|
|
|
39
|
|
-# A size of user-space buffer for TCP to use. Since we do 2 connections,
|
|
40
|
|
-# then we have tcp-buffer * (4 + 2) per each connection: read/write for
|
|
41
|
|
-# each connection + 2 copy buffers to pump the data between sockets.
|
|
42
|
|
-#
|
|
43
|
|
-# Deprecated: this setting is no longer makes any effect.
|
|
44
|
|
-# tcp-buffer = "4kb"
|
|
45
|
|
-
|
|
46
|
39
|
# Sometimes you want to enforce mtg to use some types of
|
|
47
|
40
|
# IP connectivity to Telegram. We have 4 modes:
|
|
48
|
41
|
# - prefer-ipv6:
|
|
|
@@ -57,7 +50,10 @@ prefer-ip = "prefer-ipv6"
|
|
57
|
50
|
|
|
58
|
51
|
# FakeTLS uses domain fronting protection. So it needs to know a port to
|
|
59
|
52
|
# access.
|
|
60
|
|
-domain-fronting-port = 443
|
|
|
53
|
+#
|
|
|
54
|
+# Deprecated: use [domain-fronting] configuration block. If relevant option
|
|
|
55
|
+# is defined there, this one would be ignored.
|
|
|
56
|
+# domain-fronting-port = 443
|
|
61
|
57
|
|
|
62
|
58
|
# By default, mtg resolves the fronting hostname (from the secret) via DNS
|
|
63
|
59
|
# to establish a TCP connection. If DNS resolution of that hostname is blocked,
|
|
|
@@ -65,11 +61,17 @@ domain-fronting-port = 443
|
|
65
|
61
|
# used for SNI in the TLS handshake.
|
|
66
|
62
|
#
|
|
67
|
63
|
# default value is not set (DNS resolution is used).
|
|
68
|
|
-# domain-fronting-ip = "142.250.185.112"
|
|
|
64
|
+#
|
|
|
65
|
+# Deprecated: use [domain-fronting] configuration block. If relevant option
|
|
|
66
|
+# is defined there, this one would be ignored.
|
|
|
67
|
+# domain-fronting-ip = "10.0.0.10"
|
|
69
|
68
|
|
|
70
|
69
|
# This makes a communication between both fronting website and mtg to use
|
|
71
|
70
|
# proxy protocol.
|
|
72
|
|
-domain-fronting-proxy-protocol = false
|
|
|
71
|
+#
|
|
|
72
|
+# Deprecated: use [domain-fronting] configuration block. If relevant option
|
|
|
73
|
+# is defined there, this one would be ignored.
|
|
|
74
|
+# domain-fronting-proxy-protocol = false
|
|
73
|
75
|
|
|
74
|
76
|
# FakeTLS can compare timestamps to prevent probes. Each message has
|
|
75
|
77
|
# encrypted timestamp. So, mtg can compare this timestamp and decide if
|
|
|
@@ -92,6 +94,27 @@ tolerate-time-skewness = "5s"
|
|
92
|
94
|
# Otherwise, chose a new DC.
|
|
93
|
95
|
allow-fallback-on-unknown-dc = false
|
|
94
|
96
|
|
|
|
97
|
+# This section is relevant to communication with fronting domain. Usually
|
|
|
98
|
+# you do not need to setup anything here but there are plenty of cases, especially
|
|
|
99
|
+# if you put mtg behind load balancer, when some specific configuration is
|
|
|
100
|
+# required.
|
|
|
101
|
+[domain-fronting]
|
|
|
102
|
+# By default, mtg resolves the fronting hostname (from the secret) via DNS
|
|
|
103
|
+# to establish a TCP connection. If DNS resolution of that hostname is blocked,
|
|
|
104
|
+# you can specify an IP address to connect to directly. The hostname is still
|
|
|
105
|
+# used for SNI in the TLS handshake.
|
|
|
106
|
+#
|
|
|
107
|
+# default value is not set (DNS resolution is used).
|
|
|
108
|
+# ip = "10.10.10.11"
|
|
|
109
|
+
|
|
|
110
|
+# FakeTLS uses domain fronting protection. So it needs to know a port to
|
|
|
111
|
+# access. Default value is 443
|
|
|
112
|
+# port = 443
|
|
|
113
|
+
|
|
|
114
|
+# This makes a communication between both fronting website and mtg to use
|
|
|
115
|
+# proxy protocol.
|
|
|
116
|
+# proxy-protocol = false
|
|
|
117
|
+
|
|
95
|
118
|
# network defines different network-related settings
|
|
96
|
119
|
[network]
|
|
97
|
120
|
# please be aware that mtg needs to do some external requests. For
|