Skip to content

Commit 3010c13

Browse files
committed
MinerProxyPlus
0 parents  commit 3010c13

6 files changed

Lines changed: 378 additions & 0 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.sh linguist-language=Golang
2+
*.md linguist-language=GoLang

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# MinerProxyPlus
2+
3+
```
4+
__ __ _ ____ ____ _
5+
| \/ (_)_ __ ___ _ __| _ \ _ __ _____ ___ _| _ \| |_ _ ___
6+
| |\/| | | '_ \ / _ \ '__| |_) | '__/ _ \ \/ / | | | |_) | | | | / __|
7+
| | | | | | | | __/ | | __/| | | (_) > <| |_| | __/| | |_| \__ \
8+
|_| |_|_|_| |_|\___|_| |_| |_| \___/_/\_\\__, |_| |_|\__,_|___/
9+
|___/
10+
```
11+
12+
![avatar](https://cdn.jsdelivr.net/gh/8x3090/MinerProxyPlus@master/img/demo.png)
13+
14+
## 特点
15+
16+
* go语言编写,超高性能多线程多并发,系统占用极小
17+
* 支持SSL/TCP代理,自定义抽水地址和比例
18+
* 开发者费用恒定千分之一,保证用户抽水利益的最大化
19+
* 可设置端口连接数,免疫一切CC攻击
20+
* 一键管理脚本
21+
22+
纯中转模式无任何手续费。中转模式算力截图,算力几乎无损耗。
23+
24+
![avatar](https://cdn.jsdelivr.net/gh/8x3090/MinerProxyPlus@master/img/status.png)
25+
26+
## 安装
27+
28+
### Windows
29+
30+
[Release](https://github.com/8x3090/MinerProxyPlus/releases)界面下载*MinerProxyPlus_windows_amd64.exe*,双击运行
31+
32+
### Linux
33+
34+
使用一键管理脚本
35+
36+
* 海外服务器
37+
38+
```
39+
bash <(curl -Lso- https://raw.githubusercontent.com/8x3090/MinerProxyPlus/master/script/manage.sh)
40+
```
41+
42+
* 国内服务器
43+
44+
```
45+
bash <(curl -Lso- https://cdn.jsdelivr.net/gh/8x3090/MinerProxyPlus@master/script/manage_cdn.sh)
46+
```
47+
48+
根据提示选择对应操作即可
49+
50+
## 其它
51+
52+
* 电报:https://t.me/+OJ8dBp9TFsxjN2Q1
53+
54+
* 邮箱:minerproxyplus@gmail.com

bin/MinerProxyPlus_linux_amd64

5.57 MB
Binary file not shown.
5.58 MB
Binary file not shown.

script/manage.sh

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
#!/bin/bash
2+
[[ $(id -u) != 0 ]] && echo -e "该脚本需要在root权限下运行" && exit 1
3+
4+
cmd="apt-get"
5+
if [[ $(command -v apt-get) || $(command -v yum) ]] && [[ $(command -v systemctl) ]]; then
6+
if [[ $(command -v yum) ]]; then
7+
cmd="yum"
8+
fi
9+
else
10+
echo "该脚本无法在当前系统运行" && exit 1
11+
fi
12+
13+
screen_start() {
14+
screen -dmS MinerProxyPlus
15+
screen -r MinerProxyPlus -p 0 -X stuff "cd /root/minerproxyplus"$'\n'
16+
screen -r MinerProxyPlus -p 0 -X stuff "./MinerProxyPlus"$'\n'
17+
sleep 1s
18+
}
19+
20+
install() {
21+
if [ -d "/root/minerproxyplus" ]; then
22+
echo -e "已检测到安装目录存在. 如果确定没有安装, 请输入rm -rf /root/minerproxyplus删除目录后再重新安装" && exit 1
23+
fi
24+
if screen -list | grep -q "MinerProxyPlus"; then
25+
echo -e "MinerProxyPlus已启动, 请关闭后再安装" && exit 1
26+
fi
27+
28+
$cmd update -y
29+
$cmd install curl wget screen -y
30+
mkdir /root/minerproxyplus
31+
32+
echo "正在安装MinerProxyPlus. 请稍候"
33+
wget https://github.com/8x3090/MinerProxyPlus/releases/download/v1.0.1/MinerProxyPlus_linux_amd64 -O /root/minerproxyplus/MinerProxyPlus
34+
chmod 777 /root/minerproxyplus/MinerProxyPlus
35+
echo "正在启动...如果无报错则启动成功"
36+
screen_start
37+
echo
38+
echo "当前默认配置为: "
39+
cat /root/minerproxyplus/config.yml
40+
echo
41+
echo "输入cat /root/minerproxyplus/config.yml可随时查看当前配置, 包括端口号与登录密码"
42+
echo "也可手动修改/root/minerproxyplus/config.yml中的配置信息. 注意手动修改后需重启应用方生效"
43+
echo "web后台启动成功: 可使用screen -r MinerProxyPlus查看程序输出, 退出程序输出界面键入ctrl + a + d"
44+
}
45+
46+
start() {
47+
if screen -list | grep -q "MinerProxyPlus"; then
48+
echo -e "MinerProxyPlus已启动, 请勿重复启动" && exit 1
49+
fi
50+
if [ ! -d "/root/minerproxyplus" ]; then
51+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
52+
fi
53+
54+
screen_start
55+
56+
echo "MinerProxyPlus启动成功"
57+
echo "可使用screen -r MinerProxyPlus查看程输出"
58+
}
59+
60+
restart() {
61+
if screen -list | grep -q "MinerProxyPlus"; then
62+
screen -X -S MinerProxyPlus quit
63+
fi
64+
if [ ! -d "/root/minerproxyplus" ]; then
65+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
66+
fi
67+
68+
screen_start
69+
70+
echo "MinerProxyPlus重新启动成功"
71+
echo "可使用screen -r MinerProxyPlus查看程序输出"
72+
}
73+
74+
stop() {
75+
if screen -list | grep -q "MinerProxyPlus"; then
76+
screen -X -S MinerProxyPlus quit
77+
fi
78+
if [ ! -d "/root/minerproxyplus" ]; then
79+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
80+
fi
81+
82+
echo "MinerProxyPlus已停止"
83+
}
84+
85+
uninstall() {
86+
if [ ! -d "/root/minerproxyplus" ]; then
87+
echo -e "没有检测到安装目录, 无需卸载" && exit 1
88+
fi
89+
90+
read -p "是否确认删除MinerProxyPlus[yes/no]: " flag
91+
if [ -z $flag ]; then
92+
echo "输入错误" && exit 1
93+
else
94+
if [ "$flag" = "yes" -o "$flag" = "ye" -o "$flag" = "y" ]; then
95+
screen -X -S MinerProxyPlus quit
96+
rm -rf /root/minerproxyplus
97+
echo "卸载MinerProxyPlus成功"
98+
fi
99+
fi
100+
}
101+
102+
check_limit() {
103+
echo -n "当前连接数限制: "
104+
ulimit -n
105+
}
106+
107+
change_limit() {
108+
num="n"
109+
if [ $(grep -c "root soft nofile" /etc/security/limits.conf) -eq '0' ]; then
110+
echo "root soft nofile 102400" >>/etc/security/limits.conf
111+
num="y"
112+
fi
113+
114+
if [[ "$num" = "y" ]]; then
115+
echo "连接数限制已修改为102400, 重启服务器后生效"
116+
else
117+
check_limit
118+
fi
119+
}
120+
121+
echo " __ __ _ ____ ____ _"
122+
echo "| \/ (_)_ __ ___ _ __| _ \ _ __ _____ ___ _| _ \| |_ _ ___"
123+
echo "| |\/| | | '_ \ / _ \ '__| |_) | '__/ _ \ \/ / | | | |_) | | | | / __|"
124+
echo "| | | | | | | | __/ | | __/| | | (_) > <| |_| | __/| | |_| \__ \\"
125+
echo "|_| |_|_|_| |_|\___|_| |_| |_| \___/_/\_\\\\__, |_| |_|\__,_|___/"
126+
echo " |___/"
127+
echo "MinerProxyPlus一键管理工具"
128+
echo " 1. 安装并启动(默认安装到/root/minerproxyplus)"
129+
echo " 2. 启动"
130+
echo " 3. 重启"
131+
echo " 4. 停止"
132+
echo " 5. 卸载"
133+
echo " 6. 修改linux系统连接数限制为102400(需要重启服务器生效)"
134+
echo " 7. 查看当前系统连接数限制"
135+
read -p "$(echo -e "请选择[1-7]: ")" choose
136+
case $choose in
137+
1)
138+
install
139+
;;
140+
2)
141+
start
142+
;;
143+
3)
144+
restart
145+
;;
146+
4)
147+
stop
148+
;;
149+
5)
150+
uninstall
151+
;;
152+
6)
153+
change_limit
154+
;;
155+
7)
156+
check_limit
157+
;;
158+
*)
159+
echo "输入错误, 请重新输入!"
160+
;;
161+
esac

