Переглянути джерело

Merge pull request #365 from 9seconds/best-practices

Add document about best practices
tags/v2.2.0^2^2
Sergei Arkhipov 1 місяць тому
джерело
коміт
4167dec5e1
Аккаунт користувача з таким Email не знайдено
2 змінених файлів з 51 додано та 0 видалено
  1. 1
    0
      .goreleaser.yml
  2. 50
    0
      BEST_PRACTICES.md

+ 1
- 0
.goreleaser.yml Переглянути файл

@@ -54,6 +54,7 @@ archives:
54 54
       - LICENSE
55 55
       - README.md
56 56
       - SECURITY.md
57
+      - BEST_PRACTICES.md
57 58
       - example.config.toml
58 59
 
59 60
 gomod:

+ 50
- 0
BEST_PRACTICES.md Переглянути файл

@@ -0,0 +1,50 @@
1
+# Best practices
2
+
3
+This is unfortunate, but since 2018 many things were changed. Most of them
4
+became way worse. Previous iterations of censorship systems were very dumb,
5
+DPI were primitive and filtered very obvious things. Nowadays they are
6
+way more intelligent and it is very naive to treat them frivolously.
7
+
8
+In 2026 is not enough to pretend that your mtg installation is a Microsoft
9
+website that sits in Amsterdam Digital Ocean location. Now your installation
10
+has to be a website that is mtg in disguise. Yes, it requires a bit more effort
11
+but this effort is probably less than rotating proxies each other day.
12
+
13
+mtproto traffic, even with FakeTLS, has its specifics that are probably
14
+very well known by DPI systems. These specifics are not something unique but
15
+could mark an IP address as suspicious. Now let's think:
16
+
17
+1. You have a proxy in Amsterdam Digital Ocean that tells it is microsoft.com
18
+   how hard could it be to find out that this is probably fake? 1 or probably 2
19
+   DNS queries for `microsoft.com`? In case of some CDN, there are ECS-powered
20
+   resolvers that are very capable to return results from POV of some subnets.
21
+   If censor sees no relevant results, will they be afraid to block IP?
22
+2. You have a proxy in Amsterdam Digital Ocean that tells it is a website from
23
+   the same public subnet. But not the same. Would it be hard to make these DNS
24
+   queries and ban IP?
25
+
26
+The correct way of having this proxy is following:
27
+
28
+1. Register a domain name
29
+2. Get some VPS, probably in your domestic location
30
+3. Set that domain name from a step 1 to IP address of that VPS
31
+4. Generate a couple of HTML pages by LLMs or even copy them from elsewhere
32
+5. Set some webserver and issue TLS certificates with Let's Encrypt or any other
33
+   name
34
+6. Set mtg before this webserver.
35
+7. Use sing-box or anything like that to provide local socks5 interface and
36
+   have VPNized uplinks
37
+8. Set up mtg to use socks5 from a 7 step.
38
+
39
+In that case you will get a match of DNS and SNI in requests. As a side effect,
40
+your proxy will work with XTLS and its friends: XTLS in sniff mode ignores
41
+IP address a client wants to connect to. Instead, it reads SNI and connect
42
+to resolved address: a clever idea if user does not have a trustworthy DNS
43
+set up.
44
+
45
+Yes, this is much longer that usual technique, and requires more effort. But
46
+this is could probably be very well automated to some reasonable extent.
47
+
48
+Unfortunately, this is a best practice right now.
49
+
50
+_March 2026._

Завантаження…
Відмінити
Зберегти