-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
serv00_proxyip.sh
1135 lines (1073 loc) · 32.6 KB
/
serv00_proxyip.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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# 定义颜色
re="\033[0m"
red="\033[1;91m"
green="\e[1;32m"
yellow="\e[1;33m"
purple="\e[1;35m"
red() { echo -e "\e[1;91m$1\033[0m"; }
green() { echo -e "\e[1;32m$1\033[0m"; }
yellow() { echo -e "\e[1;33m$1\033[0m"; }
purple() { echo -e "\e[1;35m$1\033[0m"; }
reading() { read -p "$(red "$1")" "$2"; }
USERNAME=$(whoami)
HOSTNAME=$(hostname)
[[ "$HOSTNAME" == "s1.ct8.pl" ]] && WORKDIR="domains/${USERNAME}.ct8.pl/logs" || WORKDIR="domains/${USERNAME}.serv00.net/logs"
[ -d "$WORKDIR" ] || (mkdir -p "$WORKDIR" && chmod 777 "$WORKDIR")
#ps aux | grep $(whoami) | grep -v "sshd\|bash\|grep" | awk '{print $2}' | xargs -r kill -9 > /dev/null 2>&1
read_ip() {
cat ip.txt
reading "请输入上面三个IP中的任意一个 (建议默认回车自动选择可用IP): " IP
if [[ -z "$IP" ]]; then
IP=$(grep -m 1 "可用" ip.txt | awk -F ':' '{print $1}')
if [ -z "$IP" ]; then
IP=$(head -n 1 ip.txt | awk -F ':' '{print $1}')
fi
fi
green "你选择的IP为: $IP"
}
read_uuid() {
reading "请输入统一的uuid密码 (建议回车默认随机): " UUID
if [[ -z "$UUID" ]]; then
UUID=$(uuidgen -r)
fi
green "你的uuid为: $UUID"
}
read_reym() {
reading "请输入reality域名 (回车默认CF域名,支持proxyip+非标端口反代ip功能): " reym
if [[ -z "$reym" ]]; then
reym=www.speedtest.net
fi
green "你的reality域名为: $reym"
}
read_vless_port() {
while true; do
reading "请输入vless-reality端口 (面板开放的tcp端口): " vless_port
if [[ "$vless_port" =~ ^[0-9]+$ ]] && [ "$vless_port" -ge 1 ] && [ "$vless_port" -le 65535 ]; then
green "你的vless-reality端口为: $vless_port"
break
else
yellow "输入错误,请重新输入面板开放的TCP端口"
fi
done
}
read_hy2_port() {
while true; do
reading "请输入hysteria2端口 (面板开放的UDP端口): " hy2_port
if [[ "$hy2_port" =~ ^[0-9]+$ ]] && [ "$hy2_port" -ge 1 ] && [ "$hy2_port" -le 65535 ]; then
green "你的hysteria2端口为: $hy2_port"
break
else
yellow "输入错误,请重新输入面板开放的UDP端口"
fi
done
}
read_vmess_port() {
while true; do
reading "请输入vmess-ws端口 (面板开放的tcp端口): " vmess_port
if [[ "$vmess_port" =~ ^[0-9]+$ ]] && [ "$vmess_port" -ge 1 ] && [ "$vmess_port" -le 65535 ]; then
green "你的vmess端口为: $vmess_port"
break
else
yellow "输入错误,请重新输入面板开放的tcp端口"
fi
done
}
install_singbox() {
if [[ -e $WORKDIR/list.txt ]]; then
yellow "已安装sing-box,请先选择2卸载,再执行安装" && exit
fi
yellow "请确保在Serv00网页设置中已开放3个端口:2个tcp端口、1个udp端口"
sleep 2
cd $WORKDIR
echo
read_ip
echo
read_reym
echo
read_uuid
echo
read_vless_port
echo
read_vmess_port
echo
read_hy2_port
echo
sleep 2
argo_configure
echo
download_and_run_singbox
echo
get_links
}
uninstall_singbox() {
reading "\n确定要卸载吗?【y/n】: " choice
case "$choice" in
[Yy])
ps aux | grep $(whoami) | grep -v "sshd\|bash\|grep" | awk '{print $2}' | xargs -r kill -9 2>/dev/null
rm -rf $WORKDIR
clear
green "已完全卸载"
;;
[Nn]) exit 0 ;;
*) red "无效的选择,请输入y或n" && menu ;;
esac
}
kill_all_tasks() {
reading "\n清理所有进程将退出ssh连接,确定继续清理吗?【y/n】: " choice
case "$choice" in
[Yy]) killall -9 -u $(whoami) ;;
*) menu ;;
esac
}
# Generating argo Config
argo_configure() {
while true; do
yellow "Argo临时隧道 (无需域名,推荐)"
yellow "Argo固定隧道 (需要域名,需要CF设置提取Token)"
echo -e "${red}注意:${purple}Argo固定隧道使用Token时,需要在cloudflare后台设置隧道端口,该端口必须与vmess-ws的tcp端口一致)${re}"
reading "输入 g 表示使用Argo固定隧道 ;回车跳过 表示使用Argo临时隧道 【g/回车】: " argo_choice
if [[ "$argo_choice" != "g" && "$argo_choice" != "G" && -n "$argo_choice" ]]; then
red "无效的选择,请输入 g 或回车"
continue
fi
if [[ "$argo_choice" == "g" || "$argo_choice" == "G" ]]; then
reading "请输入argo固定隧道域名: " ARGO_DOMAIN
green "你的argo固定隧道域名为: $ARGO_DOMAIN"
reading "请输入argo固定隧道密钥(Json或Token。当你粘贴Token时,必须以ey开头): " ARGO_AUTH
green "你的argo固定隧道密钥为: $ARGO_AUTH"
else
green "使用Argo临时隧道"
fi
break
done
if [[ $ARGO_AUTH =~ TunnelSecret ]]; then
echo $ARGO_AUTH > tunnel.json
cat > tunnel.yml << EOF
tunnel: $(cut -d\" -f12 <<< "$ARGO_AUTH")
credentials-file: tunnel.json
protocol: http2
ingress:
- hostname: $ARGO_DOMAIN
service: http://localhost:$vmess_port
originRequest:
noTLSVerify: true
- service: http_status:404
EOF
fi
}
# Download Dependency Files
download_and_run_singbox() {
ARCH=$(uname -m) && DOWNLOAD_DIR="." && mkdir -p "$DOWNLOAD_DIR" && FILE_INFO=()
if [ "$ARCH" == "arm" ] || [ "$ARCH" == "arm64" ] || [ "$ARCH" == "aarch64" ]; then
FILE_INFO=("https://github.com/eooce/test/releases/download/arm64/sb web" "https://github.com/eooce/test/releases/download/arm64/bot13 bot")
elif [ "$ARCH" == "amd64" ] || [ "$ARCH" == "x86_64" ] || [ "$ARCH" == "x86" ]; then
FILE_INFO=("https://github.com/yonggekkk/Cloudflare_vless_trojan/releases/download/serv00/sb web" "https://github.com/yonggekkk/Cloudflare_vless_trojan/releases/download/serv00/server bot")
else
echo "Unsupported architecture: $ARCH"
exit 1
fi
declare -A FILE_MAP
generate_random_name() {
local chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
local name=""
for i in {1..6}; do
name="$name${chars:RANDOM%${#chars}:1}"
done
echo "$name"
}
download_with_fallback() {
local URL=$1
local NEW_FILENAME=$2
curl -L -sS --max-time 2 -o "$NEW_FILENAME" "$URL" &
CURL_PID=$!
CURL_START_SIZE=$(stat -c%s "$NEW_FILENAME" 2>/dev/null || echo 0)
sleep 1
CURL_CURRENT_SIZE=$(stat -c%s "$NEW_FILENAME" 2>/dev/null || echo 0)
if [ "$CURL_CURRENT_SIZE" -le "$CURL_START_SIZE" ]; then
kill $CURL_PID 2>/dev/null
wait $CURL_PID 2>/dev/null
wget -q -O "$NEW_FILENAME" "$URL"
echo -e "\e[1;32mDownloading $NEW_FILENAME by wget\e[0m"
else
wait $CURL_PID
echo -e "\e[1;32mDownloading $NEW_FILENAME by curl\e[0m"
fi
}
for entry in "${FILE_INFO[@]}"; do
URL=$(echo "$entry" | cut -d ' ' -f 1)
RANDOM_NAME=$(generate_random_name)
NEW_FILENAME="$DOWNLOAD_DIR/$RANDOM_NAME"
if [ -e "$NEW_FILENAME" ]; then
echo -e "\e[1;32m$NEW_FILENAME already exists, Skipping download\e[0m"
else
download_with_fallback "$URL" "$NEW_FILENAME"
fi
chmod +x "$NEW_FILENAME"
FILE_MAP[$(echo "$entry" | cut -d ' ' -f 2)]="$NEW_FILENAME"
done
wait
output=$(./"$(basename ${FILE_MAP[web]})" generate reality-keypair)
private_key=$(echo "${output}" | awk '/PrivateKey:/ {print $2}')
public_key=$(echo "${output}" | awk '/PublicKey:/ {print $2}')
openssl ecparam -genkey -name prime256v1 -out "private.key"
openssl req -new -x509 -days 3650 -key "private.key" -out "cert.pem" -subj "/CN=$USERNAME.serv00.net"
cat > config.json << EOF
{
"log": {
"disabled": true,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8",
"strategy": "ipv4_only",
"detour": "direct"
}
],
"rules": [
{
"rule_set": [
"geosite-openai"
],
"server": "wireguard"
},
{
"rule_set": [
"geosite-netflix"
],
"server": "wireguard"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"server": "block"
}
],
"final": "google",
"strategy": "",
"disable_cache": false,
"disable_expire": false
},
"inbounds": [
{
"tag": "hysteria-in",
"type": "hysteria2",
"listen": "$IP",
"listen_port": $hy2_port,
"users": [
{
"password": "$UUID"
}
],
"masquerade": "https://bing.com",
"tls": {
"enabled": true,
"alpn": [
"h3"
],
"certificate_path": "cert.pem",
"key_path": "private.key"
}
},
{
"tag": "vless-reality-vesion",
"type": "vless",
"listen": "$IP",
"listen_port": $vless_port,
"users": [
{
"uuid": "$UUID",
"flow": "xtls-rprx-vision"
}
],
"tls": {
"enabled": true,
"server_name": "$reym",
"reality": {
"enabled": true,
"handshake": {
"server": "$reym",
"server_port": 443
},
"private_key": "$private_key",
"short_id": [
""
]
}
}
},
{
"tag": "vmess-ws-in",
"type": "vmess",
"listen": "::",
"listen_port": $vmess_port,
"users": [
{
"uuid": "$UUID"
}
],
"transport": {
"type": "ws",
"path": "$UUID-vm",
"early_data_header_name": "Sec-WebSocket-Protocol"
}
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "wireguard",
"tag": "wireguard-out",
"server": "162.159.195.100",
"server_port": 4500,
"local_address": [
"172.16.0.2/32",
"2606:4700:110:83c7:b31f:5858:b3a8:c6b1/128"
],
"private_key": "mPZo+V9qlrMGCZ7+E6z2NI6NOV34PD++TpAR09PtCWI=",
"peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
"reserved": [
26,
21,
228
]
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"rule_set": [
"geosite-openai"
],
"outbound": "wireguard-out"
},
{
"rule_set": [
"geosite-netflix"
],
"outbound": "wireguard-out"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"outbound": "block"
}
],
"rule_set": [
{
"tag": "geosite-netflix",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-netflix.srs",
"download_detour": "direct"
},
{
"tag": "geosite-openai",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/openai.srs",
"download_detour": "direct"
},
{
"tag": "geosite-category-ads-all",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "direct"
}
],
"final": "direct"
},
"experimental": {
"cache_file": {
"path": "cache.db",
"cache_id": "mycacheid",
"store_fakeip": true
}
}
}
EOF
if [ -e "$(basename ${FILE_MAP[web]})" ]; then
nohup ./"$(basename ${FILE_MAP[web]})" run -c config.json >/dev/null 2>&1 &
sleep 2
pgrep -x "$(basename ${FILE_MAP[web]})" > /dev/null && green "$(basename ${FILE_MAP[web]}) is running" || { red "$(basename ${FILE_MAP[web]}) is not running, restarting..."; pkill -x "$(basename ${FILE_MAP[web]})" && nohup ./"$(basename ${FILE_MAP[web]})" run -c config.json >/dev/null 2>&1 & sleep 2; purple "$(basename ${FILE_MAP[web]}) restarted"; }
fi
if [ -e "$(basename ${FILE_MAP[bot]})" ]; then
if [[ $ARGO_AUTH =~ ^[A-Z0-9a-z=]{120,250}$ ]]; then
args="tunnel --edge-ip-version auto --no-autoupdate --protocol http2 run --token ${ARGO_AUTH}"
elif [[ $ARGO_AUTH =~ TunnelSecret ]]; then
args="tunnel --edge-ip-version auto --config tunnel.yml run"
else
args="tunnel --edge-ip-version auto --no-autoupdate --protocol http2 --logfile boot.log --loglevel info --url http://localhost:$vmess_port"
fi
nohup ./"$(basename ${FILE_MAP[bot]})" $args >/dev/null 2>&1 &
sleep 2
pgrep -x "$(basename ${FILE_MAP[bot]})" > /dev/null && green "$(basename ${FILE_MAP[bot]}) is running" || { red "$(basename ${FILE_MAP[bot]}) is not running, restarting..."; pkill -x "$(basename ${FILE_MAP[bot]})" && nohup ./"$(basename ${FILE_MAP[bot]})" "${args}" >/dev/null 2>&1 & sleep 2; purple "$(basename ${FILE_MAP[bot]}) restarted"; }
fi
sleep 3
rm -f "$(basename ${FILE_MAP[web]})"
}
get_argodomain() {
if [[ -n $ARGO_AUTH ]]; then
echo "$ARGO_DOMAIN"
else
local retry=0
local max_retries=6
local argodomain=""
while [[ $retry -lt $max_retries ]]; do
((retry++))
argodomain=$(grep -oE 'https://[[:alnum:]+\.-]+\.trycloudflare\.com' boot.log | sed 's@https://@@')
if [[ -n $argodomain ]]; then
break
fi
sleep 1
done
echo "$argodomain"
fi
}
get_links(){
argodomain=$(get_argodomain)
echo -e "\e[1;32mArgo域名:\e[1;35m${argodomain}\e[0m\n"
if [ -z ${argodomain} ]; then
red "Argo域名生成失败,当前Argo节点不可用"
yellow "可尝试卸载重置安装,或者只用CDN回源设置现实CDN优选IP"
fi
ISP=$(curl -s --max-time 2 https://speed.cloudflare.com/meta | awk -F\" '{print $26}' | sed -e 's/ /_/g' || echo "0")
get_name() { if [ "$HOSTNAME" = "s1.ct8.pl" ]; then SERVER="CT8"; else SERVER=$(echo "$HOSTNAME" | cut -d '.' -f 1); fi; echo "$SERVER"; }
NAME="$ISP-$(get_name)"
rm -rf jh.txt
vl_link="vless://$UUID@$IP:$vless_port?encryption=none&flow=xtls-rprx-vision&security=reality&sni=$reym&fp=chrome&pbk=$public_key&type=tcp&headerType=none#$NAME-reality"
echo "$vl_link" >> jh.txt
vmws_link="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"$NAME-vmess-ws\", \"add\": \"$IP\", \"port\": \"$vmess_port\", \"id\": \"$UUID\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"\", \"path\": \"/$UUID-vm?ed=2048\", \"tls\": \"\", \"sni\": \"\", \"alpn\": \"\", \"fp\": \"\"}" | base64 -w0)"
echo "$vmws_link" >> jh.txt
vmatls_link="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"$NAME-vmess-ws-tls-argo\", \"add\": \"icook.hk\", \"port\": \"8443\", \"id\": \"$UUID\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$UUID-vm?ed=2048\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"\"}" | base64 -w0)"
echo "$vmatls_link" >> jh.txt
vma_link="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"$NAME-vmess-ws-argo\", \"add\": \"icook.hk\", \"port\": \"8880\", \"id\": \"$UUID\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$UUID-vm?ed=2048\", \"tls\": \"\"}" | base64 -w0)"
echo "$vma_link" >> jh.txt
hy2_link="hysteria2://$UUID@$IP:$hy2_port?sni=www.bing.com&alpn=h3&insecure=1#$NAME-hy2"
echo "$hy2_link" >> jh.txt
url=$(cat jh.txt 2>/dev/null)
baseurl=$(echo -e "$url" | base64 -w 0)
echo
sleep 2
cat > list.txt <<EOF
=================================================================================================
一、Vless-reality分享链接如下:
$vl_link
注意:如果之前输入的reality域名为CF域名,将激活以下功能:
可应用在 https://github.com/yonggekkk/Cloudflare_vless_trojan 项目中创建CF vless/trojan 节点
1、Proxyip(带端口)信息如下:
方式一全局应用:设置变量名:proxyip 设置变量值:$IP:$vless_port
方式二单节点应用:path路径改为:/pyip=$IP:$vless_port
CF节点的TLS可开可关
CF节点落地到CF网站的地区为:$IP所在地区
2、非标端口反代IP信息如下:
客户端优选IP地址为:$IP,端口:$vless_port
CF节点的TLS必须开启
CF节点落地到非CF网站的地区为:$IP所在地区
注:如果serv00的IP被墙,proxyip依旧有效,但用于客户端地址与端口的非标端口反代IP将不可用!
注:可能有大佬会扫Serv00的反代IP作为其共享IP库或者出售,请慎重将reality域名设置为CF域名
-------------------------------------------------------------------------------------------------
二、Vmess-ws分享链接三形态如下:
1、Vmess-ws主节点分享链接如下:
(该节点默认不支持CDN,如果设置为CDN回源(需域名):客户端地址可自行修改优选IP/域名,7个80系端口随便换,被墙依旧能用!)
$vmws_link
2、Vmess-ws-tls_Argo分享链接如下:
(该节点为CDN优选IP节点,客户端地址可自行修改优选IP/域名,6个443系端口随便换,被墙依旧能用!)
$vmatls_link
3、Vmess-ws_Argo分享链接如下:
(该节点为CDN优选IP节点,客户端地址可自行修改优选IP/域名,7个80系端口随便换,被墙依旧能用!)
$vma_link
-------------------------------------------------------------------------------------------------
三、HY2分享链接如下:
$hy2_link
-------------------------------------------------------------------------------------------------
四、以上五个节点的聚合通用分享链接如下:
$baseurl
-------------------------------------------------------------------------------------------------
五、查看sing-box与clash-meta的订阅配置文件,请进入主菜单选择4
-------------------------------------------------------------------------------------------------
=================================================================================================
EOF
cat list.txt
cat > sing_box.json <<EOF
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"experimental": {
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "ui",
"external_ui_download_url": "",
"external_ui_download_detour": "",
"secret": "",
"default_mode": "Rule"
},
"cache_file": {
"enabled": true,
"path": "cache.db",
"store_fakeip": true
}
},
"dns": {
"servers": [
{
"tag": "proxydns",
"address": "tls://8.8.8.8/dns-query",
"detour": "select"
},
{
"tag": "localdns",
"address": "h3://223.5.5.5/dns-query",
"detour": "direct"
},
{
"tag": "dns_fakeip",
"address": "fakeip"
}
],
"rules": [
{
"outbound": "any",
"server": "localdns",
"disable_cache": true
},
{
"clash_mode": "Global",
"server": "proxydns"
},
{
"clash_mode": "Direct",
"server": "localdns"
},
{
"rule_set": "geosite-cn",
"server": "localdns"
},
{
"rule_set": "geosite-geolocation-!cn",
"server": "proxydns"
},
{
"rule_set": "geosite-geolocation-!cn",
"query_type": [
"A",
"AAAA"
],
"server": "dns_fakeip"
}
],
"fakeip": {
"enabled": true,
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
},
"independent_cache": true,
"final": "proxydns"
},
"inbounds": [
{
"type": "tun",
"tag": "tun-in",
"address": [
"172.19.0.1/30",
"fd00::1/126"
],
"auto_route": true,
"strict_route": true,
"sniff": true,
"sniff_override_destination": true,
"domain_strategy": "prefer_ipv4"
}
],
"outbounds": [
{
"tag": "select",
"type": "selector",
"default": "auto",
"outbounds": [
"auto",
"vless-$NAME",
"vmess-$NAME",
"hy2-$NAME",
"vmess-tls-argo-$NAME",
"vmess-argo-$NAME"
]
},
{
"type": "vless",
"tag": "vless-$NAME",
"server": "$IP",
"server_port": $vless_port,
"uuid": "$UUID",
"packet_encoding": "xudp",
"flow": "xtls-rprx-vision",
"tls": {
"enabled": true,
"server_name": "$reym",
"utls": {
"enabled": true,
"fingerprint": "chrome"
},
"reality": {
"enabled": true,
"public_key": "$public_key",
"short_id": ""
}
}
},
{
"server": "$IP",
"server_port": $vmess_port,
"tag": "vmess-$NAME",
"tls": {
"enabled": false,
"server_name": "www.bing.com",
"insecure": false,
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"packet_encoding": "packetaddr",
"transport": {
"headers": {
"Host": [
"www.bing.com"
]
},
"path": "/$UUID-vm",
"type": "ws"
},
"type": "vmess",
"security": "auto",
"uuid": "$UUID"
},
{
"type": "hysteria2",
"tag": "hy2-$NAME",
"server": "$IP",
"server_port": $hy2_port,
"password": "$UUID",
"tls": {
"enabled": true,
"server_name": "www.bing.com",
"insecure": true,
"alpn": [
"h3"
]
}
},
{
"server": "icook.hk",
"server_port": 8443,
"tag": "vmess-tls-argo-$NAME",
"tls": {
"enabled": true,
"server_name": "$argodomain",
"insecure": false,
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"packet_encoding": "packetaddr",
"transport": {
"headers": {
"Host": [
"$argodomain"
]
},
"path": "/$UUID-vm",
"type": "ws"
},
"type": "vmess",
"security": "auto",
"uuid": "$UUID"
},
{
"server": "icook.hk",
"server_port": 8880,
"tag": "vmess-argo-$NAME",
"tls": {
"enabled": false,
"server_name": "$argodomain",
"insecure": false,
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"packet_encoding": "packetaddr",
"transport": {
"headers": {
"Host": [
"$argodomain"
]
},
"path": "/$UUID-vm",
"type": "ws"
},
"type": "vmess",
"security": "auto",
"uuid": "$UUID"
},
{
"tag": "direct",
"type": "direct"
},
{
"tag": "auto",
"type": "urltest",
"outbounds": [
"vless-$NAME",
"vmess-$NAME",
"hy2-$NAME",
"vmess-tls-argo-$NAME",
"vmess-argo-$NAME"
],
"url": "https://www.gstatic.com/generate_204",
"interval": "1m",
"tolerance": 50,
"interrupt_exist_connections": false
}
],
"route": {
"rule_set": [
{
"tag": "geosite-geolocation-!cn",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/geolocation-!cn.srs",
"download_detour": "select",
"update_interval": "1d"
},
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/geolocation-cn.srs",
"download_detour": "select",
"update_interval": "1d"
},
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geoip/cn.srs",
"download_detour": "select",
"update_interval": "1d"
}
],
"auto_detect_interface": true,
"final": "select",
"rules": [
{
"inbound": "tun-in",
"action": "sniff"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{
"port": 443,
"network": "udp",
"action": "reject"
},
{
"clash_mode": "Direct",
"outbound": "direct"
},
{
"clash_mode": "Global",
"outbound": "select"
},
{
"rule_set": "geoip-cn",
"outbound": "direct"
},
{
"rule_set": "geosite-cn",
"outbound": "direct"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"rule_set": "geosite-geolocation-!cn",
"outbound": "select"
}
]
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"interval": "30m",
"detour": "direct"
}
}
EOF
cat > clash_meta.yaml <<EOF
port: 7890
allow-lan: true
mode: rule
log-level: info
unified-delay: true
global-client-fingerprint: chrome
dns:
enable: true
listen: :53
ipv6: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
default-nameserver:
- 223.5.5.5
- 8.8.8.8
nameserver:
- https://dns.alidns.com/dns-query
- https://doh.pub/dns-query
fallback:
- https://1.0.0.1/dns-query
- tls://dns.google
fallback-filter:
geoip: true
geoip-code: CN
ipcidr:
- 240.0.0.0/4
proxies:
- name: vless-reality-vision-$NAME
type: vless
server: $IP
port: $vless_port
uuid: $UUID
network: tcp
udp: true
tls: true
flow: xtls-rprx-vision
servername: $reym
reality-opts:
public-key: $public_key
client-fingerprint: chrome
- name: vmess-ws-$NAME
type: vmess
server: $IP
port: $vmess_port
uuid: $UUID
alterId: 0
cipher: auto
udp: true
tls: false
network: ws
servername: www.bing.com
ws-opts:
path: "/$UUID-vm"
headers:
Host: www.bing.com
- name: hysteria2-$NAME
type: hysteria2
server: $IP
port: $hy2_port
password: $UUID
alpn:
- h3
sni: www.bing.com
skip-cert-verify: true
fast-open: true
- name: vmess-tls-argo-$NAME
type: vmess
server: icook.hk
port: 8443
uuid: $UUID
alterId: 0
cipher: auto
udp: true
tls: true
network: ws
servername: $argodomain
ws-opts:
path: "/$UUID-vm"
headers:
Host: $argodomain
- name: vmess-argo-$NAME
type: vmess
server: icook.hk
port: 8880
uuid: $UUID
alterId: 0
cipher: auto
udp: true
tls: false
network: ws
servername: $argodomain
ws-opts:
path: "/$UUID-vm"
headers:
Host: $argodomain
proxy-groups:
- name: 负载均衡
type: load-balance
url: https://www.gstatic.com/generate_204
interval: 300
strategy: round-robin
proxies:
- vless-reality-vision-$NAME