script/manage_cdn.sh

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
#!/bin/bash
2+
[[ $(id -u) != 0 ]] && echo -e "该脚本需要在root权限下运行" && exit 1
3+
4+
cmd="apt-get"
5+
if [[ $(command -v apt-get) || $(command -v yum) ]] && [[ $(command -v systemctl) ]]; then
6+
if [[ $(command -v yum) ]]; then
7+
cmd="yum"
8+
fi
9+
else
10+
echo "该脚本无法在当前系统运行" && exit 1
11+
fi
12+
13+
screen_start() {
14+
screen -dmS MinerProxyPlus
15+
screen -r MinerProxyPlus -p 0 -X stuff "cd /root/minerproxyplus"$'\n'
16+
screen -r MinerProxyPlus -p 0 -X stuff "./MinerProxyPlus"$'\n'
17+
sleep 1s
18+
}
19+
20+
install() {
21+
if [ -d "/root/minerproxyplus" ]; then
22+
echo -e "已检测到安装目录存在. 如果确定没有安装, 请输入rm -rf /root/minerproxyplus删除目录后再重新安装" && exit 1
23+
fi
24+
if screen -list | grep -q "MinerProxyPlus"; then
25+
echo -e "MinerProxyPlus已启动, 请关闭后再安装" && exit 1
26+
fi
27+
28+
$cmd update -y
29+
$cmd install curl wget screen -y
30+
mkdir /root/minerproxyplus
31+
32+
echo "正在安装MinerProxyPlus. 请稍候"
33+
wget https://cdn.jsdelivr.net/gh/8x3090/MinerProxyPlus@master/bin/MinerProxyPlus_linux_amd64 -O /root/minerproxyplus/MinerProxyPlus
34+
chmod 777 /root/minerproxyplus/MinerProxyPlus
35+
echo "正在启动...如果无报错则启动成功"
36+
screen_start
37+
echo
38+
echo "当前默认配置为: "
39+
cat /root/minerproxyplus/config.yml
40+
echo
41+
echo "输入cat /root/minerproxyplus/config.yml可随时查看当前配置, 包括端口号与登录密码"
42+
echo "也可手动修改/root/minerproxyplus/config.yml中的配置信息. 注意手动修改后需重启应用方生效"
43+
echo "web后台启动成功: 可使用screen -r MinerProxyPlus查看程序输出, 退出程序输出界面键入ctrl + a + d"
44+
}
45+
46+
start() {
47+
if screen -list | grep -q "MinerProxyPlus"; then
48+
echo -e "MinerProxyPlus已启动, 请勿重复启动" && exit 1
49+
fi
50+
if [ ! -d "/root/minerproxyplus" ]; then
51+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
52+
fi
53+
54+
screen_start
55+
56+
echo "MinerProxyPlus启动成功"
57+
echo "可使用screen -r MinerProxyPlus查看程输出"
58+
}
59+
60+
restart() {
61+
if screen -list | grep -q "MinerProxyPlus"; then
62+
screen -X -S MinerProxyPlus quit
63+
fi
64+
if [ ! -d "/root/minerproxyplus" ]; then
65+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
66+
fi
67+
68+
screen_start
69+
70+
echo "MinerProxyPlus重新启动成功"
71+
echo "可使用screen -r MinerProxyPlus查看程序输出"
72+
}
73+
74+
stop() {
75+
if screen -list | grep -q "MinerProxyPlus"; then
76+
screen -X -S MinerProxyPlus quit
77+
fi
78+
if [ ! -d "/root/minerproxyplus" ]; then
79+
echo -e "没有检测到安装目录. 请重新安装" && exit 1
80+
fi
81+
82+
echo "MinerProxyPlus已停止"
83+
}
84+
85+
uninstall() {
86+
if [ ! -d "/root/minerproxyplus" ]; then
87+
echo -e "没有检测到安装目录, 无需卸载" && exit 1
88+
fi
89+
90+
read -p "是否确认删除MinerProxyPlus[yes/no]: " flag
91+
if [ -z $flag ]; then
92+
echo "输入错误" && exit 1
93+
else
94+
if [ "$flag" = "yes" -o "$flag" = "ye" -o "$flag" = "y" ]; then
95+
screen -X -S MinerProxyPlus quit
96+
rm -rf /root/minerproxyplus
97+
echo "卸载MinerProxyPlus成功"
98+
fi
99+
fi
100+
}
101+
102+
check_limit() {
103+
echo -n "当前连接数限制: "
104+
ulimit -n
105+
}
106+
107+
change_limit() {
108+
num="n"
109+
if [ $(grep -c "root soft nofile" /etc/security/limits.conf) -eq '0' ]; then
110+
echo "root soft nofile 102400" >>/etc/security/limits.conf
111+
num="y"
112+
fi
113+
114+
if [[ "$num" = "y" ]]; then
115+
echo "连接数限制已修改为102400, 重启服务器后生效"
116+
else
117+
check_limit
118+
fi
119+
}
120+
121+
echo " __ __ _ ____ ____ _"
122+
echo "| \/ (_)_ __ ___ _ __| _ \ _ __ _____ ___ _| _ \| |_ _ ___"
123+
echo "| |\/| | | '_ \ / _ \ '__| |_) | '__/ _ \ \/ / | | | |_) | | | | / __|"
124+
echo "| | | | | | | | __/ | | __/| | | (_) > <| |_| | __/| | |_| \__ \\"
125+
echo "|_| |_|_|_| |_|\___|_| |_| |_| \___/_/\_\\\\__, |_| |_|\__,_|___/"
126+
echo " |___/"
127+
echo "MinerProxyPlus一键管理工具"
128+
echo " 1. 安装并启动(默认安装到/root/minerproxyplus)"
129+
echo " 2. 启动"
130+
echo " 3. 重启"
131+
echo " 4. 停止"
132+
echo " 5. 卸载"
133+
echo " 6. 修改linux系统连接数限制为102400(需要重启服务器生效)"
134+
echo " 7. 查看当前系统连接数限制"
135+
read -p "$(echo -e "请选择[1-7]: ")" choose
136+
case $choose in
137+
1)
138+
install
139+
;;
140+
2)
141+
start
142+
;;
143+
3)
144+
restart
145+
;;
146+
4)
147+
stop
148+
;;
149+
5)
150+
uninstall
151+
;;
152+
6)
153+
change_limit
154+
;;
155+
7)
156+
check_limit
157+
;;
158+
*)
159+
echo "输入错误, 请重新输入!"
160+
;;
161+
esac

0 commit comments

Comments
 (0)