|
|
@@ -91,20 +91,55 @@ or
|
|
91
|
91
|
$ head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' '
|
|
92
|
92
|
```
|
|
93
|
93
|
|
|
|
94
|
+## Secure mode
|
|
|
95
|
+
|
|
|
96
|
+If you want to support new secure mode, please prepend `dd` to the
|
|
|
97
|
+secret. For example, secret `cf18fa8ea0267057e2c61a5f7322a8e7` should
|
|
|
98
|
+be `ddcf18fa8ea0267057e2c61a5f7322a8e7`. But pay attention that some
|
|
|
99
|
+old clients won't support this mode. If this is not your case, I would
|
|
|
100
|
+suggest to go with this mode.
|
|
|
101
|
+
|
|
|
102
|
+Oneliners to generate such secrets:
|
|
|
103
|
+
|
|
|
104
|
+```console
|
|
|
105
|
+$ echo dd$(openssl rand -hex 16)
|
|
|
106
|
+```
|
|
|
107
|
+
|
|
|
108
|
+or
|
|
|
109
|
+
|
|
|
110
|
+```console
|
|
|
111
|
+$ echo dd$(head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' ')
|
|
|
112
|
+```
|
|
|
113
|
+
|
|
|
114
|
+
|
|
|
115
|
+# How to run the tool
|
|
|
116
|
+
|
|
94
|
117
|
Now run the tool:
|
|
95
|
118
|
|
|
96
|
119
|
```console
|
|
97
|
120
|
$ mtg <secret>
|
|
98
|
121
|
```
|
|
99
|
122
|
|
|
|
123
|
+How to run the tool with ADTag:
|
|
|
124
|
+
|
|
|
125
|
+```console
|
|
|
126
|
+$ mtg <secret> <adtag>
|
|
|
127
|
+```
|
|
|
128
|
+
|
|
100
|
129
|
This tool will listen on port 3128 by default with the given secret.
|
|
101
|
130
|
|
|
102
|
131
|
# One-line runner
|
|
103
|
132
|
|
|
104
|
|
-```
|
|
|
133
|
+```console
|
|
105
|
134
|
$ docker run --name mtg --restart=unless-stopped -p 3128:3128 -p 3129:3129 -d nineseconds/mtg $(openssl rand -hex 16)
|
|
106
|
135
|
```
|
|
107
|
136
|
|
|
|
137
|
+or in secret mode:
|
|
|
138
|
+
|
|
|
139
|
+```console
|
|
|
140
|
+$ docker run --name mtg --restart=unless-stopped -p 3128:3128 -p 3129:3129 -d nineseconds/mtg dd$(openssl rand -hex 16)
|
|
|
141
|
+```
|
|
|
142
|
+
|
|
108
|
143
|
You will have this tool up and running on port 3128. Now curl
|
|
109
|
144
|
`localhost:3129` to get `tg://` links or do `docker logs mtg`. Also,
|
|
110
|
145
|
port 3129 will show you some statistics if you are interested in.
|