Skip to content

Commit f8ccfd9

Browse files
authored
Update README (#49)
* Rename README_EN * Fix some markdownlint warnings * Change multi language support style * Fix some typo in Chinese translation * Fix README translation anchor links typo * Update README translation and fix some typo * Fix README translation anchor color * Fix README_EN typo
1 parent 5af29df commit f8ccfd9

File tree

3 files changed

+195
-120
lines changed

3 files changed

+195
-120
lines changed

README-en.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
1+
<div align="right">
2+
<a title="简体中文" href="README.md"><img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="简体中文" /></a>
3+
<a title="English" href="README_EN.md"><img src="https://img.shields.io/badge/-English-545759?style=for-the-badge" alt="English"></a>
4+
</div>
5+
16
# mtproxy
27

38
这是一个一键安装 MTProxy 代理的绿色脚本,脚本可以在官方版本的 MTProxy 程序和兼容性最强的第三方作者开发的 mtg 程序中进行选择静态安装或者编译,该版本默认支持 Fake TLS 以及 AdTag 配置。
49

5-
在此基础上,提供了 Nginx 作为前端转发,MTProxy 作为后端代理的方式以实现安全的伪装并且在 nginx 转发层进行配置了 IP 白名单,只有通过白名单认证过的 IP 才可以进行访问,此功能提供了 Docker 镜像以便开箱即用
10+
在此基础上,提供了 Nginx 作为前端转发,MTProxy 作为后端代理的方式以实现安全的伪装并且在 Nginx 转发层进行配置了 IP 白名单,只有通过白名单认证过的 IP 才可以进行访问。
611

7-
[English](README-en.md)
12+
> 此功能提供了 Docker 镜像以便开箱即用。
813
914
## 交流群组
1015

11-
Telegram 群组:https://t.me/EllerHK
16+
Telegram 群组:<https://t.me/EllerHK>
1217

1318
## 安装方式
1419

1520
提供了两种安装方式可供选择:
1621

17-
- 使用脚本
22+
- 使用脚本
1823

1924
选择该方式一般是你在宿主机中进行直接安装或者编译,会或多或少需要安装一些系统基础依赖库。
2025

2126
- 使用 Docker
2227

23-
**小白建议使用 Docker!** 不会对宿主机造成污染,如果你需要修改一些配置文件,需要你稍微学习一些基础Docker 使用技术。
28+
**小白建议使用 Docker!** 不会对宿主机造成污染,如果你需要修改一些配置文件,需要你稍微学习一些基础 Docker 使用技术。
2429

2530
### 使用脚本
2631

27-
> 如果你反复遇到段错误或者其他未知问题, 建议更换为 Debian 9+ 以上的系统或采用 Docker 方式运行.
32+
> 如果你反复遇到错误或者其他未知问题, 建议更换为 Debian 9+ 以上的系统或采用 Docker 方式运行
2833
2934
执行如下代码进行安装
3035

@@ -36,17 +41,13 @@ bash mtproxy.sh
3641

3742
![mtproxy.sh](https://raw.githubusercontent.com/ellermister/mtproxy/master/mtproxy.jpg)
3843

39-
### 使用Docker | 白名单 MTProxy Docker 镜像
40-
41-
The image integrates nginx and mtproxy+tls to disguise traffic, and uses a whitelist mode to deal with firewall detection.
44+
### 使用 Docker | 白名单 MTProxy Docker 镜像
4245

4346
该镜像集成了 nginx、mtproxy+tls 实现对流量的伪装,并采用**白名单**模式来应对防火墙的检测。
4447

45-
If you use this Docker image, you don't need to use the script, you can choose one of the two, don't mix it up.
46-
4748
若使用该 Docker 镜像, 就不需要用脚本了,二者二选一,不要搞混了。
4849

49-
**如果没有安装Docker**一键安装方式
50+
**如果没有安装Docker**一键安装方式如下
5051

5152
```bash
5253
curl -fsSL https://get.docker.com -o get-docker.sh
@@ -64,7 +65,9 @@ docker run -d \
6465
-p 8443:443 \
6566
ellermister/mtproxy
6667
```
67-
**镜像默认开启了 IP 段白名单**,如果你不需要可以配置 `ip_white_list="OFF"` 取消:
68+
69+
**镜像默认开启了 IP 段白名单**
70+
如果你不需要可以配置 `ip_white_list="OFF"` 取消:
6871

6972
```bash
7073
docker run -d \
@@ -80,7 +83,7 @@ ellermister/mtproxy
8083

8184
`ip_white_list` 选项:
8285

83-
- **OFF** 关闭白名单
86+
- **OFF** 关闭白名单
8487
- **IP** 开启 IP 白名单
8588
- **IPSEG** 开启 IP 段白名单
8689

@@ -94,13 +97,12 @@ docker logs -f mtproxy
9497

9598
连接端口记得修改为你映射后的外部端口,如上文例子中都是`8443`,在连接时修改端口。
9699

97-
更多使用请参考: https://hub.docker.com/r/ellermister/mtproxy
100+
更多使用请参考: <https://hub.docker.com/r/ellermister/mtproxy>
98101

99102
## 使用方式
100103

101104
配置文件 `mtp_config`,如果你想手动修改密钥或者参数请注意格式。
102105

103-
104106
运行服务
105107

106108
```bash
@@ -151,12 +153,11 @@ rm -rf /home/mtproxy
151153
cd /home/mtproxy && bash mtproxy.sh start > /dev/null 2>&1 &
152154
```
153155

154-
155156
## 计划任务守护
156157

157-
因为默认官方的 mtproxy 程序存在BUG,pid 大于 65535 时处理存在问题。进程容易坏死和异常退出。
158+
由于默认官方的 mtproxy 程序存在BUG,pid 大于 65535 时进程处理存在问题,进程容易坏死和异常退出。
158159

159-
建议通过计划任务去守护进程,编辑方式 `crontab -e`
160+
因此建议通过计划任务去守护进程 `crontab -e`
160161

161162
每分钟检测进程并启动
162163

@@ -166,14 +167,13 @@ cd /home/mtproxy && bash mtproxy.sh start > /dev/null 2>&1 &
166167

167168
## MTProxy Admin Bot
168169

169-
https://t.me/MTProxybot
170+
<https://t.me/MTProxybot>
170171
> Sorry, an error has occurred during your request. Please try again later.(Code xxxxxx)
171172
172-
如果你在申请绑定代理推广时遇到了此类错误,官方没有给出明确的原因,根据网友反馈,此类问题多出现于账号注册不足与 2~3 年,**建议使用 3 年以上的账号以及未被 banned 的账号。**
173+
如果你在申请绑定代理推广时遇到了此类错误,官方没有给出明确的原因。根据网友反馈,此类问题多出现于账号注册不足与 2~3 年。
174+
**建议使用 3 年以上的账号以及未被 banned 的账号。**
173175

174176
## 引用项目
175177

176-
- https://github.com/TelegramMessenger/MTProxy
177-
- https://github.com/9seconds/mtg
178-
179-
178+
- <https://github.com/TelegramMessenger/MTProxy>
179+
- <https://github.com/9seconds/mtg>

README_EN.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<div align="right">
2+
<a title="简体中文" href="README.md"><img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="简体中文" /></a>
3+
<a title="English" href="README_EN.md"><img src="https://img.shields.io/badge/-English-A31F34?style=for-the-badge" alt="English"></a>
4+
</div>
5+
6+
# mtproxy
7+
8+
MTProxyTLS one-click install lightweight script.
9+
With Nginx as a Forward Proxy, access is only granted with an IP whitelist.
10+
11+
## Discussion
12+
13+
Telegram Group: <https://t.me/EllerHK>
14+
15+
## Install method
16+
17+
- Script
18+
19+
This method generally requires you to install or compile directly on your machine, which may require the installation of some basic system dependency libraries.
20+
21+
- Docker
22+
23+
**Recommended!** Will not broke your system or dependencies. Just need to know some basic Docker knowledge.
24+
25+
### Script
26+
27+
> If you repeatedly encounter errors or other unknown problems, it is recommended to switch to a Debian 9+ system or use Docker.
28+
29+
Execute the following code to install
30+
31+
```bash
32+
rm -rf /home/mtproxy && mkdir /home/mtproxy && cd /home/mtproxy
33+
curl -fsSL -o mtproxy.sh https://github.com/ellermister/mtproxy/raw/master/mtproxy.sh
34+
bash mtproxy.sh
35+
```
36+
37+
![mtproxy.sh](https://raw.githubusercontent.com/ellermister/mtproxy/master/mtproxy.jpg)
38+
39+
### Docker | Whitelist MTProxy Docker Image
40+
41+
The image integrates nginx and mtproxy+tls to disguise traffic, and uses a **white-list** mode to deal with firewall detection.
42+
43+
If you use this Docker image, you don't need to use the script anymore, you can choose one of the two, don't mix it up.
44+
45+
**If you didn't install Docker before**, below is the install script:
46+
47+
```bash
48+
curl -fsSL https://get.docker.com -o get-docker.sh
49+
sh get-docker.sh
50+
```
51+
52+
**Start the container with whitelist:**
53+
54+
```bash
55+
docker run -d \
56+
--name mtproxy \
57+
--restart=always \
58+
-e domain="cloudflare.com" \
59+
-p 8080:80 \
60+
-p 8443:443 \
61+
ellermister/mtproxy
62+
```
63+
64+
**The image enabled the IP segment whitelist by default.**
65+
If you don't need it, you can cancel it:
66+
67+
```bash
68+
docker run -d \
69+
--name mtproxy \
70+
--restart=always \
71+
-e domain="cloudflare.com" \
72+
-e secret="548593a9c0688f4f7d9d57377897d964" \
73+
-e ip_white_list="OFF" \
74+
-p 8080:80 \
75+
-p 8443:443 \
76+
ellermister/mtproxy
77+
```
78+
79+
`ip_white_list` :
80+
81+
- **OFF** disable whitelist
82+
- **IP** enable IP whitelist
83+
- **IPSEG** enable IPSEG whitelist
84+
85+
`secret`:If you want to create a known key, the format is: 32 hexadecimal characters.
86+
87+
**View the parameter configuration of the link in the log**:
88+
89+
```bash
90+
docker logs -f mtproxy
91+
```
92+
93+
Please change the HOST_PORT which is for the connection, the HOST_PORT in the above example is `8443`.
94+
95+
For more usage: <https://hub.docker.com/r/ellermister/nginx-mtproxy>
96+
97+
## Usage
98+
99+
Configuration file `mtp_config`, pay attention to the format if you want to change secret manually.
100+
101+
Start service
102+
103+
```bash
104+
 bash mtproxy.sh start
105+
```
106+
107+
Debug service
108+
109+
```bash
110+
bash mtproxy.sh debug
111+
```
112+
113+
Stop service
114+
115+
```bash
116+
bash mtproxy.sh stop
117+
```
118+
119+
Restart service
120+
121+
```bash
122+
bash mtproxy.sh restart
123+
```
124+
125+
Reinstall/Reconfigure
126+
127+
```bash
128+
bash mtproxy.sh reinstall
129+
```
130+
131+
## Uninstall
132+
133+
Just delete the directory where it is located.
134+
135+
```bash
136+
rm -rf /home/mtproxy
137+
```
138+
139+
## Run on Startup
140+
141+
Edit `/etc/rc.local` and add the following code to the script:
142+
143+
```bash
144+
cd /home/mtproxy && bash mtproxy.sh start > /dev/null 2>&1 &
145+
```
146+
147+
## Crontab
148+
149+
Due to the bug in the official mtproxy, there are problems with process processing when the pid is over 65535, and the process is prone to necrosis and abnormal exit.
150+
151+
Therefore, it is recommended to monitor the process through scheduled tasks `crontab -e`:
152+
153+
Check the process and start it every minute
154+
155+
```bash
156+
* * * * * cd /home/mtproxy && bash mtproxy.sh start > /dev/null 2>&1 &
157+
```
158+
159+
## MTProxy Admin Bot
160+
161+
<https://t.me/MTProxybot>
162+
> Sorry, an error has occurred during your request. Please try again later.(Code xxxxxx)
163+
164+
If you encounter such an error when applying for binding agent promotion, the official does not give a clear reason. According to feedback from netizens, such problems mostly occur due to insufficient account registration and 2 to 3 years.
165+
**It is recommended to use accounts that are more than 3 years old and accounts that have not been banned.**
166+
167+
## Open Source Used
168+
169+
- <https://github.com/TelegramMessenger/MTProxy>
170+
- <https://github.com/9seconds/mtg>

0 commit comments

Comments
 (0)