Add files via upload
This commit is contained in:
1 parent
e8d51df005
commit
9b8f8f981b
14 files changed
+84571
No files matched your search
@@ -0,0 +1,87 @@
|
|||||||
|
Yv01
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=7,sld+1
|
||||||
|
--dpi-desync-fake-tls=0x0F0F0F0F
|
||||||
|
--dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||||
|
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||||
|
--dpi-desync-fooling=badseq
|
||||||
|
--dpi-desync-autottl 2:2-12
|
||||||
|
Yv02
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=1,midsld,endhost-1
|
||||||
|
--dpi-desync-repeats=2
|
||||||
|
--dpi-desync-fooling=md5sig
|
||||||
|
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||||
|
Yv03
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=fake,multisplit
|
||||||
|
--dpi-desync-fake-tls=0x00000000
|
||||||
|
--dpi-desync-fake-tls=!
|
||||||
|
--dpi-desync-split-pos=1,midsld
|
||||||
|
--dpi-desync-repeats=2
|
||||||
|
--dpi-desync-fooling=badseq
|
||||||
|
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||||
|
Yv04
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync-repeats=6
|
||||||
|
--dpi-desync-fooling=badseq
|
||||||
|
--dpi-desync-badseq-increment=2
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=1,midsld
|
||||||
|
--dpi-desync-fake-quic=/opt/zapret/files/fake/quic_initial_www_google_com.bin
|
||||||
|
Yv05
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=2,5,105,host+5,sld-1,endsld-5,endsld
|
||||||
|
Yv06
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=1,midsld
|
||||||
|
--dpi-desync-repeats=2
|
||||||
|
Yv07
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=fake,multidisorder
|
||||||
|
--dpi-desync-split-pos=10,midsld
|
||||||
|
--dpi-desync-fake-tls=0x00000000
|
||||||
|
--dpi-desync-fake-tls=0x0F0F0F0F
|
||||||
|
--dpi-desync-fake-tls=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||||
|
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=fonts.google.com
|
||||||
|
--dpi-desync-split-seqovl=336
|
||||||
|
--dpi-desync-split-seqovl-pattern=/opt/zapret/files/fake/tls_clienthello_www_google_com.bin
|
||||||
|
--dpi-desync-fooling=badseq
|
||||||
|
Yv08
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=hostfakesplit
|
||||||
|
--dpi-desync-hostfakesplit-mod=host=google.com
|
||||||
|
--dpi-desync-fooling=ts
|
||||||
|
Yv09
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=1,sniext+1,host+1,midsld-2,midsld,midsld+2,endhost-1
|
||||||
|
Yv10
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=multidisorder
|
||||||
|
--dpi-desync-split-pos=1,2,3,5,105,host+5,sld-1,endsld-5,endsld
|
||||||
|
--dpi-desync-fooling=badsum
|
||||||
|
Yv11
|
||||||
|
--filter-tcp=443
|
||||||
|
--hostlist=/opt/zapret/ipset/zapret-hosts-google.txt
|
||||||
|
--dpi-desync=fake,multisplit
|
||||||
|
--dpi-desync-fake-tls=0x00000000
|
||||||
|
--dpi-desync-fake-tls=!
|
||||||
|
--dpi-desync-split-pos=1,sniext+1,host+1,midsld-2,midsld,midsld+2,endhost-1
|
||||||
|
--dpi-desync-repeats=2
|
||||||
|
--dpi-desync-fooling=badseq
|
||||||
|
--dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,223 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
OUT="/root/AllowDomainsList.mtrickle"
|
||||||
|
WORK="/tmp/mihomo_groups.$$"
|
||||||
|
mkdir -p "$WORK"
|
||||||
|
trap 'rm -rf "$WORK"' EXIT
|
||||||
|
|
||||||
|
REPO_TGZ="$WORK/repo.tgz"
|
||||||
|
REPO_DIR="$WORK/repo"
|
||||||
|
|
||||||
|
RED="$(printf '\033[31m')"
|
||||||
|
GRN="$(printf '\033[32m')"
|
||||||
|
YEL="$(printf '\033[33m')"
|
||||||
|
CYN="$(printf '\033[36m')"
|
||||||
|
MAG="$(printf '\033[35m')"
|
||||||
|
RST="$(printf '\033[0m')"
|
||||||
|
|
||||||
|
say() { color="$1"; shift; echo -e "${color}$*${RST}"; }
|
||||||
|
|
||||||
|
fetch() {
|
||||||
|
u="$1"; d="$2"
|
||||||
|
if command -v uclient-fetch >/dev/null 2>&1; then
|
||||||
|
uclient-fetch -q -O "$d" "$u"
|
||||||
|
elif command -v wget >/dev/null 2>&1; then
|
||||||
|
wget -q -O "$d" "$u"
|
||||||
|
elif command -v curl >/dev/null 2>&1; then
|
||||||
|
curl -fsSL -o "$d" "$u"
|
||||||
|
else
|
||||||
|
say "$RED" "ОШИБКА: нет uclient-fetch/wget/curl"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
count_lines_human() {
|
||||||
|
f="$1"
|
||||||
|
bytes="$(wc -c < "$f" 2>/dev/null || echo 0)"
|
||||||
|
nl="$(wc -l < "$f" 2>/dev/null || echo 0)"
|
||||||
|
if [ "$bytes" -gt 0 ] && [ "$nl" -eq 0 ]; then echo 1; else echo "$nl"; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
merge_lst_dir() {
|
||||||
|
src="$1"
|
||||||
|
[ -d "$src" ] || return 0
|
||||||
|
find "$src" -maxdepth 1 -type f -name '*.lst' -print | while IFS= read -r f; do
|
||||||
|
base="$(basename "$f")"
|
||||||
|
out="$WORK/$base"
|
||||||
|
awk '{ sub(/\r$/,""); print }' "$f" >> "$out"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
clear
|
||||||
|
say "$MAG" "Создаём список ItDog Allow Domains для MagiTrickle"
|
||||||
|
|
||||||
|
fetch "https://api.github.com/repos/itdoginfo/allow-domains/tarball/main" "$REPO_TGZ"
|
||||||
|
|
||||||
|
mkdir -p "$REPO_DIR"
|
||||||
|
tar -xzf "$REPO_TGZ" -C "$REPO_DIR"
|
||||||
|
|
||||||
|
ROOTDIR="$(find "$REPO_DIR" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
|
||||||
|
[ -n "${ROOTDIR:-}" ] || { say "$RED" "ОШИБКА: не нашёл корневую папку в архиве"; exit 1; }
|
||||||
|
|
||||||
|
say "$YEL" "Вытаскивем списки Categories / Services / Subnets/IPv4/IPv6"
|
||||||
|
merge_lst_dir "$ROOTDIR/Categories"
|
||||||
|
merge_lst_dir "$ROOTDIR/Services"
|
||||||
|
merge_lst_dir "$ROOTDIR/Subnets/IPv4"
|
||||||
|
merge_lst_dir "$ROOTDIR/Subnets/IPv6"
|
||||||
|
|
||||||
|
LIST_COUNT="$(find "$WORK" -maxdepth 1 -name '*.lst' | wc -l | tr -d ' ')"
|
||||||
|
say "$MAG" "Всего файлов в работе: $YEL$LIST_COUNT"
|
||||||
|
|
||||||
|
awk '
|
||||||
|
function trim(s){ sub(/^[ \t\r\n]+/,"",s); sub(/[ \t\r\n]+$/,"",s); return s }
|
||||||
|
function tolower_ascii(s, i,c,r,up,lo){
|
||||||
|
up="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; lo="abcdefghijklmnopqrstuvwxyz"; r=""
|
||||||
|
for(i=1;i<=length(s);i++){ c=substr(s,i,1); p=index(up,c); if(p) c=substr(lo,p,1); r=r c }
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
function titlecase(s){ return (s==""?s:toupper(substr(s,1,1)) substr(s,2)) }
|
||||||
|
FNR==1{
|
||||||
|
fn=FILENAME
|
||||||
|
sub(/^.*\//,"",fn); sub(/\.lst$/,"",fn)
|
||||||
|
grp=titlecase(tolower_ascii(fn))
|
||||||
|
}
|
||||||
|
{
|
||||||
|
line=$0
|
||||||
|
sub(/\r$/,"",line)
|
||||||
|
sub(/#.*/,"",line); sub(/;.*/,"",line)
|
||||||
|
line=trim(line)
|
||||||
|
if(line=="") next
|
||||||
|
|
||||||
|
if (line ~ /^[a-zA-Z]+:\/\//) {
|
||||||
|
gsub(/^([a-zA-Z]+:\/\/)/,"",line)
|
||||||
|
sub(/\/.*$/,"",line)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(line ~ /^\*\./) line=substr(line,2)
|
||||||
|
if(line ~ /^\./) line=substr(line,2)
|
||||||
|
|
||||||
|
line=trim(line)
|
||||||
|
if(line=="") next
|
||||||
|
|
||||||
|
print grp "\t" line
|
||||||
|
}
|
||||||
|
' "$WORK"/*.lst > "$WORK/tagged.tsv"
|
||||||
|
|
||||||
|
TAGGED_TOTAL="$(wc -l < "$WORK/tagged.tsv" 2>/dev/null || echo 0)"
|
||||||
|
say "$MAG" "Всего строк: $YEL$TAGGED_TOTAL"
|
||||||
|
say "$CYN" "Создаём общий список. Ждите..."
|
||||||
|
|
||||||
|
awk -F '\t' '
|
||||||
|
function is_ipv4(s){ return (s ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/) }
|
||||||
|
function is_ipv4_cidr(s){ return (s ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]{1,2}$/) }
|
||||||
|
function is_ipv6(s){ return (s ~ /^[0-9a-fA-F:]+$/) }
|
||||||
|
function is_ipv6_cidr(s){ return (s ~ /^[0-9a-fA-F:]+\/[0-9]{1,3}$/) }
|
||||||
|
function is_domainish(s){ return (s ~ /^[A-Za-z0-9][A-Za-z0-9.-]*\.[A-Za-z0-9.-]+$/) }
|
||||||
|
function dotcount(s, i,c,n){ n=0; for(i=1;i<=length(s);i++){ c=substr(s,i,1); if(c==".") n++ } return n }
|
||||||
|
|
||||||
|
function json_escape(s, i,c,o){
|
||||||
|
o=""
|
||||||
|
for(i=1;i<=length(s);i++){
|
||||||
|
c=substr(s,i,1)
|
||||||
|
if(c=="\\") o=o "\\\\"
|
||||||
|
else if(c=="\"") o=o "\\\""
|
||||||
|
else if(c=="\r" || c=="\n") o=o ""
|
||||||
|
else o=o c
|
||||||
|
}
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
function rid( x){
|
||||||
|
"hexdump -n 4 -e \x27/1 \"%02x\"\x27 /dev/urandom 2>/dev/null" | getline x
|
||||||
|
close("hexdump -n 4 -e \x27/1 \"%02x\"\x27 /dev/urandom 2>/dev/null")
|
||||||
|
if(x=="") x="00000000"
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
function hsv_to_hex(h, s, v, c,x,m,r,g,b,hh){
|
||||||
|
c=v*s
|
||||||
|
hh=h/60
|
||||||
|
x=c*(1-((hh%2)-1<0?-(hh%2-1):(hh%2-1)))
|
||||||
|
|
||||||
|
if(hh<1){r=c;g=x;b=0}
|
||||||
|
else if(hh<2){r=x;g=c;b=0}
|
||||||
|
else if(hh<3){r=0;g=c;b=x}
|
||||||
|
else if(hh<4){r=0;g=x;b=c}
|
||||||
|
else if(hh<5){r=x;g=0;b=c}
|
||||||
|
else {r=c;g=0;b=x}
|
||||||
|
|
||||||
|
m=v-c
|
||||||
|
r=int((r+m)*255)
|
||||||
|
g=int((g+m)*255)
|
||||||
|
b=int((b+m)*255)
|
||||||
|
|
||||||
|
return sprintf("#%02x%02x%02x",r,g,b)
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN{
|
||||||
|
OFS=""
|
||||||
|
print "{\"groups\":["
|
||||||
|
first_group=1
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
g=$1; v=$2
|
||||||
|
key=g SUBSEP v
|
||||||
|
if(seen[key]++) next
|
||||||
|
groups[g]=1
|
||||||
|
vals[g, ++cnt[g]] = v
|
||||||
|
}
|
||||||
|
|
||||||
|
END{
|
||||||
|
golden=137.508
|
||||||
|
|
||||||
|
n=0
|
||||||
|
for(g in groups){ glist[++n]=g }
|
||||||
|
|
||||||
|
for(i=1;i<=n;i++) for(j=i+1;j<=n;j++) if(glist[i] > glist[j]){ t=glist[i]; glist[i]=glist[j]; glist[j]=t }
|
||||||
|
|
||||||
|
for(gi=1; gi<=n; gi++){
|
||||||
|
g=glist[gi]
|
||||||
|
|
||||||
|
if(!first_group) printf(",\n")
|
||||||
|
first_group=0
|
||||||
|
|
||||||
|
gid=rid()
|
||||||
|
|
||||||
|
hue=(gi*golden)%360
|
||||||
|
color=hsv_to_hex(hue,0.65,0.95)
|
||||||
|
|
||||||
|
print "{\"id\":\"",gid,"\",\"name\":\"",json_escape(g),"\",\"color\":\"",color,"\",\"interface\":\"Mihomo\",\"enable\":true,\"rules\":["
|
||||||
|
first_rule=1
|
||||||
|
|
||||||
|
m=cnt[g]
|
||||||
|
for(i=1;i<=m;i++) vlist[i]=vals[g,i]
|
||||||
|
for(i=1;i<=m;i++) for(j=i+1;j<=m;j++) if(vlist[i] > vlist[j]){ t=vlist[i]; vlist[i]=vlist[j]; vlist[j]=t }
|
||||||
|
|
||||||
|
for(i=1;i<=m;i++){
|
||||||
|
v=vlist[i]
|
||||||
|
if(v=="") continue
|
||||||
|
|
||||||
|
if(is_ipv6_cidr(v) || is_ipv6(v)) typ="subnet6"
|
||||||
|
else if(is_ipv4_cidr(v) || is_ipv4(v)) typ="subnet"
|
||||||
|
else if(is_domainish(v)){
|
||||||
|
if(dotcount(v)>=2) typ="domain"; else typ="namespace"
|
||||||
|
} else typ="namespace"
|
||||||
|
|
||||||
|
if(!first_rule) printf(",\n")
|
||||||
|
first_rule=0
|
||||||
|
|
||||||
|
printf("{\"enable\":true,\"id\":\"%s\",\"name\":\"\",\"rule\":\"%s\",\"type\":\"%s\"}",rid(),json_escape(v),typ)
|
||||||
|
}
|
||||||
|
|
||||||
|
print "]}"
|
||||||
|
delete vlist
|
||||||
|
}
|
||||||
|
|
||||||
|
print "]}"
|
||||||
|
}
|
||||||
|
' "$WORK/tagged.tsv" > "$OUT"
|
||||||
|
|
||||||
|
say "$GRN" "Готово!"
|
||||||
|
say "$YEL" "Файл сохранён:" "$RST""$OUT"
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
GREEN="\033[1;32m"
|
||||||
|
RED="\033[1;31m"
|
||||||
|
NC="\033[0m"
|
||||||
|
|
||||||
|
IN="/root/WARP.conf"
|
||||||
|
OUT="/etc/mihomo/config.yaml"
|
||||||
|
TMP="$(mktemp)"
|
||||||
|
|
||||||
|
[ -r "$IN" ] || { echo -e "\n${RED}Файл ${NC}$IN ${RED}отсутвтвует!${NC}"; exit 1; }
|
||||||
|
|
||||||
|
awk -v OUT="$TMP" '
|
||||||
|
function trim(s){ gsub(/^[ \t\r\n]+|[ \t\r\n]+$/, "", s); return s }
|
||||||
|
function lc(s){ return tolower(s) }
|
||||||
|
function yaml_quote(s){
|
||||||
|
gsub(/\\/,"\\\\",s)
|
||||||
|
gsub(/"/,"\\\"",s)
|
||||||
|
gsub(/\r/,"",s)
|
||||||
|
return "\"" s "\""
|
||||||
|
}
|
||||||
|
function split_endpoint(s, a,n){
|
||||||
|
s=trim(s)
|
||||||
|
n=split(s,a,":")
|
||||||
|
if(n<2){ host=s; port="" } else {
|
||||||
|
port=a[n]
|
||||||
|
host=a[1]
|
||||||
|
for(i=2;i<n;i++) host=host ":" a[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BEGIN{
|
||||||
|
sec=""
|
||||||
|
addr4=""; addr6=""; dns=""; mtu=""
|
||||||
|
priv=""; pub=""; psk=""; allowed=""; endpoint=""; keep=""
|
||||||
|
s1=""; s2=""; s3=""; s4=""; jc=""; jmin=""; jmax=""; h1=""; h2=""; h3=""; h4=""
|
||||||
|
i1=""; i2=""; i3=""; i4=""; i5=""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
raw=$0
|
||||||
|
line=$0
|
||||||
|
sub(/[;#].*$/, "", line)
|
||||||
|
line=trim(line)
|
||||||
|
if(line=="") next
|
||||||
|
|
||||||
|
if(line ~ /^\[.*\]$/){
|
||||||
|
sec=lc(trim(substr(line,2,length(line)-2)))
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index(line,"=")==0) next
|
||||||
|
key=trim(substr(line,1,index(line,"=")-1))
|
||||||
|
val=trim(substr(line,index(line,"=")+1))
|
||||||
|
k=lc(key)
|
||||||
|
|
||||||
|
if(sec=="interface"){
|
||||||
|
if(k=="address"){
|
||||||
|
gsub(/,/, " ", val)
|
||||||
|
n=split(val, a, /[ \t]+/)
|
||||||
|
for(i=1;i<=n;i++){
|
||||||
|
if(a[i] ~ /:/) addr6=a[i]; else addr4=a[i]
|
||||||
|
}
|
||||||
|
} else if(k=="privatekey") priv=val
|
||||||
|
else if(k=="dns") dns=val
|
||||||
|
else if(k=="mtu") mtu=val
|
||||||
|
else if(k=="s1") s1=val
|
||||||
|
else if(k=="s2") s2=val
|
||||||
|
else if(k=="s3") s3=val
|
||||||
|
else if(k=="s4") s4=val
|
||||||
|
else if(k=="jc") jc=val
|
||||||
|
else if(k=="jmin") jmin=val
|
||||||
|
else if(k=="jmax") jmax=val
|
||||||
|
else if(k=="h1") h1=val
|
||||||
|
else if(k=="h2") h2=val
|
||||||
|
else if(k=="h3") h3=val
|
||||||
|
else if(k=="h4") h4=val
|
||||||
|
else if(k=="i1") i1=val
|
||||||
|
else if(k=="i2") i2=val
|
||||||
|
else if(k=="i3") i3=val
|
||||||
|
else if(k=="i4") i4=val
|
||||||
|
else if(k=="i5") i5=val
|
||||||
|
} else if(sec=="peer"){
|
||||||
|
if(k=="publickey") pub=val
|
||||||
|
else if(k=="presharedkey") psk=val
|
||||||
|
else if(k=="allowedips") { gsub(/[ \t]+/, "", val); allowed=val }
|
||||||
|
else if(k=="endpoint") endpoint=val
|
||||||
|
else if(k=="persistentkeepalive") keep=val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END{
|
||||||
|
if(priv=="" || pub=="" || endpoint==""){
|
||||||
|
echo -e "\n${RED}В ${NC}WARP.conf${RED} отсутствуют обязательные поля!${NC}"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
split_endpoint(endpoint)
|
||||||
|
|
||||||
|
ip=addr4; sub(/\/32$/, "", ip)
|
||||||
|
ipv6=addr6; sub(/\/128$/, "", ipv6)
|
||||||
|
|
||||||
|
if(allowed=="") allowed="0.0.0.0/0,::/0"
|
||||||
|
n=split(allowed, aip, ",")
|
||||||
|
|
||||||
|
allowed_block=""
|
||||||
|
for(i=1;i<=n;i++){
|
||||||
|
if(aip[i]=="") continue
|
||||||
|
allowed_block = allowed_block " - " yaml_quote(aip[i]) "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
print "mixed-port: 7890" > OUT
|
||||||
|
print "allow-lan: false" >> OUT
|
||||||
|
print "tcp-concurrent: true" >> OUT
|
||||||
|
print "mode: rule" >> OUT
|
||||||
|
print "log-level: error" >> OUT
|
||||||
|
print "ipv6: false" >> OUT
|
||||||
|
print "external-controller: 0.0.0.0:9090" >> OUT
|
||||||
|
print "external-ui: ./ui" >> OUT
|
||||||
|
print "secret:" >> OUT
|
||||||
|
print "unified-delay: true" >> OUT
|
||||||
|
print "profile:" >> OUT
|
||||||
|
print " store-selected: true" >> OUT
|
||||||
|
print " store-fake-ip: true" >> OUT
|
||||||
|
print "" >> OUT
|
||||||
|
|
||||||
|
print "proxy-groups:" >> OUT
|
||||||
|
print " - name: GLOBAL" >> OUT
|
||||||
|
print " type: select" >> OUT
|
||||||
|
print " proxies:" >> OUT
|
||||||
|
print " - WARP" >> OUT
|
||||||
|
print " - REJECT" >> OUT
|
||||||
|
print "" >> OUT
|
||||||
|
|
||||||
|
print "rules:" >> OUT
|
||||||
|
print " - \"MATCH,GLOBAL\"" >> OUT
|
||||||
|
print "" >> OUT
|
||||||
|
|
||||||
|
print "proxies:" >> OUT
|
||||||
|
print " - name: WARP" >> OUT
|
||||||
|
print " type: wireguard" >> OUT
|
||||||
|
print " server: " host >> OUT
|
||||||
|
if(port!="") print " port: " port >> OUT
|
||||||
|
print " private-key: " yaml_quote(priv) >> OUT
|
||||||
|
print " udp: true" >> OUT
|
||||||
|
if(ip!="") print " ip: " ip >> OUT
|
||||||
|
if(ipv6!="") print " ipv6: " ipv6 >> OUT
|
||||||
|
print " public-key: " yaml_quote(pub) >> OUT
|
||||||
|
if(psk!="") print " pre-shared-key: " yaml_quote(psk) >> OUT
|
||||||
|
print " allowed-ips:" >> OUT
|
||||||
|
printf "%s", allowed_block >> OUT
|
||||||
|
if(mtu!="") print " mtu: " mtu >> OUT
|
||||||
|
if(keep!="") print " persistent-keepalive: " keep >> OUT
|
||||||
|
|
||||||
|
if(s1!="" || s2!="" || s3!="" || s4!="" || jc!="" || jmin!="" || jmax!="" || h1!="" || h2!="" || h3!="" || h4!="" || i1!="" || i2!="" || i3!="" || i4!="" || i5!=""){
|
||||||
|
print " amnezia-wg-option:" >> OUT
|
||||||
|
if(s1!="") print " s1: " s1 >> OUT
|
||||||
|
if(s2!="") print " s2: " s2 >> OUT
|
||||||
|
if(s3!="") print " s3: " s3 >> OUT
|
||||||
|
if(s4!="") print " s4: " s4 >> OUT
|
||||||
|
if(jc!="") print " jc: " jc >> OUT
|
||||||
|
if(jmin!="")print " jmin: " jmin >> OUT
|
||||||
|
if(jmax!="")print " jmax: " jmax >> OUT
|
||||||
|
if(h1!="") print " h1: " h1 >> OUT
|
||||||
|
if(h2!="") print " h2: " h2 >> OUT
|
||||||
|
if(h3!="") print " h3: " h3 >> OUT
|
||||||
|
if(h4!="") print " h4: " h4 >> OUT
|
||||||
|
if(i1!="") print " i1: " yaml_quote(i1) >> OUT
|
||||||
|
if(i2!="") print " i2: " yaml_quote(i2) >> OUT
|
||||||
|
if(i3!="") print " i3: " yaml_quote(i3) >> OUT
|
||||||
|
if(i4!="") print " i4: " yaml_quote(i4) >> OUT
|
||||||
|
if(i5!="") print " i5: " yaml_quote(i5) >> OUT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' "$IN"
|
||||||
|
|
||||||
|
chmod 600 "$TMP"
|
||||||
|
mkdir -p "$(dirname "$OUT")"
|
||||||
|
mv -f "$TMP" "$OUT"
|
||||||
|
|
||||||
|
/etc/init.d/mihomo reload
|
||||||
|
/etc/init.d/mihomo restart
|
||||||
|
echo -e "\n${NC}WARP${GREEN} интегрирован в ${NC}Mihomo${GREEN}!${NC}"
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
EP_LIST='Россия |engage.cloudflareclient.com:4500
|
||||||
|
Россия #2 |engage.cloudflareclient.com:2408
|
||||||
|
Россия #3 |engage.cloudflareclient.com:500'
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
RED='\033[0;31m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
MAGENTA="\033[1;35m"
|
||||||
|
CYAN="\033[1;36m"
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
chose_endpoint() {
|
||||||
|
while true; do
|
||||||
|
echo -e "\n${MAGENTA}Выберите endpoint${NC}"
|
||||||
|
|
||||||
|
i=1
|
||||||
|
while IFS='|' read -r country ep; do
|
||||||
|
printf "${CYAN}%d) ${GREEN}%-10s${MAGENTA}| ${CYAN}%s${NC}\n" "$i" "$country" "$ep"
|
||||||
|
i=$((i+1))
|
||||||
|
done <<EOF
|
||||||
|
$EP_LIST
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -en "${YELLOW}Выберите пункт (${NC}Enter = Россия${YELLOW}): ${NC}"
|
||||||
|
read num
|
||||||
|
|
||||||
|
MAX_NUM=$(printf '%s\n' "$EP_LIST" | wc -l)
|
||||||
|
|
||||||
|
[ -z "$num" ] && {
|
||||||
|
ENDPOINT="engage.cloudflareclient.com:4500"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! printf '%s' "$num" | grep -qE '^[0-9]+$' || [ "$num" -lt 1 ] || [ "$num" -gt "$MAX_NUM" ]; then
|
||||||
|
ENDPOINT="engage.cloudflareclient.com:4500"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
ENDPOINT="$(printf '%s\n' "$EP_LIST" | sed -n "${num}p" | cut -d'|' -f2)"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
echo -e "${MAGENTA}Генерируем WARP${NC}"
|
||||||
|
|
||||||
|
if command -v apk >/dev/null 2>&1; then
|
||||||
|
PKG="apk"
|
||||||
|
elif command -v opkg >/dev/null 2>&1; then
|
||||||
|
PKG="opkg"
|
||||||
|
else
|
||||||
|
echo -e "${RED}Не найден пакетный менеджер!${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${CYAN}Проверяем зависимости${NC}"
|
||||||
|
|
||||||
|
deps="wireguard-tools curl jq"
|
||||||
|
missing=""
|
||||||
|
|
||||||
|
for pkg in $deps; do
|
||||||
|
if [ "$PKG" = "apk" ]; then
|
||||||
|
apk info -e "$pkg" >/dev/null 2>&1 || missing="$missing $pkg"
|
||||||
|
else
|
||||||
|
opkg list-installed 2>/dev/null | grep -q "^$pkg " || missing="$missing $pkg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo -e "${CYAN}Обновляем пакеты${NC}"
|
||||||
|
if [ "$PKG" = "apk" ]; then
|
||||||
|
apk update >/dev/null 2>&1 || { echo -e "\n${RED}Ошибка обновления пакетов!${NC}"; exit 1; }
|
||||||
|
else
|
||||||
|
opkg update >/dev/null 2>&1 || { echo -e "\n${RED}Ошибка обновления пакетов!${NC}"; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
install_pkg() {
|
||||||
|
pkg="$1"
|
||||||
|
if [ "$PKG" = "apk" ]; then
|
||||||
|
apk info -e "$pkg" >/dev/null 2>&1 && return
|
||||||
|
echo -e "${GREEN}Устанавливаем:${NC} $pkg"
|
||||||
|
apk add "$pkg" >/dev/null 2>&1 || { echo -e "\n${RED}Ошибка установки${NC} $pkg"; exit 1; }
|
||||||
|
else
|
||||||
|
opkg list-installed 2>/dev/null | grep -qF "^$pkg " && return
|
||||||
|
echo -e "${GREEN}Устанавливаем:${NC} $pkg"
|
||||||
|
opkg install "$pkg" >/dev/null 2>&1 || { echo -e "\n${RED}Ошибка установки${NC} $pkg"; exit 1; }
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for pkg in $missing; do
|
||||||
|
install_pkg "$pkg"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${CYAN}Генерируем ключи${NC}"
|
||||||
|
priv="$(wg genkey)"
|
||||||
|
pub="$(printf "%s" "$priv" | wg pubkey)"
|
||||||
|
|
||||||
|
api="https://api.cloudflareclient.com/v0i1909051800"
|
||||||
|
|
||||||
|
ins() {
|
||||||
|
curl -s \
|
||||||
|
-H "User-Agent: okhttp/3.12.1" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-X "$1" "$api/$2" "${@:3}"
|
||||||
|
}
|
||||||
|
|
||||||
|
sec() {
|
||||||
|
ins "$1" "$2" -H "Authorization: Bearer $3" "${@:4}"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo -e "${CYAN}Регистрируем устройство в ${NC}Cloudflare"
|
||||||
|
|
||||||
|
response=$(ins POST "reg" \
|
||||||
|
-d "{\"install_id\":\"\",\"tos\":\"$(date -u +%FT%TZ)\",\"key\":\"${pub}\",\"fcm_token\":\"\",\"type\":\"ios\",\"locale\":\"en_US\"}")
|
||||||
|
|
||||||
|
id=$(echo "$response" | jq -r '.result.id')
|
||||||
|
token=$(echo "$response" | jq -r '.result.token')
|
||||||
|
|
||||||
|
if [ -z "$id" ] || [ "$id" = "null" ]; then
|
||||||
|
echo -e "${RED}Ошибка регистрации${NC} $response"
|
||||||
|
if [ "$(/etc/init.d/zapret status 2>/dev/null)" = "running" ]; then
|
||||||
|
echo -e "${YELLOW}Zapret запущен. Направьте через него ${NC}cloudflareclient.com${YELLOW} и повторите попытку.${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${YELLOW}Требуется установленный и запущенный ${NC}Zapret${YELLOW} с маршрутизацией ${NC}cloudflareclient.com${YELLOW} через него.${NC}"
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
################################################################################################
|
||||||
|
chose_endpoint
|
||||||
|
################################################################################################
|
||||||
|
|
||||||
|
echo -e "${GREEN}Активируем и генерируем ${NC}WARP${NC}"
|
||||||
|
|
||||||
|
response=$(sec PATCH "reg/${id}" "$token" -d '{"warp_enabled":true}')
|
||||||
|
|
||||||
|
peer_pub=$(echo "$response" | jq -r '.result.config.peers[0].public_key')
|
||||||
|
client_ipv4=$(echo "$response" | jq -r '.result.config.interface.addresses.v4')
|
||||||
|
client_ipv6=$(echo "$response" | jq -r '.result.config.interface.addresses.v6')
|
||||||
|
|
||||||
|
if [ -z "$peer_pub" ] || [ "$peer_pub" = "null" ]; then
|
||||||
|
echo -e "\n${RED}Ошибка получения конфигурации${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
conf=$(cat <<EOF
|
||||||
|
[Interface]
|
||||||
|
PrivateKey = ${priv}
|
||||||
|
Address = ${client_ipv4}, ${client_ipv6}
|
||||||
|
DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
|
||||||
|
MTU = 1280
|
||||||
|
S1 = 0
|
||||||
|
S2 = 0
|
||||||
|
Jc = 4
|
||||||
|
Jmin = 40
|
||||||
|
Jmax = 70
|
||||||
|
H1 = 1
|
||||||
|
H2 = 2
|
||||||
|
H3 = 3
|
||||||
|
H4 = 4
|
||||||
|
I1 = <b 0xce000000010897a297ecc34cd6dd000044d0ec2e2e1ea2991f467ace4222129b5a098823784694b4897b9986ae0b7280135fa85e196d9ad980b150122129ce2a9379531b0fd3e871ca5fdb883c369832f730e272d7b8b74f393f9f0fa43f11e510ecb2219a52984410c204cf875585340c62238e14ad04dff382f2c200e0ee22fe743b9c6b8b043121c5710ec289f471c91ee414fca8b8be8419ae8ce7ffc53837f6ade262891895f3f4cecd31bc93ac5599e18e4f01b472362b8056c3172b513051f8322d1062997ef4a383b01706598d08d48c221d30e74c7ce000cdad36b706b1bf9b0607c32ec4b3203a4ee21ab64df336212b9758280803fcab14933b0e7ee1e04a7becce3e2633f4852585c567894a5f9efe9706a151b615856647e8b7dba69ab357b3982f554549bef9256111b2d67afde0b496f16962d4957ff654232aa9e845b61463908309cfd9de0a6abf5f425f577d7e5f6440652aa8da5f73588e82e9470f3b21b27b28c649506ae1a7f5f15b876f56abc4615f49911549b9bb39dd804fde182bd2dcec0c33bad9b138ca07d4a4a1650a2c2686acea05727e2a78962a840ae428f55627516e73c83dd8893b02358e81b524b4d99fda6df52b3a8d7a5291326e7ac9d773c5b43b8444554ef5aea104a738ed650aa979674bbed38da58ac29d87c29d387d80b526065baeb073ce65f075ccb56e47533aef357dceaa8293a523c5f6f790be90e4731123d3c6152a70576e90b4ab5bc5ead01576c68ab633ff7d36dcde2a0b2c68897e1acfc4d6483aaaeb635dd63c96b2b6a7a2bfe042f6aed82e5363aa850aace12ee3b1a93f30d8ab9537df483152a5527faca21efc9981b304f11fc95336f5b9637b174c5a0659e2b22e159a9fed4b8e93047371175b1d6d9cc8ab745f3b2281537d1c75fb9451871864efa5d184c38c185fd203de206751b92620f7c369e031d2041e152040920ac2c5ab5340bfc9d0561176abf10a147287ea90758575ac6a9f5ac9f390d0d5b23ee12af583383d994e22c0cf42383834bcd3ada1b3825a0664d8f3fb678261d57601ddf94a8a68a7c273a18c08aa99c7ad8c6c42eab67718843597ec9930457359dfdfbce024afc2dcf9348579a57d8d3490b2fa99f278f1c37d87dad9b221acd575192ffae1784f8e60ec7cee4068b6b988f0433d96d6a1b1865f4e155e9fe020279f434f3bf1bd117b717b92f6cd1cc9bea7d45978bcc3f24bda631a36910110a6ec06da35f8966c9279d130347594f13e9e07514fa370754d1424c0a1545c5070ef9fb2acd14233e8a50bfc5978b5bdf8bc1714731f798d21e2004117c61f2989dd44f0cf027b27d4019e81ed4b5c31db347c4a3a4d85048d7093cf16753d7b0d15e078f5c7a5205dc2f87e330a1f716738dce1c6180e9d02869b5546f1c4d2748f8c90d9693cba4e0079297d22fd61402dea32ff0eb69ebd65a5d0b687d87e3a8b2c42b648aa723c7c7daf37abcc4bb85caea2ee8f55bec20e913b3324ab8f5c3304f820d42ad1b9f2ffc1a3af9927136b4419e1e579ab4c2ae3c776d293d397d575df181e6cae0a4ada5d67ecea171cca3288d57c7bbdaee3befe745fb7d634f70386d873b90c4d6c6596bb65af68f9e5121e67ebf0d89d3c909ceedfb32ce9575a7758ff080724e1ab5d5f43074ecb53a479af21ed03d7b6899c36631c0166f9d47e5e1d4528a5d3d3f744029c4b1c190cbfbad06f5f83f7ad0429fa9a2719c56ffe3783460e166de2d8>
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey = ${peer_pub}
|
||||||
|
AllowedIPs = 0.0.0.0/0, ::/0
|
||||||
|
Endpoint = ${ENDPOINT}
|
||||||
|
PersistentKeepalive = 25
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -e "${GREEN}========== ${YELLOW}WARP CONFIG${GREEN} ==========${NC}"
|
||||||
|
echo "$conf"
|
||||||
|
echo -e "${GREEN}=================================${NC}"
|
||||||
|
echo "$conf" > /root/WARP.conf
|
||||||
|
echo -e "\n${YELLOW}Файл сохранён:${NC} /root/WARP.conf"
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT_VERSION="v0.1.2-alpha"
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
RED='\033[0;31m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
log_info() { echo -e "${GREEN}[INFO]${NC} $*"; }
|
||||||
|
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
|
||||||
|
log_error() { echo -e "${RED}[ERROR]${NC} $*" >&2; }
|
||||||
|
log_step() { echo -e "${GREEN}=== $* ===${NC}"; }
|
||||||
|
log_done() { echo -e "${GREEN}$*${NC}"; }
|
||||||
|
|
||||||
|
USE_APK=0
|
||||||
|
if command -v apk > /dev/null 2>&1; then
|
||||||
|
USE_APK=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
is_pkg_installed() {
|
||||||
|
if [ "$USE_APK" -eq 1 ]; then
|
||||||
|
apk info "$1" > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
opkg list-installed 2>/dev/null | grep -q "^$1 "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_pkg() {
|
||||||
|
if [ "$USE_APK" -eq 1 ]; then
|
||||||
|
apk del "$1" > /dev/null 2>&1 || true
|
||||||
|
else
|
||||||
|
opkg remove "$1" > /dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_mihomo() {
|
||||||
|
log_info "Проверка наличия Mihomo..."
|
||||||
|
local CLEANED=0
|
||||||
|
|
||||||
|
if [ -f "/etc/init.d/mihomo" ]; then
|
||||||
|
/etc/init.d/mihomo stop 2>/dev/null || true
|
||||||
|
/etc/init.d/mihomo disable 2>/dev/null || true
|
||||||
|
rm -f /etc/init.d/mihomo
|
||||||
|
CLEANED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "/usr/bin/mihomo" ]; then
|
||||||
|
rm -f /usr/bin/mihomo
|
||||||
|
CLEANED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "/etc/mihomo" ] || [ -d "/www/luci-static/resources/view/mihomo" ]; then
|
||||||
|
rm -rf /etc/mihomo
|
||||||
|
rm -f /usr/share/luci/menu.d/luci-app-mihomo.json
|
||||||
|
rm -f /usr/share/rpcd/acl.d/luci-app-mihomo.json
|
||||||
|
rm -rf /www/luci-static/resources/view/mihomo
|
||||||
|
CLEANED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CLEANED" -eq 1 ]; then
|
||||||
|
log_done "Mihomo и его файлы успешно удалены."
|
||||||
|
else
|
||||||
|
log_done "Mihomo не найден (уже удалён)."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_hev_tunnel() {
|
||||||
|
log_info "Проверка наличия Hev-Socks5-Tunnel..."
|
||||||
|
local ACTION_TAKEN=0
|
||||||
|
|
||||||
|
if [ -f "/etc/init.d/hev-socks5-tunnel" ]; then
|
||||||
|
/etc/init.d/hev-socks5-tunnel stop 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is_pkg_installed hev-socks5-tunnel; then
|
||||||
|
remove_pkg hev-socks5-tunnel
|
||||||
|
ACTION_TAKEN=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "/etc/hev-socks5-tunnel" ] || [ -f "/etc/config/hev-socks5-tunnel" ]; then
|
||||||
|
rm -rf /etc/hev-socks5-tunnel
|
||||||
|
rm -f /etc/config/hev-socks5-tunnel
|
||||||
|
ACTION_TAKEN=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "--> Очистка UCI..."
|
||||||
|
uci delete network.Mihomo 2>/dev/null || true
|
||||||
|
|
||||||
|
local fw_section
|
||||||
|
for fw_section in $(uci show firewall 2>/dev/null \
|
||||||
|
| grep -E "\.name='Mihomo'" \
|
||||||
|
| sed "s/\.name.*//"); do
|
||||||
|
uci delete "$fw_section" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
|
||||||
|
for fw_section in $(uci show firewall 2>/dev/null \
|
||||||
|
| grep -E "\.(src|dest)='Mihomo'" \
|
||||||
|
| sed -E "s/\.(src|dest).*//"); do
|
||||||
|
uci delete "$fw_section" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
|
||||||
|
uci delete firewall.Mihomo 2>/dev/null || true
|
||||||
|
uci delete firewall.lan_to_Mihomo 2>/dev/null || true
|
||||||
|
|
||||||
|
uci commit network
|
||||||
|
uci commit firewall
|
||||||
|
|
||||||
|
/etc/init.d/network reload 2>/dev/null || true
|
||||||
|
/etc/init.d/firewall restart 2>/dev/null || true
|
||||||
|
|
||||||
|
if [ "$ACTION_TAKEN" -eq 1 ]; then
|
||||||
|
log_done "Hev-Socks5-Tunnel и настройки удалены."
|
||||||
|
else
|
||||||
|
log_done "Hev-Socks5-Tunnel не найден (уже удалён)."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_magitrickle() {
|
||||||
|
log_info "Проверка наличия MagiTrickle..."
|
||||||
|
local PKG_REMOVED=0
|
||||||
|
|
||||||
|
if [ -f "/etc/init.d/magitrickle" ]; then
|
||||||
|
/etc/init.d/magitrickle stop 2>/dev/null || true
|
||||||
|
/etc/init.d/magitrickle disable 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is_pkg_installed magitrickle_mod; then
|
||||||
|
log_info "Найден MagiTrickle Mod. Удаление..."
|
||||||
|
remove_pkg magitrickle_mod
|
||||||
|
PKG_REMOVED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is_pkg_installed magitrickle; then
|
||||||
|
log_info "Найден MagiTrickle. Удаление..."
|
||||||
|
remove_pkg magitrickle
|
||||||
|
PKG_REMOVED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local FILES_REMOVED=0
|
||||||
|
if [ -d "/www/luci-static/resources/view/magitrickle" ] || \
|
||||||
|
[ -f "/usr/share/luci/menu.d/luci-app-magitrickle.json" ]; then
|
||||||
|
rm -rf /www/luci-static/resources/view/magitrickle
|
||||||
|
rm -f /usr/share/luci/menu.d/luci-app-magitrickle.json
|
||||||
|
FILES_REMOVED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "/etc/magitrickle/state/config.yaml" ]; then
|
||||||
|
rm -f /etc/magitrickle/state/config.yaml
|
||||||
|
rm -f /etc/magitrickle/state/config.yaml.backup
|
||||||
|
FILES_REMOVED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$PKG_REMOVED" -eq 1 ] || [ "$FILES_REMOVED" -eq 1 ]; then
|
||||||
|
log_done "MagiTrickle и его файлы удалены."
|
||||||
|
else
|
||||||
|
log_done "MagiTrickle не найден (уже удалён)."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup_system() {
|
||||||
|
log_info "Очистка кэша и перезапуск служб..."
|
||||||
|
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/
|
||||||
|
/etc/init.d/firewall stop >/dev/null 2>&1
|
||||||
|
sleep 2
|
||||||
|
/etc/init.d/firewall start >/dev/null 2>&1
|
||||||
|
conntrack -F 2>/dev/null
|
||||||
|
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||||
|
/etc/init.d/odhcpd restart >/dev/null 2>&1
|
||||||
|
/etc/init.d/rpcd restart >/dev/null 2>&1
|
||||||
|
/etc/init.d/uhttpd restart >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
clear
|
||||||
|
log_done "Скрипт удаления Mixomo OpenWrt $SCRIPT_VERSION от Internet Helper"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
log_step "[1/4] Удаление Mihomo"
|
||||||
|
remove_mihomo
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
log_step "[2/4] Удаление Hev-Tunnel"
|
||||||
|
remove_hev_tunnel
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
log_step "[3/4] Удаление MagiTrickle"
|
||||||
|
remove_magitrickle
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
log_step "[4/4] Завершение"
|
||||||
|
cleanup_system
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
log_done "Удаление успешно завершено!"
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,213 @@
|
|||||||
|
127.0.0.1 localhost
|
||||||
|
|
||||||
|
::1 localhost ip6-localhost ip6-loopback
|
||||||
|
ff02::1 ip6-allnodes
|
||||||
|
ff02::2 ip6-allrouters
|
||||||
|
|
||||||
|
#mafioznik
|
||||||
|
|
||||||
|
# ChatGPT, OpenAI:
|
||||||
|
103.27.157.38 chatgpt.com
|
||||||
|
103.27.157.38 ab.chatgpt.com
|
||||||
|
103.27.157.38 auth.openai.com
|
||||||
|
103.27.157.38 auth0.openai.com
|
||||||
|
103.27.157.38 platform.openai.com
|
||||||
|
103.27.157.38 cdn.oaistatic.com
|
||||||
|
103.27.157.38 files.oaiusercontent.com
|
||||||
|
103.27.157.38 cdn.auth0.com
|
||||||
|
103.27.157.38 tcr9i.chat.openai.com
|
||||||
|
103.27.157.38 webrtc.chatgpt.com
|
||||||
|
103.27.157.38 android.chat.openai.com
|
||||||
|
103.27.157.38 api.openai.com
|
||||||
|
103.27.157.38 ios.chat.openai.com
|
||||||
|
103.27.157.38 operator.chatgpt.com
|
||||||
|
|
||||||
|
# Сервисы Google:
|
||||||
|
103.27.157.38 gemini.google.com
|
||||||
|
103.27.157.38 aistudio.google.com
|
||||||
|
103.27.157.38 generativelanguage.googleapis.com
|
||||||
|
103.27.157.38 aitestkitchen.withgoogle.com
|
||||||
|
103.27.157.38 aisandbox-pa.googleapis.com
|
||||||
|
103.27.157.38 webchannel-alkalimakersuite-pa.clients6.google.com
|
||||||
|
103.27.157.38 alkalimakersuite-pa.clients6.google.com
|
||||||
|
103.27.157.38 assistant-s3-pa.googleapis.com
|
||||||
|
103.27.157.38 proactivebackend-pa.googleapis.com
|
||||||
|
103.27.157.38 o.pki.goog
|
||||||
|
103.27.157.38 labs.google
|
||||||
|
103.27.157.38 notebooklm.google
|
||||||
|
103.27.157.38 notebooklm.google.com
|
||||||
|
103.27.157.38 jules.google.com
|
||||||
|
103.27.157.38 stitch.withgoogle.com
|
||||||
|
103.27.157.38 robinfrontend-pa.googleapis.com
|
||||||
|
|
||||||
|
# Microsoft Copilot, Microsoft Rewards, Xbox, Xbox Cloud Gaming:
|
||||||
|
103.27.157.38 copilot.microsoft.com
|
||||||
|
103.27.157.38 sydney.bing.com
|
||||||
|
103.27.157.38 edgeservices.bing.com
|
||||||
|
103.27.157.38 rewards.bing.com
|
||||||
|
103.27.157.38 xsts.auth.xboxlive.com
|
||||||
|
103.27.157.38 xgpuwebf2p.gssv-play-prod.xboxlive.com
|
||||||
|
103.27.157.38 xgpuweb.gssv-play-prod.xboxlive.com
|
||||||
|
103.27.157.38 win1910.ipv6.microsoft.com
|
||||||
|
103.27.157.38 azwindows.ipv6.microsoft.com.akadns.net
|
||||||
|
103.27.157.38 ipv6.msftconnecttest.com
|
||||||
|
103.27.157.38 ncsiv6-geo.trafficmanager.net
|
||||||
|
103.27.157.38 ipv6.msftconnecttest.com.edgesuite.net
|
||||||
|
103.27.157.38 a1968.i6g1.akamai.net
|
||||||
|
103.27.157.38 a1961.g2.akamai.net
|
||||||
|
103.27.157.38 ncsi-geo.trafficmanager.net
|
||||||
|
103.27.157.38 www.msftconnecttest.com
|
||||||
|
103.27.157.38 www.msftncsi.com.edgesuite.net
|
||||||
|
103.27.157.38 www.microsoft.com-c-3.edgekey.net
|
||||||
|
103.27.157.38 www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net
|
||||||
|
103.27.157.38 e13678.dscb.akamaiedge.net
|
||||||
|
|
||||||
|
# Spotify:
|
||||||
|
103.27.157.38 api.spotify.com
|
||||||
|
103.27.157.38 xpui.app.spotify.com
|
||||||
|
103.27.157.38 appresolve.spotify.com
|
||||||
|
103.27.157.38 login5.spotify.com
|
||||||
|
103.27.157.38 login.app.spotify.com
|
||||||
|
103.27.157.38 encore.scdn.co
|
||||||
|
103.27.157.38 ap-gew1.spotify.com
|
||||||
|
103.27.157.38 gew1-spclient.spotify.com
|
||||||
|
103.27.157.38 spclient.wg.spotify.com
|
||||||
|
103.27.157.38 api-partner.spotify.com
|
||||||
|
103.27.157.38 aet.spotify.com
|
||||||
|
103.27.157.38 www.spotify.com
|
||||||
|
103.27.157.38 accounts.spotify.com
|
||||||
|
103.27.157.38 open.spotify.com
|
||||||
|
|
||||||
|
# GitHub Copilot:
|
||||||
|
103.27.157.38 api.individual.githubcopilot.com
|
||||||
|
103.27.157.38 proxy.individual.githubcopilot.com
|
||||||
|
|
||||||
|
# JetBrains:
|
||||||
|
103.27.157.38 datalore.jetbrains.com
|
||||||
|
103.27.157.38 plugins.jetbrains.com
|
||||||
|
103.27.157.38 download.jetbrains.com
|
||||||
|
103.27.157.38 account.jetbrains.com
|
||||||
|
103.27.157.38 api.jetbrains.ai
|
||||||
|
|
||||||
|
# ElevenLabs:
|
||||||
|
103.27.157.38 elevenlabs.io
|
||||||
|
103.27.157.38 api.us.elevenlabs.io
|
||||||
|
103.27.157.38 elevenreader.io
|
||||||
|
103.27.157.38 api.elevenlabs.io
|
||||||
|
103.27.157.38 help.elevenlabs.io
|
||||||
|
|
||||||
|
# Truth Social
|
||||||
|
103.27.157.38 truthsocial.com
|
||||||
|
103.27.157.38 static-assets-1.truthsocial.com
|
||||||
|
|
||||||
|
# Grok
|
||||||
|
103.27.157.38 grok.com
|
||||||
|
103.27.157.38 accounts.x.ai
|
||||||
|
103.27.157.38 assets.grok.com
|
||||||
|
|
||||||
|
# Tidal
|
||||||
|
103.27.157.38 api.tidal.com
|
||||||
|
103.27.157.38 listen.tidal.com
|
||||||
|
103.27.157.38 login.tidal.com
|
||||||
|
103.27.157.38 auth.tidal.com
|
||||||
|
103.27.157.38 link.tidal.com
|
||||||
|
103.27.157.38 dd.tidal.com
|
||||||
|
103.27.157.38 resources.tidal.com
|
||||||
|
103.27.157.38 images.tidal.com
|
||||||
|
103.27.157.38 fsu.fa.tidal.com
|
||||||
|
103.27.157.38 geolocation.onetrust.com
|
||||||
|
103.27.157.38 api.squareup.com
|
||||||
|
103.27.157.38 api-global.squareup.com
|
||||||
|
|
||||||
|
# DeepL
|
||||||
|
103.27.157.38 deepl.com
|
||||||
|
103.27.157.38 www.deepl.com
|
||||||
|
103.27.157.38 www2.deepl.com
|
||||||
|
103.27.157.38 login-wall.deepl.com
|
||||||
|
103.27.157.38 w.deepl.com
|
||||||
|
103.27.157.38 s.deepl.com
|
||||||
|
103.27.157.38 dict.deepl.com
|
||||||
|
103.27.157.38 ita-free.www.deepl.com
|
||||||
|
103.27.157.38 write-free.www.deepl.com
|
||||||
|
103.27.157.38 experimentation.deepl.com
|
||||||
|
103.27.157.38 experimentation-grpc.deepl.com
|
||||||
|
103.27.157.38 ita-free.app.deepl.com
|
||||||
|
103.27.157.38 shield.deepl.com
|
||||||
|
103.27.157.38 ott.deepl.com
|
||||||
|
103.27.157.38 api-free.deepl.com
|
||||||
|
103.27.157.38 backend.deepl.com
|
||||||
|
103.27.157.38 clearance.deepl.com
|
||||||
|
103.27.157.38 errortracking.deepl.com
|
||||||
|
103.27.157.38 auth.deepl.com
|
||||||
|
103.27.157.38 oneshot-free.www.deepl.com
|
||||||
|
|
||||||
|
# Deezer
|
||||||
|
103.27.157.38 deezer.com
|
||||||
|
103.27.157.38 www.deezer.com
|
||||||
|
103.27.157.38 dzcdn.net
|
||||||
|
103.27.157.38 payment.deezer.com
|
||||||
|
|
||||||
|
# Weather.com
|
||||||
|
103.27.157.38 weather.com
|
||||||
|
103.27.157.38 upsx.weather.com
|
||||||
|
|
||||||
|
# Guilded
|
||||||
|
103.27.157.38 guilded.gg
|
||||||
|
103.27.157.38 www.guilded.gg
|
||||||
|
|
||||||
|
# Fitbit
|
||||||
|
103.27.157.38 api.fitbit.com
|
||||||
|
103.27.157.38 fitbit-pa.googleapis.com
|
||||||
|
103.27.157.38 fitbitvestibuleshim-pa.googleapis.com
|
||||||
|
103.27.157.38 fitbit.google.com
|
||||||
|
|
||||||
|
# Claude
|
||||||
|
103.27.157.38 claude.ai
|
||||||
|
103.27.157.38 console.anthropic.com
|
||||||
|
103.27.157.38 auth.anthropic.com
|
||||||
|
103.27.157.38 api.anthropic.com
|
||||||
|
|
||||||
|
# Другое:
|
||||||
|
103.27.157.38 www.notion.so
|
||||||
|
103.27.157.38 www.canva.com
|
||||||
|
103.27.157.38 www.intel.com
|
||||||
|
103.27.157.38 api16-normal-alisg.mchost.guru
|
||||||
|
103.27.157.38 www.tiktok.com
|
||||||
|
103.27.157.38 web.archive.org
|
||||||
|
103.27.157.38 developer.nvidia.com
|
||||||
|
103.27.157.38 builds.parsec.app
|
||||||
|
103.27.157.38 tria.ge
|
||||||
|
103.27.157.38 api.imgur.com
|
||||||
|
103.27.157.38 www.dyson.com
|
||||||
|
103.27.157.38 www.dyson.fr
|
||||||
|
103.27.157.38 usher.ttvnw.net
|
||||||
|
103.27.157.38 api.manus.im
|
||||||
|
103.27.157.38 trae-api-sg.mchost.guru
|
||||||
|
103.27.157.38 www.intel.de
|
||||||
|
103.27.157.38 gql.twitch.tv
|
||||||
|
103.27.157.38 us.posthog.com
|
||||||
|
103.27.157.38 eu.posthog.com
|
||||||
|
103.27.157.38 gql.twitch.tv
|
||||||
|
|
||||||
|
# Broadcom
|
||||||
|
103.27.157.38 access.broadcom.com
|
||||||
|
103.27.157.38 knowledge.broadcom.com
|
||||||
|
103.27.157.38 support.broadcom.com
|
||||||
|
103.27.157.38 profile.broadcom.com
|
||||||
|
|
||||||
|
# Supercell
|
||||||
|
103.27.157.38 accounts.supercell.com
|
||||||
|
103.27.157.38 cdn.id.supercell.com
|
||||||
|
103.27.157.38 clashofclans.inbox.supercell.com
|
||||||
|
103.27.157.38 game-assets.brawlstarsgame.com
|
||||||
|
103.27.157.38 game-assets.clashofclans.com
|
||||||
|
103.27.157.38 game-assets.clashroyaleapp.com
|
||||||
|
103.27.157.38 security.id.supercell.com
|
||||||
|
103.27.157.38 store.supercell.com
|
||||||
|
|
||||||
|
# Dell
|
||||||
|
103.27.157.38 afcs.dellcdn.com
|
||||||
|
103.27.157.38 nexus.dell.com
|
||||||
|
103.27.157.38 i.dell.com
|
||||||
|
103.27.157.38 www.dell.com
|
||||||
|
103.27.157.38 dds.dell.com
|
||||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user