-
Notifications
You must be signed in to change notification settings - Fork 32
/
deep.sh
251 lines (244 loc) · 7.03 KB
/
deep.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#!/bin/bash
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
PLAIN='\033[0m'
red() {
echo -e "\033[31m\033[01m$1\033[0m"
}
green() {
echo -e "\033[32m\033[01m$1\033[0m"
}
yellow() {
echo -e "\033[33m\033[01m$1\033[0m"
}
clear
echo "#############################################################"
echo -e "# ${RED} Deepnote xray 一键安装脚本${PLAIN} #"
echo -e "# ${GREEN}作者${PLAIN}: MisakaNo の 小破站 #"
echo -e "# ${GREEN}博客${PLAIN}: https://blog.misaka.rest #"
echo -e "# ${GREEN}GitHub 项目${PLAIN}: https://github.com/Misaka-blog #"
echo -e "# ${GREEN}Telegram 频道${PLAIN}: https://t.me/misakablogchannel #"
echo -e "# ${GREEN}Telegram 群组${PLAIN}: https://t.me/misakanoxpz #"
echo -e "# ${GREEN}YouTube 频道${PLAIN}: https://www.youtube.com/@misaka-blog #"
echo "#############################################################"
echo ""
yellow "使用前请注意:"
red "1. 我已知悉本项目有可能触发 Deepnote 封号机制"
red "2. 我不保证脚本其搭建节点的稳定性"
read -rp "是否安装脚本? [Y/N]:" yesno
if [[ $yesno =~ "Y"|"y" ]]; then
kill -9 $(ps -ef | grep web | grep -v grep | awk '{print $2}') >/dev/null 2>&1
rm -f web config.json
yellow "开始安装..."
wget -O temp.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip temp.zip xray
RELEASE_RANDOMNESS=$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 6)
mv xray web
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
read -rp "请设置UUID(如无设置则使用脚本默认的):" uuid
if [[ -z $uuid ]]; then
uuid="8d4a8f5e-c2f7-4c1b-b8c0-f8f5a9b6c384"
fi
cat <<EOF > config.json
{
"log":{
"access":"/dev/null",
"error":"/dev/null",
"loglevel":"none"
},
"inbounds":[
{
"port":8080,
"protocol":"vless",
"settings":{
"clients":[
{
"id":"$uuid",
"flow":"xtls-rprx-direct"
}
],
"decryption":"none",
"fallbacks":[
{
"dest":3001
},
{
"path":"/vless",
"dest":3002
},
{
"path":"/vmess",
"dest":3003
},
{
"path":"/trojan",
"dest":3004
},
{
"path":"/shadowsocks",
"dest":3005
}
]
},
"streamSettings":{
"network":"tcp"
}
},
{
"port":3001,
"listen":"127.0.0.1",
"protocol":"vless",
"settings":{
"clients":[
{
"id":"$uuid"
}
],
"decryption":"none"
},
"streamSettings":{
"network":"ws",
"security":"none"
}
},
{
"port":3002,
"listen":"127.0.0.1",
"protocol":"vless",
"settings":{
"clients":[
{
"id":"$uuid",
"level":0,
"email":"argo@xray"
}
],
"decryption":"none"
},
"streamSettings":{
"network":"ws",
"security":"none",
"wsSettings":{
"path":"/vless"
}
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls",
"quic"
],
"metadataOnly":false
}
},
{
"port":3003,
"listen":"127.0.0.1",
"protocol":"vmess",
"settings":{
"clients":[
{
"id":"$uuid",
"alterId":0
}
]
},
"streamSettings":{
"network":"ws",
"wsSettings":{
"path":"/vmess"
}
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls",
"quic"
],
"metadataOnly":false
}
},
{
"port":3004,
"listen":"127.0.0.1",
"protocol":"trojan",
"settings":{
"clients":[
{
"password":"$uuid"
}
]
},
"streamSettings":{
"network":"ws",
"security":"none",
"wsSettings":{
"path":"/trojan"
}
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls",
"quic"
],
"metadataOnly":false
}
},
{
"port":3005,
"listen":"127.0.0.1",
"protocol":"shadowsocks",
"settings":{
"clients":[
{
"method":"chacha20-ietf-poly1305",
"password":"$uuid"
}
],
"decryption":"none"
},
"streamSettings":{
"network":"ws",
"wsSettings":{
"path":"/shadowsocks"
}
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls",
"quic"
],
"metadataOnly":false
}
}
],
"dns":{
"servers":[
"https+local://8.8.8.8/dns-query"
]
},
"outbounds":[
{
"protocol":"freedom"
}
]
}
EOF
nohup ./web -config=config.json &>/dev/null &
green "Deepnote xray 已安装完成!"
yellow "请认真阅读项目博客说明文档,配置出站链接!"
yellow "别忘记给项目点一个免费的Star!"
echo ""
yellow "更多项目,请关注:小御坂的破站"
else
red "已取消安装,脚本退出!"
exit 1
fi