├── icon ├── App │ ├── ETH.png │ ├── Apple.PNG │ ├── Google.png │ ├── Loon.png │ ├── OpenAi.PNG │ ├── PayPal.PNG │ ├── Stash.PNG │ ├── Surge.PNG │ ├── apple.PNG │ ├── ChatGPT.PNG │ ├── Pokemmo.PNG │ ├── Spotify.PNG │ ├── Telegram.png │ ├── Twitter.png │ ├── Whatsapp.PNG │ ├── YouTube.png │ ├── Youtube.png │ ├── Quantumult.PNG │ ├── JujutsuKaisen.PNG │ └── Shadowrcoket.PNG ├── Mine │ ├── ssh.png │ ├── Emokui.png │ └── Ygking.jpeg ├── Country │ ├── America.PNG │ ├── Canada.PNG │ ├── China.PNG │ ├── Finland.PNG │ ├── France.PNG │ ├── Germany.PNG │ ├── Janpan.PNG │ ├── Taiwan.PNG │ ├── Turkey.PNG │ ├── Argentina.PNG │ ├── Australia.PNG │ ├── HongKong.PNG │ ├── Singapore.PNG │ ├── SouthKorea.PNG │ └── UnitedKingdom.PNG └── icon.json ├── Rule ├── Jujutsu ├── OpenAI ├── Spotify ├── Telegram ├── Crypto ├── YouTube ├── ACL │ └── mihomo.txt ├── PayPal ├── Apple └── Google ├── Shell ├── README.md ├── serv00.sh ├── Install.sh ├── wireguard.sh ├── nginx.sh ├── substore.sh ├── acme.sh ├── mihomo.sh └── snell.sh ├── Script ├── Surge │ ├── AdBlocker.sgmodule │ ├── 1Blocker.sgmodule │ ├── SubStore.sgmodule │ ├── Spotify.sgmodule │ ├── YouTube.sgmodule │ ├── ScriptHub.sgmodule │ └── Talkatone.sgmodule ├── JS │ ├── DelHeader.js │ ├── Spotify-json.js │ ├── AdBlocker.js │ └── 1Blocker.js └── README.md └── README.md /icon/App/ETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/ETH.png -------------------------------------------------------------------------------- /icon/App/Apple.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Apple.PNG -------------------------------------------------------------------------------- /icon/App/Google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Google.png -------------------------------------------------------------------------------- /icon/App/Loon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Loon.png -------------------------------------------------------------------------------- /icon/App/OpenAi.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/OpenAi.PNG -------------------------------------------------------------------------------- /icon/App/PayPal.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/PayPal.PNG -------------------------------------------------------------------------------- /icon/App/Stash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Stash.PNG -------------------------------------------------------------------------------- /icon/App/Surge.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Surge.PNG -------------------------------------------------------------------------------- /icon/App/apple.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/apple.PNG -------------------------------------------------------------------------------- /icon/Mine/ssh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Mine/ssh.png -------------------------------------------------------------------------------- /icon/App/ChatGPT.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/ChatGPT.PNG -------------------------------------------------------------------------------- /icon/App/Pokemmo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Pokemmo.PNG -------------------------------------------------------------------------------- /icon/App/Spotify.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Spotify.PNG -------------------------------------------------------------------------------- /icon/App/Telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Telegram.png -------------------------------------------------------------------------------- /icon/App/Twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Twitter.png -------------------------------------------------------------------------------- /icon/App/Whatsapp.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Whatsapp.PNG -------------------------------------------------------------------------------- /icon/App/YouTube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/YouTube.png -------------------------------------------------------------------------------- /icon/App/Youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Youtube.png -------------------------------------------------------------------------------- /icon/Mine/Emokui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Mine/Emokui.png -------------------------------------------------------------------------------- /icon/Mine/Ygking.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Mine/Ygking.jpeg -------------------------------------------------------------------------------- /icon/App/Quantumult.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Quantumult.PNG -------------------------------------------------------------------------------- /icon/Country/America.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/America.PNG -------------------------------------------------------------------------------- /icon/Country/Canada.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Canada.PNG -------------------------------------------------------------------------------- /icon/Country/China.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/China.PNG -------------------------------------------------------------------------------- /icon/Country/Finland.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Finland.PNG -------------------------------------------------------------------------------- /icon/Country/France.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/France.PNG -------------------------------------------------------------------------------- /icon/Country/Germany.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Germany.PNG -------------------------------------------------------------------------------- /icon/Country/Janpan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Janpan.PNG -------------------------------------------------------------------------------- /icon/Country/Taiwan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Taiwan.PNG -------------------------------------------------------------------------------- /icon/Country/Turkey.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Turkey.PNG -------------------------------------------------------------------------------- /icon/App/JujutsuKaisen.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/JujutsuKaisen.PNG -------------------------------------------------------------------------------- /icon/App/Shadowrcoket.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/App/Shadowrcoket.PNG -------------------------------------------------------------------------------- /icon/Country/Argentina.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Argentina.PNG -------------------------------------------------------------------------------- /icon/Country/Australia.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Australia.PNG -------------------------------------------------------------------------------- /icon/Country/HongKong.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/HongKong.PNG -------------------------------------------------------------------------------- /icon/Country/Singapore.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/Singapore.PNG -------------------------------------------------------------------------------- /icon/Country/SouthKorea.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/SouthKorea.PNG -------------------------------------------------------------------------------- /icon/Country/UnitedKingdom.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Emokui/Nothing/HEAD/icon/Country/UnitedKingdom.PNG -------------------------------------------------------------------------------- /Rule/Jujutsu: -------------------------------------------------------------------------------- 1 | DOMAIN-SUFFIX,dmm.com 2 | DOMAIN,fonts.gstatic.com 3 | DOMAIN-SUFFIX,app.adjust.com 4 | DOMAIN-SUFFIX,jujutsuphanpara.jp 5 | -------------------------------------------------------------------------------- /Shell/README.md: -------------------------------------------------------------------------------- 1 | ### sudo and curl ### 2 | 3 | ``` 4 | apt update && apt install sudo && sudo apt update && sudo apt install curl 5 | ``` 6 | 7 | ### serv00 Clear ### 8 | ``` 9 | curl -O "https://raw.githubusercontent.com/Emokui/Nothing/Zero/Shell/serv00.sh" 10 | chmod +x serv00.sh 11 | ./serv00.sh 12 | ``` 13 | -------------------------------------------------------------------------------- /Script/Surge/AdBlocker.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗔𝗱𝗕𝗹𝗼𝗰𝗸𝗲𝗿 2 | #!desc= 𝗨𝗻𝗹𝗼𝗰𝗸 𝗽𝗿𝗼 3 | 4 | [Script] 5 | 𝗨𝗻𝗹𝗼𝗰𝗸 = type=http-response, pattern=^https:\/\/api\.adblockpro\.app\/verify, script-path=https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/JS/AdBlocker.js, requires-body=true, max-size=-1, timeout=60 6 | 7 | [MITM] 8 | hostname = %APPEND% api.adblockpro.app 9 | -------------------------------------------------------------------------------- /Script/JS/DelHeader.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > name:DelHeader 3 | ***********************************************/ 4 | 5 | const version = 'V1.0.2'; 6 | 7 | function setHeaderValue(e,a,d){var r=a.toLowerCase();r in e?e[r]=d:e[a]=d}var modifiedHeaders=$request.headers;setHeaderValue(modifiedHeaders,"X-RevenueCat-ETag",""),$done({headers:modifiedHeaders}); 8 | -------------------------------------------------------------------------------- /Script/JS/Spotify-json.js: -------------------------------------------------------------------------------- 1 | console.log(`spotify-json-2025.06.20`); 2 | let url = $request.url; 3 | // console.log(`原始url:${url}`); 4 | if (url.includes('com:443')) { 5 | url = url.replace(/com:443/, 'com'); 6 | } 7 | if (url.includes('platform=iphone')) { 8 | url = url.replace(/platform=iphone/, 'platform=ipad'); 9 | // console.log(`替换platform:${url}`); 10 | } else { 11 | console.log('无需处理'); 12 | } 13 | $done({ 14 | url 15 | }); 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 𝐔𝐬𝐞 ## 2 | 3 | ``` 4 | bash <(curl -sL https://raw.githubusercontent.com/Emokui/Nothing/Zero/Shell/ssh.sh) 5 | ``` 6 | ![SSH](./icon/Mine/ssh.png) 7 | 8 | ## 𝐁𝐥𝐨𝐠 ## 9 | https://snell.us.kg 10 | 11 | 12 | ## 𝐂𝐡𝐚𝐧𝐧𝐞𝐥 ## 13 | https://t.me/ygking 14 | 15 | 16 | ## 𝐑𝐨𝐮𝐭𝐢𝐧𝐠 𝐑𝐮𝐥𝐞𝐬 ## 17 | 18 | https://github.com/SukkaW/Surge 19 | 20 | 21 | https://github.com/luestr/ShuntRules 22 | 23 | 24 | https://github.com/blackmatrix7/ios_rule_script/tree/master/rule 25 | -------------------------------------------------------------------------------- /Rule/OpenAI: -------------------------------------------------------------------------------- 1 | DOMAIN,api.segment.io 2 | DOMAIN,openai.nooc.ink 3 | DOMAIN,api.revenuecat.com 4 | DOMAIN,openaicom.imgix.net 5 | DOMAIN,platform.openai.com 6 | DOMAIN,browser-intake-datadoghq.com 7 | DOMAIN,api-production.8-lives-cat.io 8 | DOMAIN,chat.openai.com.cdn.cloudflare.net 9 | DOMAIN,openaiassets.blob.core.windows.net 10 | DOMAIN-SUFFIX,openai.com 11 | DOMAIN-SUFFIX,chatgpt.com 12 | DOMAIN-SUFFIX,gstatic.com 13 | DOMAIN-SUFFIX,chat.openai.com 14 | DOMAIN-SUFFIX,oaiusercontent.com 15 | DOMAIN-SUFFIX,openaicom.imgix.net 16 | DOMAIN-SUFFIX,ingest.us.sentry.io 17 | DOMAIN-SUFFIX,chatgpt.livekit.cloud 18 | -------------------------------------------------------------------------------- /Script/Surge/1Blocker.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝟭𝗕𝗹𝗼𝗰𝗸𝗲𝗿 2 | #!desc= 𝗨𝗻𝗹𝗼𝗰𝗸 𝗣𝗿𝗲𝗺𝗶𝘂𝗺 3 | 4 | [Script] 5 | 6 | 𝗨𝗻𝗹𝗼𝗰𝗸 = type=http-response, pattern=^https:\/\/api\.(revenuecat|rc-backup)\.com\/.+\/(receipts$|subscribers\/[^/]+$), script-path=https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/JS/1Blocker.js, requires-body=true, max-size=-1, timeout=60 7 | 𝗛𝗲𝗮𝗱𝗲𝗿 = type=http-request, pattern=^https:\/\/api\.(revenuecat|rc-backup)\.com\/.+\/(receipts|subscribers), script-path=https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/JS/DelHeader.js, timeout=60 8 | 9 | [MITM] 10 | hostname = %APPEND% api.revenuecat.com, api.rc-backup.com 11 | -------------------------------------------------------------------------------- /Script/Surge/SubStore.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗦𝘂𝗯𝗦𝘁𝗼𝗿𝗲 2 | #!desc= 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 𝗰𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻 3 | 4 | [MITM] 5 | hostname = %APPEND% sub.store 6 | 7 | [Script] 8 | 𝗦𝘂𝗯-𝗦𝘁𝗼𝗿𝗲 𝗖𝗼𝗿𝗲=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://raw.githubusercontent.com/sub-store-org/Sub-Store/release/sub-store-1.min.js,requires-body=true,timeout=120 9 | 𝗦𝘂𝗯-𝗦𝘁𝗼𝗿𝗲 𝗦𝗶𝗺𝗽𝗹𝗲=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://raw.githubusercontent.com/sub-store-org/Sub-Store/release/sub-store-0.min.js,requires-body=true,timeout=120 10 | 11 | 𝗦𝘂𝗯-𝗦𝘁𝗼𝗿𝗲 𝗦𝘆𝗻𝗰=type=cron,cronexp=55 23 * * *,wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/sub-store-org/Sub-Store/release/cron-sync-artifacts.min.js 12 | -------------------------------------------------------------------------------- /Script/README.md: -------------------------------------------------------------------------------- 1 | #### Spotify #### 2 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/Spotify.sgmodule* 3 | 4 | 5 | 源自: https://github.com/app2smile 6 | 7 | 8 | #### 1Blocker #### 9 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/1Blocker.sgmodule* 10 | 11 | 12 | 源自: https://github.com/ddgksf2013 13 | 14 | 15 | #### AdBlocker #### 16 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/AdBlocker.sgmodule* 17 | 18 | 19 | 源自: https://github.com/Yu9191 20 | 21 | 22 | #### YouTube #### 23 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/YouTube.sgmodule* 24 | 25 | 26 | 源自: https://github.com/Maasea 27 | 28 | 29 | #### Script-Hub #### 30 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/Script-Hub.sgmodule* 31 | 32 | 33 | 源自: https://github.com/Script-Hub-Org 34 | 35 | 36 | #### Talkatone #### 37 | *https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/Surge/Talkatone.sgmodule* 38 | -------------------------------------------------------------------------------- /Script/Surge/Spotify.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗦𝗽𝗼𝘁𝗶𝗳𝘆 2 | #!desc= 𝗨𝗻𝗹𝗼𝗰𝗸 𝗣𝗿𝗲𝗺𝗶𝘂𝗺 3 | 4 | [Header Rewrite] 5 | http-request ^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/user-customization-service\/v1\/customize$ header-del if-none-match 6 | 7 | [MITM] 8 | hostname = %APPEND% spclient.wg.spotify.com, *spclient.spotify.com 9 | 10 | [Script] 11 | 𝗝𝘀𝗼𝗻 = type=http-request,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(artistview\/v1\/artist|album-entity-view\/v2\/album)\/,requires-body=0,script-path=https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/JS/Spotify-json.js 12 | 𝗣𝗿𝗼𝘁𝗼 = type=http-response,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(bootstrap\/v1\/bootstrap|user-customization-service\/v1\/customize)$,requires-body=1,binary-body-mode=1,max-size=0,script-path=https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/JS/Spotify-proto.js,script-update-interval=0 13 | -------------------------------------------------------------------------------- /Script/Surge/YouTube.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗬𝗼𝘂𝘁𝘂𝗯𝗲 𝗘𝗻𝗵𝗮𝗻𝗰𝗲 2 | #!desc= 𝗥𝗲𝗺𝗼𝘃𝗲 𝗔𝗱 3 | #!arguments= 屏蔽上传按钮:true,屏蔽选段按钮:true,屏蔽Shorts按钮:false,字幕翻译语言:off,歌词翻译语言:off,启用调试模式:false 4 | 5 | [Rule] 6 | AND,((DOMAIN-SUFFIX,googlevideo.com), (PROTOCOL,UDP)),REJECT 7 | AND,((DOMAIN,youtubei.googleapis.com), (PROTOCOL,UDP)),REJECT 8 | 9 | [Script] 10 | youtube.response = type=http-response,pattern=^https:\/\/youtubei\.googleapis\.com\/(youtubei\/v1\/(browse|next|player|search|reel\/reel_watch_sequence|guide|account\/get_setting|get_watch))(\?(.*))?$,requires-body=1,max-size=-1,binary-body-mode=1,script-path=https://raw.githubusercontent.com/Maasea/sgmodule/master/Script/Youtube/youtube.response.js,argument="{"lyricLang":"{{{歌词翻译语言}}}","captionLang":"{{{字幕翻译语言}}}","blockUpload":{{{屏蔽上传按钮}}},"blockImmersive":{{{屏蔽选段按钮}}},"blockShorts":{{{屏蔽Shorts按钮}}},"debug":{{{启用调试模式}}}}" 11 | 12 | [Map Local] 13 | ^https?:\/\/[\w-]+\.googlevideo\.com\/initplayback.+&oad data-type=text data="" status-code=200 14 | 15 | [MITM] 16 | hostname = %APPEND% *.googlevideo.com, youtubei.googleapis.com 17 | -------------------------------------------------------------------------------- /Rule/Spotify: -------------------------------------------------------------------------------- 1 | DOMAIN,audio4-ak-spotify-com.akamaized.net 2 | DOMAIN,cdn-spotify-experiments.conductrics.com 3 | DOMAIN,heads-ak-spotify-com.akamaized.net 4 | DOMAIN,spotify.com.edgesuite.net 5 | DOMAIN,spotify.map.fastly.net 6 | DOMAIN,spotify.map.fastlylb.net 7 | DOMAIN-SUFFIX,audio-ak-spotify-com.akamaized.net 8 | DOMAIN-SUFFIX,byspotify.com 9 | DOMAIN-SUFFIX,heads4-ak-spotify-com.akamaized.net 10 | DOMAIN-SUFFIX,pscdn.co 11 | DOMAIN-SUFFIX,scdn.co 12 | DOMAIN-SUFFIX,spoti.fi 13 | DOMAIN-SUFFIX,spotify-com.akamaized.net 14 | DOMAIN-SUFFIX,spotify-everywhere.com 15 | DOMAIN-SUFFIX,spotify.app.link 16 | DOMAIN-SUFFIX,spotify.com 17 | DOMAIN-SUFFIX,spotify.design 18 | DOMAIN-SUFFIX,spotifycdn.com 19 | DOMAIN-SUFFIX,spotifycdn.net 20 | DOMAIN-SUFFIX,spotifycharts.com 21 | DOMAIN-SUFFIX,spotifycodes.com 22 | DOMAIN-SUFFIX,spotifyforbrands.com 23 | DOMAIN-SUFFIX,spotifyjobs.com 24 | DOMAIN-SUFFIX,spotifynewsroom.jp 25 | DOMAIN-SUFFIX,spotilocal.com 26 | DOMAIN-SUFFIX,tospotify.com 27 | IP-CIDR,104.154.127.126/32,no-resolve 28 | IP-CIDR,35.186.224.47/32,no-resolve 29 | PROCESS-NAME,com.spotify.music 30 | -------------------------------------------------------------------------------- /Script/Surge/ScriptHub.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗦𝗰𝗿𝗶𝗽𝘁 𝗛𝘂𝗯 2 | #!desc= 𝗦𝗰𝗿𝗶𝗽𝘁 𝗖𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻 3 | #!arguments= Notify:关闭通知 4 | #!arguments-desc=Notify:\nScriptHub通知设置, 可选 开启通知, 关闭通知, 跟随链接 5 | 6 | [General] 7 | force-http-engine-hosts = %APPEND% script.hub, *.script.hub 8 | 9 | [Script] 10 | 𝗦𝗰𝗿𝗶𝗽𝘁 𝗛𝘂𝗯: 前端 = type=http-request, pattern=^https?:\/\/script\.hub\/($|edit\/|reload), script-path=https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/script-hub.js, timeout=300 11 | 12 | 𝗦𝗰𝗿𝗶𝗽𝘁 𝗛𝘂𝗯: 重写转换 = type=http-request, pattern=^https?:\/\/script\.hub\/file\/_start_\/.+type=(?:qx-rewrite|surge-module|loon-plugin|all-module), script-path=https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/Rewrite-Parser.js, timeout=300, argument=Notify={{{Notify}}} 13 | 14 | 𝗦𝗰𝗿𝗶𝗽𝘁 𝗛𝘂𝗯: 规则集转换 = type=http-request, pattern=^https?:\/\/script\.hub\/file\/_start_\/.+type=rule-set, script-path=https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/rule-parser.js, timeout=300, argument=Notify={{{Notify}}} 15 | 16 | 𝗦𝗰𝗿𝗶𝗽𝘁 𝗛𝘂𝗯: 脚本转换 = type=http-request, pattern=^https?:\/\/script\.hub\/convert\/, script-path=https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/script-converter.js, timeout=300 17 | 18 | [MITM] 19 | hostname = %APPEND% script.hub, *.script.hub 20 | -------------------------------------------------------------------------------- /Rule/Telegram: -------------------------------------------------------------------------------- 1 | # telegram 2 | DOMAIN,api.swiftgram.app 3 | DOMAIN-SUFFIX,cdn-telegram.org 4 | DOMAIN-SUFFIX,comments.app 5 | DOMAIN-SUFFIX,contest.com 6 | DOMAIN-SUFFIX,graph.org 7 | DOMAIN-SUFFIX,legra.ph 8 | DOMAIN-SUFFIX,mbrx.app 9 | DOMAIN-SUFFIX,quiz.directory 10 | DOMAIN-SUFFIX,stel.com 11 | DOMAIN-SUFFIX,t.me 12 | DOMAIN-SUFFIX,tdesktop.com 13 | DOMAIN-SUFFIX,telega.one 14 | DOMAIN-SUFFIX,telegra.ph 15 | DOMAIN-SUFFIX,telegram-cdn.org 16 | DOMAIN-SUFFIX,telegram.dog 17 | DOMAIN-SUFFIX,telegram.me 18 | DOMAIN-SUFFIX,telegram.org 19 | DOMAIN-SUFFIX,telegram.space 20 | DOMAIN-SUFFIX,telegramdownload.com 21 | DOMAIN-SUFFIX,telesco.pe 22 | DOMAIN-SUFFIX,tg.dev 23 | DOMAIN-SUFFIX,tx.me 24 | DOMAIN-SUFFIX,usercontent.dev 25 | IP-CIDR,109.239.140.0/24,no-resolve 26 | IP-CIDR,149.154.160.0/20,no-resolve 27 | IP-CIDR,5.28.192.0/18,no-resolve 28 | IP-CIDR,91.108.0.0/16,no-resolve 29 | IP-ASN,211157,no-resolve 30 | IP-ASN,44907,no-resolve 31 | IP-ASN,59930,no-resolve 32 | IP-ASN,62014,no-resolve 33 | IP-ASN,62041,no-resolve 34 | # whatsapp 35 | DOMAIN,graph.facebook.com 36 | DOMAIN-SUFFIX,bintray.com 37 | DOMAIN-SUFFIX,whatsapp.biz 38 | DOMAIN-SUFFIX,whatsapp.com 39 | DOMAIN-SUFFIX,whatsapp.net 40 | DOMAIN-KEYWORD,whatsapp 41 | IP-CIDR,158.85.224.160/27,no-resolve 42 | IP-CIDR,158.85.46.128/27,no-resolve 43 | IP-CIDR,158.85.5.192/27,no-resolve 44 | IP-CIDR,173.192.222.160/27,no-resolve 45 | IP-CIDR,173.192.231.32/27,no-resolve 46 | IP-CIDR,18.194.0.0/15,no-resolve 47 | IP-CIDR,184.173.128.0/17,no-resolve 48 | IP-CIDR,208.43.122.128/27,no-resolve 49 | IP-CIDR,34.224.0.0/12,no-resolve 50 | IP-CIDR,50.22.198.204/30,no-resolve 51 | IP-CIDR,54.242.0.0/15,no-resolve 52 | -------------------------------------------------------------------------------- /Script/Surge/Talkatone.sgmodule: -------------------------------------------------------------------------------- 1 | #!name= 𝗧𝗮𝗹𝗸𝗮𝘁𝗼𝗻𝗲 2 | #!desc= 𝗥𝗲𝗺𝗼𝘃𝗲 𝗔𝗱 𝗔𝗻𝗱 𝗗𝗜𝗥𝗘𝗖𝗧 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗶𝗼𝗻 3 | #!arguments= PROXY:PROXY,DIRECT:DIRECT 4 | #!arguments-desc= Customize PROXY or DIRECT 5 | [Rule] 6 | DOMAIN,spadsync.com,REJECT-DROP 7 | DOMAIN,talkatone.com,REJECT-DROP 8 | DOMAIN,ow.pubmatic.com,REJECT-DROP 9 | DOMAIN,ads.pubmatic.com,REJECT-DROP 10 | DOMAIN,ep7.facebook.com,REJECT-DROP 11 | DOMAIN,config.inmobi.com,REJECT-DROP 12 | DOMAIN,bidder.criteo.com,REJECT-DROP 13 | DOMAIN,ssp.api.tappx.com,REJECT-DROP 14 | DOMAIN,ext.track.tappx.com,REJECT-DROP 15 | DOMAIN,mumu.nie.netease.com,REJECT-DROP 16 | DOMAIN,skadnetworks.fyber.com,REJECT-DROP 17 | DOMAIN,aax.amazon-adsystem.com,REJECT-DROP 18 | DOMAIN,mads.amazon-adsystem.com,REJECT-DROP 19 | DOMAIN,aax-fe.amazon-adsystem.com,REJECT-DROP 20 | DOMAIN,app-analytics-services.com,REJECT-DROP 21 | DOMAIN,aax-eu.amazon-adsystem.com,REJECT-DROP 22 | DOMAIN,gum.criteo.com,REJECT-DROP 23 | DOMAIN,ads.inmobi.com,REJECT-DROP 24 | DOMAIN,mug.criteo.com,REJECT-DROP 25 | DOMAIN,cdn.taboola.com,REJECT-DROP 26 | DOMAIN,mfx.mobilefuse.com,REJECT-DROP 27 | DOMAIN,cdn.mobilefuse.com,REJECT-DROP 28 | DOMAIN,sdk-files.smaato.net,REJECT-DROP 29 | DOMAIN,c.amazon-adsystem.com,REJECT-DROP 30 | DOMAIN,checkip.amazonaws.com,REJECT-DROP 31 | DOMAIN,sdk-dnt.ad.smaato.net,REJECT-DROP 32 | DOMAIN,cdn2.inner-active.mobi,REJECT-DROP 33 | DOMAIN,googleads.g.doubleclick.net,REJECT-DROP 34 | DOMAIN,sdk-events.inner-active.mobi,REJECT-DROP 35 | DOMAIN,pagead2.googlesyndication.com,REJECT-DROP 36 | DOMAIN,firebaselogging-pa.googleapis.com,REJECT-DROP 37 | DOMAIN,d.tktn.be,{{{PROXY}}} 38 | DOMAIN,a1.tktn.be,{{{PROXY}}} 39 | DOMAIN,xmpp4.tktn.be,{{{PROXY}}} 40 | IP-CIDR,69.46.75.0/24,{{{DIRECT}}},no-resolve 41 | IP-CIDR,50.117.27.0/24,{{{DIRECT}}},no-resolve 42 | IP-CIDR,205.164.56.0/24,{{{DIRECT}}},no-resolve 43 | -------------------------------------------------------------------------------- /Shell/serv00.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 颜色定义 4 | RED='\033[0;31m' 5 | GREEN='\033[0;32m' 6 | YELLOW='\033[0;33m' 7 | RESET='\033[0m' 8 | 9 | # 辅助函数 10 | red() { 11 | echo -e "${RED}$1${RESET}" 12 | } 13 | 14 | green() { 15 | echo -e "${GREEN}$1${RESET}" 16 | } 17 | 18 | yellow() { 19 | echo -e "${YELLOW}$1${RESET}" 20 | } 21 | 22 | # 清理cron任务 23 | cleanCron() { 24 | echo "" > null 25 | crontab null 26 | rm null 27 | } 28 | 29 | # 结束所有用户进程 30 | killUserProc() { 31 | local user=$(whoami) 32 | pkill -kill -u $user 33 | } 34 | 35 | # 系统初始化函数 36 | initServer() { 37 | read -p "$(red "确定要初始化系统吗?这将删除大部分数据。 [y/n] [n]: ")" input 38 | input=${input:-n} 39 | 40 | if [[ "$input" == "y" ]] || [[ "$input" == "Y" ]]; then 41 | read -p "是否保留用户配置?[y/n] [y]: " saveProfile 42 | saveProfile=${saveProfile:-y} 43 | 44 | green "清理cron任务..." 45 | cleanCron 46 | 47 | green "清理用户进程..." 48 | killUserProc 49 | 50 | green "清理磁盘..." 51 | if [[ "$saveProfile" = "y" ]] || [[ "$saveProfile" = "Y" ]]; then 52 | rm -rf ~/* 2>/dev/null 53 | else 54 | rm -rf ~/* ~/.* 2>/dev/null 55 | fi 56 | 57 | yellow "系统初始化完成" 58 | else 59 | yellow "操作已取消" 60 | fi 61 | } 62 | 63 | # 显示菜单 64 | showMenu() { 65 | clear 66 | echo "=========================================" 67 | echo " 系统清理脚本 " 68 | echo "=========================================" 69 | echo "1. 初始化系统(清理数据)" 70 | echo "2. 退出" 71 | echo "=========================================" 72 | read -p "请选择操作 [1-2]: " choice 73 | 74 | case $choice in 75 | 1) 76 | initServer 77 | ;; 78 | 2) 79 | echo "退出脚本" 80 | exit 0 81 | ;; 82 | *) 83 | red "无效的选择,请重新输入" 84 | ;; 85 | esac 86 | } 87 | 88 | # 主循环 89 | while true; do 90 | showMenu 91 | read -p "按Enter键继续..." 92 | done 93 | -------------------------------------------------------------------------------- /Rule/Crypto: -------------------------------------------------------------------------------- 1 | # OKX 2 | DOMAIN-SUFFIX,okex.com 3 | DOMAIN-SUFFIX,okx.com 4 | DOMAIN-SUFFIX,okx-dns.com 5 | DOMAIN-SUFFIX,okx-dns1.com 6 | DOMAIN-SUFFIX,okx-dns2.com 7 | DOMAIN-SUFFIX,oklink.com 8 | # Binance 9 | DOMAIN-SUFFIX,binance.cc 10 | DOMAIN-SUFFIX,binance.cloud 11 | DOMAIN-SUFFIX,binance.com 12 | DOMAIN-SUFFIX,binance.im 13 | DOMAIN-SUFFIX,binance.me 14 | DOMAIN-SUFFIX,binance.us 15 | DOMAIN-SUFFIX,bnappzh.co 16 | DOMAIN-SUFFIX,bnappzh.com 17 | DOMAIN-SUFFIX,bnbstatic.com 18 | DOMAIN-SUFFIX,bntrace.com 19 | DOMAIN-SUFFIX,binance.charity 20 | DOMAIN-SUFFIX,binance.co 21 | DOMAIN-SUFFIX,binance.info 22 | DOMAIN-SUFFIX,binance.net 23 | DOMAIN-SUFFIX,binance.org 24 | DOMAIN-SUFFIX,binance.vision 25 | DOMAIN-SUFFIX,binanceapi.com 26 | DOMAIN-SUFFIX,binancezh.be 27 | DOMAIN-SUFFIX,binancezh.biz 28 | DOMAIN-SUFFIX,binancezh.cc 29 | DOMAIN-SUFFIX,binancezh.co 30 | DOMAIN-SUFFIX,binancezh.com 31 | DOMAIN-SUFFIX,binancezh.info 32 | DOMAIN-SUFFIX,binancezh.ink 33 | DOMAIN-SUFFIX,binancezh.kim 34 | DOMAIN-SUFFIX,binancezh.link 35 | DOMAIN-SUFFIX,binancezh.live 36 | DOMAIN-SUFFIX,binancezh.mobi 37 | DOMAIN-SUFFIX,binancezh.net 38 | DOMAIN-SUFFIX,binancezh.pro 39 | DOMAIN-SUFFIX,binancezh.sh 40 | DOMAIN-SUFFIX,binancezh.top 41 | DOMAIN-SUFFIX,bnappzh.mobi 42 | DOMAIN-SUFFIX,bsc.getblock.io 43 | DOMAIN-SUFFIX,bscscan.com 44 | DOMAIN-SUFFIX,bnappweb.academy 45 | # Bitget 46 | DOMAIN-SUFFIX,bitget.com 47 | DOMAIN-SUFFIX,bitgetapp.com 48 | DOMAIN-SUFFIX,bitgetapps.com 49 | DOMAIN-SUFFIX,bitgetimg.com 50 | DOMAIN-SUFFIX,bitget.fit 51 | # Bybit 52 | DOMAIN,bybit-exchange.github.io 53 | DOMAIN,bybit.ada.support 54 | DOMAIN-SUFFIX,bybit.com 55 | DOMAIN-SUFFIX,bycsi.com 56 | DOMAIN-SUFFIX,bytick.com 57 | DOMAIN-SUFFIX,byapis.com 58 | DOMAIN-SUFFIX,bycbe.com 59 | DOMAIN-SUFFIX,bymj.io 60 | DOMAIN-SUFFIX,byabcde.com 61 | DOMAIN-SUFFIX,byapps.net 62 | DOMAIN-SUFFIX,byd3c3.com 63 | DOMAIN-SUFFIX,bybit.biz 64 | DOMAIN-SUFFIX,bybdc6.com 65 | DOMAIN-SUFFIX,bybit-global.com 66 | DOMAIN-SUFFIX,bybit.cloud 67 | DOMAIN-SUFFIX,bybitglobal.com 68 | # Others 69 | DOMAIN,api.portalhq.io 70 | DOMAIN,www.recaptcha.net 71 | DOMAIN,fcmtoken.googleapis.com 72 | DOMAIN,cdn-settings.segment.com 73 | DOMAIN,mapsmobilesdks-pa.googleapis.com 74 | DOMAIN,firebase-settings.crashlytics.com 75 | DOMAIN,avalanche-c-chain-rpc.publicnode.com 76 | DOMAIN,service-platform.liquidity-financial.com -------------------------------------------------------------------------------- /Script/JS/AdBlocker.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | adblockpro 10.7.5 4 | 5 | [rewrite_local] 6 | ^https:\/\/api\.adblockpro\.app\/verify url script-response-body https://raw.githubusercontent.com/Yu9191/Rewrite/main/adblockpro.js 7 | [mitm] 8 | hostname = api.adblockpro.app 9 | */ 10 | var _0xodr='jsjiami.com.v7';function _0x1617(_0x1517b3,_0x5516f5){const _0x36318c=_0x3631();return _0x1617=function(_0x161794,_0x2eaca9){_0x161794=_0x161794-0x16c;let _0x279c9e=_0x36318c[_0x161794];if(_0x1617['eEhkpz']===undefined){var _0x3d54ac=function(_0x252674){const _0x45b5d6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x16c798='',_0x49ac85='';for(let _0x2a7527=0x0,_0x424cba,_0x341442,_0x52a7f9=0x0;_0x341442=_0x252674['charAt'](_0x52a7f9++);~_0x341442&&(_0x424cba=_0x2a7527%0x4?_0x424cba*0x40+_0x341442:_0x341442,_0x2a7527++%0x4)?_0x16c798+=String['fromCharCode'](0xff&_0x424cba>>(-0x2*_0x2a7527&0x6)):0x0){_0x341442=_0x45b5d6['indexOf'](_0x341442);}for(let _0xf58758=0x0,_0x1d9d9d=_0x16c798['length'];_0xf58758<_0x1d9d9d;_0xf58758++){_0x49ac85+='%'+('00'+_0x16c798['charCodeAt'](_0xf58758)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49ac85);};const _0x1169a3=function(_0x2a26a1,_0x45a346){let _0x310f3e=[],_0x15b6a4=0x0,_0x4f4320,_0x1da90a='';_0x2a26a1=_0x3d54ac(_0x2a26a1);let _0x4398d8;for(_0x4398d8=0x0;_0x4398d8<0x100;_0x4398d8++){_0x310f3e[_0x4398d8]=_0x4398d8;}for(_0x4398d8=0x0;_0x4398d8<0x100;_0x4398d8++){_0x15b6a4=(_0x15b6a4+_0x310f3e[_0x4398d8]+_0x45a346['charCodeAt'](_0x4398d8%_0x45a346['length']))%0x100,_0x4f4320=_0x310f3e[_0x4398d8],_0x310f3e[_0x4398d8]=_0x310f3e[_0x15b6a4],_0x310f3e[_0x15b6a4]=_0x4f4320;}_0x4398d8=0x0,_0x15b6a4=0x0;for(let _0x5cd171=0x0;_0x5cd171<_0x2a26a1['length'];_0x5cd171++){_0x4398d8=(_0x4398d8+0x1)%0x100,_0x15b6a4=(_0x15b6a4+_0x310f3e[_0x4398d8])%0x100,_0x4f4320=_0x310f3e[_0x4398d8],_0x310f3e[_0x4398d8]=_0x310f3e[_0x15b6a4],_0x310f3e[_0x15b6a4]=_0x4f4320,_0x1da90a+=String['fromCharCode'](_0x2a26a1['charCodeAt'](_0x5cd171)^_0x310f3e[(_0x310f3e[_0x4398d8]+_0x310f3e[_0x15b6a4])%0x100]);}return _0x1da90a;};_0x1617['KbuKJu']=_0x1169a3,_0x1517b3=arguments,_0x1617['eEhkpz']=!![];}const _0xaace29=_0x36318c[0x0],_0xf3748d=_0x161794+_0xaace29,_0x569565=_0x1517b3[_0xf3748d];return!_0x569565?(_0x1617['dxAbZf']===undefined&&(_0x1617['dxAbZf']=!![]),_0x279c9e=_0x1617['KbuKJu'](_0x279c9e,_0x2eaca9),_0x1517b3[_0xf3748d]=_0x279c9e):_0x279c9e=_0x569565,_0x279c9e;},_0x1617(_0x1517b3,_0x5516f5);}const _0x267c4f=_0x1617;function _0x3631(){const _0x408719=(function(){return[_0xodr,'lgjtWbsyjOiaXWmSiR.PncboRm.Fv7MySWBRUpWF==','WQHIW47dL8k6WOyCmeaGq8oMpG','j8kJW5NcL0fAWP9cWOr2DSohWRu','xX/cGSo0DCk6FSoIWOpcKCodWQ7cTa','wrZcJ8o7ESk7iSotWOpcJ8o1WPG','W7RcMJrLWPq','WRldNfC9tL8EhsBcGCoXWRrh'].concat((function(){return['W6RcQr1tWOXcrYpcVq','fr3cPt8QBs4','ee7dKdCkucKmfa','cINcJNhdVaBdSspdKvL6oI0','WPNdVaLdcmkIqfVdTd7dKGq','kYtcJvypWRxdGbNdIG','WONcRmoRW7xdV8kyWQK','WQbHW4NcPSoMW61knh0'].concat((function(){return['WRtdQSk6cSo3WRxdLqVcT8ovWO8','WPpdS1hdH8oyb0qVWRddJ2qn','WRJcIg0Ng8kgW4eLFmo8uCo4CW','WQ7cLSoWcCkpbWm4D3LvdW','WORdVSkrW5FdSmksWQ/dJgq'];}()));}()));}());_0x3631=function(){return _0x408719;};return _0x3631();};(function(_0x180a0f,_0x33f83c,_0x474ab7,_0x169a22,_0x3c9c8f,_0x28fd93,_0xc854db){return _0x180a0f=_0x180a0f>>0x2,_0x28fd93='hs',_0xc854db='hs',function(_0x371971,_0xbbc626,_0x1940bb,_0x54c8a1,_0x50789c){const _0x28b9ea=_0x1617;_0x54c8a1='tfi',_0x28fd93=_0x54c8a1+_0x28fd93,_0x50789c='up',_0xc854db+=_0x50789c,_0x28fd93=_0x1940bb(_0x28fd93),_0xc854db=_0x1940bb(_0xc854db),_0x1940bb=0x0;const _0x5b643e=_0x371971();while(!![]&&--_0x169a22+_0xbbc626){try{_0x54c8a1=parseInt(_0x28b9ea(0x16e,'Zx!E'))/0x1*(-parseInt(_0x28b9ea(0x177,'d4Rt'))/0x2)+parseInt(_0x28b9ea(0x179,'@5S$'))/0x3+-parseInt(_0x28b9ea(0x170,'%^)P'))/0x4+-parseInt(_0x28b9ea(0x16c,'O(dI'))/0x5+parseInt(_0x28b9ea(0x176,'d4Rt'))/0x6*(-parseInt(_0x28b9ea(0x172,'U1)g'))/0x7)+parseInt(_0x28b9ea(0x178,'KHC('))/0x8+-parseInt(_0x28b9ea(0x17a,'Z!oS'))/0x9*(-parseInt(_0x28b9ea(0x17d,'18xj'))/0xa);}catch(_0x575519){_0x54c8a1=_0x1940bb;}finally{_0x50789c=_0x5b643e[_0x28fd93]();if(_0x180a0f<=_0x169a22)_0x1940bb?_0x3c9c8f?_0x54c8a1=_0x50789c:_0x3c9c8f=_0x50789c:_0x1940bb=_0x50789c;else{if(_0x1940bb==_0x3c9c8f['replace'](/[MWtyBSPObRgXnpUlF=]/g,'')){if(_0x54c8a1===_0xbbc626){_0x5b643e['un'+_0x28fd93](_0x50789c);break;}_0x5b643e[_0xc854db](_0x50789c);}}}}}(_0x474ab7,_0x33f83c,function(_0x2904b2,_0x58edd3,_0x50990c,_0xbe2278,_0x5da6dc,_0x2e2bbb,_0x34304c){return _0x58edd3='\x73\x70\x6c\x69\x74',_0x2904b2=arguments[0x0],_0x2904b2=_0x2904b2[_0x58edd3](''),_0x50990c='\x72\x65\x76\x65\x72\x73\x65',_0x2904b2=_0x2904b2[_0x50990c]('\x76'),_0xbe2278='\x6a\x6f\x69\x6e',(0x14f8ab,_0x2904b2[_0xbe2278](''));});}(0x314,0x4083d,_0x3631,0xc7),_0x3631)&&(_0xodr=0xf06);let obj=JSON[_0x267c4f(0x173,'gayk')]($response['body']);obj['p']=0x1,obj['s']=0x1,obj['l']=0x1,obj['t']=0x1,obj['e']=0x1,obj['m']=0x1,obj['f']=0x1,$done({'body':JSON[_0x267c4f(0x175,'v9A*')](obj)});var version_ = 'jsjiami.com.v7'; 11 | -------------------------------------------------------------------------------- /icon/icon.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sukurain", 3 | "description": "what's this?", 4 | "icons": [ 5 | { 6 | "name": "Apple", 7 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Apple.PNG" 8 | }, 9 | { 10 | "name": "apple", 11 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/apple.PNG" 12 | }, 13 | { 14 | "name": "ChatGPT", 15 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/ChatGPT.PNG" 16 | }, 17 | { 18 | "name": "OpenAi", 19 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/OpenAi.PNG" 20 | }, 21 | { 22 | "name": "YouTube", 23 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/YouTube.png" 24 | }, 25 | { 26 | "name": "Youtube", 27 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Youtube.png" 28 | }, 29 | { 30 | "name": "PayPal", 31 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/PayPal.PNG" 32 | }, 33 | { 34 | "name": "Google", 35 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Google.png" 36 | }, 37 | 38 | { 39 | "name": "ETH", 40 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/ETH.png" 41 | }, 42 | { 43 | "name": "JujutsuKaisen.PNG", 44 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/JujutsuKaisen.PNG" 45 | }, 46 | { 47 | "name": "Loon", 48 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Loon.png" 49 | }, 50 | { 51 | "name": "Shadowrcoket", 52 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Shadowrcoket.PNG" 53 | }, 54 | { 55 | "name": "Stash", 56 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Stash.PNG" 57 | }, 58 | { 59 | "name": "Surge", 60 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Surge.PNG" 61 | }, 62 | { 63 | "name": "Quantumult", 64 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Quantumult.PNG" 65 | }, 66 | { 67 | "name": "Pokemmo", 68 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Pokemmo.PNG" 69 | }, 70 | { 71 | "name": "Spotify", 72 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Spotify.PNG" 73 | }, 74 | { 75 | "name": "Telegram", 76 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Telegram.png" 77 | }, 78 | { 79 | "name": "Whatsapp", 80 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Whatsapp.PNG" 81 | }, 82 | { 83 | "name": "Twitter", 84 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/App/Twitter.png" 85 | }, 86 | { 87 | "name": "America", 88 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/America.PNG" 89 | }, 90 | { 91 | "name": "Argentina", 92 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Argentina.PNG" 93 | }, 94 | { 95 | "name": "Australia", 96 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Australia.PNG" 97 | }, 98 | { 99 | "name": "Canada", 100 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Canada.PNG" 101 | }, 102 | { 103 | "name": "China", 104 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/China.PNG" 105 | }, 106 | { 107 | "name": "Finland", 108 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Finland.PNG" 109 | }, 110 | { 111 | "name": "France", 112 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/France.PNG" 113 | }, 114 | { 115 | "name": "Germany", 116 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Germany.PNG" 117 | }, 118 | { 119 | "name": "HongKong", 120 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/HongKong.PNG" 121 | }, 122 | { 123 | "name": "Janpan", 124 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Janpan.PNG" 125 | }, 126 | { 127 | "name": "Singapore", 128 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Singapore.PNG" 129 | }, 130 | { 131 | "name": "SouthKorea", 132 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/SouthKorea.PNG" 133 | }, 134 | { 135 | "name": "Taiwan", 136 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Taiwan.PNG" 137 | }, 138 | { 139 | "name": "Turkey", 140 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/Turkey.PNG" 141 | }, 142 | { 143 | "name": "UnitedKingdom", 144 | "url": "https://raw.githubusercontent.com/Emokui/Nothing/Zero/icon/Country/UnitedKingdom.PNG" 145 | } 146 | ] 147 | } 148 | -------------------------------------------------------------------------------- /Rule/YouTube: -------------------------------------------------------------------------------- 1 | DOMAIN,yt3.ggpht.com 2 | DOMAIN,youtubei.googleapis.com 3 | DOMAIN,music.youtube.com 4 | DOMAIN-SUFFIX,youtube.co.ae 5 | DOMAIN-SUFFIX,youtube.ae 6 | DOMAIN-SUFFIX,youtube.al 7 | DOMAIN-SUFFIX,youtube.am 8 | DOMAIN-SUFFIX,youtube.com.ar 9 | DOMAIN-SUFFIX,youtube.co.at 10 | DOMAIN-SUFFIX,youtube.at 11 | DOMAIN-SUFFIX,youtube.com.au 12 | DOMAIN-SUFFIX,youtube.com.az 13 | DOMAIN-SUFFIX,youtube.az 14 | DOMAIN-SUFFIX,youtube.ba 15 | DOMAIN-SUFFIX,youtube.com.bd 16 | DOMAIN-SUFFIX,youtu.be 17 | DOMAIN-SUFFIX,youtube.be 18 | DOMAIN-SUFFIX,yt.be 19 | DOMAIN-SUFFIX,youtube.bg 20 | DOMAIN-SUFFIX,youtube.com.bh 21 | DOMAIN-SUFFIX,youtube.bh 22 | DOMAIN-SUFFIX,youtube.com.bo 23 | DOMAIN-SUFFIX,youtube.bo 24 | DOMAIN-SUFFIX,youtube.com.br 25 | DOMAIN-SUFFIX,youtubego.com.br 26 | DOMAIN-SUFFIX,youtube.com.by 27 | DOMAIN-SUFFIX,youtube.by 28 | DOMAIN-SUFFIX,youtube.ca 29 | DOMAIN-SUFFIX,youtube.cat 30 | DOMAIN-SUFFIX,youtube.ch 31 | DOMAIN-SUFFIX,youtube.cl 32 | DOMAIN-SUFFIX,ggpht.cn 33 | DOMAIN-SUFFIX,youtube.com.co 34 | DOMAIN-SUFFIX,youtube.co 35 | DOMAIN-SUFFIX,ggpht.com 36 | DOMAIN-SUFFIX,wide-youtube.l.google.com 37 | DOMAIN-SUFFIX,youtube-ui.l.google.com 38 | DOMAIN-SUFFIX,video.google.com 39 | DOMAIN-SUFFIX,youtube.googleapis.com 40 | DOMAIN-SUFFIX,youtubeembeddedplayer.googleapis.com 41 | DOMAIN-SUFFIX,youtubei.googleapis.com 42 | DOMAIN-SUFFIX,googlevideo.com 43 | DOMAIN-SUFFIX,gvt1.com 44 | DOMAIN-SUFFIX,gvt2.com 45 | DOMAIN-SUFFIX,withyoutube.com 46 | DOMAIN-SUFFIX,youtube.com 47 | DOMAIN-SUFFIX,youtube-nocookie.com 48 | DOMAIN-SUFFIX,youtubeeducation.com 49 | DOMAIN-SUFFIX,youtubefanfest.com 50 | DOMAIN-SUFFIX,youtubegaming.com 51 | DOMAIN-SUFFIX,youtubego.com 52 | DOMAIN-SUFFIX,youtubekids.com 53 | DOMAIN-SUFFIX,youtubemobilesupport.com 54 | DOMAIN-SUFFIX,ytimg.com 55 | DOMAIN-SUFFIX,youtube.co.cr 56 | DOMAIN-SUFFIX,youtube.cr 57 | DOMAIN-SUFFIX,youtube.cz 58 | DOMAIN-SUFFIX,youtube.de 59 | DOMAIN-SUFFIX,youtube.dk 60 | DOMAIN-SUFFIX,youtube.com.do 61 | DOMAIN-SUFFIX,youtube.com.ec 62 | DOMAIN-SUFFIX,youtube.com.ee 63 | DOMAIN-SUFFIX,youtube.ee 64 | DOMAIN-SUFFIX,youtube.com.eg 65 | DOMAIN-SUFFIX,youtube.com.es 66 | DOMAIN-SUFFIX,youtube.es 67 | DOMAIN-SUFFIX,youtube.fi 68 | DOMAIN-SUFFIX,youtube.fr 69 | DOMAIN-SUFFIX,youtube.ge 70 | DOMAIN-SUFFIX,youtube.com.gh 71 | DOMAIN-SUFFIX,youtube.com.gr 72 | DOMAIN-SUFFIX,youtube.gr 73 | DOMAIN-SUFFIX,youtube.com.gt 74 | DOMAIN-SUFFIX,youtube.gt 75 | DOMAIN-SUFFIX,youtube.com.hk 76 | DOMAIN-SUFFIX,youtube.hk 77 | DOMAIN-SUFFIX,youtube.com.hn 78 | DOMAIN-SUFFIX,youtube.com.hr 79 | DOMAIN-SUFFIX,youtube.hr 80 | DOMAIN-SUFFIX,youtube.co.hu 81 | DOMAIN-SUFFIX,youtube.hu 82 | DOMAIN-SUFFIX,youtube.co.id 83 | DOMAIN-SUFFIX,youtubego.co.id 84 | DOMAIN-SUFFIX,youtubego.id 85 | DOMAIN-SUFFIX,youtube.ie 86 | DOMAIN-SUFFIX,youtube.co.il 87 | DOMAIN-SUFFIX,youtube.co.in 88 | DOMAIN-SUFFIX,youtubego.co.in 89 | DOMAIN-SUFFIX,youtube.in 90 | DOMAIN-SUFFIX,youtubego.in 91 | DOMAIN-SUFFIX,youtube.iq 92 | DOMAIN-SUFFIX,youtube.is 93 | DOMAIN-SUFFIX,youtube.it 94 | DOMAIN-SUFFIX,youtube.com.jm 95 | DOMAIN-SUFFIX,youtube.com.jo 96 | DOMAIN-SUFFIX,youtube.jo 97 | DOMAIN-SUFFIX,youtube.co.jp 98 | DOMAIN-SUFFIX,youtube.jp 99 | DOMAIN-SUFFIX,youtube.co.ke 100 | DOMAIN-SUFFIX,youtube.co.kr 101 | DOMAIN-SUFFIX,youtube.kr 102 | DOMAIN-SUFFIX,youtube.com.kw 103 | DOMAIN-SUFFIX,youtube.kz 104 | DOMAIN-SUFFIX,youtube.la 105 | DOMAIN-SUFFIX,youtube.com.lb 106 | DOMAIN-SUFFIX,youtube.lk 107 | DOMAIN-SUFFIX,youtube.lt 108 | DOMAIN-SUFFIX,youtube.lu 109 | DOMAIN-SUFFIX,youtube.com.lv 110 | DOMAIN-SUFFIX,youtube.lv 111 | DOMAIN-SUFFIX,youtube.com.ly 112 | DOMAIN-SUFFIX,youtube.ly 113 | DOMAIN-SUFFIX,youtube.co.ma 114 | DOMAIN-SUFFIX,youtube.ma 115 | DOMAIN-SUFFIX,youtube.md 116 | DOMAIN-SUFFIX,youtube.me 117 | DOMAIN-SUFFIX,youtube.com.mk 118 | DOMAIN-SUFFIX,youtube.mk 119 | DOMAIN-SUFFIX,youtube.mn 120 | DOMAIN-SUFFIX,youtube.com.mt 121 | DOMAIN-SUFFIX,youtube.com.mx 122 | DOMAIN-SUFFIX,youtube.mx 123 | DOMAIN-SUFFIX,youtube.com.my 124 | DOMAIN-SUFFIX,youtube.my 125 | DOMAIN-SUFFIX,youtube.com.ng 126 | DOMAIN-SUFFIX,youtube.ng 127 | DOMAIN-SUFFIX,youtube.com.ni 128 | DOMAIN-SUFFIX,youtube.ni 129 | DOMAIN-SUFFIX,youtube.nl 130 | DOMAIN-SUFFIX,youtube.no 131 | DOMAIN-SUFFIX,youtube.co.nz 132 | DOMAIN-SUFFIX,youtube.com.om 133 | DOMAIN-SUFFIX,youtube.com.pa 134 | DOMAIN-SUFFIX,youtube.pa 135 | DOMAIN-SUFFIX,youtube.com.pe 136 | DOMAIN-SUFFIX,youtube.pe 137 | DOMAIN-SUFFIX,youtube.com.ph 138 | DOMAIN-SUFFIX,youtube.ph 139 | DOMAIN-SUFFIX,youtube.com.pk 140 | DOMAIN-SUFFIX,youtube.pk 141 | DOMAIN-SUFFIX,youtube.pl 142 | DOMAIN-SUFFIX,youtube.pr 143 | DOMAIN-SUFFIX,youtube.com.pt 144 | DOMAIN-SUFFIX,youtube.pt 145 | DOMAIN-SUFFIX,youtube.com.py 146 | DOMAIN-SUFFIX,youtube.com.qa 147 | DOMAIN-SUFFIX,youtube.qa 148 | DOMAIN-SUFFIX,youtube.com.ro 149 | DOMAIN-SUFFIX,youtube.ro 150 | DOMAIN-SUFFIX,youtube.rs 151 | DOMAIN-SUFFIX,youtube.ru 152 | DOMAIN-SUFFIX,youtube.com.sa 153 | DOMAIN-SUFFIX,youtube.sa 154 | DOMAIN-SUFFIX,youtube.se 155 | DOMAIN-SUFFIX,youtube.com.sg 156 | DOMAIN-SUFFIX,youtube.sg 157 | DOMAIN-SUFFIX,youtube.si 158 | DOMAIN-SUFFIX,youtube.sk 159 | DOMAIN-SUFFIX,youtube.sn 160 | DOMAIN-SUFFIX,youtube.soy 161 | DOMAIN-SUFFIX,youtube.com.sv 162 | DOMAIN-SUFFIX,youtube.sv 163 | DOMAIN-SUFFIX,youtube.co.th 164 | DOMAIN-SUFFIX,youtube.com.tn 165 | DOMAIN-SUFFIX,youtube.tn 166 | DOMAIN-SUFFIX,youtube.com.tr 167 | DOMAIN-SUFFIX,youtube.tv 168 | DOMAIN-SUFFIX,youtube.com.tw 169 | DOMAIN-SUFFIX,youtube.co.tz 170 | DOMAIN-SUFFIX,youtube.com.ua 171 | DOMAIN-SUFFIX,youtube.ua 172 | DOMAIN-SUFFIX,youtube.co.ug 173 | DOMAIN-SUFFIX,youtube.ug 174 | DOMAIN-SUFFIX,youtube.co.uk 175 | DOMAIN-SUFFIX,youtube.com.uy 176 | DOMAIN-SUFFIX,youtube.uy 177 | DOMAIN-SUFFIX,youtube.co.ve 178 | DOMAIN-SUFFIX,youtube.com.ve 179 | DOMAIN-SUFFIX,youtube.vn 180 | DOMAIN-SUFFIX,youtube 181 | DOMAIN-SUFFIX,youtube.co.za 182 | DOMAIN-SUFFIX,youtube.co.zw 183 | DOMAIN-KEYWORD,youtube 184 | USER-AGENT,YouTube* 185 | USER-AGENT,*youtube* 186 | USER-AGENT,YouTubeMusic* 187 | USER-AGENT,*YouTubeMusic* 188 | USER-AGENT,com.google.ios.youtube* 189 | USER-AGENT,com.google.ios.youtubemusic* 190 | USER-AGENT,*com.google.ios.youtubemusic* 191 | IP-CIDR,172.110.32.0/21,no-resolve 192 | IP-CIDR,216.73.80.0/20,no-resolve 193 | -------------------------------------------------------------------------------- /Script/JS/1Blocker.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > ScriptName 1Blocker 4 | > Author @neko 5 | 6 | [rewrite_local] 7 | ^https:\/\/api\.(revenuecat|rc-backup)\.com\/.+\/(receipts$|subscribers\/[^/]+$) url script-response-body https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/1Blocker.js 8 | ^https:\/\/api\.(revenuecat|rc-backup)\.com\/.+\/(receipts|subscribers) url script-request-header https://raw.githubusercontent.com/Emokui/Nothing/Zero/Script/deleteheader.js 9 | 10 | [mitm] 11 | hostname=api.revenuecat.com, api.rc-backup.com 12 | 13 | ***********************************/ 14 | 15 | const mapping = { 16 | '1Blocker': ['premium'] 17 | }; 18 | 19 | var _0xodF='jsjiami.com.v7';function _0x52ea(_0x3ea8b3,_0x5559a4){var _0x3b9dd1=_0x3b9d();return _0x52ea=function(_0x52eaee,_0x3ab28b){_0x52eaee=_0x52eaee-0x167;var _0xa7cab=_0x3b9dd1[_0x52eaee];if(_0x52ea['ggTMmB']===undefined){var _0x950288=function(_0x37bf5b){var _0x78e8dd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x192f0b='',_0x31676d='';for(var _0x400f1d=0x0,_0x110761,_0x902d8a,_0x2991a3=0x0;_0x902d8a=_0x37bf5b['charAt'](_0x2991a3++);~_0x902d8a&&(_0x110761=_0x400f1d%0x4?_0x110761*0x40+_0x902d8a:_0x902d8a,_0x400f1d++%0x4)?_0x192f0b+=String['fromCharCode'](0xff&_0x110761>>(-0x2*_0x400f1d&0x6)):0x0){_0x902d8a=_0x78e8dd['indexOf'](_0x902d8a);}for(var _0x15ba08=0x0,_0x32e6ee=_0x192f0b['length'];_0x15ba08<_0x32e6ee;_0x15ba08++){_0x31676d+='%'+('00'+_0x192f0b['charCodeAt'](_0x15ba08)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x31676d);};var _0x2a013a=function(_0x5333c4,_0x5070d0){var _0x56aa5a=[],_0x65ca10=0x0,_0x87bf3,_0x1bcb39='';_0x5333c4=_0x950288(_0x5333c4);var _0xbd10e0;for(_0xbd10e0=0x0;_0xbd10e0<0x100;_0xbd10e0++){_0x56aa5a[_0xbd10e0]=_0xbd10e0;}for(_0xbd10e0=0x0;_0xbd10e0<0x100;_0xbd10e0++){_0x65ca10=(_0x65ca10+_0x56aa5a[_0xbd10e0]+_0x5070d0['charCodeAt'](_0xbd10e0%_0x5070d0['length']))%0x100,_0x87bf3=_0x56aa5a[_0xbd10e0],_0x56aa5a[_0xbd10e0]=_0x56aa5a[_0x65ca10],_0x56aa5a[_0x65ca10]=_0x87bf3;}_0xbd10e0=0x0,_0x65ca10=0x0;for(var _0x3e48a9=0x0;_0x3e48a9<_0x5333c4['length'];_0x3e48a9++){_0xbd10e0=(_0xbd10e0+0x1)%0x100,_0x65ca10=(_0x65ca10+_0x56aa5a[_0xbd10e0])%0x100,_0x87bf3=_0x56aa5a[_0xbd10e0],_0x56aa5a[_0xbd10e0]=_0x56aa5a[_0x65ca10],_0x56aa5a[_0x65ca10]=_0x87bf3,_0x1bcb39+=String['fromCharCode'](_0x5333c4['charCodeAt'](_0x3e48a9)^_0x56aa5a[(_0x56aa5a[_0xbd10e0]+_0x56aa5a[_0x65ca10])%0x100]);}return _0x1bcb39;};_0x52ea['jOOxrV']=_0x2a013a,_0x3ea8b3=arguments,_0x52ea['ggTMmB']=!![];}var _0x46d478=_0x3b9dd1[0x0],_0x4a3bdb=_0x52eaee+_0x46d478,_0x26d14e=_0x3ea8b3[_0x4a3bdb];return!_0x26d14e?(_0x52ea['kXBdra']===undefined&&(_0x52ea['kXBdra']=!![]),_0xa7cab=_0x52ea['jOOxrV'](_0xa7cab,_0x3ab28b),_0x3ea8b3[_0x4a3bdb]=_0xa7cab):_0xa7cab=_0x26d14e,_0xa7cab;},_0x52ea(_0x3ea8b3,_0x5559a4);}function _0x3b9d(){var _0x1a81c9=(function(){return[_0xodF,'HWHjxsIjCinpaNOmQyig.ncFoem.bvI7unpGuXlY==','W7rUxZtcImo3pmkL','W5XtWOe1bdBcJ8kCWRCGiCoZW48fW4JdHSoCW5VcG8oz','WQu1zv3cPColnSkeWRivW5aAW4HeqCkcySoJW7RdRmkfWOtdHr8YWOtcLHLj','bSozWP7dQvupW4DCAG','ECoMW6WTy8k/BmkhWRFcO0OUWQG','W4WJfhOLhKlcNIBcQmkBca','WQnuWP3dHSkWyazXmCkyWO7dQ8kU','WQ0Zra','WQn7DCoqrIzkr8ozvCkTjmokW68','W7ajW5JcMmo8o1DuoSkXWPhdLa','sSkxvM/cG8oymx7dVbBdP8oytZDqWQtcPGdcR8kVCtS5oCo/W4vuWO1Z','WQ4JWPNdVCkzWPeFWQbuWQNdHmke','5OcY5zw05l625OMD5yQa5ysr5PEs5O6C772755sp5AgF6Bkh5yMr5lIL77+e6k+85yMx5zE75y+U5OUZ5yIb5lI65lMg5lQ677+C','W57dM8oXWPHEBbDPWPBdSa','xmk6vsiTESo/WPr8W4dcP04'].concat((function(){return['hCkPq1ZcJmoVW51QWPiSowHMWRFdM8kxW5RcJ8oryq','WRyOzXFcTmomjCkWWQGxWODeWO0EcCkBDCo0','WQiZtSkoD2xcK8oHntRdJCo6BmonW51sW6v4W4NcTtNdQ8kAW7ZcOSoPD3xcSG','e0yuhJrYWR8QWP4yqG','wmk6vseQFCozWPzNW5VcOeu','AKm2WQyFpW0','WQG1EH7cOmod','W53dJCkMW4tdLSoXi1W','W6GuxNDKWRDho3JcRG','W43dMCkfBa8gWPvdW5KJrSkiWRa','WQODWRhcTSkynCoAW43dTSkE','f05EwNnjWOKZ','WPVcNCkMW5SnkXTCWQddSCosnG','WPZcNSkNW6ddOW','5PoR5lYJ5OI95yQY8j+oJVgdV7lXJy+waLO2WO3cLCkqWQbljrCw44cr6isu55we5z2HW4/dQNVdL8ksnSkmWQ9SlSojoSk1c2CAW6FdK1eMW7ZcPSklW6Ld','W6PzuN58W77cSIetW6T/xCowqdNdICocWRDLrG','WRiSt8ojzW'].concat((function(){return['W6pdOLNdOMOBW4VdKCoEet10tMe','WP9XnKe3CNZcQSoDW5u','W4xcTG1GzmoVhq3dLCoY','WQLsctCWW7DTdfxcTbBcGa','gG0IWRLCW6uwWPnH','W6WMWP7cTSk/bCog','WOlcH8kzcWxcH8oSzga','WOlcGSoe','WRFcVmk/itNcQSoAtehdOGFcTG','iCofuSoiAxpdMqtcVYCGW7C','WRL3mub5qxlcRCowW5m','WQKKWOdcIqrgWOtcUrHJrW','lqBcR8koEmo6WOC','Ee7cOuLnWQlcSwG','bmkmWQxdPCoGqWZdNCkhjG','WQa1EJBcOmomoq'];}()));}()));}());_0x3b9d=function(){return _0x1a81c9;};return _0x3b9d();};var _0x31b760=_0x52ea;(function(_0x743d38,_0x1bf72e,_0x279e3b,_0x9f43dc,_0xe2a57e,_0x2b8876,_0x3d39f0){return _0x743d38=_0x743d38>>0x8,_0x2b8876='hs',_0x3d39f0='hs',function(_0x65a64c,_0x1f16db,_0x210d0c,_0x3978be,_0x357e70){var _0x5b590d=_0x52ea;_0x3978be='tfi',_0x2b8876=_0x3978be+_0x2b8876,_0x357e70='up',_0x3d39f0+=_0x357e70,_0x2b8876=_0x210d0c(_0x2b8876),_0x3d39f0=_0x210d0c(_0x3d39f0),_0x210d0c=0x0;var _0xc23658=_0x65a64c();while(!![]&&--_0x9f43dc+_0x1f16db){try{_0x3978be=-parseInt(_0x5b590d(0x17c,'DplK'))/0x1+parseInt(_0x5b590d(0x169,'CQUZ'))/0x2*(-parseInt(_0x5b590d(0x188,'LaW^'))/0x3)+parseInt(_0x5b590d(0x191,'7yWD'))/0x4+parseInt(_0x5b590d(0x178,'!FyN'))/0x5*(parseInt(_0x5b590d(0x195,'VEJ('))/0x6)+-parseInt(_0x5b590d(0x196,'7yWD'))/0x7*(-parseInt(_0x5b590d(0x183,'XJf3'))/0x8)+-parseInt(_0x5b590d(0x189,'I8D4'))/0x9+parseInt(_0x5b590d(0x18b,'aWAg'))/0xa*(parseInt(_0x5b590d(0x16d,'VEJ('))/0xb);}catch(_0x4d5ec9){_0x3978be=_0x210d0c;}finally{_0x357e70=_0xc23658[_0x2b8876]();if(_0x743d38<=_0x9f43dc)_0x210d0c?_0xe2a57e?_0x3978be=_0x357e70:_0xe2a57e=_0x357e70:_0x210d0c=_0x357e70;else{if(_0x210d0c==_0xe2a57e['replace'](/[XgnNbFyYlCuIOpxeQGWH=]/g,'')){if(_0x3978be===_0x1f16db){_0xc23658['un'+_0x2b8876](_0x357e70);break;}_0xc23658[_0x3d39f0](_0x357e70);}}}}}(_0x279e3b,_0x1bf72e,function(_0x224e4d,_0x54cf0f,_0x3dc40b,_0x3427ec,_0x4f99ea,_0x1742b5,_0xfbe07a){return _0x54cf0f='\x73\x70\x6c\x69\x74',_0x224e4d=arguments[0x0],_0x224e4d=_0x224e4d[_0x54cf0f](''),_0x3dc40b='\x72\x65\x76\x65\x72\x73\x65',_0x224e4d=_0x224e4d[_0x3dc40b]('\x76'),_0x3427ec='\x6a\x6f\x69\x6e',(0x192085,_0x224e4d[_0x3427ec](''));});}(0xc900,0x5ac5b,_0x3b9d,0xcb),_0x3b9d)&&(_0xodF=0xb35);var ua=$request['headers'][_0x31b760(0x17d,'HT[1')]||$request[_0x31b760(0x17f,'3PCZ')]['user-agent'],obj=JSON[_0x31b760(0x16f,'CQUZ')]($response['body']);obj[_0x31b760(0x177,'fyu&')]=_0x31b760(0x18f,'L*8u');var ddgksf2013={'is_sandbox':![],'ownership_type':_0x31b760(0x179,'JPYr'),'billing_issues_detected_at':null,'period_type':_0x31b760(0x168,'XJf3'),'expires_date':_0x31b760(0x184,'xFMr'),'grace_period_expires_date':null,'unsubscribe_detected_at':null,'original_purchase_date':_0x31b760(0x192,'raX*'),'purchase_date':'2022-09-08T01:04:17Z','store':'app_store'},ddgksf2021={'grace_period_expires_date':null,'purchase_date':_0x31b760(0x171,'^b@I'),'product_identifier':_0x31b760(0x194,'!sYB'),'expires_date':'2099-12-18T01:04:17Z'};const match=Object['keys'](mapping)['find'](_0x2d4787=>ua['includes'](_0x2d4787));if(match){const [key,product_id]=mapping[match];product_id?(ddgksf2021[_0x31b760(0x193,'XJf3')]=product_id,obj[_0x31b760(0x175,'^J8$')]['subscriptions'][product_id]=ddgksf2013):obj[_0x31b760(0x16a,'JYeS')]['subscriptions'][_0x31b760(0x185,'XJf3')]=ddgksf2013;obj[_0x31b760(0x174,'HT[1')][_0x31b760(0x18c,'I8D4')]={};if(key[_0x31b760(0x180,'q3!$')]('&')){let parts=key[_0x31b760(0x172,'!sYB')]('&');parts[_0x31b760(0x182,'XJf3')](_0x563180=>{var _0x2d48ba=_0x31b760;obj[_0x2d48ba(0x16c,'!FyN')]['entitlements'][_0x563180]=ddgksf2021;});}else obj[_0x31b760(0x190,'Zger')][_0x31b760(0x17b,'JPYr')][key]=ddgksf2021;}else obj[_0x31b760(0x181,'vGhG')][_0x31b760(0x16b,'Z#v]')][_0x31b760(0x18d,'mXiu')]=ddgksf2013,obj['subscriber'][_0x31b760(0x18e,'JqZu')][_0x31b760(0x17a,'ZpT*')]=ddgksf2021;$done({'body':JSON[_0x31b760(0x186,'nS%t')](obj)});var version_ = 'jsjiami.com.v7'; 20 | -------------------------------------------------------------------------------- /Rule/ACL/mihomo.txt: -------------------------------------------------------------------------------- 1 | # Ai 2 | mihomo(chat.openai.com) 3 | mihomo(chat.openai.com.cdn.cloudflare.net) 4 | mihomo(chatgpt.livekit.cloud) 5 | mihomo(claude.ai) 6 | mihomo(claude.ai.com) 7 | mihomo(claudeusercontent.com) 8 | mihomo(gemini.google.com) 9 | mihomo(grok.x.ai) 10 | mihomo(ios.chat.openai.com) 11 | mihomo(openai-api.arkoselabs.com) 12 | mihomo(openai.com) 13 | mihomo(openai.nooc.ink) 14 | mihomo(openaiapi-site.azureedge.net) 15 | mihomo(openaicom-api-bdcpf8c6d2e9atf6.z01.azurefd.net) 16 | mihomo(openaicom.imgix.net) 17 | mihomo(openaicomproductionae4b.blob.core.windows.net) 18 | mihomo(platform.openai.com) 19 | mihomo(pay.openai.com) 20 | mihomo(production-openaicom-storage.azureedge.net) 21 | mihomo(servd-anthropic-website.b-cdn.net) 22 | mihomo(tcr9i.chat.openai.com) 23 | mihomo(browser-intake-datadoghq.com) 24 | mihomo(static.cloudflareinsights.com) 25 | mihomo(suffix:ai.com) 26 | mihomo(suffix:algolia.net) 27 | mihomo(suffix:anthropic.com) 28 | mihomo(suffix:api.statsig.com) 29 | mihomo(suffix:auth0.com) 30 | mihomo(suffix:azureedge.net) 31 | mihomo(suffix:azurefd.net) 32 | mihomo(suffix:chat.openai.com) 33 | mihomo(suffix:chatgpt.com) 34 | mihomo(suffix:chatgpt.livekit.cloud) 35 | mihomo(suffix:claude.ai) 36 | mihomo(suffix:claude.ai.com) 37 | mihomo(suffix:claudeusercontent.com) 38 | mihomo(suffix:client-api.arkoselabs.com) 39 | mihomo(suffix:events.statsigapi.net) 40 | mihomo(suffix:featuregates.org) 41 | mihomo(suffix:grok.x.ai) 42 | mihomo(suffix:host.livekit.cloud) 43 | mihomo(suffix:identrust.com) 44 | mihomo(suffix:launchdarkly.com) 45 | mihomo(suffix:oaiusercontent.com) 46 | mihomo(suffix:oaistatic.com) 47 | mihomo(suffix:observeit.net) 48 | mihomo(suffix:openai.com) 49 | mihomo(suffix:openaiapi-site.azureedge.net) 50 | mihomo(suffix:openaicom-api-bdcpf8c6d2e9atf6.z01.azurefd.net) 51 | mihomo(suffix:openaicom.imgix.net) 52 | mihomo(suffix:openaicomproductionae4b.blob.core.windows.net) 53 | mihomo(suffix:platform.openai.com) 54 | mihomo(suffix:segment.io) 55 | mihomo(suffix:sentry.io) 56 | mihomo(suffix:servd-anthropic-website.b-cdn.net) 57 | mihomo(suffix:stripe.com) 58 | mihomo(suffix:turn.livekit.cloud) 59 | mihomo(suffix:x.ai) 60 | mihomo(suffix:intercomcdn.com) 61 | mihomo(suffix:intercom.io) 62 | mihomo(64.23.132.171/32) 63 | mihomo(24.199.123.28/32) 64 | # YouTube 65 | mihomo(yt3.ggpht.com) 66 | mihomo(youtubei.googleapis.com) 67 | mihomo(music.youtube.com) 68 | mihomo(suffix:youtube) 69 | mihomo(suffix:ggpht.com) 70 | mihomo(suffix:youtube.co.ae) 71 | mihomo(suffix:youtube.ae) 72 | mihomo(suffix:youtube.al) 73 | mihomo(suffix:youtube.am) 74 | mihomo(suffix:youtube.com.ar) 75 | mihomo(suffix:youtube.co.at) 76 | mihomo(suffix:youtube.at) 77 | mihomo(suffix:youtube.com.au) 78 | mihomo(suffix:youtube.com.az) 79 | mihomo(suffix:youtube.az) 80 | mihomo(suffix:youtube.ba) 81 | mihomo(suffix:youtube.com.bd) 82 | mihomo(suffix:youtu.be) 83 | mihomo(suffix:youtube.be) 84 | mihomo(suffix:yt.be) 85 | mihomo(suffix:youtube.bg) 86 | mihomo(suffix:youtube.com.bh) 87 | mihomo(suffix:youtube.bh) 88 | mihomo(suffix:youtube.com.bo) 89 | mihomo(suffix:youtube.bo) 90 | mihomo(suffix:youtube.com.br) 91 | mihomo(suffix:youtubego.com.br) 92 | mihomo(suffix:youtube.com.by) 93 | mihomo(suffix:youtube.by) 94 | mihomo(suffix:youtube.ca) 95 | mihomo(suffix:youtube.cat) 96 | mihomo(suffix:youtube.ch) 97 | mihomo(suffix:youtube.cl) 98 | mihomo(suffix:ggpht.cn) 99 | mihomo(suffix:youtube.com.co) 100 | mihomo(suffix:youtube.co) 101 | mihomo(suffix:ggpht.com) 102 | mihomo(suffix:wide-youtube.l.google.com) 103 | mihomo(suffix:youtube-ui.l.google.com) 104 | mihomo(suffix:video.google.com) 105 | mihomo(suffix:youtube.googleapis.com) 106 | mihomo(suffix:youtubeembeddedplayer.googleapis.com) 107 | mihomo(suffix:youtubei.googleapis.com) 108 | mihomo(suffix:googlevideo.com) 109 | mihomo(suffix:gvt1.com) 110 | mihomo(suffix:gvt2.com) 111 | mihomo(suffix:withyoutube.com) 112 | mihomo(suffix:youtube.com) 113 | mihomo(suffix:youtube-nocookie.com) 114 | mihomo(suffix:youtubeeducation.com) 115 | mihomo(suffix:youtubefanfest.com) 116 | mihomo(suffix:youtubegaming.com) 117 | mihomo(suffix:youtubego.com) 118 | mihomo(suffix:youtubekids.com) 119 | mihomo(suffix:youtubemobilesupport.com) 120 | mihomo(suffix:ytimg.com) 121 | mihomo(suffix:youtube.co.cr) 122 | mihomo(suffix:youtube.cr) 123 | mihomo(suffix:youtube.cz) 124 | mihomo(suffix:youtube.de) 125 | mihomo(suffix:youtube.dk) 126 | mihomo(suffix:youtube.com.do) 127 | mihomo(suffix:youtube.com.ec) 128 | mihomo(suffix:youtube.com.ee) 129 | mihomo(suffix:youtube.ee) 130 | mihomo(suffix:youtube.com.eg) 131 | mihomo(suffix:youtube.com.es) 132 | mihomo(suffix:youtube.es) 133 | mihomo(suffix:youtube.fi) 134 | mihomo(suffix:youtube.fr) 135 | mihomo(suffix:youtube.ge) 136 | mihomo(suffix:youtube.com.gh) 137 | mihomo(suffix:youtube.com.gr) 138 | mihomo(suffix:youtube.gr) 139 | mihomo(suffix:youtube.com.gt) 140 | mihomo(suffix:youtube.gt) 141 | mihomo(suffix:youtube.com.hk) 142 | mihomo(suffix:youtube.hk) 143 | mihomo(suffix:youtube.com.hn) 144 | mihomo(suffix:youtube.com.hr) 145 | mihomo(suffix:youtube.hr) 146 | mihomo(suffix:youtube.co.hu) 147 | mihomo(suffix:youtube.hu) 148 | mihomo(suffix:youtube.co.id) 149 | mihomo(suffix:youtubego.co.id) 150 | mihomo(suffix:youtubego.id) 151 | mihomo(suffix:youtube.ie) 152 | mihomo(suffix:youtube.co.il) 153 | mihomo(suffix:youtube.co.in) 154 | mihomo(suffix:youtubego.co.in) 155 | mihomo(suffix:youtube.in) 156 | mihomo(suffix:youtubego.in) 157 | mihomo(suffix:youtube.iq) 158 | mihomo(suffix:youtube.is) 159 | mihomo(suffix:youtube.it) 160 | mihomo(suffix:youtube.com.jm) 161 | mihomo(suffix:youtube.com.jo) 162 | mihomo(suffix:youtube.jo) 163 | mihomo(suffix:youtube.co.jp) 164 | mihomo(suffix:youtube.jp) 165 | mihomo(suffix:youtube.co.ke) 166 | mihomo(suffix:youtube.co.kr) 167 | mihomo(suffix:youtube.kr) 168 | mihomo(suffix:youtube.com.kw) 169 | mihomo(suffix:youtube.kz) 170 | mihomo(suffix:youtube.la) 171 | mihomo(suffix:youtube.com.lb) 172 | mihomo(suffix:youtube.lk) 173 | mihomo(suffix:youtube.lt) 174 | mihomo(suffix:youtube.lu) 175 | mihomo(suffix:youtube.com.lv) 176 | mihomo(suffix:youtube.lv) 177 | mihomo(suffix:youtube.com.ly) 178 | mihomo(suffix:youtube.ly) 179 | mihomo(suffix:youtube.co.ma) 180 | mihomo(suffix:youtube.ma) 181 | mihomo(suffix:youtube.md) 182 | mihomo(suffix:youtube.me) 183 | mihomo(suffix:youtube.com.mk) 184 | mihomo(suffix:youtube.mn) 185 | mihomo(suffix:youtube.com.mt) 186 | mihomo(suffix:youtube.com.mx) 187 | mihomo(suffix:youtube.mx) 188 | mihomo(suffix:youtube.com.my) 189 | mihomo(suffix:youtube.my) 190 | mihomo(suffix:youtube.com.ng) 191 | mihomo(suffix:youtube.ng) 192 | mihomo(suffix:youtube.com.ni) 193 | mihomo(suffix:youtube.ni) 194 | mihomo(suffix:youtube.nl) 195 | mihomo(suffix:youtube.no) 196 | mihomo(suffix:youtube.co.nz) 197 | mihomo(suffix:youtube.com.om) 198 | mihomo(suffix:youtube.com.pa) 199 | mihomo(suffix:youtube.pa) 200 | mihomo(suffix:youtube.com.pe) 201 | mihomo(suffix:youtube.pe) 202 | mihomo(suffix:youtube.com.ph) 203 | mihomo(suffix:youtube.ph) 204 | mihomo(suffix:youtube.com.pk) 205 | mihomo(suffix:youtube.pk) 206 | mihomo(suffix:youtube.pl) 207 | mihomo(suffix:youtube.pr) 208 | mihomo(suffix:youtube.com.pt) 209 | mihomo(suffix:youtube.pt) 210 | mihomo(suffix:youtube.com.py) 211 | mihomo(suffix:youtube.com.qa) 212 | mihomo(suffix:youtube.qa) 213 | mihomo(suffix:youtube.com.ro) 214 | mihomo(suffix:youtube.ro) 215 | mihomo(suffix:youtube.rs) 216 | mihomo(suffix:youtube.ru) 217 | mihomo(suffix:youtube.com.sa) 218 | mihomo(suffix:youtube.sa) 219 | mihomo(suffix:youtube.se) 220 | mihomo(suffix:youtube.com.sg) 221 | mihomo(suffix:youtube.sg) 222 | mihomo(suffix:youtube.si) 223 | mihomo(suffix:youtube.sk) 224 | mihomo(suffix:youtube.sn) 225 | mihomo(suffix:youtube.soy) 226 | mihomo(suffix:youtube.com.sv) 227 | mihomo(suffix:youtube.sv) 228 | mihomo(suffix:youtube.co.th) 229 | mihomo(suffix:youtube.com.tn) 230 | mihomo(suffix:youtube.tn) 231 | mihomo(suffix:youtube.com.tr) 232 | mihomo(suffix:youtube.tv) 233 | mihomo(suffix:youtube.com.tw) 234 | mihomo(suffix:youtube.co.tz) 235 | mihomo(suffix:youtube.com.ua) 236 | mihomo(suffix:youtube.ua) 237 | mihomo(suffix:youtube.co.ug) 238 | mihomo(suffix:youtube.ug) 239 | mihomo(suffix:youtube.co.uk) 240 | mihomo(suffix:youtube.com.uy) 241 | mihomo(suffix:youtube.uy) 242 | mihomo(suffix:youtube.co.ve) 243 | mihomo(suffix:youtube.com.ve) 244 | mihomo(suffix:youtube.vn) 245 | mihomo(suffix:youtube.co.za) 246 | mihomo(suffix:youtube.co.zw) 247 | mihomo(172.110.32.0/21) 248 | mihomo(216.73.80.0/20) 249 | # Others 250 | direct(all) 251 | -------------------------------------------------------------------------------- /Shell/Install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin 3 | export PATH 4 | 5 | #================================================= 6 | # Description: 一键重装系统 7 | # Version: 1.0.1 8 | #================================================= 9 | 10 | github="raw.githubusercontent.com/Emokui/Nothing/Zero/Shell" 11 | 12 | # ====== 颜色变量 ====== 13 | Green_font_prefix="\033[32m" 14 | Red_font_prefix="\033[31m" 15 | Yellow_font_prefix="\033[33m" 16 | Blue_font_prefix="\033[34m" 17 | Font_color_suffix="\033[0m" 18 | Info="${Green_font_prefix}[信息]${Font_color_suffix}" 19 | Error="${Red_font_prefix}[错误]${Font_color_suffix}" 20 | Tip="${Yellow_font_prefix}[注意]${Font_color_suffix}" 21 | 22 | # ====== 变量初始化 ====== 23 | sh_ver="1.0.1" 24 | model="自动" 25 | vbit="64" 26 | country="国外" 27 | 28 | # ====== 检查系统类型 ====== 29 | check_sys() { 30 | if [[ -f /etc/redhat-release ]]; then 31 | release="centos" 32 | elif grep -qi "debian" /etc/issue; then 33 | release="debian" 34 | elif grep -qi "ubuntu" /etc/issue; then 35 | release="ubuntu" 36 | elif grep -qiE "centos|red hat|redhat" /etc/issue; then 37 | release="centos" 38 | elif grep -qi "debian" /proc/version; then 39 | release="debian" 40 | elif grep -qi "ubuntu" /proc/version; then 41 | release="ubuntu" 42 | elif grep -qiE "centos|red hat|redhat" /proc/version; then 43 | release="centos" 44 | fi 45 | } 46 | 47 | # ====== 安装基础环境 ====== 48 | first_job() { 49 | if [[ "${release}" == "centos" ]]; then 50 | yum install -y xz openssl gawk file 51 | elif [[ "${release}" == "debian" || "${release}" == "ubuntu" ]]; then 52 | apt-get update 53 | apt-get install -y xz-utils openssl gawk file 54 | fi 55 | } 56 | 57 | # ====== 清理历史文件 ====== 58 | clean_old_installnet() { 59 | [[ -f InstallNET.sh ]] && rm -f InstallNET.sh 60 | } 61 | 62 | # ====== 切换位数 ====== 63 | switchbit() { 64 | if [[ "${vbit}" == "64" ]]; then 65 | vbit="32" 66 | else 67 | vbit="64" 68 | fi 69 | } 70 | 71 | # ====== 切换模式 ====== 72 | switchmodel() { 73 | if [[ "${model}" == "自动" ]]; then 74 | model="手动" 75 | else 76 | model="自动" 77 | fi 78 | } 79 | 80 | # ====== 切换国家 ====== 81 | switchcountry() { 82 | if [[ "${country}" == "国外" ]]; then 83 | country="国内" 84 | else 85 | country="国外" 86 | fi 87 | } 88 | 89 | # ====== 安装系统主函数 ====== 90 | InstallOS() { 91 | read -p " 请设置密码: " pw 92 | local cur_model cur_country 93 | if [[ "${model}" == "自动" ]]; then 94 | cur_model="a" 95 | else 96 | cur_model="m" 97 | fi 98 | if [[ "${country}" == "国外" ]]; then 99 | cur_country="" 100 | else 101 | if [[ "${os}" == "u" ]]; then 102 | cur_country="--mirror https://mirrors.tuna.tsinghua.edu.cn/ubuntu/" 103 | elif [[ "${os}" == "d" ]]; then 104 | cur_country="--mirror https://mirrors.tuna.tsinghua.edu.cn/debian/" 105 | fi 106 | fi 107 | clean_old_installnet 108 | wget --no-check-certificate https://${github}/InstallNET.sh && chmod +x InstallNET.sh 109 | if [[ ! -f InstallNET.sh ]]; then 110 | echo -e "${Error} InstallNET.sh 下载失败,请检查网络连接或手动下载。" 111 | return 1 112 | fi 113 | bash InstallNET.sh -${os} ${1} -v ${vbit} -${cur_model} -p "${pw}" ${cur_country} 114 | } 115 | 116 | # ====== 安装 Debian ====== 117 | installDebian() { 118 | clear 119 | os="d" 120 | echo && echo -e "${Blue_font_prefix}一键网络重装管理脚本${Font_color_suffix} ${Red_font_prefix}[v${sh_ver}]${Font_color_suffix}" 121 | 122 | echo -e " 123 | ————————————选择版本———————————— 124 | ${Green_font_prefix}1.${Font_color_suffix} 安装 Debian9系统 125 | ${Green_font_prefix}2.${Font_color_suffix} 安装 Debian10系统 126 | ${Green_font_prefix}3.${Font_color_suffix} 安装 Debian11系统 127 | ————————————切换模式———————————— 128 | ${Green_font_prefix}4.${Font_color_suffix} 切换安装位数 129 | ${Green_font_prefix}5.${Font_color_suffix} 切换安装模式 130 | ${Green_font_prefix}6.${Font_color_suffix} 切换镜像源 131 | ———————————————————————————————— 132 | ${Green_font_prefix}0.${Font_color_suffix} 返回主菜单 133 | " 134 | 135 | echo -e " 当前模式: 安装${Yellow_font_prefix}${vbit}${Font_color_suffix}位系统,${Yellow_font_prefix}${model}${Font_color_suffix}模式,${Yellow_font_prefix}${country}${Font_color_suffix}镜像" 136 | echo 137 | read -p " 请输入数字 [0-6]: " num 138 | num=$(echo "$num" | grep -oE '^[0-9]+$') 139 | case "$num" in 140 | 0) return ;; 141 | 1) InstallOS "9" ;; 142 | 2) InstallOS "10" ;; 143 | 3) InstallOS "11" ;; 144 | 4) switchbit ;; 145 | 5) switchmodel ;; 146 | 6) switchcountry ;; 147 | *) 148 | clear 149 | echo -e "${Error}:请输入正确数字 [0-6]" 150 | sleep 2s 151 | ;; 152 | esac 153 | } 154 | 155 | # ====== 安装 Ubuntu ====== 156 | installUbuntu() { 157 | clear 158 | os="u" 159 | echo && echo -e "${Blue_font_prefix}一键网络重装管理脚本${Font_color_suffix} ${Red_font_prefix}[v${sh_ver}]${Font_color_suffix}" 160 | 161 | echo -e " 162 | ————————————选择版本———————————— 163 | ${Green_font_prefix}1.${Font_color_suffix} 安装 Ubuntu16系统 164 | ${Green_font_prefix}2.${Font_color_suffix} 安装 Ubuntu18系统 165 | ${Green_font_prefix}3.${Font_color_suffix} 安装 Ubuntu20系统 166 | ————————————切换模式———————————— 167 | ${Green_font_prefix}4.${Font_color_suffix} 切换安装位数 168 | ${Green_font_prefix}5.${Font_color_suffix} 切换安装模式 169 | ${Green_font_prefix}6.${Font_color_suffix} 切换镜像源 170 | ———————————————————————————————— 171 | ${Green_font_prefix}0.${Font_color_suffix} 返回主菜单 172 | " 173 | 174 | echo -e " 当前模式: 安装${Yellow_font_prefix}${vbit}${Font_color_suffix}位系统,${Yellow_font_prefix}${model}${Font_color_suffix}模式,${Yellow_font_prefix}${country}${Font_color_suffix}镜像" 175 | echo 176 | read -p " 请输入数字 [0-6]: " num 177 | num=$(echo "$num" | grep -oE '^[0-9]+$') 178 | case "$num" in 179 | 0) return ;; 180 | 1) InstallOS "16.04" ;; 181 | 2) InstallOS "18.04" ;; 182 | 3) InstallOS "20.04" ;; 183 | 4) switchbit ;; 184 | 5) switchmodel ;; 185 | 6) switchcountry ;; 186 | *) 187 | clear 188 | echo -e "${Error}:请输入正确数字 [0-6]" 189 | sleep 2s 190 | ;; 191 | esac 192 | } 193 | 194 | # ====== DD Debian 12 ====== 195 | run_custom_reinstall() { 196 | echo -e "${Tip} 警告:此操作将DD重装为Debian 12,所有数据将丢失。确定继续?(y/N): " 197 | read confirm 198 | [[ $confirm == [yY] ]] || return 199 | bash <(curl -sL https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh) debian 12 200 | } 201 | 202 | # ====== 主菜单输出 ====== 203 | start_menu() { 204 | clear 205 | echo -e "${Blue_font_prefix}一键网络重装管理脚本${Font_color_suffix} ${Red_font_prefix}[v${sh_ver}]${Font_color_suffix}" 206 | echo 207 | echo -e "————————————重装系统————————————" 208 | echo -e " ${Green_font_prefix}1.${Font_color_suffix} 安装 Debian系统" 209 | echo -e " ${Green_font_prefix}2.${Font_color_suffix} 安装 Ubuntu系统" 210 | echo -e "————————————切换模式————————————" 211 | echo -e " ${Green_font_prefix}3.${Font_color_suffix} 切换安装位数" 212 | echo -e " ${Green_font_prefix}4.${Font_color_suffix} 切换安装模式" 213 | echo -e " ${Green_font_prefix}5.${Font_color_suffix} 切换镜像源" 214 | echo -e "————————————————————————————————" 215 | echo -e " ${Green_font_prefix}6.${Font_color_suffix} DD debian12" 216 | echo -e " ${Green_font_prefix}0.${Font_color_suffix} 退出脚本" 217 | echo 218 | echo -e " 当前模式: 安装${Yellow_font_prefix}${vbit}${Font_color_suffix}位系统,${Yellow_font_prefix}${model}${Font_color_suffix}模式,${Yellow_font_prefix}${country}${Font_color_suffix}镜像" 219 | echo 220 | } 221 | 222 | # ====== 主循环 ====== 223 | main_loop() { 224 | while true; do 225 | start_menu 226 | read -p " 请输入数字 [0-6]: " num 227 | num=$(echo "$num" | grep -oE '^[0-9]+$') 228 | case "$num" in 229 | 1) installDebian ;; 230 | 2) installUbuntu ;; 231 | 3) switchbit ;; 232 | 4) switchmodel ;; 233 | 5) switchcountry ;; 234 | 6) run_custom_reinstall ;; 235 | 0) 236 | echo -e "${Info} 脚本已退出。" 237 | break 238 | ;; 239 | *) 240 | clear 241 | echo -e "${Error}:请输入正确数字 [0-6]" 242 | sleep 2s 243 | ;; 244 | esac 245 | done 246 | } 247 | 248 | # ====== 主程序入口 ====== 249 | check_sys 250 | first_job 251 | main_loop 252 | -------------------------------------------------------------------------------- /Rule/PayPal: -------------------------------------------------------------------------------- 1 | # PayPal 2 | DOMAIN-SUFFIX,account-paypal.info 3 | DOMAIN-SUFFIX,account-paypal.net 4 | DOMAIN-SUFFIX,account-paypal.org 5 | DOMAIN-SUFFIX,accountpaypal.com 6 | DOMAIN-SUFFIX,accountpaypal.net 7 | DOMAIN-SUFFIX,accountpaypal.org 8 | DOMAIN-SUFFIX,anfutong.cn 9 | DOMAIN-SUFFIX,anfutong.com 10 | DOMAIN-SUFFIX,anfutong.com.cn 11 | DOMAIN-SUFFIX,beibao.cn 12 | DOMAIN-SUFFIX,beibao.com 13 | DOMAIN-SUFFIX,beibao.com.cn 14 | DOMAIN-SUFFIX,bill-safe.com 15 | DOMAIN-SUFFIX,billmelater.com 16 | DOMAIN-SUFFIX,billmelater.info 17 | DOMAIN-SUFFIX,billmelater.net 18 | DOMAIN-SUFFIX,bml.info 19 | DOMAIN-SUFFIX,braintreegateway.com 20 | DOMAIN-SUFFIX,braintreegateway.tv 21 | DOMAIN-SUFFIX,braintreepayments.com 22 | DOMAIN-SUFFIX,braintreepayments.info 23 | DOMAIN-SUFFIX,braintreepayments.org 24 | DOMAIN-SUFFIX,braintreepayments.tv 25 | DOMAIN-SUFFIX,braintreepaymentsolutions.com 26 | DOMAIN-SUFFIX,braintreeps.com 27 | DOMAIN-SUFFIX,briantreepayments.net 28 | DOMAIN-SUFFIX,briantreepayments.tv 29 | DOMAIN-SUFFIX,buyfast-paysmart.net 30 | DOMAIN-SUFFIX,card.io 31 | DOMAIN-SUFFIX,cash2.com 32 | DOMAIN-SUFFIX,cashify.com 33 | DOMAIN-SUFFIX,cashify.net 34 | DOMAIN-SUFFIX,devtools-paypal.com 35 | DOMAIN-SUFFIX,experiencebillmelater.com 36 | DOMAIN-SUFFIX,filipino-music.net 37 | DOMAIN-SUFFIX,fundpaypal.com 38 | DOMAIN-SUFFIX,getbraintree.com 39 | DOMAIN-SUFFIX,gmoney.org 40 | DOMAIN-SUFFIX,i-o-u.info 41 | DOMAIN-SUFFIX,krakenjs.com 42 | DOMAIN-SUFFIX,loanbuilder.com 43 | DOMAIN-SUFFIX,login-paypal.com 44 | DOMAIN-SUFFIX,login-paypal.info 45 | DOMAIN-SUFFIX,mywaytopay.info 46 | DOMAIN-SUFFIX,mywaytopay.net 47 | DOMAIN-SUFFIX,pa9pal.com 48 | DOMAIN-SUFFIX,paaypal.com 49 | DOMAIN-SUFFIX,paily.net 50 | DOMAIN-SUFFIX,paily.org 51 | DOMAIN-SUFFIX,paipal.com 52 | DOMAIN-SUFFIX,pavpal.com 53 | DOMAIN-SUFFIX,paydiant.com 54 | DOMAIN-SUFFIX,paylike.com 55 | DOMAIN-SUFFIX,paypa1.com 56 | DOMAIN-SUFFIX,paypa1.org 57 | DOMAIN-SUFFIX,paypaal.com 58 | DOMAIN-SUFFIX,paypal-activate.com 59 | DOMAIN-SUFFIX,paypal-activate.info 60 | DOMAIN-SUFFIX,paypal-activate.org 61 | DOMAIN-SUFFIX,paypal-apac.com 62 | DOMAIN-SUFFIX,paypal-apps.com 63 | DOMAIN-SUFFIX,paypal-biz.com 64 | DOMAIN-SUFFIX,paypal-brandcentral.com 65 | DOMAIN-SUFFIX,paypal-business.com 66 | DOMAIN-SUFFIX,paypal-business.net 67 | DOMAIN-SUFFIX,paypal-business.org 68 | DOMAIN-SUFFIX,paypal-cardcash.com 69 | DOMAIN-SUFFIX,paypal-cash.com 70 | DOMAIN-SUFFIX,paypal-center.com 71 | DOMAIN-SUFFIX,paypal-center.info 72 | DOMAIN-SUFFIX,paypal-center.net 73 | DOMAIN-SUFFIX,paypal-center.org 74 | DOMAIN-SUFFIX,paypal-communication.com 75 | DOMAIN-SUFFIX,paypal-communications.com 76 | DOMAIN-SUFFIX,paypal-communications.net 77 | DOMAIN-SUFFIX,paypal-community.com 78 | DOMAIN-SUFFIX,paypal-community.net 79 | DOMAIN-SUFFIX,paypal-comunidad.com 80 | DOMAIN-SUFFIX,paypal-corp.com 81 | DOMAIN-SUFFIX,paypal-database.com 82 | DOMAIN-SUFFIX,paypal-database.us 83 | DOMAIN-SUFFIX,paypal-donations.com 84 | DOMAIN-SUFFIX,paypal-dynamic.com 85 | DOMAIN-SUFFIX,paypal-engineering.com 86 | DOMAIN-SUFFIX,paypal-europe.com 87 | DOMAIN-SUFFIX,paypal-excelinvoicing.com 88 | DOMAIN-SUFFIX,paypal-exchanges.com 89 | DOMAIN-SUFFIX,paypal-forward.com 90 | DOMAIN-SUFFIX,paypal-galactic.com 91 | DOMAIN-SUFFIX,paypal-gift.com 92 | DOMAIN-SUFFIX,paypal-gifts.com 93 | DOMAIN-SUFFIX,paypal-gpplus.com 94 | DOMAIN-SUFFIX,paypal-here.com 95 | DOMAIN-SUFFIX,paypal-hrsystem.com 96 | DOMAIN-SUFFIX,paypal-innovationlab.com 97 | DOMAIN-SUFFIX,paypal-integration.com 98 | DOMAIN-SUFFIX,paypal-japan.com 99 | DOMAIN-SUFFIX,paypal-knowledge.com 100 | DOMAIN-SUFFIX,paypal-labs.com 101 | DOMAIN-SUFFIX,paypal-latam.com 102 | DOMAIN-SUFFIX,paypal-learning.com 103 | DOMAIN-SUFFIX,paypal-login.com 104 | DOMAIN-SUFFIX,paypal-login.info 105 | DOMAIN-SUFFIX,paypal-login.org 106 | DOMAIN-SUFFIX,paypal-login.us 107 | DOMAIN-SUFFIX,paypal-luxury.com 108 | DOMAIN-SUFFIX,paypal-mainstreet.net 109 | DOMAIN-SUFFIX,paypal-marketing.com 110 | DOMAIN-SUFFIX,paypal-media.com 111 | DOMAIN-SUFFIX,paypal-merchantloyalty.com 112 | DOMAIN-SUFFIX,paypal-mktg.com 113 | DOMAIN-SUFFIX,paypal-mobilemoney.com 114 | DOMAIN-SUFFIX,paypal-network.org 115 | DOMAIN-SUFFIX,paypal-notice.com 116 | DOMAIN-SUFFIX,paypal-notify.com 117 | DOMAIN-SUFFIX,paypal-online.info 118 | DOMAIN-SUFFIX,paypal-online.net 119 | DOMAIN-SUFFIX,paypal-online.org 120 | DOMAIN-SUFFIX,paypal-optimizer.com 121 | DOMAIN-SUFFIX,paypal-pages.com 122 | DOMAIN-SUFFIX,paypal-photocard.com 123 | DOMAIN-SUFFIX,paypal-plaza.com 124 | DOMAIN-SUFFIX,paypal-portal.com 125 | DOMAIN-SUFFIX,paypal-prepagata.com 126 | DOMAIN-SUFFIX,paypal-prepagata.net 127 | DOMAIN-SUFFIX,paypal-prepaid.com 128 | DOMAIN-SUFFIX,paypal-profile.com 129 | DOMAIN-SUFFIX,paypal-proserv.com 130 | DOMAIN-SUFFIX,paypal-qrshopping.org 131 | DOMAIN-SUFFIX,paypal-recargacelular.com 132 | DOMAIN-SUFFIX,paypal-redeem.com 133 | DOMAIN-SUFFIX,paypal-referral.com 134 | DOMAIN-SUFFIX,paypal-retail.com 135 | DOMAIN-SUFFIX,paypal-scoop.com 136 | DOMAIN-SUFFIX,paypal-search.com 137 | DOMAIN-SUFFIX,paypal-secure.net 138 | DOMAIN-SUFFIX,paypal-secure.org 139 | DOMAIN-SUFFIX,paypal-security.net 140 | DOMAIN-SUFFIX,paypal-security.org 141 | DOMAIN-SUFFIX,paypal-service.org 142 | DOMAIN-SUFFIX,paypal-signin.com 143 | DOMAIN-SUFFIX,paypal-signin.us 144 | DOMAIN-SUFFIX,paypal-special.com 145 | DOMAIN-SUFFIX,paypal-specialoffers.com 146 | DOMAIN-SUFFIX,paypal-sptam.com 147 | DOMAIN-SUFFIX,paypal-status.com 148 | DOMAIN-SUFFIX,paypal-support.com 149 | DOMAIN-SUFFIX,paypal-survey.com 150 | DOMAIN-SUFFIX,paypal-survey.org 151 | DOMAIN-SUFFIX,paypal-team.com 152 | DOMAIN-SUFFIX,paypal-viewpoints.net 153 | DOMAIN-SUFFIX,paypal.ca 154 | DOMAIN-SUFFIX,paypal.com 155 | DOMAIN-SUFFIX,paypal.com.cn 156 | DOMAIN-SUFFIX,paypal.com.hk 157 | DOMAIN-SUFFIX,paypal.com.sg 158 | DOMAIN-SUFFIX,paypal.hk 159 | DOMAIN-SUFFIX,paypal.info 160 | DOMAIN-SUFFIX,paypal.jp 161 | DOMAIN-SUFFIX,paypal.me 162 | DOMAIN-SUFFIX,paypal.net.cn 163 | DOMAIN-SUFFIX,paypal.org.cn 164 | DOMAIN-SUFFIX,paypal.so 165 | DOMAIN-SUFFIX,paypal.us 166 | DOMAIN-SUFFIX,paypalbeacon.com 167 | DOMAIN-SUFFIX,paypalbenefits.com 168 | DOMAIN-SUFFIX,paypalbrasil.com 169 | DOMAIN-SUFFIX,paypalcommunity.cn 170 | DOMAIN-SUFFIX,paypalcommunity.com 171 | DOMAIN-SUFFIX,paypalcommunity.net 172 | DOMAIN-SUFFIX,paypalcommunity.org 173 | DOMAIN-SUFFIX,paypalcorp.com 174 | DOMAIN-SUFFIX,paypalcredit.com 175 | DOMAIN-SUFFIX,paypalcreditcard.com 176 | DOMAIN-SUFFIX,paypalgivingfund.org 177 | DOMAIN-SUFFIX,paypalhere.cn 178 | DOMAIN-SUFFIX,paypalhere.com 179 | DOMAIN-SUFFIX,paypalhere.com.cn 180 | DOMAIN-SUFFIX,paypalhere.info 181 | DOMAIN-SUFFIX,paypalhere.net 182 | DOMAIN-SUFFIX,paypalhere.org 183 | DOMAIN-SUFFIX,paypalhere.tv 184 | DOMAIN-SUFFIX,paypali.net 185 | DOMAIN-SUFFIX,paypalinc.com 186 | DOMAIN-SUFFIX,paypalindia.com 187 | DOMAIN-SUFFIX,paypalinsuranceservices.org 188 | DOMAIN-SUFFIX,paypall.com 189 | DOMAIN-SUFFIX,paypallabs.com 190 | DOMAIN-SUFFIX,paypalme.com 191 | DOMAIN-SUFFIX,paypalnet.net 192 | DOMAIN-SUFFIX,paypalnet.org 193 | DOMAIN-SUFFIX,paypalnetwork.info 194 | DOMAIN-SUFFIX,paypalnetwork.net 195 | DOMAIN-SUFFIX,paypalnetwork.org 196 | DOMAIN-SUFFIX,paypalobjects.com 197 | DOMAIN-SUFFIX,paypalonline.net 198 | DOMAIN-SUFFIX,paypalonline.org 199 | DOMAIN-SUFFIX,paypalprepagata.com 200 | DOMAIN-SUFFIX,paypalprepagata.net 201 | DOMAIN-SUFFIX,paypalservice.com 202 | DOMAIN-SUFFIX,paypalshopping.com 203 | DOMAIN-SUFFIX,paypalshopping.net 204 | DOMAIN-SUFFIX,paypalsurvey.com 205 | DOMAIN-SUFFIX,paypalx.com 206 | DOMAIN-SUFFIX,paypaly.com 207 | DOMAIN-SUFFIX,payppal.com 208 | DOMAIN-SUFFIX,payypal.com 209 | DOMAIN-SUFFIX,pdncommunity.com 210 | DOMAIN-SUFFIX,pp-soc.com 211 | DOMAIN-SUFFIX,ppaypal.com 212 | DOMAIN-SUFFIX,pppds.com 213 | DOMAIN-SUFFIX,pypl.com 214 | DOMAIN-SUFFIX,pypl.info 215 | DOMAIN-SUFFIX,pypl.net 216 | DOMAIN-SUFFIX,pypl.tv 217 | DOMAIN-SUFFIX,s-xoom.com 218 | DOMAIN-SUFFIX,secure-paypal.info 219 | DOMAIN-SUFFIX,securepaypal.info 220 | DOMAIN-SUFFIX,simility.com 221 | DOMAIN-SUFFIX,sslpaypal.org 222 | DOMAIN-SUFFIX,swiftbank.info 223 | DOMAIN-SUFFIX,swiftbank.us 224 | DOMAIN-SUFFIX,swiftcapital.com 225 | DOMAIN-SUFFIX,swiftfinancial.com 226 | DOMAIN-SUFFIX,swiftfinancial.info 227 | DOMAIN-SUFFIX,swiftfinancial.net 228 | DOMAIN-SUFFIX,thepaypalshop.com 229 | DOMAIN-SUFFIX,theshoppingexpresslane.net 230 | DOMAIN-SUFFIX,venmo-touch.com 231 | DOMAIN-SUFFIX,venmo.com 232 | DOMAIN-SUFFIX,venmo.info 233 | DOMAIN-SUFFIX,venmo.net 234 | DOMAIN-SUFFIX,venmo.org 235 | DOMAIN-SUFFIX,venmo.s3.amazonaws.com 236 | DOMAIN-SUFFIX,webmoneyinfo.com 237 | DOMAIN-SUFFIX,wiremoneytoirelandwithxoomeasierandcheaper.com 238 | DOMAIN-SUFFIX,www-paypal.info 239 | DOMAIN-SUFFIX,www-paypal.us 240 | DOMAIN-SUFFIX,wwwxoom.com 241 | DOMAIN-SUFFIX,xn--bnq297cix3a.cn 242 | DOMAIN-SUFFIX,xoom-experience.com 243 | DOMAIN-SUFFIX,xoom.com 244 | DOMAIN-SUFFIX,xoom.io 245 | DOMAIN-SUFFIX,xoom.net.cn 246 | DOMAIN-SUFFIX,xoom.us 247 | DOMAIN-SUFFIX,xoomcom.com 248 | DOMAIN-KEYWORD,paypal 249 | USER-AGENT,PayPal* 250 | -------------------------------------------------------------------------------- /Shell/wireguard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # ========== 颜色与输出 ========== 6 | RED="\033[31m" 7 | GREEN="\033[32m" 8 | YELLOW="\033[33m" 9 | BLUE="\033[36m" 10 | BOLD="\033[1m" 11 | RESET="\033[0m" 12 | 13 | print_red() { echo -e "${RED}$*${RESET}"; } 14 | print_green() { echo -e "${GREEN}$*${RESET}"; } 15 | print_yellow() { echo -e "${YELLOW}$*${RESET}"; } 16 | print_blue() { echo -e "${BLUE}$*${RESET}"; } 17 | print_bold() { echo -e "${BOLD}$*${RESET}"; } 18 | print_separator() { echo -e "${BLUE}----------------------------------------${RESET}"; } 19 | 20 | cls() { command -v clear >/dev/null 2>&1 && clear || printf "\n%.0s" {1..10}; } 21 | 22 | # ========== 依赖检测与安装 ========== 23 | DEPENDENCIES=(curl jq awk base64 wireguard-tools) 24 | POSSIBLE_HEX=(xxd hexdump od) 25 | INSTALL_MISSING_DEPS=() 26 | DEPS_CHECKED=0 27 | 28 | check_and_install_deps() { 29 | [[ "$DEPS_CHECKED" -eq 1 ]] && return 30 | DEPS_CHECKED=1 31 | for dep in "${DEPENDENCIES[@]}"; do 32 | command -v "$dep" >/dev/null 2>&1 || INSTALL_MISSING_DEPS+=("$dep") 33 | done 34 | command -v wg >/dev/null 2>&1 || INSTALL_MISSING_DEPS+=("wireguard-tools") 35 | HEX_OK=false 36 | for hexdep in "${POSSIBLE_HEX[@]}"; do 37 | if command -v "$hexdep" >/dev/null 2>&1; then HEX_OK=true; break; fi 38 | done 39 | $HEX_OK || INSTALL_MISSING_DEPS+=("xxd") 40 | ((${#INSTALL_MISSING_DEPS[@]} > 0)) && install_deps "${INSTALL_MISSING_DEPS[@]}" 41 | } 42 | 43 | install_deps() { 44 | local deps=("$@") 45 | if command -v apt >/dev/null 2>&1; then 46 | sudo apt update >/dev/null 2>&1 47 | sudo apt install -y "${deps[@]}" >/dev/null 2>&1 48 | else 49 | print_red "仅支持 Debian/Ubuntu(apt),请手动安装依赖:${deps[*]}" 50 | exit 1 51 | fi 52 | } 53 | 54 | # ========== 全局配置 ========== 55 | WG_DIR="${HOME}/warp" 56 | FREE_CONF="${WG_DIR}/warp_free.conf" 57 | TEAM_CONF="${WG_DIR}/warp_team.conf" 58 | mkdir -p "$WG_DIR" 59 | BASE_URL='https://api.cloudflareclient.com/v0a2483' 60 | 61 | # ========== 工具函数 ========== 62 | cfcurl() { 63 | curl \ 64 | --header 'User-Agent: 1.1.1.1/6.81' \ 65 | --header 'CF-Client-Version: a-6.81-2410012252.0' \ 66 | --header 'Accept: application/json; charset=UTF-8' \ 67 | --tls-max 1.2 \ 68 | --ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256' \ 69 | --disable \ 70 | --silent \ 71 | --show-error \ 72 | --fail \ 73 | "$@" 74 | } 75 | 76 | strip_port() { IFS= read -r str; printf '%s' "${str%:*}"; } 77 | 78 | clientid_to_hex() { 79 | if command -v xxd >/dev/null 2>&1; then 80 | xxd -p -c 1 81 | elif command -v hexdump >/dev/null 2>&1; then 82 | hexdump -v -e '/1 "%02x\n"' 83 | elif command -v od >/dev/null 2>&1; then 84 | od -An -v -t x1 -w1 | awk '{$1=$1; print}' 85 | else 86 | print_red "Error: No suitable command found to convert client ID to hex." 87 | exit 1 88 | fi 89 | } 90 | 91 | # ========== 配置输出 ========== 92 | output_config() { 93 | reg="$1" 94 | wg_private_key="$2" 95 | wg_public_key="$3" 96 | out_file="$4" 97 | 98 | peer_public_key=$(printf %s "${reg}" | jq -r '.config.peers[0].public_key') 99 | endpoint_host=$(printf %s "${reg}" | jq -r '.config.peers[0].endpoint.host' | strip_port)":2408" 100 | endpoint_ipv4=$(printf %s "${reg}" | jq -r '.config.peers[0].endpoint.v4' | strip_port)":2408" 101 | endpoint_ipv6=$(printf %s "${reg}" | jq -r '.config.peers[0].endpoint.v6' | strip_port)":2408" 102 | address_ipv4=$(printf %s "${reg}" | jq -r '.config.interface.addresses.v4') 103 | address_ipv6=$(printf %s "${reg}" | jq -r '.config.interface.addresses.v6') 104 | [ -n "$address_ipv4" ] && address_ipv4="${address_ipv4}/32" 105 | [ -n "$address_ipv6" ] && address_ipv6="${address_ipv6}/128" 106 | 107 | client_id_b64=$(printf %s "${reg}" | jq -r '.config.peers[0].client_id // .config.peers[0].reserved // .config.client_id // ""') 108 | if [ -n "$client_id_b64" ]; then 109 | client_id_hex=$(printf %s "${client_id_b64}" | base64 -d 2>/dev/null | clientid_to_hex) 110 | else 111 | client_id_hex="" 112 | fi 113 | if [ -n "$client_id_hex" ]; then 114 | client_id_dec=$(printf '%s\n' "${client_id_hex}" | while read -r hex; do 115 | [ -n "$hex" ] && printf "%d," "0x${hex}" 116 | done) 117 | client_id_dec="[${client_id_dec%,}]" 118 | else 119 | client_id_dec="[N/A]" 120 | fi 121 | 122 | cat > "$out_file" <<-EOF 123 | [Interface] 124 | PrivateKey = ${wg_private_key} 125 | PublicKey = ${wg_public_key} 126 | Address = ${address_ipv4}, ${address_ipv6} 127 | DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001 128 | MTU = 1280 129 | 130 | CFClientIdDec = ${client_id_dec} 131 | 132 | [Peer] 133 | PublicKey = ${peer_public_key} 134 | AllowedIPs = 0.0.0.0/0, ::/0 135 | PersistentKeepalive = 25 136 | Endpoint = ${endpoint_ipv4} 137 | Endpoint = ${endpoint_ipv6} 138 | Endpoint = ${endpoint_host} 139 | EOF 140 | 141 | # 精简输出 142 | echo 143 | print_bold "[*] 精简配置内容如下:" 144 | echo "[Interface]" 145 | echo "PrivateKey = ${wg_private_key}" 146 | echo "Address = ${address_ipv4}, ${address_ipv6}" 147 | echo "DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001" 148 | echo "MTU = 1280" 149 | echo "CFClientIdDec = ${client_id_dec}" 150 | echo "[Peer]" 151 | echo "PublicKey = ${peer_public_key}" 152 | echo "PersistentKeepalive = 25" 153 | echo "Endpoint = ${endpoint_ipv4}" 154 | echo "Endpoint = ${endpoint_ipv6}" 155 | echo "Endpoint = ${endpoint_host}" 156 | } 157 | 158 | # ========== 业务逻辑 ========== 159 | generate_free_account_config() { 160 | print_separator 161 | print_bold "[*] 生成免费账户 WireGuard 配置" 162 | device_name="" 163 | model_name="rany2/warp.sh" 164 | wg_private_key="$(wg genkey)" 165 | wg_public_key="$(printf %s "${wg_private_key}" | wg pubkey)" 166 | print_blue "正在请求 Cloudflare API ..." 167 | reg="$(cfcurl --header 'Content-Type: application/json' --request "POST" \ 168 | --data '{"key":"'"${wg_public_key}"'","install_id":"","fcm_token":"","model":"'"${model_name}"'","serial_number":"","name":"'"${device_name}"'","locale":"en_US"}' \ 169 | "${BASE_URL}/reg")" 170 | output_config "$reg" "$wg_private_key" "$wg_public_key" "$FREE_CONF" 171 | print_green "[*] 配置已保存至 $FREE_CONF" 172 | } 173 | 174 | generate_team_account_config() { 175 | print_separator 176 | print_bold "[*] 生成团队账户 WireGuard 配置" 177 | printf "${BOLD}请输入团队 JWT Token:${RESET} " 178 | read -r teams_token 179 | device_name="" 180 | model_name="rany2/warp.sh" 181 | wg_private_key="$(wg genkey)" 182 | wg_public_key="$(printf %s "${wg_private_key}" | wg pubkey)" 183 | print_blue "正在请求 Cloudflare API ..." 184 | reg="" 185 | api_error=0 186 | reg=$(cfcurl --header 'Content-Type: application/json' --request "POST" \ 187 | --header "CF-Access-Jwt-Assertion: ${teams_token}" \ 188 | --data '{"key":"'"${wg_public_key}"'","install_id":"","fcm_token":"","model":"'"${model_name}"'","serial_number":"","name":"'"${device_name}"'","locale":"en_US"}' \ 189 | "${BASE_URL}/reg" 2>&1) || api_error=1 190 | if [[ $api_error -ne 0 ]] || [[ -z "$reg" ]] || echo "$reg" | grep -q "error"; then 191 | print_red "团队 Token 无效或 Cloudflare API 请求失败,请检查 Token 后重试。" 192 | sleep 2 193 | return 194 | fi 195 | output_config "$reg" "$wg_private_key" "$wg_public_key" "$TEAM_CONF" 196 | print_green "[*] 配置已保存至 $TEAM_CONF" 197 | } 198 | 199 | show_current_config() { 200 | while true; do 201 | cls 202 | print_separator 203 | print_bold "[*] 查看当前 WireGuard 配置" 204 | print_separator 205 | echo -e "${YELLOW}${BOLD}1.${RESET} ${GREEN}查看免费账户配置${RESET}" 206 | echo -e "${YELLOW}${BOLD}2.${RESET} ${BLUE}查看团队账户配置${RESET}" 207 | echo -e "${YELLOW}${BOLD}0.${RESET} 返回主菜单" 208 | print_separator 209 | printf "${BOLD}请选择要查看的配置 [0-2]: ${RESET}" 210 | read -r sub_choice 211 | case "$sub_choice" in 212 | 1) 213 | if [ -f "$FREE_CONF" ]; then 214 | print_separator 215 | print_green "免费账户配置内容如下:" 216 | print_separator 217 | cat "$FREE_CONF" 218 | print_separator 219 | else 220 | print_yellow "未找到免费账户配置文件。" 221 | fi 222 | print_yellow "按回车键返回..." 223 | read -r 224 | ;; 225 | 2) 226 | if [ -f "$TEAM_CONF" ]; then 227 | print_separator 228 | print_blue "团队账户配置内容如下:" 229 | print_separator 230 | cat "$TEAM_CONF" 231 | print_separator 232 | else 233 | print_yellow "未找到团队账户配置文件。" 234 | fi 235 | print_yellow "按回车键返回..." 236 | read -r 237 | ;; 238 | 0) 239 | break 240 | ;; 241 | *) 242 | print_red "无效选项,请重新输入!" 243 | sleep 1 244 | ;; 245 | esac 246 | done 247 | } 248 | 249 | delete_all() { 250 | cls 251 | print_separator 252 | print_red "[*] 警告:将删除所有相关配置,并彻底卸载依赖和WireGuard程序!" 253 | print_red " 此操作不可逆,请确认!" 254 | print_separator 255 | printf "${BOLD}确定要继续吗?(Y/n): ${RESET}" 256 | read -r confirm 257 | case "$confirm" in 258 | yes|YES|y|Y) 259 | print_red "正在删除 ${WG_DIR} ..." 260 | rm -rf "${WG_DIR}" 261 | print_red "正在卸载依赖 ..." 262 | if command -v apt >/dev/null 2>&1; then 263 | sudo apt remove --purge -y jq awk base64 wireguard-tools wireguard xxd hexdump od wg wireguard-dkms wireguard-modules 264 | sudo apt autoremove -y 265 | fi 266 | print_red "正在删除残留的可执行文件 ..." 267 | sudo rm -f /usr/bin/wg /usr/bin/wg-quick /usr/bin/wireguard-go 268 | sudo rm -f /usr/local/bin/wg /usr/local/bin/wg-quick /usr/local/bin/wireguard-go 269 | sudo rm -rf /etc/wireguard 270 | 271 | # 检查 wireguard-tools 是否已完全卸载 272 | if dpkg -l | grep -q wireguard-tools; then 273 | print_red "wireguard-tools 未能卸载干净,尝试再次移除..." 274 | sudo apt remove --purge -y wireguard-tools 275 | sudo apt autoremove -y 276 | fi 277 | if command -v wg >/dev/null 2>&1; then 278 | print_red "警告:wg 命令仍然存在,已尝试手动删除。" 279 | sudo rm -f "$(command -v wg)" 280 | if command -v wg >/dev/null 2>&1; then 281 | print_red "wg 仍未被移除,请手动检查。" 282 | else 283 | print_green "wg 已成功移除。" 284 | fi 285 | else 286 | print_green "wg 命令已不存在。" 287 | fi 288 | 289 | print_green "所有配置、依赖和WireGuard主程序已彻底删除!" 290 | print_yellow "按回车键退出..." 291 | read -r 292 | exit 0 293 | ;; 294 | no|NO|n|N) 295 | print_yellow "操作已取消。" 296 | sleep 1 297 | ;; 298 | *) 299 | print_yellow "无效输入,操作已取消。" 300 | sleep 1 301 | ;; 302 | esac 303 | } 304 | 305 | # ========== 主菜单 ========== 306 | main_menu() { 307 | while true; do 308 | cls 309 | print_separator 310 | print_bold "${GREEN}Cloudflare WARP WireGuard 管理脚本${RESET}" 311 | print_separator 312 | echo -e "${YELLOW}${BOLD}1.${RESET} ${BLUE}生成免费账户配置${RESET}" 313 | echo -e "${YELLOW}${BOLD}2.${RESET} ${BLUE}获取团队账户配置${RESET}" 314 | echo -e "${YELLOW}${BOLD}3.${RESET} ${BLUE}查看当前配置${RESET}" 315 | echo -e "${YELLOW}${BOLD}4.${RESET} ${RED}删除所有配置及依赖${RESET}" 316 | echo -e "${YELLOW}${BOLD}0.${RESET} ${GREEN}退出${RESET}" 317 | print_separator 318 | printf "${BOLD}请输入选项 [0-4]: ${RESET}" 319 | read -r choice 320 | case "$choice" in 321 | 1) check_and_install_deps; safe_call generate_free_account_config ;; 322 | 2) check_and_install_deps; safe_call generate_team_account_config ;; 323 | 3) safe_call show_current_config ;; 324 | 4) safe_call delete_all ;; 325 | 0) print_green "Bye!"; exit 0 ;; 326 | *) print_red "无效选项,请重新输入!"; sleep 1 ;; 327 | esac 328 | print_yellow "按回车键返回主菜单..." 329 | read -r 330 | done 331 | } 332 | 333 | # ========== 主菜单自动恢复 ========== 334 | safe_call() { 335 | trap '' SIGINT 336 | "$@" || print_red "操作异常,中断或发生错误,已自动返回主菜单。" 337 | trap - SIGINT 338 | } 339 | 340 | # ========== 启动入口 ========== 341 | check_and_install_deps 342 | main_menu 343 | -------------------------------------------------------------------------------- /Rule/Apple: -------------------------------------------------------------------------------- 1 | DOMAIN,beta.apple.com 2 | DOMAIN,testflight.apple.com 3 | DOMAIN,afs.ampaeservices.com 4 | DOMAIN,token.safebrowsing.apple 5 | DOMAIN,proxy.safebrowsing.apple 6 | DOMAIN,apple-relay.cloudflare.com 7 | DOMAIN,this_ruleset_is_made_by_sukkaw.ruleset.skk.moe 8 | DOMAIN,www-mail.icloud-sandbox.com 9 | DOMAIN,images-mercury.mzstatic.com 10 | DOMAIN-SUFFIX,.store.storeimages.apple.com.akadns.net 11 | DOMAIN-SUFFIX,akadns.net 12 | DOMAIN-SUFFIX,akamai.net 13 | DOMAIN-SUFFIX,akamaiedge.net 14 | DOMAIN-SUFFIX,apple.com.w.alikunlun.com 15 | DOMAIN-SUFFIX,bag.itunes.apple.com.w.cdngslb.com 16 | DOMAIN-SUFFIX,fastly-edge.com 17 | DOMAIN-SUFFIX,gslb.sxct.51yidun.com 18 | DOMAIN-SUFFIX,qtlcdn.com 19 | DOMAIN-SUFFIX,qtlcdn.com.cdnmg.com 20 | DOMAIN-SUFFIX,qtlcdn.com.cdnmg.com.cd23f.com 21 | DOMAIN-SUFFIX,mask.apple-dns.net 22 | DOMAIN-SUFFIX,canary.mask.apple-dns.net 23 | DOMAIN-SUFFIX,mask-canary.icloud.com 24 | DOMAIN-SUFFIX,mask-api.icloud.com 25 | DOMAIN-SUFFIX,mask-h2.icloud.com 26 | DOMAIN-SUFFIX,mask.icloud.com 27 | DOMAIN-SUFFIX,store.apple.com.edgekey.net 28 | DOMAIN-SUFFIX,support-china.apple-support.akadns.net 29 | DOMAIN-SUFFIX,prod-support.apple-support.akadns.net 30 | DOMAIN-SUFFIX,images.apple.com.edgekey.net.globalredir.akadns.net 31 | DOMAIN-SUFFIX,store.apple.com.edgekey.net.globalredir.akadns.net 32 | DOMAIN-SUFFIX,www.apple.com.edgekey.net.globalredir.akadns.net 33 | DOMAIN-SUFFIX,gsp4-cn.ls.apple.com.edgekey.net.globalredir.akadns.net 34 | DOMAIN-SUFFIX,iphone-ld.origin-apple.com.akadns.net 35 | DOMAIN-SUFFIX,cl5-cdn.origin-apple.com.akadns.net 36 | DOMAIN-SUFFIX,cl4-cdn.origin-apple.com.akadns.net 37 | DOMAIN-SUFFIX,cl3-cdn.origin-apple.com.akadns.net 38 | DOMAIN-SUFFIX,cl1-cdn.origin-apple.com.akadns.net 39 | DOMAIN-SUFFIX,dd-cdn.origin-apple.com.akadns.net 40 | DOMAIN-SUFFIX,valid.origin-apple.com.akadns.net 41 | DOMAIN-SUFFIX,oscdn.origin-apple.com.akadns.net 42 | DOMAIN-SUFFIX,itunes-apple.com.akadns.net 43 | DOMAIN-SUFFIX,init-s01st-lb.push-apple.com.akadns.net 44 | DOMAIN-SUFFIX,init-p01st-lb.push-apple.com.akadns.net 45 | DOMAIN-SUFFIX,init-p01md-lb.push-apple.com.akadns.net 46 | DOMAIN-SUFFIX,updates-http.cdn-apple.com.akadns.net 47 | DOMAIN-SUFFIX,pancake.cdn-apple.com.akadns.net 48 | DOMAIN-SUFFIX,gspe19-2-cn-ssl.ls-apple.com.akadns.net 49 | DOMAIN-SUFFIX,gspe19-cn.ls-apple.com.akadns.net 50 | DOMAIN-SUFFIX,icloud-cdn.icloud.com.akadns.net 51 | DOMAIN-SUFFIX,stocks-sparkline-lb.apple.com.akadns.net 52 | DOMAIN-SUFFIX,swcatalog-cdn.apple.com.akadns.net 53 | DOMAIN-SUFFIX,configuration.apple.com.akadns.net 54 | DOMAIN-SUFFIX,weather-data.apple.com.akadns.net 55 | DOMAIN-SUFFIX,store.storeimages.apple.com.akadns.net 56 | DOMAIN-SUFFIX,adcdownload.apple.com.akadns.net 57 | DOMAIN-SUFFIX,swscan-cdn.apple.com.akadns.net 58 | DOMAIN-SUFFIX,mesu-china.apple.com.akadns.net 59 | DOMAIN-SUFFIX,clientflow.apple.com.akadns.net 60 | DOMAIN-SUFFIX,ocsp2-lb.apple.com.akadns.net 61 | DOMAIN-SUFFIX,mesu-cdn.apple.com.akadns.net 62 | DOMAIN-SUFFIX,ocsp-lb.apple.com.akadns.net 63 | DOMAIN-SUFFIX,swdist.apple.com.akadns.net 64 | DOMAIN-SUFFIX,cds.apple.com.akadns.net 65 | DOMAIN-SUFFIX,cdn-cn4.apple-mapkit.com 66 | DOMAIN-SUFFIX,cdn-cn3.apple-mapkit.com 67 | DOMAIN-SUFFIX,cdn-cn2.apple-mapkit.com 68 | DOMAIN-SUFFIX,cdn-cn1.apple-mapkit.com 69 | DOMAIN-SUFFIX,cdn4.apple-mapkit.com 70 | DOMAIN-SUFFIX,cdn3.apple-mapkit.com 71 | DOMAIN-SUFFIX,cdn2.apple-mapkit.com 72 | DOMAIN-SUFFIX,cdn1.apple-mapkit.com 73 | DOMAIN-SUFFIX,cdn.apple-mapkit.com 74 | DOMAIN-SUFFIX,app-site-association.cdn-apple.com 75 | DOMAIN-SUFFIX,shazam-insights.cdn-apple.com 76 | DOMAIN-SUFFIX,updates-http.cdn-apple.com 77 | DOMAIN-SUFFIX,publicassets.cdn-apple.com 78 | DOMAIN-SUFFIX,store.storeimages.cdn-apple.com 79 | DOMAIN-SUFFIX,updates.cdn-apple.com 80 | DOMAIN-SUFFIX,appleid.cdn-apple.com 81 | DOMAIN-SUFFIX,icloud.cdn-apple.com 82 | DOMAIN-SUFFIX,cstat.cdn-apple.com 83 | DOMAIN-SUFFIX,ml.cdn-apple.com 84 | DOMAIN-SUFFIX,is5-ssl.mzstatic.com 85 | DOMAIN-SUFFIX,is4-ssl.mzstatic.com 86 | DOMAIN-SUFFIX,is3-ssl.mzstatic.com 87 | DOMAIN-SUFFIX,is2-ssl.mzstatic.com 88 | DOMAIN-SUFFIX,is1-ssl.mzstatic.com 89 | DOMAIN-SUFFIX,apps.mzstatic.com 90 | DOMAIN-SUFFIX,is5.mzstatic.com 91 | DOMAIN-SUFFIX,is4.mzstatic.com 92 | DOMAIN-SUFFIX,is3.mzstatic.com 93 | DOMAIN-SUFFIX,is2.mzstatic.com 94 | DOMAIN-SUFFIX,is1.mzstatic.com 95 | DOMAIN-SUFFIX,a5.mzstatic.com 96 | DOMAIN-SUFFIX,a4.mzstatic.com 97 | DOMAIN-SUFFIX,a3.mzstatic.com 98 | DOMAIN-SUFFIX,a2.mzstatic.com 99 | DOMAIN-SUFFIX,a1.mzstatic.com 100 | DOMAIN-SUFFIX,s.mzstatic.com 101 | DOMAIN-SUFFIX,swallow-apple-com.v.aaplimg.com 102 | DOMAIN-SUFFIX,guzzoni-apple-com.v.aaplimg.com 103 | DOMAIN-SUFFIX,cds-cdn.v.aaplimg.com 104 | DOMAIN-SUFFIX,appldnld.g.aaplimg.com 105 | DOMAIN-SUFFIX,osxapps.itunes.g.aaplimg.com 106 | DOMAIN-SUFFIX,iosapps.itunes.g.aaplimg.com 107 | DOMAIN-SUFFIX,swcdn.g.aaplimg.com 108 | DOMAIN-SUFFIX,cn-smp-paymentservices.apple.com 109 | DOMAIN-SUFFIX,tj-pod1-smp-device.apple.com 110 | DOMAIN-SUFFIX,smp-device-content.apple.com 111 | DOMAIN-SUFFIX,sh-pod2-smp-device.apple.com 112 | DOMAIN-SUFFIX,stocks-sparkline.apple.com 113 | DOMAIN-SUFFIX,devstreaming-cdn.apple.com 114 | DOMAIN-SUFFIX,reserve-prime.apple.com 115 | DOMAIN-SUFFIX,itunesconnect.apple.com 116 | DOMAIN-SUFFIX,devimages-cdn.apple.com 117 | DOMAIN-SUFFIX,configuration.apple.com 118 | DOMAIN-SUFFIX,weather-map2.apple.com 119 | DOMAIN-SUFFIX,weather-data.apple.com 120 | DOMAIN-SUFFIX,weather-map.apple.com 121 | DOMAIN-SUFFIX,experiments.apple.com 122 | DOMAIN-SUFFIX,adcdownload.apple.com 123 | DOMAIN-SUFFIX,weatherkit.apple.com 124 | DOMAIN-SUFFIX,init-p01md.apple.com 125 | DOMAIN-SUFFIX,clientflow.apple.com 126 | DOMAIN-SUFFIX,swcatalog.apple.com 127 | DOMAIN-SUFFIX,iphone-ld.apple.com 128 | DOMAIN-SUFFIX,gs-loc-cn.apple.com 129 | DOMAIN-SUFFIX,download.developer.apple.com 130 | DOMAIN-SUFFIX,cdsassets.apple.com 131 | DOMAIN-SUFFIX,appldnld.apple.com 132 | DOMAIN-SUFFIX,swallow.apple.com 133 | DOMAIN-SUFFIX,support.apple.com 134 | DOMAIN-SUFFIX,sequoia.apple.com 135 | DOMAIN-SUFFIX,pancake.apple.com 136 | DOMAIN-SUFFIX,init-kt.apple.com 137 | DOMAIN-SUFFIX,guzzoni.apple.com 138 | DOMAIN-SUFFIX,sylvan.apple.com 139 | DOMAIN-SUFFIX,swscan.apple.com 140 | DOMAIN-SUFFIX,swdist.apple.com 141 | DOMAIN-SUFFIX,itunes.apple.com 142 | DOMAIN-SUFFIX,iadsdk.apple.com 143 | DOMAIN-SUFFIX,gs-loc.apple.com 144 | DOMAIN-SUFFIX,dejavu.apple.com 145 | DOMAIN-SUFFIX,cl4-cn.apple.com 146 | DOMAIN-SUFFIX,cl2-cn.apple.com 147 | DOMAIN-SUFFIX,valid.apple.com 148 | DOMAIN-SUFFIX,swcdn.apple.com 149 | DOMAIN-SUFFIX,store.apple.com 150 | DOMAIN-SUFFIX,guzzoni.smoot.apple.com 151 | DOMAIN-SUFFIX,oscdn.apple.com 152 | DOMAIN-SUFFIX,ocsp2.apple.com 153 | DOMAIN-SUFFIX,music.apple.com 154 | DOMAIN-SUFFIX,amp-api.media.apple.com 155 | DOMAIN-SUFFIX,ipcdn.apple.com 156 | DOMAIN-SUFFIX,cstat.apple.com 157 | DOMAIN-SUFFIX,certs.apple.com 158 | DOMAIN-SUFFIX,seed-swallow.siri.apple.com 159 | DOMAIN-SUFFIX,seed-sequoia.siri.apple.com 160 | DOMAIN-SUFFIX,probe.siri.apple.com 161 | DOMAIN-SUFFIX,seed.siri.apple.com 162 | DOMAIN-SUFFIX,init-s01st.push.apple.com 163 | DOMAIN-SUFFIX,init-p01st.push.apple.com 164 | DOMAIN-SUFFIX,pba0.apple.com 165 | DOMAIN-SUFFIX,ocsp.apple.com 166 | DOMAIN-SUFFIX,mesu.apple.com 167 | DOMAIN-SUFFIX,apps.apple.com 168 | DOMAIN-SUFFIX,www.apple.com 169 | DOMAIN-SUFFIX,init.ess.apple.com 170 | DOMAIN-SUFFIX,crl.apple.com 171 | DOMAIN-SUFFIX,cl5.apple.com 172 | DOMAIN-SUFFIX,cl4.apple.com 173 | DOMAIN-SUFFIX,cl3.apple.com 174 | DOMAIN-SUFFIX,cl2.apple.com 175 | DOMAIN-SUFFIX,cl1.apple.com 176 | DOMAIN-SUFFIX,cds.apple.com 177 | DOMAIN-SUFFIX,xp.apple.com 178 | DOMAIN-SUFFIX,gspe19-2-cn-ssl.ls.apple.com 179 | DOMAIN-SUFFIX,gspe79-cn-ssl.ls.apple.com 180 | DOMAIN-SUFFIX,gspe19-cn-ssl.ls.apple.com 181 | DOMAIN-SUFFIX,gsp85-cn-ssl.ls.apple.com 182 | DOMAIN-SUFFIX,gsp10-ssl-cn.ls.apple.com 183 | DOMAIN-SUFFIX,gspe35-ssl.ls.apple.com 184 | DOMAIN-SUFFIX,gspe21-ssl.ls.apple.com 185 | DOMAIN-SUFFIX,gspe19-cn.ls.apple.com 186 | DOMAIN-SUFFIX,gsp13-cn.ls.apple.com 187 | DOMAIN-SUFFIX,gsp12-cn.ls.apple.com 188 | DOMAIN-SUFFIX,gsp5-cn.ls.apple.com 189 | DOMAIN-SUFFIX,gsp4-cn.ls.apple.com 190 | DOMAIN-SUFFIX,static.gc.apple.com 191 | DOMAIN-SUFFIX,a1.mzstatic.com 192 | DOMAIN-SUFFIX,a2.mzstatic.com 193 | DOMAIN-SUFFIX,a3.mzstatic.com 194 | DOMAIN-SUFFIX,a4.mzstatic.com 195 | DOMAIN-SUFFIX,a5.mzstatic.com 196 | DOMAIN-SUFFIX,amp-api-updates.apps.apple.com 197 | DOMAIN-SUFFIX,api-p-ap-c.smoot.apple.com 198 | DOMAIN-SUFFIX,api-p-ap-d.smoot.apple.com 199 | DOMAIN-SUFFIX,api-p-ap-e.smoot.apple.com 200 | DOMAIN-SUFFIX,bag-cdn.itunes-apple.com.akadns.net 201 | DOMAIN-SUFFIX,is-ssl.mzstatic.com-cn-lb.itunes-apple.com.akadns.net 202 | DOMAIN-SUFFIX,icloud-cdn.icloud.com.akadns.net 203 | DOMAIN-SUFFIX,images.apple.com.akadns.net 204 | DOMAIN-SUFFIX,images.apple.com.edgekey.net.globalredir.akadns.net 205 | DOMAIN-SUFFIX,images.apple.com 206 | DOMAIN-SUFFIX,init-kt.apple.com 207 | DOMAIN-SUFFIX,init-p01md-lb.push-apple.com.akadns.net 208 | DOMAIN-SUFFIX,init-p01md.apple.com 209 | DOMAIN-SUFFIX,init-p01st-lb.push-apple.com.akadns.net 210 | DOMAIN-SUFFIX,init-p01st.push.apple.com 211 | DOMAIN-SUFFIX,init-s01st-lb.push-apple.com.akadns.net 212 | DOMAIN-SUFFIX,init-s01st.push.apple.com 213 | DOMAIN-SUFFIX,init.ess.apple.com 214 | DOMAIN-SUFFIX,iosapps.itunes.g.aaplimg.com 215 | DOMAIN-SUFFIX,ipcdn.apple.com 216 | DOMAIN-SUFFIX,iphone-ld.apple.com 217 | DOMAIN-SUFFIX,iphone-ld.origin-apple.com.akadns.net 218 | DOMAIN-SUFFIX,itunes-apple.com.akadns.net 219 | DOMAIN-SUFFIX,itunes.apple.com 220 | DOMAIN-SUFFIX,itunesconnect.apple.com 221 | DOMAIN-SUFFIX,mesu-cdn.apple.com.akadns.net 222 | DOMAIN-SUFFIX,mesu-china.apple.com.akadns.net 223 | DOMAIN-SUFFIX,mesu.apple.com 224 | DOMAIN-SUFFIX,ml.cdn-apple.com 225 | DOMAIN-SUFFIX,music.apple.com 226 | DOMAIN-SUFFIX,ocsp-lb.apple.com.akadns.net 227 | DOMAIN-SUFFIX,ocsp2-lb.apple.com.akadns.net 228 | DOMAIN-SUFFIX,ocsp.apple.com 229 | DOMAIN-SUFFIX,ocsp2.apple.com 230 | DOMAIN-SUFFIX,oscdn.apple.com 231 | DOMAIN-SUFFIX,oscdn.origin-apple.com.akadns.net 232 | DOMAIN-SUFFIX,osxapps.itunes.g.aaplimg.com 233 | DOMAIN-SUFFIX,pancake.apple.com 234 | DOMAIN-SUFFIX,pancake.cdn-apple.com.akadns.net 235 | DOMAIN-SUFFIX,pba0.apple.com 236 | DOMAIN-SUFFIX,probe.siri.apple.com 237 | DOMAIN-SUFFIX,prod-support.apple-support.akadns.net 238 | DOMAIN-SUFFIX,publicassets.cdn-apple.com 239 | DOMAIN-SUFFIX,reserve-prime.apple.com 240 | DOMAIN-SUFFIX,s.mzstatic.com 241 | DOMAIN-SUFFIX,seed-sequoia.siri.apple.com 242 | DOMAIN-SUFFIX,seed-swallow.siri.apple.com 243 | DOMAIN-SUFFIX,seed.siri.apple.com 244 | DOMAIN-SUFFIX,sequoia.apple.com 245 | DOMAIN-SUFFIX,sh-pod2-smp-device.apple.com 246 | DOMAIN-SUFFIX,shazam-insights.cdn-apple.com 247 | DOMAIN-SUFFIX,smp-device-content.apple.com 248 | DOMAIN-SUFFIX,static.gc.apple.com 249 | DOMAIN-SUFFIX,stocks-sparkline-lb.apple.com.akadns.net 250 | DOMAIN-SUFFIX,stocks-sparkline.apple.com 251 | DOMAIN-SUFFIX,store.apple.com.edgekey.net.globalredir.akadns.net 252 | DOMAIN-SUFFIX,store.apple.com.edgekey.net 253 | DOMAIN-SUFFIX,store.apple.com 254 | DOMAIN-SUFFIX,store.storeimages.apple.com.akadns.net 255 | DOMAIN-SUFFIX,store.storeimages.cdn-apple.com 256 | DOMAIN-SUFFIX,support-china.apple-support.akadns.net 257 | DOMAIN-SUFFIX,support.apple.com 258 | DOMAIN-SUFFIX,swallow-apple-com.v.aaplimg.com 259 | DOMAIN-SUFFIX,swallow.apple.com 260 | DOMAIN-SUFFIX,swcatalog-cdn.apple.com.akadns.net 261 | DOMAIN-SUFFIX,swcatalog.apple.com 262 | DOMAIN-SUFFIX,swcdn.apple.com 263 | DOMAIN-SUFFIX,swcdn.g.aaplimg.com 264 | DOMAIN-SUFFIX,swdist.apple.com.akadns.net 265 | DOMAIN-SUFFIX,swdist.apple.com 266 | DOMAIN-SUFFIX,swscan-cdn.apple.com.akadns.net 267 | DOMAIN-SUFFIX,swscan.apple.com 268 | DOMAIN-SUFFIX,sylvan.apple.com 269 | DOMAIN-SUFFIX,tj-pod1-smp-device.apple.com 270 | DOMAIN-SUFFIX,updates-http.cdn-apple.com.akadns.net 271 | DOMAIN-SUFFIX,updates-http.cdn-apple.com 272 | DOMAIN-SUFFIX,updates.cdn-apple.com 273 | DOMAIN-SUFFIX,valid.apple.com 274 | DOMAIN-SUFFIX,valid.origin-apple.com.akadns.net 275 | DOMAIN-SUFFIX,weather-data.apple.com.akadns.net 276 | DOMAIN-SUFFIX,weather-data.apple.com 277 | DOMAIN-SUFFIX,weather-map.apple.com 278 | DOMAIN-SUFFIX,weather-map2.apple.com 279 | DOMAIN-SUFFIX,weatherkit.apple.com 280 | DOMAIN-SUFFIX,www.apple.com.edgekey.net.globalredir.akadns.net 281 | DOMAIN-SUFFIX,www.apple.com.edgekey.net 282 | DOMAIN-SUFFIX,www.apple.com 283 | DOMAIN-SUFFIX,xp.apple.com 284 | DOMAIN,gs-loc-cn.apple.com 285 | DOMAIN-SUFFIX,gspe19-cn-ssl.ls.apple.com 286 | DOMAIN-SUFFIX,cn-ssl.ls.apple.com 287 | DOMAIN-SUFFIX,cn.ls.apple.com 288 | DOMAIN-SUFFIX,cn.apple.com 289 | DOMAIN,api.smoot.apple.cn 290 | DOMAIN-SUFFIX,icloud.com.cn 291 | DOMAIN-SUFFIX,apple.com.cn 292 | DOMAIN-SUFFIX,apple.news 293 | DOMAIN-SUFFIX,apple-dns.net 294 | DOMAIN-SUFFIX,push-apple.com.akadns.net 295 | DOMAIN-SUFFIX,organicfruitapps.com 296 | DOMAIN-SUFFIX,icloud-content.com 297 | DOMAIN-SUFFIX,apple-cloudkit.com 298 | DOMAIN-SUFFIX,apple-mapkit.com 299 | DOMAIN-SUFFIX,cdn-apple.com 300 | DOMAIN-SUFFIX,appstore.com 301 | DOMAIN-SUFFIX,aaplimg.com 302 | DOMAIN-SUFFIX,itunes.com 303 | DOMAIN-SUFFIX,icloud.com 304 | DOMAIN-SUFFIX,apple.com 305 | DOMAIN-SUFFIX,me.com 306 | DOMAIN-SUFFIX,appsto.re 307 | DOMAIN-SUFFIX,apple.co 308 | PROCESS-NAME,trustd 309 | PROCESS-NAME,netbiosd 310 | PROCESS-NAME,com.apple.geod 311 | PROCESS-NAME,mapspushd 312 | PROCESS-NAME,com.apple.Maps 313 | PROCESS-NAME,apsd 314 | PROCESS-NAME,fmfd 315 | PROCESS-NAME,findmydevice-user-agent 316 | PROCESS-NAME,CoreLocationAgent 317 | PROCESS-NAME,WeatherWidget 318 | IP-CIDR,17.0.0.0/8,no-resolve 319 | IP-CIDR,63.92.224.0/19,no-resolve 320 | IP-CIDR,65.199.22.0/23,no-resolve 321 | IP-CIDR,139.178.128.0/18,no-resolve 322 | IP-CIDR,144.178.0.0/19,no-resolve 323 | IP-CIDR,144.178.36.0/22,no-resolve 324 | IP-CIDR,144.178.48.0/20,no-resolve 325 | IP-CIDR,192.35.50.0/24,no-resolve 326 | IP-CIDR,198.183.17.0/24,no-resolve 327 | IP-CIDR,205.180.175.0/24,no-resolve 328 | -------------------------------------------------------------------------------- /Shell/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RED='\033[0;31m' 4 | GREEN='\033[0;32m' 5 | YELLOW='\033[1;33m' 6 | BLUE='\033[1;34m' 7 | CYAN='\033[1;36m' 8 | NC='\033[0m' 9 | 10 | CONF_DIR="/etc/nginx/conf.d/" 11 | PROXY_PREFIX="" 12 | 13 | clear_screen() { 14 | command -v clear &>/dev/null && clear || printf "\033c" 15 | } 16 | 17 | ensure_nginx() { 18 | NGINX_BIN=$(command -v nginx) 19 | if [[ -z "$NGINX_BIN" ]]; then 20 | echo -e "${YELLOW}检测到未安装 nginx,尝试安装...${NC}" 21 | if command -v apt >/dev/null 2>&1; then 22 | apt update -y && apt install -y nginx 23 | elif command -v yum >/dev/null 2>&1; then 24 | yum install -y nginx 25 | else 26 | echo -e "${RED}[X] 未知包管理器,请手动安装 Nginx。${NC}" 27 | exit 1 28 | fi 29 | NGINX_BIN=$(command -v nginx) 30 | if [[ -z "$NGINX_BIN" ]]; then 31 | echo -e "${RED}[X] nginx 安装失败,请检查。${NC}" 32 | exit 1 33 | fi 34 | fi 35 | } 36 | 37 | list_proxies() { 38 | mapfile -t proxies < <(find "$CONF_DIR" -maxdepth 1 -type f -name "*.conf" | sort) 39 | if [[ ${#proxies[@]} -eq 0 ]]; then 40 | echo -e "${YELLOW}当前没有任何反代配置。${NC}" 41 | return 1 42 | fi 43 | for i in "${!proxies[@]}"; do 44 | name=$(basename "${proxies[$i]}" .conf) 45 | echo -e "${GREEN}$((i+1)). ${name}${NC}" 46 | done 47 | return 0 48 | } 49 | 50 | choose_proxy_by_index() { 51 | if ! list_proxies; then 52 | return 1 53 | fi 54 | while true; do 55 | read -p "请输入反代序号(输入0返回上级): " idx 56 | if [[ "$idx" == "0" ]]; then 57 | return 1 58 | elif [[ "$idx" =~ ^[0-9]+$ ]] && (( idx >= 1 && idx <= ${#proxies[@]} )); then 59 | CHOSEN_CONF="${proxies[$((idx-1))]}" 60 | return 0 61 | else 62 | echo -e "${RED}输入无效,请输入正确的序号。${NC}" 63 | fi 64 | done 65 | } 66 | 67 | setup_reverse_proxy() { 68 | ensure_nginx 69 | clear_screen 70 | echo -e "${CYAN}\n===== 新建 Nginx 反代 =====\n${NC}" 71 | 72 | local api_addr ext_port allowed_ip crt_path key_path proxy_pass_header ip_allow secret is_mihomo domain conf_file 73 | 74 | while true; do 75 | read -p "请输入要反代的域名: " domain 76 | [[ -z "$domain" ]] && echo -e "${RED}域名不能为空。${NC}" && continue 77 | read -p "请输入外部访问端口: " ext_port 78 | if [[ ! "$ext_port" =~ ^[0-9]+$ ]]; then 79 | echo -e "${RED}[X] 端口格式错误,请重新输入数字。${NC}" 80 | continue 81 | fi 82 | conf_file="${CONF_DIR}${domain}_${ext_port}.conf" 83 | if [[ -e "$conf_file" ]]; then 84 | echo -e "${RED}该域名和端口组合的反代配置已存在,请更换域名或端口。${NC}" 85 | continue 86 | fi 87 | if ss -tuln | grep -q ":${ext_port}[[:space:]]"; then 88 | echo -e "${RED}[X] 端口 ${ext_port} 已被占用,请更换其他端口。${NC}" 89 | continue 90 | fi 91 | break 92 | done 93 | 94 | read -p "请输入后端服务地址: " api_addr 95 | 96 | read -p "请输入允许访问的IP(留空表示允许全部): " allowed_ip 97 | 98 | echo -e "${YELLOW}\n检测 /root/cert/ 目录中的证书...${NC}" 99 | crt_path="" 100 | key_path="" 101 | if [[ -d /root/cert/ ]]; then 102 | mapfile -t certs < <(find /root/cert -type f -name "*.crt" | sort) 103 | mapfile -t keys < <(find /root/cert -type f -name "*.key" | sort) 104 | if [[ ${#certs[@]} -gt 0 && ${#keys[@]} -gt 0 ]]; then 105 | echo -e "${GREEN}发现以下证书:${NC}" 106 | for i in "${!certs[@]}"; do 107 | echo -e "${BLUE}$((i+1)). ${certs[i]}${NC}" 108 | done 109 | read -p "请选择证书序号(回车手动输入证书): " cert_index 110 | if [[ "$cert_index" =~ ^[0-9]+$ && "$cert_index" -ge 1 && "$cert_index" -le ${#certs[@]} ]]; then 111 | crt_path="${certs[$((cert_index-1))]}" 112 | key_guess="${crt_path%.crt}.key" 113 | if [[ -f "$key_guess" ]]; then 114 | key_path="$key_guess" 115 | else 116 | echo -e "${YELLOW}未找到与此 crt 同名的 key,请手动输入 key 路径。${NC}" 117 | fi 118 | fi 119 | fi 120 | fi 121 | 122 | while [[ -z "$crt_path" ]]; do 123 | read -p "请输入 .crt 证书完整路径: " crt_path 124 | [[ ! -f "$crt_path" ]] && echo -e "${RED}[X] 证书文件不存在,请重试。${NC}" && crt_path="" 125 | done 126 | while [[ -z "$key_path" ]]; do 127 | read -p "请输入 .key 密钥完整路径: " key_path 128 | [[ ! -f "$key_path" ]] && echo -e "${RED}[X] 密钥文件不存在,请重试。${NC}" && key_path="" 129 | done 130 | 131 | read -p "是否反代 Mihomo API?(y/n): " is_mihomo 132 | if [[ "${is_mihomo,,}" == "y" ]]; then 133 | read -p "请输入 Secret 值: " secret 134 | proxy_pass_header="proxy_set_header Authorization \"Bearer $secret\";" 135 | else 136 | proxy_pass_header="" 137 | fi 138 | 139 | ip_allow="" 140 | if [[ -n "$allowed_ip" ]]; then 141 | ip_allow="allow $allowed_ip; 142 | deny all;" 143 | fi 144 | 145 | echo -e "${CYAN}生成反代配置...${NC}" 146 | 147 | rm -f /etc/nginx/conf.d/default.conf 148 | rm -f /etc/nginx/sites-enabled/default 149 | 150 | location_block=" proxy_pass http://${api_addr}; 151 | proxy_http_version 1.1; 152 | proxy_set_header Host \$host; 153 | proxy_set_header X-Real-IP \$remote_addr; 154 | proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; 155 | proxy_set_header Upgrade \$http_upgrade; 156 | proxy_set_header Connection \"upgrade\";" 157 | if [[ -n "$proxy_pass_header" ]]; then 158 | location_block="${location_block} 159 | ${proxy_pass_header}" 160 | fi 161 | if [[ -n "$ip_allow" ]]; then 162 | while read -r line; do 163 | location_block="${location_block} 164 | $line" 165 | done <<< "$ip_allow" 166 | fi 167 | 168 | cat > "$conf_file" < "$new_conf_file" < " confirm 323 | if [[ "${confirm,,}" == "y" ]]; then 324 | rm -f "$conf_file" 325 | $NGINX_BIN -t && systemctl reload nginx 326 | echo -e "${GREEN}✅ 配置已删除并重载${NC}" 327 | else 328 | echo -e "${YELLOW}取消删除操作。${NC}" 329 | fi 330 | read -p "按回车返回管理菜单..." 331 | } 332 | 333 | remove_all_proxies() { 334 | clear_screen 335 | NGINX_BIN=$(command -v nginx) 336 | if [[ -z "$NGINX_BIN" ]]; then 337 | echo -e "${YELLOW}Nginx 未安装,无需删除。${NC}" 338 | read -p "按回车返回管理菜单..." 339 | return 340 | fi 341 | echo -e "${RED}将删除所有反代配置文件及Nginx本体!${NC}" 342 | read -p "确认删除所有反代及Nginx?(y/n): " confirm 343 | if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then 344 | echo -e "${YELLOW}已取消操作。${NC}" 345 | read -p "按回车返回管理菜单..." 346 | return 347 | fi 348 | find "$CONF_DIR" -maxdepth 1 -type f -name "*.conf" -exec rm -f {} \; 349 | if command -v apt >/dev/null 2>&1; then 350 | apt purge -y nginx nginx-common && apt autoremove -y 351 | elif command -v yum >/dev/null 2>&1; then 352 | yum remove -y nginx 353 | fi 354 | echo -e "${GREEN}✅ 已删除所有反代配置及Nginx${NC}" 355 | read -p "按回车返回管理菜单..." 356 | } 357 | 358 | manage_proxies_menu() { 359 | while true; do 360 | clear_screen 361 | echo -e "${BLUE}✦ Nginx_Menu ✦${NC}" 362 | echo -e "${GREEN} 1.${NC}查看反代" 363 | echo -e "${GREEN} 2.${NC}删除反代" 364 | echo -e "${GREEN} 3.${NC}删除Nginx" 365 | echo -e "${GREEN} 0.${NC}返回Kongroo" 366 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦ :${NC}")" sel 367 | case "$sel" in 368 | 1) view_and_modify_proxy ;; 369 | 2) delete_proxy ;; 370 | 3) remove_all_proxies ;; 371 | 0) break ;; 372 | *) echo -e "${RED}请输入有效选项。${NC}"; sleep 1 ;; 373 | esac 374 | done 375 | } 376 | 377 | restart_proxy() { 378 | ensure_nginx 379 | clear_screen 380 | echo -e "${CYAN}重启 Nginx...${NC}" 381 | systemctl restart nginx && echo -e "${GREEN}✅ Nginx 已重启${NC}" 382 | read -p "按回车返回主菜单..." 383 | } 384 | 385 | stop_proxy() { 386 | clear_screen 387 | echo -e "${YELLOW}停止 Nginx...${NC}" 388 | systemctl stop nginx && echo -e "${GREEN}✅ Nginx 已停止${NC}" 389 | read -p "按回车返回主菜单..." 390 | } 391 | 392 | show_menu() { 393 | while true; do 394 | clear_screen 395 | echo -e "${BLUE}✦ Nginx_Ver.1.2 ✦${NC}" 396 | echo -e "${GREEN} 1.${NC}新建反代" 397 | echo -e "${GREEN} 2.${NC}管理反代" 398 | echo -e "${GREEN} 3.${NC}重启反代" 399 | echo -e "${GREEN} 4.${NC}停止反代" 400 | echo -e "${GREEN} 0.${NC}退出Kongroo" 401 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦ :${NC}")" opt 402 | 403 | case "$opt" in 404 | 1) setup_reverse_proxy ;; 405 | 2) manage_proxies_menu ;; 406 | 3) restart_proxy ;; 407 | 4) stop_proxy ;; 408 | 0) clear_screen; exit 0 ;; 409 | *) echo -e "${RED}请输入正确选项。${NC}"; sleep 1 ;; 410 | esac 411 | done 412 | } 413 | 414 | show_menu 415 | -------------------------------------------------------------------------------- /Shell/substore.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | # 颜色定义 5 | RED='\033[0;31m' 6 | GREEN='\033[0;32m' 7 | YELLOW='\033[1;33m' 8 | BLUE='\033[0;34m' 9 | CYAN='\033[0;36m' 10 | MAGENTA='\033[1;35m' 11 | PLAIN='\033[0m' 12 | 13 | SUBSTORE_COMPOSE_PATH="/root/substore/docker-compose.yml" 14 | SUBSTORE_DATA_PATH="/root/substore/data" 15 | SUBSTORE_INFO_PATH="/root/substore/info.txt" 16 | 17 | check_root() { 18 | if [ "$(id -u)" != "0" ]; then 19 | echo -e "${RED}运行脚本需要 root 权限${PLAIN}" >&2 20 | exit 1 21 | fi 22 | } 23 | 24 | install_packages() { 25 | hash -r 26 | if ! command -v docker &> /dev/null; then 27 | echo -e "${YELLOW}正在安装 Docker 和 Docker Compose...${PLAIN}" 28 | ( 29 | if ! curl -fsSL https://get.docker.com | bash; then 30 | exit 10 31 | fi 32 | if ! apt-get update && apt-get install -y docker-compose; then 33 | exit 11 34 | fi 35 | ) & 36 | install_pid=$! 37 | spin='-\|/' 38 | i=0 39 | while kill -0 $install_pid 2>/dev/null; do 40 | i=$(( (i+1) %4 )) 41 | printf "\r${CYAN}安装中,请稍候... ${spin:$i:1}${PLAIN}" 42 | sleep 0.3 43 | done 44 | wait $install_pid 45 | install_status=$? 46 | echo -ne "\r" 47 | if [[ $install_status -eq 0 ]]; then 48 | echo -e "${GREEN}Docker 和 Docker Compose 安装完成。${PLAIN}" 49 | elif [[ $install_status -eq 10 ]]; then 50 | echo -e "${RED}Docker 安装失败${PLAIN}" >&2 51 | exit 1 52 | elif [[ $install_status -eq 11 ]]; then 53 | echo -e "${RED}Docker Compose 安装失败${PLAIN}" >&2 54 | exit 1 55 | else 56 | echo -e "${RED}未知错误,安装失败${PLAIN}" >&2 57 | exit 1 58 | fi 59 | else 60 | echo -e "${GREEN}Docker 和 Docker Compose 已安装。${PLAIN}" 61 | fi 62 | } 63 | 64 | get_public_ip() { 65 | local ip_services=("ifconfig.me" "ipinfo.io/ip" "icanhazip.com" "ipecho.net/plain" "ident.me") 66 | local public_ip 67 | 68 | for service in "${ip_services[@]}"; do 69 | if public_ip=$(curl -sS --connect-timeout 5 "$service"); then 70 | if [[ "$public_ip" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 71 | echo "$public_ip" 72 | return 0 73 | fi 74 | fi 75 | sleep 1 76 | done 77 | 78 | echo -e "${RED}无法获取公共 IP 地址。${PLAIN}" >&2 79 | exit 1 80 | } 81 | 82 | install_substore() { 83 | # 新增:检测是否已安装并配置过 84 | if [[ -f "$SUBSTORE_COMPOSE_PATH" && -f "$SUBSTORE_INFO_PATH" ]]; then 85 | echo -e "${GREEN}Sub-Store 已经安装并配置过。${PLAIN}" 86 | echo -e "${YELLOW}如需修改配置,请选择 2. 管理 Sub-Store。${PLAIN}" 87 | read -p "按回车键返回主菜单..." 88 | return 0 89 | fi 90 | 91 | install_packages 92 | local public_ip 93 | public_ip=$(get_public_ip) 94 | local secret_key 95 | secret_key=$(openssl rand -hex 16) 96 | 97 | echo -e "${CYAN}生成的密钥: $secret_key${PLAIN}" 98 | 99 | local default_port=3001 100 | read -p "请输入你想使用的端口号(默认: $default_port): " custom_port 101 | custom_port="${custom_port:-$default_port}" 102 | 103 | if ! [[ "$custom_port" =~ ^[0-9]+$ ]] || [ "$custom_port" -lt 1 ] || [ "$custom_port" -gt 65535 ]; then 104 | echo -e "${YELLOW}无效端口号,使用默认端口 $default_port${PLAIN}" 105 | custom_port=$default_port 106 | fi 107 | 108 | echo -e "${YELLOW}请选择访问方式:${PLAIN}" 109 | echo -e "${GREEN}1.${PLAIN} 公网访问(所有设备可访问)" 110 | echo -e "${GREEN}2.${PLAIN} 仅本机访问(127.0.0.1,仅本机可访问)" 111 | read -p "请输入选项 [1/2],默认1: " access_choice 112 | access_choice="${access_choice:-1}" 113 | 114 | if [[ "$access_choice" == "2" ]]; then 115 | port_mapping="127.0.0.1:${custom_port}:3001" 116 | panel_host="127.0.0.1" 117 | else 118 | port_mapping="${custom_port}:3001" 119 | panel_host="$public_ip" 120 | fi 121 | 122 | mkdir -p /root/substore "$SUBSTORE_DATA_PATH" 123 | 124 | echo -e "${YELLOW}清理旧容器和配置...${PLAIN}" 125 | if command -v docker &>/dev/null; then 126 | docker rm -f sub-store >/dev/null 2>&1 || true 127 | docker compose -p sub-store down >/dev/null 2>&1 || true 128 | fi 129 | 130 | cat < "$SUBSTORE_COMPOSE_PATH" 131 | name: sub-store-app 132 | services: 133 | sub-store: 134 | image: xream/sub-store 135 | container_name: sub-store 136 | restart: always 137 | environment: 138 | - SUB_STORE_BACKEND_UPLOAD_CRON=55 23 * * * 139 | - SUB_STORE_FRONTEND_BACKEND_PATH=/$secret_key 140 | ports: 141 | - "$port_mapping" 142 | volumes: 143 | - $SUBSTORE_DATA_PATH:/opt/app/data 144 | EOF 145 | 146 | cd /root/substore 147 | 148 | echo -e "${CYAN}拉取最新镜像...${PLAIN}" 149 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store pull 150 | 151 | echo -e "${CYAN}启动容器...${PLAIN}" 152 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store up -d 153 | 154 | if ! command -v cron &>/dev/null; then 155 | echo -e "${YELLOW}安装 cron...${PLAIN}" 156 | apt-get update >/dev/null 2>&1 157 | apt-get install -y cron >/dev/null 2>&1 158 | fi 159 | systemctl enable cron >/dev/null 2>&1 160 | systemctl start cron 161 | 162 | local cron_job="0 * * * * cd /root/substore && docker stop sub-store && docker rm sub-store && docker compose -f $SUBSTORE_COMPOSE_PATH -p sub-store pull sub-store && docker compose -f $SUBSTORE_COMPOSE_PATH -p sub-store up -d" 163 | (crontab -l 2>/dev/null || true; echo "$cron_job") | sort -u | crontab - 164 | 165 | echo -e "${CYAN}等待服务启动...${PLAIN}" 166 | for i in {1..30}; do 167 | if curl -s "http://127.0.0.1:$custom_port" >/dev/null; then 168 | echo -e "\n${GREEN}部署成功!您的 Sub-Store 信息如下:${PLAIN}" 169 | echo -e "${YELLOW}Sub-Store 面板:http://$panel_host:$custom_port${PLAIN}" 170 | echo -e "${YELLOW}后端地址:http://$panel_host:$custom_port/$secret_key${PLAIN}\n" 171 | echo "PORT=$custom_port" > "$SUBSTORE_INFO_PATH" 172 | echo "SECRET=$secret_key" >> "$SUBSTORE_INFO_PATH" 173 | echo "IP=$panel_host" >> "$SUBSTORE_INFO_PATH" 174 | return 0 175 | fi 176 | sleep 1 177 | done 178 | 179 | echo -e "${YELLOW}警告: 服务似乎未能在预期时间内启动,但可能仍在进行中。${PLAIN}" 180 | echo "PORT=$custom_port" > "$SUBSTORE_INFO_PATH" 181 | echo "SECRET=$secret_key" >> "$SUBSTORE_INFO_PATH" 182 | echo "IP=$panel_host" >> "$SUBSTORE_INFO_PATH" 183 | echo -e "${YELLOW}Sub-Store 面板:http://$panel_host:$custom_port${PLAIN}" 184 | echo -e "${YELLOW}后端地址:http://$panel_host:$custom_port/$secret_key${PLAIN}\n" 185 | } 186 | 187 | show_substore_info() { 188 | if [[ -f "$SUBSTORE_INFO_PATH" ]]; then 189 | source "$SUBSTORE_INFO_PATH" 190 | echo -e "${GREEN}Sub-Store 面板: ${CYAN}http://$IP:$PORT${PLAIN}" 191 | echo -e "${GREEN}后端地址: ${CYAN}http://$IP:$PORT/$SECRET${PLAIN}" 192 | else 193 | echo -e "${RED}Sub-Store 信息不存在,请先安装。${PLAIN}" 194 | fi 195 | } 196 | 197 | restart_substore() { 198 | if [[ ! -f "$SUBSTORE_COMPOSE_PATH" ]]; then 199 | echo -e "${RED}未检测到 Sub-Store 配置,无法重启。${PLAIN}" 200 | return 1 201 | fi 202 | if command -v docker &>/dev/null; then 203 | cd /root/substore 204 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store restart 205 | echo -e "${GREEN}Sub-Store 已重启。${PLAIN}" 206 | else 207 | echo -e "${RED}Docker 未安装,无法重启 Sub-Store。${PLAIN}" 208 | fi 209 | } 210 | 211 | update_substore() { 212 | if [[ ! -f "$SUBSTORE_COMPOSE_PATH" ]]; then 213 | echo -e "${RED}未检测到 Sub-Store 配置,无法更新。${PLAIN}" 214 | return 1 215 | fi 216 | if command -v docker &>/dev/null; then 217 | cd /root/substore 218 | echo -e "${CYAN}拉取最新 Sub-Store 镜像...${PLAIN}" 219 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store pull 220 | echo -e "${CYAN}重启 Sub-Store...${PLAIN}" 221 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store up -d 222 | echo -e "${GREEN}Sub-Store 已更新并重启。${PLAIN}" 223 | else 224 | echo -e "${RED}Docker 未安装,无法更新 Sub-Store。${PLAIN}" 225 | fi 226 | } 227 | 228 | delete_substore() { 229 | echo -e "${RED}即将彻底删除 Sub-Store、Docker 及其所有数据,是否继续? [y/N]${PLAIN}" 230 | read -r confirm 231 | if [[ "$confirm" =~ ^[yY]$ ]]; then 232 | if command -v docker &>/dev/null; then 233 | echo -e "${YELLOW}1. 停止并删除所有 Docker 容器...${PLAIN}" 234 | docker rm -f $(docker ps -aq) 2>/dev/null || true 235 | 236 | echo -e "${YELLOW}2. 删除所有 Docker 镜像...${PLAIN}" 237 | docker rmi -f $(docker images -q) 2>/dev/null || true 238 | 239 | echo -e "${YELLOW}3. 清理所有未使用的 Docker 网络...${PLAIN}" 240 | docker network prune -f || true 241 | fi 242 | 243 | echo -e "${YELLOW}4. 卸载 Docker 及 Docker Compose...${PLAIN}" 244 | if command -v apt &>/dev/null; then 245 | apt-get remove -y docker docker-ce docker-ce-cli docker-compose 246 | apt-get purge -y docker-ce docker-ce-cli docker-compose 247 | elif command -v yum &>/dev/null; then 248 | yum remove -y docker docker-ce docker-ce-cli docker-compose 249 | elif command -v dnf &>/dev/null; then 250 | dnf remove -y docker docker-ce docker-ce-cli docker-compose 251 | elif command -v apk &>/dev/null; then 252 | apk del docker docker-compose 253 | fi 254 | 255 | echo -e "${YELLOW}5. 删除 Docker 数据与配置目录...${PLAIN}" 256 | rm -rf /var/lib/docker /etc/docker 257 | 258 | echo -e "${YELLOW}6. 删除 Sub-Store 相关目录和数据...${PLAIN}" 259 | rm -rf /root/substore 260 | rm -rf /root/substore/data 261 | rm -rf /root/substore/info.txt 262 | 263 | echo -e "${YELLOW}7. 删除残留 docker-compose 配置文件(如有)...${PLAIN}" 264 | rm -rf /root/docker-compose.yml 265 | 266 | echo -e "${YELLOW}8. 删除其他自定义目录(如有/home/nginx、/root/sub-store-data)...${PLAIN}" 267 | rm -rf /home/nginx 268 | rm -rf /root/sub-store-data 269 | 270 | echo -e "${GREEN}Sub-Store、Docker 及相关数据已全部删除。${PLAIN}" 271 | hash -r 272 | else 273 | echo -e "${YELLOW}已取消删除。${PLAIN}" 274 | fi 275 | } 276 | 277 | substore_manage_menu() { 278 | while true; do 279 | clear 280 | echo -e "${MAGENTA}============== Sub-Store 管理 ==============${PLAIN}" 281 | echo -e "${GREEN}1.${PLAIN} 查看当前 Sub-Store 地址及后端" 282 | echo -e "${GREEN}2.${PLAIN} 重启 Sub-Store" 283 | echo -e "${GREEN}3.${PLAIN} 更新 Sub-Store" 284 | echo -e "${GREEN}4.${PLAIN} 删除 Sub-Store 及相关" 285 | echo -e "${GREEN}0.${PLAIN} 返回主菜单" 286 | read -p "请选择操作:" sub_choice 287 | case $sub_choice in 288 | 1) show_substore_info; read -p "按回车键返回管理菜单..." ;; 289 | 2) restart_substore; read -p "按回车键返回管理菜单..." ;; 290 | 3) update_substore; read -p "按回车键返回管理菜单..." ;; 291 | 4) delete_substore; read -p "按回车键返回管理菜单..." ;; 292 | 0) break ;; 293 | *) echo -e "${RED}无效选项,请重新选择。${PLAIN}"; read -p "按回车键返回管理菜单..." ;; 294 | esac 295 | clear 296 | done 297 | } 298 | 299 | substore_manage_menu() { 300 | while true; do 301 | clear 302 | echo -e "${BLUE}✦ SubStore_Menu ✦${PLAIN}" 303 | echo -e "${GREEN} 1.${PLAIN}查看SubStore" 304 | echo -e "${GREEN} 2.${PLAIN}重启SubStore" 305 | echo -e "${GREEN} 3.${PLAIN}更新SubStore" 306 | echo -e "${GREEN} 4.${PLAIN}修改SubStore" 307 | echo -e "${GREEN} 5.${PLAIN}删除SubStore" 308 | echo -e "${GREEN} 0.${PLAIN}返回 Kongroo" 309 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦${PLAIN} : ")" sub_choice 310 | case $sub_choice in 311 | 1) show_substore_info; read -p "按回车键返回管理菜单..." ;; 312 | 2) restart_substore; read -p "按回车键返回管理菜单..." ;; 313 | 3) update_substore; read -p "按回车键返回管理菜单..." ;; 314 | 4) modify_substore_config; read -p "按回车键返回管理菜单..." ;; 315 | 5) delete_substore; read -p "按回车键返回管理菜单..." ;; 316 | 0) break ;; 317 | *) echo -e "${RED}无效选项,请重新选择。${PLAIN}"; read -p "按回车键返回管理菜单..." ;; 318 | esac 319 | clear 320 | done 321 | } 322 | 323 | modify_substore_config() { 324 | if [[ ! -f "$SUBSTORE_COMPOSE_PATH" || ! -f "$SUBSTORE_INFO_PATH" ]]; then 325 | echo -e "${RED}未检测到 Sub-Store 配置,请先安装。${PLAIN}" 326 | return 1 327 | fi 328 | 329 | source "$SUBSTORE_INFO_PATH" 330 | echo -e "${CYAN}当前配置:${PLAIN}" 331 | echo -e "1. 端口号: ${YELLOW}${PORT}${PLAIN}" 332 | echo -e "2. 密钥: ${YELLOW}${SECRET}${PLAIN}" 333 | echo -e "3. 访问IP: ${YELLOW}${IP}${PLAIN}" 334 | echo -e "${YELLOW}如需修改端口或密钥,将重新生成 docker-compose 配置,并重启服务。${PLAIN}" 335 | 336 | read -p "请输入新端口号(回车保留当前: $PORT): " new_port 337 | new_port="${new_port:-$PORT}" 338 | if ! [[ "$new_port" =~ ^[0-9]+$ ]] || [ "$new_port" -lt 1 ] || [ "$new_port" -gt 65535 ]; then 339 | echo -e "${RED}无效端口号,保留当前端口。${PLAIN}" 340 | new_port=$PORT 341 | fi 342 | 343 | read -p "请输入新的后台密钥(回车保留当前: $SECRET): " new_secret 344 | new_secret="${new_secret:-$SECRET}" 345 | 346 | echo -e "${YELLOW}请选择访问方式:${PLAIN}" 347 | echo -e "${GREEN}1.${PLAIN} 公网访问(所有设备可访问)" 348 | echo -e "${GREEN}2.${PLAIN} 仅本机访问(127.0.0.1,仅本机可访问)" 349 | read -p "请输入选项 [1/2],默认与当前一致: " access_choice 350 | access_choice="${access_choice:-1}" 351 | if [[ "$access_choice" == "2" ]]; then 352 | port_mapping="127.0.0.1:${new_port}:3001" 353 | new_ip="127.0.0.1" 354 | else 355 | port_mapping="${new_port}:3001" 356 | new_ip=$(get_public_ip) 357 | fi 358 | 359 | cat < "$SUBSTORE_COMPOSE_PATH" 360 | name: sub-store-app 361 | services: 362 | sub-store: 363 | image: xream/sub-store 364 | container_name: sub-store 365 | restart: always 366 | environment: 367 | - SUB_STORE_BACKEND_UPLOAD_CRON=55 23 * * * 368 | - SUB_STORE_FRONTEND_BACKEND_PATH=/$new_secret 369 | ports: 370 | - "$port_mapping" 371 | volumes: 372 | - $SUBSTORE_DATA_PATH:/opt/app/data 373 | EOF 374 | 375 | echo "PORT=$new_port" > "$SUBSTORE_INFO_PATH" 376 | echo "SECRET=$new_secret" >> "$SUBSTORE_INFO_PATH" 377 | echo "IP=$new_ip" >> "$SUBSTORE_INFO_PATH" 378 | 379 | cd /root/substore 380 | echo -e "${CYAN}重启 Sub-Store 服务以应用新配置...${PLAIN}" 381 | docker compose -f "$SUBSTORE_COMPOSE_PATH" -p sub-store up -d 382 | 383 | echo -e "${GREEN}配置已更新!新面板地址: ${CYAN}http://$new_ip:$new_port${PLAIN}" 384 | echo -e "${GREEN}新后端路径: ${CYAN}http://$new_ip:$new_port/$new_secret${PLAIN}" 385 | } 386 | 387 | main_menu() { 388 | while true; do 389 | clear 390 | echo -e "${BLUE}✦ SubStore_Ver.1.2 ✦${PLAIN}" 391 | echo -e "${GREEN} 1.${PLAIN}安装substore" 392 | echo -e "${GREEN} 2.${PLAIN}管理substore" 393 | echo -e "${GREEN} 0.${PLAIN}退出 Kongroo" 394 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦${PLAIN} : ")" main_choice 395 | case $main_choice in 396 | 1) install_substore ;; 397 | 2) substore_manage_menu ;; 398 | 0) exit 0 ;; 399 | *) echo -e "${RED}无效选项,请重新选择。${PLAIN}"; read -p "按回车键返回菜单..." ;; 400 | esac 401 | clear 402 | done 403 | } 404 | 405 | trap 'echo -e "${RED}错误发生在第 $LINENO 行${PLAIN}"; exit 1' ERR 406 | 407 | check_root 408 | main_menu 409 | -------------------------------------------------------------------------------- /Shell/acme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ====== 颜色变量 ====== 4 | RED="\033[31m\033[01m" 5 | GREEN="\033[32m\033[01m" 6 | YELLOW="\033[33m\033[01m" 7 | PLAIN='\033[0m' 8 | 9 | # ====== 检测 IPv4 函数 ====== 10 | has_ipv4() { 11 | ip -4 addr show scope global | grep -q inet 12 | } 13 | 14 | get_acme_download_url() { 15 | local url="https://github.com/acmesh-official/acme.sh/archive/master.tar.gz" 16 | if ! has_ipv4; then 17 | url="${url/github.com/acme-cdn.pages.dev}" 18 | fi 19 | echo "$url" 20 | } 21 | 22 | # ====== 系统适配 ====== 23 | REGEX=("debian" "ubuntu" "centos|red hat|kernel|oracle linux|alma|rocky" "'amazon linux'" "fedora") 24 | RELEASE=("Debian" "Ubuntu" "CentOS" "CentOS" "Fedora") 25 | PACKAGE_UPDATE=("apt-get update" "apt-get update" "yum -y update" "yum -y update" "yum -y update") 26 | PACKAGE_INSTALL=("apt -y install" "apt -y install" "yum -y install" "yum -y install" "yum -y install") 27 | PACKAGE_REMOVE=("apt -y remove" "apt -y remove" "yum -y remove" "yum -y remove" "yum -y remove") 28 | PACKAGE_UNINSTALL=("apt -y autoremove" "apt -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove") 29 | 30 | [[ $EUID -ne 0 ]] && echo -e "${RED}注意:请在 root 用户下运行脚本${PLAIN}" && exit 1 31 | 32 | CMD=( 33 | "$(grep -i pretty_name /etc/os-release 2>/dev/null | cut -d \" -f2)" 34 | "$(hostnamectl 2>/dev/null | grep -i system | cut -d : -f2)" 35 | "$(lsb_release -sd 2>/dev/null)" 36 | "$(grep -i description /etc/lsb-release 2>/dev/null | cut -d \" -f2)" 37 | "$(grep -i description /etc/os-release 2>/dev/null | cut -d \" -f2)" 38 | "$(uname -s)" 39 | ) 40 | for i in "${CMD[@]}"; do 41 | SYS="$i" 42 | if [[ -n $SYS ]]; then 43 | break 44 | fi 45 | done 46 | 47 | for ((int = 0; int < ${#REGEX[@]}; int++)); do 48 | if [[ $(echo "$SYS" | tr '[:upper:]' '[:lower:]') =~ ${REGEX[int]} ]]; then 49 | SYSTEM="${RELEASE[int]}" 50 | [[ -n $SYSTEM ]] && break 51 | fi 52 | done 53 | 54 | [[ -z $SYSTEM ]] && echo -e "${RED}不支持当前 VPS 系统,请使用主流的操作系统${PLAIN}" && exit 1 55 | 56 | # ====== 辅助函数 ====== 57 | back2menu() { 58 | echo "" 59 | echo -e "${YELLOW}操作完成!按 Enter 键返回主菜单,或按 Ctrl+C 退出脚本...${PLAIN}" 60 | read -r 61 | menu 62 | } 63 | 64 | check_ip() { 65 | ipv4=$(curl -s4m8 ip.sb -k | sed -n 1p) 66 | ipv6=$(curl -s6m8 ip.sb -k | sed -n 1p) 67 | } 68 | 69 | # ====== Acme 安装与卸载 ====== 70 | inst_acme() { 71 | if [[ ! $SYSTEM == "CentOS" ]]; then 72 | eval "${PACKAGE_UPDATE[int]}" 73 | fi 74 | eval "${PACKAGE_INSTALL[int]} curl wget sudo socat openssl dnsutils" 75 | 76 | if [[ $SYSTEM == "CentOS" ]]; then 77 | eval "${PACKAGE_INSTALL[int]} cronie" 78 | systemctl start crond 79 | systemctl enable crond 80 | else 81 | eval "${PACKAGE_INSTALL[int]} cron" 82 | systemctl start cron 83 | systemctl enable cron 84 | fi 85 | 86 | read -rp "请输入注册邮箱 (留空自动生成一个 gmail 邮箱): " email 87 | if [[ -z $email ]]; then 88 | automail=$(date +%s%N | md5sum | cut -c 1-16) 89 | email=$automail@gmail.com 90 | echo -e "${YELLOW}已取消设置邮箱,使用自动生成的 gmail 邮箱: $email${PLAIN}" 91 | fi 92 | 93 | ACME_TAR_URL=$(get_acme_download_url) 94 | wget --no-check-certificate -O master.tar.gz "$ACME_TAR_URL" 95 | if [[ $? -eq 0 ]]; then 96 | tar zxvf master.tar.gz 97 | cd acme.sh-master || exit 1 98 | ./acme.sh --install --accountemail "$email" 99 | cd .. 100 | rm -rf acme.sh-master master.tar.gz 101 | source ~/.bashrc 102 | bash ~/.acme.sh/acme.sh --upgrade --auto-upgrade 103 | switch_provider 104 | if [[ -n $(~/.acme.sh/acme.sh -v 2>/dev/null) ]]; then 105 | echo -e "${GREEN}Acme.sh 证书一键申请脚本安装成功!${PLAIN}" 106 | else 107 | echo -e "${RED}抱歉,Acme.sh 证书一键申请脚本安装失败${PLAIN}" 108 | echo -e "${GREEN}建议如下:${PLAIN}" 109 | echo -e "${YELLOW}检查 VPS 的网络环境${PLAIN}" 110 | fi 111 | else 112 | echo -e "${RED}Acme.sh 下载失败,请检查网络或稍后重试${PLAIN}" 113 | fi 114 | back2menu 115 | } 116 | 117 | unst_acme() { 118 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && echo -e "${YELLOW}未安装 Acme.sh,卸载程序无法执行!${PLAIN}" && back2menu 119 | ~/.acme.sh/acme.sh --uninstall 120 | sed -i '/--cron/d' /etc/crontab >/dev/null 2>&1 121 | rm -rf ~/.acme.sh 122 | echo -e "${GREEN}Acme.sh 证书一键申请脚本已彻底卸载!${PLAIN}" 123 | back2menu 124 | } 125 | 126 | # ====== 证书相关 ====== 127 | check_80() { 128 | if [[ -z $(type -P lsof) ]]; then 129 | if [[ ! $SYSTEM == "CentOS" ]]; then 130 | eval "${PACKAGE_UPDATE[int]}" 131 | fi 132 | eval "${PACKAGE_INSTALL[int]} lsof" 133 | fi 134 | 135 | echo -e "${YELLOW}正在检测 80 端口是否被占用...${PLAIN}" 136 | sleep 1 137 | 138 | if [[ $(lsof -i:"80" | grep -i -c "listen") -eq 0 ]]; then 139 | echo -e "${GREEN}检测到目前 80 端口未被占用${PLAIN}" 140 | sleep 1 141 | else 142 | echo -e "${RED}检测到目前 80 端口被其他程序占用,以下为占用程序信息${PLAIN}" 143 | lsof -i:"80" 144 | read -rp "如需结束占用进程请按 Y,按其他键则退出 [Y/N]: " yn 145 | if [[ $yn =~ [Yy] ]]; then 146 | lsof -i:"80" | awk '{print $2}' | grep -v "PID" | xargs kill -9 147 | sleep 1 148 | else 149 | exit 1 150 | fi 151 | fi 152 | } 153 | 154 | checktls() { 155 | mkdir -p /root/cert 156 | 157 | if [[ -f /root/cert/$domain.crt && -f /root/cert/$domain.key ]]; then 158 | if [[ -s /root/cert/$domain.crt && -s /root/cert/$domain.key ]]; then 159 | if [[ -n $(type -P wg-quick) && -n $(type -P wgcf) ]]; then 160 | wg-quick up wgcf >/dev/null 2>&1 161 | fi 162 | if [[ -a "/opt/warp-go/warp-go" ]]; then 163 | systemctl start warp-go 164 | fi 165 | 166 | echo $domain > /root/cert/ca.log 167 | sed -i '/--cron/d' /etc/crontab >/dev/null 2>&1 168 | echo "0 0 * * * root bash /root/.acme.sh/acme.sh --cron -f >/dev/null 2>&1" >> /etc/crontab 169 | 170 | echo -e "${GREEN}证书申请成功! 证书 ($domain.crt) 和私钥 ($domain.key) 已保存到 /root/cert${PLAIN}" 171 | echo -e "${YELLOW}证书 crt 文件路径: /root/cert/$domain.crt${PLAIN}" 172 | echo -e "${YELLOW}私钥 key 文件路径: /root/cert/$domain.key${PLAIN}" 173 | else 174 | if [[ -n $(type -P wg-quick) && -n $(type -P wgcf) ]]; then 175 | wg-quick up wgcf >/dev/null 2>&1 176 | fi 177 | if [[ -a "/opt/warp-go/warp-go" ]]; then 178 | systemctl start warp-go 179 | fi 180 | 181 | echo -e "${RED}抱歉,证书申请失败${PLAIN}" 182 | echo -e "${GREEN}建议如下:${PLAIN}" 183 | echo -e "${YELLOW}1. 请检查防火墙配置,80端口是否被占用${PLAIN}" 184 | echo -e "${YELLOW}2. 同一域名多次申请可能会触发风控,请尝试更换证书颁发机构,再重试申请${PLAIN}" 185 | fi 186 | fi 187 | } 188 | 189 | acme_standalone() { 190 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 191 | 192 | check_80 193 | 194 | WARPv4Status=$(curl -s4m8 https://www.cloudflare.com/cdn-cgi/trace -k | grep warp | cut -d= -f2) 195 | WARPv6Status=$(curl -s6m8 https://www.cloudflare.com/cdn-cgi/trace -k | grep warp | cut -d= -f2) 196 | if [[ $WARPv4Status =~ on|plus ]] || [[ $WARPv6Status =~ on|plus ]]; then 197 | wg-quick down wgcf >/dev/null 2>&1 198 | systemctl stop warp-go >/dev/null 2>&1 199 | fi 200 | 201 | check_ip 202 | 203 | echo "" 204 | echo -e "${YELLOW}在使用 80 端口申请模式时,请先将您的域名解析至您的 VPS 的真实 IP 地址,否则会导致证书申请失败${PLAIN}" 205 | echo "" 206 | if [[ -n $ipv4 && -n $ipv6 ]]; then 207 | echo -e "VPS 的真实 IPv4 地址为: ${GREEN}$ipv4${PLAIN}" 208 | echo -e "VPS 的真实 IPv6 地址为: ${GREEN}$ipv6${PLAIN}" 209 | elif [[ -n $ipv4 ]]; then 210 | echo -e "VPS 的真实 IPv4 地址为: ${GREEN}$ipv4${PLAIN}" 211 | elif [[ -n $ipv6 ]]; then 212 | echo -e "VPS 的真实 IPv6 地址为: ${GREEN}$ipv6${PLAIN}" 213 | fi 214 | echo "" 215 | 216 | read -rp "请输入解析完成的域名: " domain 217 | [[ -z $domain ]] && echo -e "${RED}未输入域名,无法执行操作!${PLAIN}" && back2menu 218 | echo -e "${GREEN}已输入的域名:$domain${PLAIN}" && sleep 1 219 | 220 | domainIP=$(dig @8.8.8.8 +time=2 +short "$domain" 2>/dev/null | sed -n 1p) 221 | if echo $domainIP | grep -q "network unreachable\|timed out" || [[ -z $domainIP ]]; then 222 | domainIP=$(dig @2001:4860:4860::8888 +time=2 aaaa +short "$domain" 2>/dev/null | sed -n 1p) 223 | fi 224 | if echo $domainIP | grep -q "network unreachable\|timed out" || [[ -z $domainIP ]] ; then 225 | echo -e "${RED}未解析出 IP,请检查域名是否输入有误${PLAIN}" 226 | echo -e "${YELLOW}是否尝试强行匹配?${PLAIN}" 227 | echo -e "${GREEN}1. 是,将使用强行匹配${PLAIN}" 228 | echo -e "${GREEN}2. 否,返回主菜单${PLAIN}" 229 | read -p "请输入选项 [1-2]:" ipChoice 230 | if [[ $ipChoice == 1 ]]; then 231 | echo -e "${YELLOW}将尝试强行匹配以申请域名证书${PLAIN}" 232 | else 233 | echo -e "${RED}将返回主菜单${PLAIN}" 234 | back2menu 235 | fi 236 | fi 237 | 238 | if [[ $domainIP == $ipv6 ]]; then 239 | bash ~/.acme.sh/acme.sh --issue -d ${domain} --standalone -k ec-256 --listen-v6 --insecure 240 | fi 241 | if [[ $domainIP == $ipv4 ]]; then 242 | bash ~/.acme.sh/acme.sh --issue -d ${domain} --standalone -k ec-256 --insecure 243 | fi 244 | 245 | if [[ -n $(echo $domainIP | grep nginx) ]]; then 246 | if [[ -n $(type -P wg-quick) && -n $(type -P wgcf) ]]; then 247 | wg-quick up wgcf >/dev/null 2>&1 248 | fi 249 | if [[ -a "/opt/warp-go/warp-go" ]]; then 250 | systemctl start warp-go 251 | fi 252 | echo -e "${YELLOW}域名解析失败,请检查域名是否正确填写或等待解析完成再执行脚本${PLAIN}" 253 | back2menu 254 | elif [[ -n $(echo $domainIP | grep ":") || -n $(echo $domainIP | grep ".") ]]; then 255 | if [[ $domainIP != $ipv4 ]] && [[ $domainIP != $ipv6 ]]; then 256 | if [[ -n $(type -P wg-quick) && -n $(type -P wgcf) ]]; then 257 | wg-quick up wgcf >/dev/null 2>&1 258 | fi 259 | if [[ -a "/opt/warp-go/warp-go" ]]; then 260 | systemctl start warp-go 261 | fi 262 | echo -e "${GREEN}域名 ${domain} 目前解析的 IP: ($domainIP)${PLAIN}" 263 | echo -e "${RED}当前域名解析的 IP 与当前 VPS 使用的真实 IP 不匹配${PLAIN}" 264 | echo -e "${GREEN}建议如下:${PLAIN}" 265 | echo -e "${YELLOW}1. 请确保 CloudFlare 小云朵为关闭状态${PLAIN}" 266 | echo -e "${YELLOW}2. 请确保 DNS解析设置的 IP 为 VPS 的真实 IP${PLAIN}" 267 | back2menu 268 | fi 269 | fi 270 | 271 | mkdir -p /root/cert 272 | bash ~/.acme.sh/acme.sh --install-cert -d ${domain} --key-file /root/cert/$domain.key --fullchain-file /root/cert/$domain.crt --ecc 273 | checktls 274 | back2menu 275 | } 276 | 277 | acme_cfapiTLD() { 278 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 279 | 280 | check_ip 281 | 282 | read -rp "请输入需要申请证书的域名: " domain 283 | if [[ $(echo ${domain:0-2}) =~ cf|ga|gq|ml|tk ]]; then 284 | echo -e "${RED}检测为 Freenom 免费域名,由于 CloudFlare API 不支持,故无法使用本模式申请!${PLAIN}" 285 | back2menu 286 | fi 287 | 288 | read -rp "请输入 CloudFlare Global API Key: " cfgak 289 | [[ -z $cfgak ]] && echo -e "${RED}未输入 CloudFlare Global API Key,无法执行操作!${PLAIN}" && back2menu 290 | export CF_Key="$cfgak" 291 | read -rp "请输入 CloudFlare 的登录邮箱: " cfemail 292 | [[ -z $cfemail ]] && echo -e "${RED}未输入 CloudFlare 的登录邮箱,无法执行操作!${PLAIN}" && back2menu 293 | export CF_Email="$cfemail" 294 | 295 | if [[ -z $ipv4 ]]; then 296 | bash ~/.acme.sh/acme.sh --issue --dns dns_cf -d "${domain}" -k ec-256 --listen-v6 --insecure 297 | else 298 | bash ~/.acme.sh/acme.sh --issue --dns dns_cf -d "${domain}" -k ec-256 --insecure 299 | fi 300 | 301 | mkdir -p /root/cert 302 | bash ~/.acme.sh/acme.sh --install-cert -d "${domain}" --key-file /root/cert/$domain.key --fullchain-file /root/cert/$domain.crt --ecc 303 | checktls 304 | back2menu 305 | } 306 | 307 | acme_cfapiNTLD() { 308 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 309 | 310 | check_ip 311 | 312 | read -rp "请输入需要申请证书的泛域名 (输入格式:example.com): " domain 313 | [[ -z $domain ]] && echo -e "${RED}未输入域名,无法执行操作!${PLAIN}" && back2menu 314 | if [[ $(echo ${domain:0-2}) =~ cf|ga|gq|ml|tk ]]; then 315 | echo -e "${RED}检测为 Freenom 免费域名,由于 CloudFlare API 不支持,故无法使用本模式申请!${PLAIN}" 316 | back2menu 317 | fi 318 | 319 | read -rp "请输入 CloudFlare Global API Key: " cfgak 320 | [[ -z $cfgak ]] && echo -e "${RED}未输入 CloudFlare Global API Key,无法执行操作!${PLAIN}" && back2menu 321 | export CF_Key="$cfgak" 322 | read -rp "请输入 CloudFlare 的登录邮箱: " cfemail 323 | [[ -z $cfemail ]] && echo -e "${RED}未输入 CloudFlare 的登录邮箱,无法执行操作!${PLAIN}" && back2menu 324 | export CF_Email="$cfemail" 325 | 326 | if [[ -z $ipv4 ]]; then 327 | bash ~/.acme.sh/acme.sh --issue --dns dns_cf -d "*.${domain}" -d "${domain}" -k ec-256 --listen-v6 --insecure 328 | else 329 | bash ~/.acme.sh/acme.sh --issue --dns dns_cf -d "*.${domain}" -d "${domain}" -k ec-256 --insecure 330 | fi 331 | 332 | mkdir -p /root/cert 333 | bash ~/.acme.sh/acme.sh --install-cert -d "*.${domain}" --key-file /root/cert/$domain.key --fullchain-file /root/cert/$domain.crt --ecc 334 | checktls 335 | back2menu 336 | } 337 | 338 | view_cert() { 339 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 340 | bash ~/.acme.sh/acme.sh --list 341 | back2menu 342 | } 343 | 344 | revoke_cert() { 345 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 346 | 347 | bash ~/.acme.sh/acme.sh --list 348 | read -rp "请输入要撤销的域名证书 (复制 Main_Domain 下显示的域名): " domain 349 | [[ -z $domain ]] && echo -e "${RED}未输入域名,无法执行操作!${PLAIN}" && back2menu 350 | 351 | if [[ -n $(bash ~/.acme.sh/acme.sh --list | grep $domain) ]]; then 352 | bash ~/.acme.sh/acme.sh --revoke -d ${domain} --ecc 353 | bash ~/.acme.sh/acme.sh --remove -d ${domain} --ecc 354 | 355 | rm -rf ~/.acme.sh/${domain}_ecc 356 | rm -f /root/cert/$domain.crt /root/cert/$domain.key 357 | 358 | echo -e "${GREEN}撤销 ${domain} 的域名证书成功${PLAIN}" 359 | else 360 | echo -e "${RED}未找到 ${domain} 的域名证书,请检查后重新运行!${PLAIN}" 361 | fi 362 | back2menu 363 | } 364 | 365 | renew_cert() { 366 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && echo -e "${YELLOW}未安装 acme.sh,无法执行操作!${PLAIN}" && back2menu 367 | bash ~/.acme.sh/acme.sh --cron -f 368 | back2menu 369 | } 370 | 371 | switch_provider() { 372 | [[ -z $(~/.acme.sh/acme.sh -v 2>/dev/null) ]] && inst_acme 373 | 374 | echo -e "${YELLOW}请选择证书提供商,默认通过 Letsencrypt.org 来申请证书${PLAIN}" 375 | echo -e "${YELLOW}如果证书申请失败,可选 BuyPass.com 或 ZeroSSL.com 来申请.${PLAIN}" 376 | echo -e " ${GREEN}1.${PLAIN} Letsencrypt.org ${YELLOW}(默认)${PLAIN}" 377 | echo -e " ${GREEN}2.${PLAIN} BuyPass.com${PLAIN}" 378 | echo -e " ${GREEN}3.${PLAIN} ZeroSSL.com${PLAIN}" 379 | read -rp "请选择证书提供商 [1-3]: " provider 380 | case $provider in 381 | 2) bash ~/.acme.sh/acme.sh --set-default-ca --server buypass && echo -e "${GREEN}切换证书提供商为 BuyPass.com 成功!${PLAIN}" ;; 382 | 3) bash ~/.acme.sh/acme.sh --set-default-ca --server zerossl && echo -e "${GREEN}切换证书提供商为 ZeroSSL.com 成功!${PLAIN}" ;; 383 | *) bash ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt && echo -e "${GREEN}切换证书提供商为 Letsencrypt.org 成功!${PLAIN}" ;; 384 | esac 385 | back2menu 386 | } 387 | 388 | generate_self_signed_cert() { 389 | echo "" 390 | echo -e "${YELLOW}开始生成自签名ECC证书...${PLAIN}" 391 | DEFAULT_DOMAIN="bing.com" 392 | DEFAULT_CERT_PATH="/etc/cert" 393 | DEFAULT_DAYS=36500 394 | 395 | read -rp "请输入证书的域名(默认: ${DEFAULT_DOMAIN}): " domain 396 | domain="${domain:-$DEFAULT_DOMAIN}" 397 | read -rp "请输入证书存放路径(默认: ${DEFAULT_CERT_PATH}): " cert_path 398 | cert_path="${cert_path:-$DEFAULT_CERT_PATH}" 399 | read -rp "请输入证书有效天数(默认: ${DEFAULT_DAYS}): " days 400 | days="${days:-$DEFAULT_DAYS}" 401 | 402 | key_file="${cert_path}/server.key" 403 | crt_file="${cert_path}/server.crt" 404 | 405 | sudo mkdir -p "$cert_path" 406 | echo "生成 ECC 私钥..." 407 | sudo openssl ecparam -name prime256v1 -genkey -noout -out "$key_file" 408 | echo "使用私钥生成自签证书..." 409 | sudo openssl req -new -x509 -key "$key_file" -out "$crt_file" -days "$days" \ 410 | -subj "/CN=$domain" -addext "subjectAltName=DNS:$domain" 411 | sudo chmod 644 "$crt_file" 412 | sudo chmod 600 "$key_file" 413 | 414 | echo "" 415 | echo -e "${GREEN}自签名证书生成完成!${PLAIN}" 416 | echo "私钥位置: $key_file" 417 | echo "证书位置: $crt_file" 418 | back2menu 419 | } 420 | 421 | # ====== 主菜单 ====== 422 | menu() { 423 | clear 424 | echo "===============================" 425 | echo -e " ${RED}证书申请 OR 自签${PLAIN}" 426 | echo "===============================" 427 | echo -e " ${GREEN} 1.${PLAIN}安装Acme" 428 | echo -e " ${GREEN} 2.${PLAIN}卸载Acme" 429 | echo " -------------" 430 | echo -e " ${GREEN} 3.${PLAIN}申请单域名证书 ${YELLOW}(80 端口申请)${PLAIN}" 431 | echo -e " ${GREEN} 4.${PLAIN}申请单域名证书 ${YELLOW}(CF API 申请)${PLAIN}" 432 | echo -e " ${GREEN} 5.${PLAIN}申请泛域名证书 ${YELLOW}(CF API 申请)${PLAIN}" 433 | echo " -------------" 434 | echo -e " ${GREEN} 6.${PLAIN}查看已申请的证书" 435 | echo -e " ${GREEN} 7.${PLAIN}撤销已申请的证书" 436 | echo -e " ${GREEN} 8.${PLAIN}续期已申请的证书" 437 | echo -e " ${GREEN} 9.${PLAIN}切换证书颁发机构" 438 | echo -e " ${GREEN} 10.${PLAIN}生成自签证书" 439 | echo " -------------" 440 | echo -e " ${GREEN} 0.${PLAIN}退出脚本" 441 | echo "" 442 | read -rp "$(echo -e "${RED}请输入选项 [0-10]: ${PLAIN}")" menuInput 443 | case "$menuInput" in 444 | 1 ) inst_acme ;; 445 | 2 ) unst_acme ;; 446 | 3 ) acme_standalone ;; 447 | 4 ) acme_cfapiTLD ;; 448 | 5 ) acme_cfapiNTLD ;; 449 | 6 ) view_cert ;; 450 | 7 ) revoke_cert ;; 451 | 8 ) renew_cert ;; 452 | 9 ) switch_provider ;; 453 | 10 ) generate_self_signed_cert ;; 454 | * ) exit 1 ;; 455 | esac 456 | } 457 | 458 | menu 459 | -------------------------------------------------------------------------------- /Rule/Google: -------------------------------------------------------------------------------- 1 | DOMAIN,lens.l.google.com 2 | DOMAIN,mtalk.google.com 3 | DOMAIN,safebrowsing-cache.google.com 4 | DOMAIN,redirector.c.bigcache.googleapis.com 5 | DOMAIN,clientservices.googleapis.com 6 | DOMAIN,fonts.googleapis.com 7 | DOMAIN,safebrowsing.googleapis.com 8 | DOMAIN,translate.googleapis.com 9 | DOMAIN,www.googleapis.com 10 | DOMAIN,fonts.gstatic.com 11 | DOMAIN,redirector.gvt1.com 12 | DOMAIN,crl.pki.goog 13 | DOMAIN,ocsp.pki.goog 14 | DOMAIN,voice.telephony.goog 15 | DOMAIN-SUFFIX,google.ad 16 | DOMAIN-SUFFIX,blogspot.ae 17 | DOMAIN-SUFFIX,google.ae 18 | DOMAIN-SUFFIX,google.com.af 19 | DOMAIN-SUFFIX,google.com.ag 20 | DOMAIN-SUFFIX,api.ai 21 | DOMAIN-SUFFIX,google.com.ai 22 | DOMAIN-SUFFIX,blogspot.al 23 | DOMAIN-SUFFIX,google.al 24 | DOMAIN-SUFFIX,blogspot.am 25 | DOMAIN-SUFFIX,google.am 26 | DOMAIN-SUFFIX,google.co.ao 27 | DOMAIN-SUFFIX,cloudproxy.app 28 | DOMAIN-SUFFIX,get.app 29 | DOMAIN-SUFFIX,gridaware.app 30 | DOMAIN-SUFFIX,run.app 31 | DOMAIN-SUFFIX,web.app 32 | DOMAIN-SUFFIX,blogspot.com.ar 33 | DOMAIN-SUFFIX,google.com.ar 34 | DOMAIN-SUFFIX,google.as 35 | DOMAIN-SUFFIX,blogspot.co.at 36 | DOMAIN-SUFFIX,google.at 37 | DOMAIN-SUFFIX,blogspot.com.au 38 | DOMAIN-SUFFIX,google.com.au 39 | DOMAIN-SUFFIX,google.az 40 | DOMAIN-SUFFIX,blogspot.ba 41 | DOMAIN-SUFFIX,google.ba 42 | DOMAIN-SUFFIX,google.com.bd 43 | DOMAIN-SUFFIX,blogspot.be 44 | DOMAIN-SUFFIX,google.be 45 | DOMAIN-SUFFIX,google.berlin 46 | DOMAIN-SUFFIX,google.bf 47 | DOMAIN-SUFFIX,blogspot.bg 48 | DOMAIN-SUFFIX,google.bg 49 | DOMAIN-SUFFIX,google.com.bh 50 | DOMAIN-SUFFIX,google.bi 51 | DOMAIN-SUFFIX,blogspot.bj 52 | DOMAIN-SUFFIX,google.bj 53 | DOMAIN-SUFFIX,google.com.bn 54 | DOMAIN-SUFFIX,google.com.bo 55 | DOMAIN-SUFFIX,blogspot.com.br 56 | DOMAIN-SUFFIX,google.com.br 57 | DOMAIN-SUFFIX,womenwill.com.br 58 | DOMAIN-SUFFIX,google.bs 59 | DOMAIN-SUFFIX,google.bt 60 | DOMAIN-SUFFIX,bazel.build 61 | DOMAIN-SUFFIX,google.co.bw 62 | DOMAIN-SUFFIX,blogspot.com.by 63 | DOMAIN-SUFFIX,google.by 64 | DOMAIN-SUFFIX,near.by 65 | DOMAIN-SUFFIX,google.com.bz 66 | DOMAIN-SUFFIX,appbridge.ca 67 | DOMAIN-SUFFIX,blogspot.ca 68 | DOMAIN-SUFFIX,bumptop.ca 69 | DOMAIN-SUFFIX,google.ca 70 | DOMAIN-SUFFIX,google.cat 71 | DOMAIN-SUFFIX,google.cd 72 | DOMAIN-SUFFIX,blogspot.cf 73 | DOMAIN-SUFFIX,google.cf 74 | DOMAIN-SUFFIX,google.cg 75 | DOMAIN-SUFFIX,blogspot.ch 76 | DOMAIN-SUFFIX,google.ch 77 | DOMAIN-SUFFIX,fastlane.ci 78 | DOMAIN-SUFFIX,google.ci 79 | DOMAIN-SUFFIX,google.co.ck 80 | DOMAIN-SUFFIX,blogspot.cl 81 | DOMAIN-SUFFIX,google.cl 82 | DOMAIN-SUFFIX,google.cm 83 | DOMAIN-SUFFIX,g.cn 84 | DOMAIN-SUFFIX,gkecnapps.cn 85 | DOMAIN-SUFFIX,google.cn 86 | DOMAIN-SUFFIX,googleapis.cn 87 | DOMAIN-SUFFIX,googlecnapps.cn 88 | DOMAIN-SUFFIX,gstatic.cn 89 | DOMAIN-SUFFIX,gstaticcnapps.cn 90 | DOMAIN-SUFFIX,blogspot.com.co 91 | DOMAIN-SUFFIX,google.com.co 92 | DOMAIN-SUFFIX,g.co 93 | DOMAIN-SUFFIX,xplr.co 94 | DOMAIN-SUFFIX,plus.codes 95 | DOMAIN-SUFFIX,0emm.com 96 | DOMAIN-SUFFIX,1ucrs.com 97 | DOMAIN-SUFFIX,265.com 98 | DOMAIN-SUFFIX,466453.com 99 | DOMAIN-SUFFIX,admeld.com 100 | DOMAIN-SUFFIX,admob.com 101 | DOMAIN-SUFFIX,admob-cn.com 102 | DOMAIN-SUFFIX,adsense.com 103 | DOMAIN-SUFFIX,adsensecustomsearchads.com 104 | DOMAIN-SUFFIX,adsenseformobileapps.com 105 | DOMAIN-SUFFIX,advertisercommunity.com 106 | DOMAIN-SUFFIX,advertiserscommunity.com 107 | DOMAIN-SUFFIX,adwords.com 108 | DOMAIN-SUFFIX,adwords-community.com 109 | DOMAIN-SUFFIX,adwordsexpress.com 110 | DOMAIN-SUFFIX,ampproject.com 111 | DOMAIN-SUFFIX,android.com 112 | DOMAIN-SUFFIX,androidify.com 113 | DOMAIN-SUFFIX,androidtv.com 114 | DOMAIN-SUFFIX,apigee.com 115 | DOMAIN-SUFFIX,app-analytics-services.com 116 | DOMAIN-SUFFIX,app-measurement.com 117 | DOMAIN-SUFFIX,app-measurement-cn.com 118 | DOMAIN-SUFFIX,appspot.com 119 | DOMAIN-SUFFIX,apture.com 120 | DOMAIN-SUFFIX,area120.com 121 | DOMAIN-SUFFIX,asp-cc.com 122 | DOMAIN-SUFFIX,autodraw.com 123 | DOMAIN-SUFFIX,bandpage.com 124 | DOMAIN-SUFFIX,baselinestudy.com 125 | DOMAIN-SUFFIX,beatthatquote.com 126 | DOMAIN-SUFFIX,blogblog.com 127 | DOMAIN-SUFFIX,blogger.com 128 | DOMAIN-SUFFIX,blogspot.com 129 | DOMAIN-SUFFIX,brocaproject.com 130 | DOMAIN-SUFFIX,bumpshare.com 131 | DOMAIN-SUFFIX,bumptop.com 132 | DOMAIN-SUFFIX,bumptunes.com 133 | DOMAIN-SUFFIX,campuslondon.com 134 | DOMAIN-SUFFIX,capitalg.com 135 | DOMAIN-SUFFIX,clickserve.cc-dt.com 136 | DOMAIN-SUFFIX,charlestonroadregistry.com 137 | DOMAIN-SUFFIX,chrome.com 138 | DOMAIN-SUFFIX,chromebook.com 139 | DOMAIN-SUFFIX,chromecast.com 140 | DOMAIN-SUFFIX,chromeexperiments.com 141 | DOMAIN-SUFFIX,chromercise.com 142 | DOMAIN-SUFFIX,chromestatus.com 143 | DOMAIN-SUFFIX,chroniclesec.com 144 | DOMAIN-SUFFIX,cloudburstresearch.com 145 | DOMAIN-SUFFIX,cloudrobotics.com 146 | DOMAIN-SUFFIX,cobrasearch.com 147 | DOMAIN-SUFFIX,codespot.com 148 | DOMAIN-SUFFIX,conscrypt.com 149 | DOMAIN-SUFFIX,coova.com 150 | DOMAIN-SUFFIX,crashlytics.com 151 | DOMAIN-SUFFIX,crbug.com 152 | DOMAIN-SUFFIX,creativelab5.com 153 | DOMAIN-SUFFIX,crossmediapanel.com 154 | DOMAIN-SUFFIX,crr.com 155 | DOMAIN-SUFFIX,crrev.com 156 | DOMAIN-SUFFIX,cs4hs.com 157 | DOMAIN-SUFFIX,debug.com 158 | DOMAIN-SUFFIX,debugproject.com 159 | DOMAIN-SUFFIX,deepmind.com 160 | DOMAIN-SUFFIX,deja.com 161 | DOMAIN-SUFFIX,www.destinationurl.com 162 | DOMAIN-SUFFIX,dialogflow.com 163 | DOMAIN-SUFFIX,digisfera.com 164 | DOMAIN-SUFFIX,digitalattackmap.com 165 | DOMAIN-SUFFIX,doubleclick.com 166 | DOMAIN-SUFFIX,episodic.com 167 | DOMAIN-SUFFIX,feedburner.com 168 | DOMAIN-SUFFIX,fflick.com 169 | DOMAIN-SUFFIX,financeleadsonline.com 170 | DOMAIN-SUFFIX,firebaseapp.com 171 | DOMAIN-SUFFIX,firebaseio.com 172 | DOMAIN-SUFFIX,flutterapp.com 173 | DOMAIN-SUFFIX,foofle.com 174 | DOMAIN-SUFFIX,froogle.com 175 | DOMAIN-SUFFIX,g-tun.com 176 | DOMAIN-SUFFIX,gerritcodereview.com 177 | DOMAIN-SUFFIX,getbumptop.com 178 | DOMAIN-SUFFIX,ggoogle.com 179 | DOMAIN-SUFFIX,gipscorp.com 180 | DOMAIN-SUFFIX,gmail.com 181 | DOMAIN-SUFFIX,gmodules.com 182 | DOMAIN-SUFFIX,go-lang.com 183 | DOMAIN-SUFFIX,gogle.com 184 | DOMAIN-SUFFIX,gogole.com 185 | DOMAIN-SUFFIX,golang.com 186 | DOMAIN-SUFFIX,googel.com 187 | DOMAIN-SUFFIX,googil.com 188 | DOMAIN-SUFFIX,googl.com 189 | DOMAIN-SUFFIX,google.com 190 | DOMAIN-SUFFIX,google-analytics.com 191 | DOMAIN-SUFFIX,google-analytics-cn.com 192 | DOMAIN-SUFFIX,google-syndication.com 193 | DOMAIN-SUFFIX,googleacquisitionmigration.com 194 | DOMAIN-SUFFIX,googleadapis.com 195 | DOMAIN-SUFFIX,clickserver.googleads.com 196 | DOMAIN-SUFFIX,googleadservices.com 197 | DOMAIN-SUFFIX,googleadservices-cn.com 198 | DOMAIN-SUFFIX,googleanalytics.com 199 | DOMAIN-SUFFIX,googleapis.com 200 | DOMAIN-SUFFIX,googleapis-cn.com 201 | DOMAIN-SUFFIX,googleapps.com 202 | DOMAIN-SUFFIX,googleapps-cn.com 203 | DOMAIN-SUFFIX,googlearth.com 204 | DOMAIN-SUFFIX,googleblog.com 205 | DOMAIN-SUFFIX,googlebot.com 206 | DOMAIN-SUFFIX,googlecapital.com 207 | DOMAIN-SUFFIX,googlecode.com 208 | DOMAIN-SUFFIX,googlecommerce.com 209 | DOMAIN-SUFFIX,googledanmark.com 210 | DOMAIN-SUFFIX,googledomains.com 211 | DOMAIN-SUFFIX,googledrive.com 212 | DOMAIN-SUFFIX,googlee.com 213 | DOMAIN-SUFFIX,googleearth.com 214 | DOMAIN-SUFFIX,googlefiber.com 215 | DOMAIN-SUFFIX,googlefinland.com 216 | DOMAIN-SUFFIX,googlemail.com 217 | DOMAIN-SUFFIX,googlemaps.com 218 | DOMAIN-SUFFIX,googlemashups.com 219 | DOMAIN-SUFFIX,googleoptimize.com 220 | DOMAIN-SUFFIX,googleoptimize-cn.com 221 | DOMAIN-SUFFIX,googlepagecreator.com 222 | DOMAIN-SUFFIX,googlephotos.com 223 | DOMAIN-SUFFIX,googleplay.com 224 | DOMAIN-SUFFIX,googleplus.com 225 | DOMAIN-SUFFIX,googlescholar.com 226 | DOMAIN-SUFFIX,googlesource.com 227 | DOMAIN-SUFFIX,googlestore.com 228 | DOMAIN-SUFFIX,googlesverige.com 229 | DOMAIN-SUFFIX,googlesyndication.com 230 | DOMAIN-SUFFIX,googlesyndication-cn.com 231 | DOMAIN-SUFFIX,googletagmanager.com 232 | DOMAIN-SUFFIX,googletagmanager-cn.com 233 | DOMAIN-SUFFIX,googletagservices.com 234 | DOMAIN-SUFFIX,googletagservices-cn.com 235 | DOMAIN-SUFFIX,googletraveladservices.com 236 | DOMAIN-SUFFIX,googletraveladservices-cn.com 237 | DOMAIN-SUFFIX,googleusercontent.com 238 | DOMAIN-SUFFIX,googlevads-cn.com 239 | DOMAIN-SUFFIX,googleventures.com 240 | DOMAIN-SUFFIX,googlr.com 241 | DOMAIN-SUFFIX,goolge.com 242 | DOMAIN-SUFFIX,gooogle.com 243 | DOMAIN-SUFFIX,gstatic.com 244 | DOMAIN-SUFFIX,gstatic-cn.com 245 | DOMAIN-SUFFIX,gsuite.com 246 | DOMAIN-SUFFIX,gv.com 247 | DOMAIN-SUFFIX,gvt0.com 248 | DOMAIN-SUFFIX,redirector.gcpcdn.gvt1.com 249 | DOMAIN-SUFFIX,redirector.offline-maps.gvt1.com 250 | DOMAIN-SUFFIX,redirector.gvt1.com 251 | DOMAIN-SUFFIX,redirector.snap.gvt1.com 252 | DOMAIN-SUFFIX,gvt1-cn.com 253 | DOMAIN-SUFFIX,beacons.gvt2.com 254 | DOMAIN-SUFFIX,beacons2.gvt2.com 255 | DOMAIN-SUFFIX,beacons3.gvt2.com 256 | DOMAIN-SUFFIX,gcp.gvt2.com 257 | DOMAIN-SUFFIX,gvt2-cn.com 258 | DOMAIN-SUFFIX,gvt3.com 259 | DOMAIN-SUFFIX,gvt5.com 260 | DOMAIN-SUFFIX,gvt6.com 261 | DOMAIN-SUFFIX,gvt7.com 262 | DOMAIN-SUFFIX,gvt9.com 263 | DOMAIN-SUFFIX,hindiweb.com 264 | DOMAIN-SUFFIX,html5rocks.com 265 | DOMAIN-SUFFIX,hwgo.com 266 | DOMAIN-SUFFIX,igoogle.com 267 | DOMAIN-SUFFIX,impermium.com 268 | DOMAIN-SUFFIX,itasoftware.com 269 | DOMAIN-SUFFIX,jibemobile.com 270 | DOMAIN-SUFFIX,kaggle.com 271 | DOMAIN-SUFFIX,keyhole.com 272 | DOMAIN-SUFFIX,keytransparency.com 273 | DOMAIN-SUFFIX,lanternal.com 274 | DOMAIN-SUFFIX,like.com 275 | DOMAIN-SUFFIX,madewithcode.com 276 | DOMAIN-SUFFIX,mdialog.com 277 | DOMAIN-SUFFIX,mfg-inspector.com 278 | DOMAIN-SUFFIX,moodstocks.com 279 | DOMAIN-SUFFIX,nest.com 280 | DOMAIN-SUFFIX,neverware.com 281 | DOMAIN-SUFFIX,oasisfeng.com 282 | DOMAIN-SUFFIX,oauthz.com 283 | DOMAIN-SUFFIX,apps5.oingo.com 284 | DOMAIN-SUFFIX,on2.com 285 | DOMAIN-SUFFIX,oneworldmanystories.com 286 | DOMAIN-SUFFIX,orbitera.com 287 | DOMAIN-SUFFIX,pagespeedmobilizer.com 288 | DOMAIN-SUFFIX,panoramio.com 289 | DOMAIN-SUFFIX,picasa.com 290 | DOMAIN-SUFFIX,picasaweb.com 291 | DOMAIN-SUFFIX,picnik.com 292 | DOMAIN-SUFFIX,pittpatt.com 293 | DOMAIN-SUFFIX,pixate.com 294 | DOMAIN-SUFFIX,postini.com 295 | DOMAIN-SUFFIX,privacysandbox.com 296 | DOMAIN-SUFFIX,projectara.com 297 | DOMAIN-SUFFIX,projectbaseline.com 298 | DOMAIN-SUFFIX,publishproxy.com 299 | DOMAIN-SUFFIX,www.pxcc.com 300 | DOMAIN-SUFFIX,qiao-cn.com 301 | DOMAIN-SUFFIX,questvisual.com 302 | DOMAIN-SUFFIX,quickoffice.com 303 | DOMAIN-SUFFIX,quiksee.com 304 | DOMAIN-SUFFIX,redhotlabs.com 305 | DOMAIN-SUFFIX,revolv.com 306 | DOMAIN-SUFFIX,ridepenguin.com 307 | DOMAIN-SUFFIX,saynow.com 308 | DOMAIN-SUFFIX,schemer.com 309 | DOMAIN-SUFFIX,screenwisetrends.com 310 | DOMAIN-SUFFIX,screenwisetrendspanel.com 311 | DOMAIN-SUFFIX,snapseed.com 312 | DOMAIN-SUFFIX,solveforx.com 313 | DOMAIN-SUFFIX,stcroixmosquito.com 314 | DOMAIN-SUFFIX,stcroixmosquitoproject.com 315 | DOMAIN-SUFFIX,studywatchbyverily.com 316 | DOMAIN-SUFFIX,stxmosquito.com 317 | DOMAIN-SUFFIX,stxmosquitoproject.com 318 | DOMAIN-SUFFIX,synergyse.com 319 | DOMAIN-SUFFIX,thecleversense.com 320 | DOMAIN-SUFFIX,thegooglestore.com 321 | DOMAIN-SUFFIX,thinkquarterly.com 322 | DOMAIN-SUFFIX,thinkwithgoogle.com 323 | DOMAIN-SUFFIX,tiltbrush.com 324 | DOMAIN-SUFFIX,txvia.com 325 | DOMAIN-SUFFIX,urchin.com 326 | DOMAIN-SUFFIX,useplannr.com 327 | DOMAIN-SUFFIX,usvimosquito.com 328 | DOMAIN-SUFFIX,usvimosquitoproject.com 329 | DOMAIN-SUFFIX,velostrata.com 330 | DOMAIN-SUFFIX,verily.com 331 | DOMAIN-SUFFIX,verilylifesciences.com 332 | DOMAIN-SUFFIX,verilystudyhub.com 333 | DOMAIN-SUFFIX,verilystudywatch.com 334 | DOMAIN-SUFFIX,wallet.com 335 | DOMAIN-SUFFIX,waymo.com 336 | DOMAIN-SUFFIX,waze.com 337 | DOMAIN-SUFFIX,webappfieldguide.com 338 | DOMAIN-SUFFIX,webpkgcache.com 339 | DOMAIN-SUFFIX,widevine.com 340 | DOMAIN-SUFFIX,withgoogle.com 341 | DOMAIN-SUFFIX,womenwill.com 342 | DOMAIN-SUFFIX,xn--9kr7l.com 343 | DOMAIN-SUFFIX,xn--9trs65b.com 344 | DOMAIN-SUFFIX,xn--flw351e.com 345 | DOMAIN-SUFFIX,xn--ggle-55da.com 346 | DOMAIN-SUFFIX,xn--gogl-0nd52e.com 347 | DOMAIN-SUFFIX,xn--gogl-1nd42e.com 348 | DOMAIN-SUFFIX,xn--ngstr-lra8j.com 349 | DOMAIN-SUFFIX,zynamics.com 350 | DOMAIN-SUFFIX,x.company 351 | DOMAIN-SUFFIX,google.co.cr 352 | DOMAIN-SUFFIX,google.com.cu 353 | DOMAIN-SUFFIX,blogspot.cv 354 | DOMAIN-SUFFIX,google.cv 355 | DOMAIN-SUFFIX,blogspot.com.cy 356 | DOMAIN-SUFFIX,google.com.cy 357 | DOMAIN-SUFFIX,blogspot.cz 358 | DOMAIN-SUFFIX,google.cz 359 | DOMAIN-SUFFIX,blogspot.de 360 | DOMAIN-SUFFIX,google.de 361 | DOMAIN-SUFFIX,weltweitwachsen.de 362 | DOMAIN-SUFFIX,zukunftswerkstatt.de 363 | DOMAIN-SUFFIX,amp.dev 364 | DOMAIN-SUFFIX,bdn.dev 365 | DOMAIN-SUFFIX,certificate-transparency.dev 366 | DOMAIN-SUFFIX,chromeos.dev 367 | DOMAIN-SUFFIX,dart.dev 368 | DOMAIN-SUFFIX,dartpad.dev 369 | DOMAIN-SUFFIX,deps.dev 370 | DOMAIN-SUFFIX,flutter.dev 371 | DOMAIN-SUFFIX,fuchsia.dev 372 | DOMAIN-SUFFIX,g.dev 373 | DOMAIN-SUFFIX,gateway.dev 374 | DOMAIN-SUFFIX,get.dev 375 | DOMAIN-SUFFIX,go.dev 376 | DOMAIN-SUFFIX,google.dev 377 | DOMAIN-SUFFIX,opensourceinsight.dev 378 | DOMAIN-SUFFIX,opensourceinsights.dev 379 | DOMAIN-SUFFIX,stadia.dev 380 | DOMAIN-SUFFIX,tfhub.dev 381 | DOMAIN-SUFFIX,v8.dev 382 | DOMAIN-SUFFIX,web.dev 383 | DOMAIN-SUFFIX,google.dj 384 | DOMAIN-SUFFIX,blogspot.dk 385 | DOMAIN-SUFFIX,google.dk 386 | DOMAIN-SUFFIX,google.dm 387 | DOMAIN-SUFFIX,google.com.do 388 | DOMAIN-SUFFIX,google.dz 389 | DOMAIN-SUFFIX,google.com.ec 390 | DOMAIN-SUFFIX,blogspot.com.ee 391 | DOMAIN-SUFFIX,google.ee 392 | DOMAIN-SUFFIX,blogspot.com.eg 393 | DOMAIN-SUFFIX,google.com.eg 394 | DOMAIN-SUFFIX,blogspot.com.es 395 | DOMAIN-SUFFIX,google.es 396 | DOMAIN-SUFFIX,google.com.et 397 | DOMAIN-SUFFIX,blogspot.fi 398 | DOMAIN-SUFFIX,google.fi 399 | DOMAIN-SUFFIX,google.com.fj 400 | DOMAIN-SUFFIX,google.fm 401 | DOMAIN-SUFFIX,keytransparency.foo 402 | DOMAIN-SUFFIX,nomulus.foo 403 | DOMAIN-SUFFIX,savethedate.foo 404 | DOMAIN-SUFFIX,blogspot.fr 405 | DOMAIN-SUFFIX,google.fr 406 | DOMAIN-SUFFIX,google.ga 407 | DOMAIN-SUFFIX,google.ge 408 | DOMAIN-SUFFIX,google.gg 409 | DOMAIN-SUFFIX,google.com.gh 410 | DOMAIN-SUFFIX,google.com.gi 411 | DOMAIN-SUFFIX,goo.gl 412 | DOMAIN-SUFFIX,google.gl 413 | DOMAIN-SUFFIX,chat.gle 414 | DOMAIN-SUFFIX,hey.gle 415 | DOMAIN-SUFFIX,ok.gle 416 | DOMAIN-SUFFIX,google.gm 417 | DOMAIN-SUFFIX,prod.databe.floonet.goog 418 | DOMAIN-SUFFIX,staging.databe.floonet.goog 419 | DOMAIN-SUFFIX,prod-controlbe.floonet.goog 420 | DOMAIN-SUFFIX,prod-databe.floonet.goog 421 | DOMAIN-SUFFIX,staging-controlbe.floonet.goog 422 | DOMAIN-SUFFIX,staging-databe.floonet.goog 423 | DOMAIN-SUFFIX,pki.goog 424 | DOMAIN-SUFFIX,blog.google 425 | DOMAIN-SUFFIX,registry.google 426 | DOMAIN-SUFFIX,blogspot.gr 427 | DOMAIN-SUFFIX,google.gr 428 | DOMAIN-SUFFIX,google.com.gt 429 | DOMAIN-SUFFIX,google.gy 430 | DOMAIN-SUFFIX,on.here 431 | DOMAIN-SUFFIX,blogspot.hk 432 | DOMAIN-SUFFIX,google.com.hk 433 | DOMAIN-SUFFIX,google.hn 434 | DOMAIN-SUFFIX,devsitetest.how 435 | DOMAIN-SUFFIX,get.how 436 | DOMAIN-SUFFIX,blogspot.hr 437 | DOMAIN-SUFFIX,google.hr 438 | DOMAIN-SUFFIX,google.ht 439 | DOMAIN-SUFFIX,blogspot.hu 440 | DOMAIN-SUFFIX,google.hu 441 | DOMAIN-SUFFIX,blogspot.co.id 442 | DOMAIN-SUFFIX,google.co.id 443 | DOMAIN-SUFFIX,womenwill.id 444 | DOMAIN-SUFFIX,blogspot.ie 445 | DOMAIN-SUFFIX,google.ie 446 | DOMAIN-SUFFIX,blogspot.co.il 447 | DOMAIN-SUFFIX,google.co.il 448 | DOMAIN-SUFFIX,google.im 449 | DOMAIN-SUFFIX,blogspot.in 450 | DOMAIN-SUFFIX,google.co.in 451 | DOMAIN-SUFFIX,womenwill.in 452 | DOMAIN-SUFFIX,deps.info 453 | DOMAIN-SUFFIX,appbridge.io 454 | DOMAIN-SUFFIX,gcr.io 455 | DOMAIN-SUFFIX,getmdl.io 456 | DOMAIN-SUFFIX,gsrc.io 457 | DOMAIN-SUFFIX,kaggle.io 458 | DOMAIN-SUFFIX,material.io 459 | DOMAIN-SUFFIX,openthread.io 460 | DOMAIN-SUFFIX,openweave.io 461 | DOMAIN-SUFFIX,shattered.io 462 | DOMAIN-SUFFIX,google.iq 463 | DOMAIN-SUFFIX,blogspot.is 464 | DOMAIN-SUFFIX,google.is 465 | DOMAIN-SUFFIX,appbridge.it 466 | DOMAIN-SUFFIX,blogspot.it 467 | DOMAIN-SUFFIX,google.it 468 | DOMAIN-SUFFIX,google.je 469 | DOMAIN-SUFFIX,google.com.jm 470 | DOMAIN-SUFFIX,google.jo 471 | DOMAIN-SUFFIX,blogspot.jp 472 | DOMAIN-SUFFIX,google.co.jp 473 | DOMAIN-SUFFIX,blogspot.co.ke 474 | DOMAIN-SUFFIX,google.co.ke 475 | DOMAIN-SUFFIX,google.kg 476 | DOMAIN-SUFFIX,google.com.kh 477 | DOMAIN-SUFFIX,google.ki 478 | DOMAIN-SUFFIX,blogspot.kr 479 | DOMAIN-SUFFIX,google.co.kr 480 | DOMAIN-SUFFIX,google.com.kw 481 | DOMAIN-SUFFIX,google.kz 482 | DOMAIN-SUFFIX,google.la 483 | DOMAIN-SUFFIX,google.com.lb 484 | DOMAIN-SUFFIX,blogspot.li 485 | DOMAIN-SUFFIX,google.li 486 | DOMAIN-SUFFIX,page.link 487 | DOMAIN-SUFFIX,google.lk 488 | DOMAIN-SUFFIX,google.co.ls 489 | DOMAIN-SUFFIX,blogspot.lt 490 | DOMAIN-SUFFIX,google.lt 491 | DOMAIN-SUFFIX,blogspot.lu 492 | DOMAIN-SUFFIX,google.lu 493 | DOMAIN-SUFFIX,google.lv 494 | DOMAIN-SUFFIX,google.com.ly 495 | DOMAIN-SUFFIX,google.co.ma 496 | DOMAIN-SUFFIX,blogspot.md 497 | DOMAIN-SUFFIX,google.md 498 | DOMAIN-SUFFIX,google.me 499 | DOMAIN-SUFFIX,google.mg 500 | DOMAIN-SUFFIX,blogspot.mk 501 | DOMAIN-SUFFIX,google.mk 502 | DOMAIN-SUFFIX,google.ml 503 | DOMAIN-SUFFIX,google.com.mm 504 | DOMAIN-SUFFIX,google.mn 505 | DOMAIN-SUFFIX,pageview.mobi 506 | DOMAIN-SUFFIX,google.ms 507 | DOMAIN-SUFFIX,blogspot.com.mt 508 | DOMAIN-SUFFIX,google.com.mt 509 | DOMAIN-SUFFIX,google.mu 510 | DOMAIN-SUFFIX,google.mv 511 | DOMAIN-SUFFIX,google.mw 512 | DOMAIN-SUFFIX,blogspot.mx 513 | DOMAIN-SUFFIX,google.com.mx 514 | DOMAIN-SUFFIX,womenwill.mx 515 | DOMAIN-SUFFIX,blogspot.my 516 | DOMAIN-SUFFIX,google.com.my 517 | DOMAIN-SUFFIX,google.co.mz 518 | DOMAIN-SUFFIX,google.com.na 519 | DOMAIN-SUFFIX,google.ne 520 | DOMAIN-SUFFIX,1e100.net 521 | DOMAIN-SUFFIX,2mdn.net 522 | DOMAIN-SUFFIX,2mdn-cn.net 523 | DOMAIN-SUFFIX,adgoogle.net 524 | DOMAIN-SUFFIX,ampproject.net 525 | DOMAIN-SUFFIX,app-measurement.net 526 | DOMAIN-SUFFIX,bumptop.net 527 | DOMAIN-SUFFIX,cloudfunctions.net 528 | DOMAIN-SUFFIX,coova.net 529 | DOMAIN-SUFFIX,dartsearch.net 530 | DOMAIN-SUFFIX,dartsearch-cn.net 531 | DOMAIN-SUFFIX,doubleclick.net 532 | DOMAIN-SUFFIX,doubleclick-cn.net 533 | DOMAIN-SUFFIX,go-lang.net 534 | DOMAIN-SUFFIX,golang.net 535 | DOMAIN-SUFFIX,gonglchuangl.net 536 | DOMAIN-SUFFIX,gongyichuangyi.net 537 | DOMAIN-SUFFIX,google.net 538 | DOMAIN-SUFFIX,googlecert.net 539 | DOMAIN-SUFFIX,googlefiber.net 540 | DOMAIN-SUFFIX,avail.googleflights.net 541 | DOMAIN-SUFFIX,qpx.googleflights.net 542 | DOMAIN-SUFFIX,googleflights-cn.net 543 | DOMAIN-SUFFIX,onefifteen.net 544 | DOMAIN-SUFFIX,picasaweb.net 545 | DOMAIN-SUFFIX,download.qatp1.net 546 | DOMAIN-SUFFIX,qagpublic.qatp1.net 547 | DOMAIN-SUFFIX,qualysapi.qatp1.net 548 | DOMAIN-SUFFIX,qgadmin.qcpp1.net 549 | DOMAIN-SUFFIX,scanservice1.qcpp1.net 550 | DOMAIN-SUFFIX,monitoring.qpdp1.net 551 | DOMAIN-SUFFIX,qualysguard.qpdp1.net 552 | DOMAIN-SUFFIX,recaptcha.net 553 | DOMAIN-SUFFIX,recaptcha-cn.net 554 | DOMAIN-SUFFIX,stxmosquitoproject.net 555 | DOMAIN-SUFFIX,txcloud.net 556 | DOMAIN-SUFFIX,meet.new 557 | DOMAIN-SUFFIX,unfiltered.news 558 | DOMAIN-SUFFIX,blogspot.com.ng 559 | DOMAIN-SUFFIX,google.com.ng 560 | DOMAIN-SUFFIX,google.com.ni 561 | DOMAIN-SUFFIX,blogspot.nl 562 | DOMAIN-SUFFIX,google.nl 563 | DOMAIN-SUFFIX,blogspot.no 564 | DOMAIN-SUFFIX,google.no 565 | DOMAIN-SUFFIX,google.com.np 566 | DOMAIN-SUFFIX,google.nr 567 | DOMAIN-SUFFIX,google.nu 568 | DOMAIN-SUFFIX,blogspot.co.nz 569 | DOMAIN-SUFFIX,google.co.nz 570 | DOMAIN-SUFFIX,google.com.om 571 | DOMAIN-SUFFIX,ampproject.org 572 | DOMAIN-SUFFIX,angulardart.org 573 | DOMAIN-SUFFIX,baselinestudy.org 574 | DOMAIN-SUFFIX,blink.org 575 | DOMAIN-SUFFIX,brotli.org 576 | DOMAIN-SUFFIX,bumptop.org 577 | DOMAIN-SUFFIX,certificate-transparency.org 578 | DOMAIN-SUFFIX,chromium.org 579 | DOMAIN-SUFFIX,conscrypt.org 580 | DOMAIN-SUFFIX,cookiechoices.org 581 | DOMAIN-SUFFIX,coova.org 582 | DOMAIN-SUFFIX,dartlang.org 583 | DOMAIN-SUFFIX,data-vocabulary.org 584 | DOMAIN-SUFFIX,dataliberation.org 585 | DOMAIN-SUFFIX,digitalassetlinks.org 586 | DOMAIN-SUFFIX,getoutline.org 587 | DOMAIN-SUFFIX,globaledu.org 588 | DOMAIN-SUFFIX,go-lang.org 589 | DOMAIN-SUFFIX,godoc.org 590 | DOMAIN-SUFFIX,golang.org 591 | DOMAIN-SUFFIX,google.org 592 | DOMAIN-SUFFIX,gwtproject.org 593 | DOMAIN-SUFFIX,hdrplusdata.org 594 | DOMAIN-SUFFIX,iamremarkable.org 595 | DOMAIN-SUFFIX,j2objc.org 596 | DOMAIN-SUFFIX,keytransparency.org 597 | DOMAIN-SUFFIX,onefifteen.org 598 | DOMAIN-SUFFIX,partylikeits1986.org 599 | DOMAIN-SUFFIX,paxlicense.org 600 | DOMAIN-SUFFIX,picasaweb.org 601 | DOMAIN-SUFFIX,polymer-project.org 602 | DOMAIN-SUFFIX,polymerproject.org 603 | DOMAIN-SUFFIX,schema.org 604 | DOMAIN-SUFFIX,studywatchbyverily.org 605 | DOMAIN-SUFFIX,stxmosquitoproject.org 606 | DOMAIN-SUFFIX,teachparentstech.org 607 | DOMAIN-SUFFIX,tensorflow.org 608 | DOMAIN-SUFFIX,v8project.org 609 | DOMAIN-SUFFIX,verilystudywatch.org 610 | DOMAIN-SUFFIX,waveprotocol.org 611 | DOMAIN-SUFFIX,webmproject.org 612 | DOMAIN-SUFFIX,webrtc.org 613 | DOMAIN-SUFFIX,whatbrowser.org 614 | DOMAIN-SUFFIX,google.com.pa 615 | DOMAIN-SUFFIX,g.page 616 | DOMAIN-SUFFIX,get.page 617 | DOMAIN-SUFFIX,mobileview.page 618 | DOMAIN-SUFFIX,blogspot.pe 619 | DOMAIN-SUFFIX,google.com.pe 620 | DOMAIN-SUFFIX,google.com.pg 621 | DOMAIN-SUFFIX,google.com.ph 622 | DOMAIN-SUFFIX,google.com.pk 623 | DOMAIN-SUFFIX,google.pl 624 | DOMAIN-SUFFIX,google.pn 625 | DOMAIN-SUFFIX,google.com.pr 626 | DOMAIN-SUFFIX,google.ps 627 | DOMAIN-SUFFIX,blogspot.pt 628 | DOMAIN-SUFFIX,google.pt 629 | DOMAIN-SUFFIX,google.com.py 630 | DOMAIN-SUFFIX,blogspot.qa 631 | DOMAIN-SUFFIX,google.com.qa 632 | DOMAIN-SUFFIX,blogspot.re 633 | DOMAIN-SUFFIX,blogspot.ro 634 | DOMAIN-SUFFIX,google.ro 635 | DOMAIN-SUFFIX,blogspot.rs 636 | DOMAIN-SUFFIX,google.rs 637 | DOMAIN-SUFFIX,blogspot.ru 638 | DOMAIN-SUFFIX,google.ru 639 | DOMAIN-SUFFIX,google.rw 640 | DOMAIN-SUFFIX,google.com.sa 641 | DOMAIN-SUFFIX,google.com.sb 642 | DOMAIN-SUFFIX,google.sc 643 | DOMAIN-SUFFIX,blogspot.se 644 | DOMAIN-SUFFIX,google.se 645 | DOMAIN-SUFFIX,chronicle.security 646 | DOMAIN-SUFFIX,blogspot.sg 647 | DOMAIN-SUFFIX,google.com.sg 648 | DOMAIN-SUFFIX,google.sh 649 | DOMAIN-SUFFIX,blogspot.si 650 | DOMAIN-SUFFIX,google.si 651 | DOMAIN-SUFFIX,blogspot.sk 652 | DOMAIN-SUFFIX,google.sk 653 | DOMAIN-SUFFIX,google.com.sl 654 | DOMAIN-SUFFIX,google.sm 655 | DOMAIN-SUFFIX,blogspot.sn 656 | DOMAIN-SUFFIX,google.sn 657 | DOMAIN-SUFFIX,google.so 658 | DOMAIN-SUFFIX,iam.soy 659 | DOMAIN-SUFFIX,google.sr 660 | DOMAIN-SUFFIX,google.st 661 | DOMAIN-SUFFIX,google.com.sv 662 | DOMAIN-SUFFIX,blogspot.td 663 | DOMAIN-SUFFIX,google.td 664 | DOMAIN-SUFFIX,x.team 665 | DOMAIN-SUFFIX,google.tg 666 | DOMAIN-SUFFIX,google.co.th 667 | DOMAIN-SUFFIX,google.com.tj 668 | DOMAIN-SUFFIX,google.tl 669 | DOMAIN-SUFFIX,google.tm 670 | DOMAIN-SUFFIX,google.tn 671 | DOMAIN-SUFFIX,google.to 672 | DOMAIN-SUFFIX,fastlane.tools 673 | DOMAIN-SUFFIX,blogspot.com.tr 674 | DOMAIN-SUFFIX,google.com.tr 675 | DOMAIN-SUFFIX,google.tt 676 | DOMAIN-SUFFIX,blogspot.tw 677 | DOMAIN-SUFFIX,google.com.tw 678 | DOMAIN-SUFFIX,google.co.tz 679 | DOMAIN-SUFFIX,google.com.ua 680 | DOMAIN-SUFFIX,blogspot.ug 681 | DOMAIN-SUFFIX,google.co.ug 682 | DOMAIN-SUFFIX,blogspot.co.uk 683 | DOMAIN-SUFFIX,google.co.uk 684 | DOMAIN-SUFFIX,googlecompare.co.uk 685 | DOMAIN-SUFFIX,howtogetmo.co.uk 686 | DOMAIN-SUFFIX,thinkquarterly.co.uk 687 | DOMAIN-SUFFIX,blogspot.com.uy 688 | DOMAIN-SUFFIX,google.com.uy 689 | DOMAIN-SUFFIX,google.co.uz 690 | DOMAIN-SUFFIX,google.com.vc 691 | DOMAIN-SUFFIX,google.co.ve 692 | DOMAIN-SUFFIX,google.ventures 693 | DOMAIN-SUFFIX,google.vg 694 | DOMAIN-SUFFIX,google.co.vi 695 | DOMAIN-SUFFIX,blogspot.vn 696 | DOMAIN-SUFFIX,google.com.vn 697 | DOMAIN-SUFFIX,google.vu 698 | DOMAIN-SUFFIX,google.ws 699 | DOMAIN-SUFFIX,xn--p8j9a0d9c9a.xn--q9jyb4c 700 | DOMAIN-SUFFIX,abc.xyz 701 | DOMAIN-SUFFIX,blogspot.co.za 702 | DOMAIN-SUFFIX,google.co.za 703 | DOMAIN-SUFFIX,google.co.zm 704 | DOMAIN-SUFFIX,google.co.zw 705 | DOMAIN-KEYWORD,gmail 706 | DOMAIN-KEYWORD,google 707 | DOMAIN-KEYWORD,appspot 708 | DOMAIN-KEYWORD,blogspot 709 | DOMAIN-KEYWORD,recaptcha 710 | USER-AGENT,Google.Drive* 711 | USER-AGENT,*com.google.Drive* 712 | USER-AGENT,%E4%BA%91%E7%AB%AF%E7%A1%AC%E7%9B%98* 713 | IP-CIDR,172.110.32.0/21,no-resolve 714 | IP-CIDR,216.73.80.0/20,no-resolve 715 | IP-CIDR,173.194.0.0/16,no-resolve 716 | IP-CIDR,74.125.0.0/16,no-resolve 717 | IP-CIDR6,2620:120:e000::/40,no-resolve 718 | USER-AGENT,*com.google.Drive* 719 | USER-AGENT,Google.Drive* 720 | PROCESS-NAME,com.android.vending 721 | PROCESS-NAME,com.google.android.gms 722 | PROCESS-NAME,com.google.android.gsf 723 | PROCESS-NAME,com.google.android.play.games 724 | PROCESS-NAME,BackupandSy 725 | -------------------------------------------------------------------------------- /Shell/mihomo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BLUE="\033[1;34m" 4 | GREEN="\033[1;32m" 5 | YELLOW="\033[1;33m" 6 | RED="\033[1;31m" 7 | PLAIN="\033[0m" 8 | 9 | MIHOMO_DIR="${HOME}/clash" 10 | MIHOMO_PATH="${MIHOMO_DIR}/mihomo" 11 | CONFIG_PATH="${MIHOMO_DIR}/config.yaml" 12 | SERVICE_NAME="mihomo-user" 13 | 14 | check_yq() { 15 | if ! command -v yq >/dev/null 2>&1; then 16 | echo -e "${YELLOW}[!] 未检测到 yq,正在自动安装...${PLAIN}" 17 | YQ_URL="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" 18 | if command -v curl >/dev/null 2>&1; then 19 | sudo curl -L "$YQ_URL" -o /usr/local/bin/yq 20 | elif command -v wget >/dev/null 2>&1; then 21 | sudo wget "$YQ_URL" -O /usr/local/bin/yq 22 | else 23 | echo -e "${RED}[!] curl 和 wget 都未安装,无法自动安装 yq,请手动安装。${PLAIN}" 24 | exit 1 25 | fi 26 | sudo chmod +x /usr/local/bin/yq 27 | hash -r 28 | if ! command -v yq >/dev/null 2>&1; then 29 | echo -e "${RED}[!] yq 安装失败,请手动安装。${PLAIN}" 30 | exit 1 31 | fi 32 | echo -e "${GREEN}[*] yq 已成功安装。${PLAIN}" 33 | fi 34 | } 35 | check_yq 36 | 37 | check_status() { 38 | if [ $? -ne 0 ]; then 39 | echo -e "${RED}[!] $1 失败。${PLAIN}" 40 | exit 1 41 | fi 42 | } 43 | 44 | create_systemd_service() { 45 | sudo tee /etc/systemd/system/${SERVICE_NAME}.service > /dev/null < "${MIHOMO_DIR}/mihomo.version" 102 | else 103 | echo -e "${RED}[!] 解压后未找到 mihomo 可执行文件,请检查下载或解压是否成功。${PLAIN}" 104 | exit 1 105 | fi 106 | 107 | clear 108 | echo -e "${YELLOW}[*] Tun模式: ${PLAIN}" 109 | echo -e "${GREEN} 1.${PLAIN}开启" 110 | echo -e "${GREEN} 2.${PLAIN}关闭" 111 | read -e -p "$(echo -e "${BLUE}请选择 (默认1): ${PLAIN}")" tun_choice 112 | case "$tun_choice" in 113 | 2) tun_enable=false ;; 114 | *) tun_enable=true ;; 115 | esac 116 | 117 | echo -e "${YELLOW}[*] 出站模式: ${PLAIN}" 118 | echo -e "${GREEN} 1.${PLAIN}rule" 119 | echo -e "${GREEN} 2.${PLAIN}global" 120 | echo -e "${GREEN} 3.${PLAIN}direct" 121 | read -e -p "$(echo -e "${BLUE}请选择 (默认1): ${PLAIN}")" mode_choice 122 | case "$mode_choice" in 123 | 2) mode="global" ;; 124 | 3) mode="direct" ;; 125 | *) mode="rule" ;; 126 | esac 127 | 128 | echo -e "${YELLOW}[*] WG配置: ${PLAIN}" 129 | echo -e "${GREEN}1.${PLAIN}使用默认配置" 130 | echo -e "${GREEN}2.${PLAIN}手动输入配置" 131 | read -e -p "$(echo -e "${BLUE}请选择 (默认1): ${PLAIN}")" wg_choice 132 | case "$wg_choice" in 133 | 2) 134 | read -e -p "$(echo -e "${BLUE} Private-key ${PLAIN}: ")" private_key 135 | read -e -p "$(echo -e "${BLUE} Endpoint ${PLAIN}: ")" server 136 | read -e -p "$(echo -e "${BLUE} Port ${PLAIN}: ")" port 137 | if ! [[ "$port" =~ ^[0-9]+$ ]] || [ "$port" -lt 1 ] || [ "$port" -gt 65535 ]; then 138 | echo -e "${RED}[!] 无效端口号,请输入 1-65535 之间的数字${PLAIN}" 139 | exit 1 140 | fi 141 | read -e -p "$(echo -e "${BLUE} Public-key ${PLAIN}: ")" public_key 142 | read -e -p "$(echo -e "${BLUE} MTU ${PLAIN}: ")" mtu 143 | ;; 144 | *) 145 | private_key="eMCyIN4iJrc9jeot1L+53I1N7whB3AVlMYCF43yJfnQ=" 146 | server="162.159.193.8" 147 | port="2408" 148 | public_key="bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=" 149 | mtu="1280" 150 | ;; 151 | esac 152 | 153 | echo -e "${YELLOW}[*] SOCKS端口: ${PLAIN}" 154 | read -e -p "$(echo -e "${BLUE} socks-port ${PLAIN}${BLUE}[默认: 18443]${PLAIN}: ")" socks_port 155 | socks_port=${socks_port:-18443} 156 | 157 | echo -e "${YELLOW}[*] SOCKS地址: ${PLAIN}" 158 | echo -e "${GREEN} 1.${PLAIN}127.0.0.1 (仅本地访问)" 159 | echo -e "${GREEN} 2.${PLAIN}0.0.0.0 (允许公网访问)" 160 | read -e -p "$(echo -e "${BLUE}请输入选项 [1/2] (默认1): ${PLAIN}")" bind_choice 161 | case "$bind_choice" in 162 | 2) bind_address="0.0.0.0" ;; 163 | *) bind_address="127.0.0.1" ;; 164 | esac 165 | 166 | echo -e "${YELLOW}[*] SOCKS认证: ${PLAIN}" 167 | echo -e "${GREEN} 1.${PLAIN}开启" 168 | echo -e "${GREEN} 2.${PLAIN}关闭" 169 | read -e -p "$(echo -e "${BLUE}请选择 (默认2): ${PLAIN}")" auth_choice 170 | case "$auth_choice" in 171 | 1) 172 | read -e -p "$(echo -e "${BLUE} 用户名 (默认admin): ${PLAIN}")" auth_user 173 | read -e -p "$(echo -e "${BLUE} 密码 (默认admin): ${PLAIN}")" auth_pass 174 | auth_user=${auth_user:-admin} 175 | auth_pass=${auth_pass:-admin} 176 | authentication_config="authentication:\n - \"$auth_user:$auth_pass\"" 177 | ;; 178 | *) 179 | authentication_config="" 180 | ;; 181 | esac 182 | 183 | echo -e "${YELLOW}[*] 控制器地址: ${PLAIN}" 184 | echo -e "${GREEN} 1.${PLAIN}开启公网访问 (0.0.0.0:port)" 185 | echo -e "${GREEN} 2.${PLAIN}仅本机访问 (127.0.0.1:port)" 186 | read -e -p "$(echo -e "${BLUE}请选择 (默认2): ${PLAIN}")" ext_ctrl_choice 187 | case "$ext_ctrl_choice" in 188 | 1) 189 | ext_ctrl_addr="0.0.0.0" 190 | ;; 191 | *) 192 | ext_ctrl_addr="127.0.0.1" 193 | ;; 194 | esac 195 | read -e -p "$(echo -e "${BLUE}控制器端口[默认9090]: ${PLAIN}")" ext_ctrl_port 196 | ext_ctrl_port=${ext_ctrl_port:-9090} 197 | external_controller="${ext_ctrl_addr}:${ext_ctrl_port}" 198 | 199 | read -e -p "$(echo -e "${BLUE}控制器密码(留空为无密码): ${PLAIN}")" ext_ctrl_secret 200 | ext_ctrl_secret=${ext_ctrl_secret:-""} 201 | 202 | clear 203 | echo -e "${BLUE}[*] 创建 config.yaml 配置文件...${PLAIN}" 204 | cat < config.yaml 205 | tun: 206 | enable: $tun_enable 207 | stack: system 208 | dns-hijack: 209 | - any:53 210 | auto-route: true 211 | strict-route: true 212 | auto-redirect: true 213 | auto-detect-interface: true 214 | tcp-concurrent: true 215 | find-process-mode: off 216 | allow-lan: false 217 | socks-port: $socks_port 218 | bind-address: "$bind_address" 219 | external-controller: "$external_controller" 220 | secret: "$ext_ctrl_secret" 221 | $(if [ -n "$authentication_config" ]; then echo -e "$authentication_config"; fi) 222 | mode: $mode 223 | log-level: silent 224 | ipv6: true 225 | profile: 226 | store-selected: true 227 | store-fake-ip: true 228 | sniffer: 229 | enable: false 230 | dns: 231 | enable: true 232 | listen: :53 233 | ipv6: true 234 | nameserver: 235 | - 8.8.8.8 236 | - 1.1.1.1 237 | enhanced-mode: redir-host 238 | proxies: 239 | - name: "warp" 240 | type: wireguard 241 | private-key: $private_key 242 | server: $server 243 | port: $port 244 | ip: 172.16.0.2 245 | public-key: $public_key 246 | allowed-ips: ['0.0.0.0/0', '::/0'] 247 | udp: true 248 | mtu: $mtu 249 | rule-providers: 250 | OpenAI: 251 | type: http 252 | behavior: classical 253 | format: text 254 | path: ./Rule/OpenAI 255 | url: https://raw.githubusercontent.com/Emokui/Nothing/Zero/Rule/OpenAI 256 | interval: 86400 257 | YouTube: 258 | type: http 259 | behavior: classical 260 | format: text 261 | path: ./Rule/YouTube 262 | url: https://raw.githubusercontent.com/Emokui/Nothing/Zero/Rule/YouTube 263 | interval: 86400 264 | rules: 265 | - RULE-SET,YouTube,warp 266 | - RULE-SET,OpenAI,warp 267 | - MATCH,DIRECT 268 | EOF 269 | check_status "创建配置文件" 270 | 271 | echo -e "${BLUE}[*] 配置 systemd service ...${PLAIN}" 272 | create_systemd_service 273 | 274 | sudo systemctl daemon-reload 275 | sudo systemctl enable --now ${SERVICE_NAME}.service 276 | echo -e "${GREEN}[*] Mihomo 安装完成,已自动启动。${PLAIN}" 277 | echo -e "${BLUE}你可以用 'sudo systemctl [start|stop|restart|status] ${SERVICE_NAME}' 管理 Mihomo${PLAIN}" 278 | 279 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 280 | clear 281 | } 282 | 283 | update_mihomo() { 284 | clear 285 | echo -e "${BLUE}[*] 开始更新 Mihomo...${PLAIN}" 286 | cd "$MIHOMO_DIR" || { echo -e "${RED}[!] 无法进入 $MIHOMO_DIR 目录。${PLAIN}"; exit 1; } 287 | result=$(get_latest_mihomo_url_and_version) 288 | download_url="${result%|*}" 289 | latest_version="${result#*|}" 290 | 291 | current_version=$(get_current_mihomo_version) 292 | 293 | if [ "$current_version" = "$latest_version" ]; then 294 | echo -e "${GREEN}[*] 当前已是最新版 Mihomo ($latest_version),无需更新。${PLAIN}" 295 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 296 | clear 297 | return 298 | fi 299 | 300 | echo -e "${BLUE}[*] 下载 Mihomo: $download_url ${PLAIN}" 301 | wget "$download_url" -O "mihomo.gz" 302 | check_status "下载 Mihomo" 303 | 304 | gunzip -f "mihomo.gz" 305 | if [ -f "mihomo" ]; then 306 | chmod +x mihomo 307 | check_status "设置执行权限" 308 | echo "${latest_version}" > "${MIHOMO_DIR}/mihomo.version" 309 | else 310 | echo -e "${RED}[!] 解压后未找到 mihomo 可执行文件,请检查下载或解压是否成功。${PLAIN}" 311 | exit 1 312 | fi 313 | 314 | clear 315 | echo -e "${BLUE}[*] 重启 Mihomo systemd 服务...${PLAIN}" 316 | sudo systemctl restart ${SERVICE_NAME}.service 317 | sleep 2 318 | sudo systemctl status --no-pager ${SERVICE_NAME}.service 319 | 320 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 321 | clear 322 | } 323 | 324 | modify_mihomo_config() { 325 | if [ ! -f "$CONFIG_PATH" ]; then 326 | echo -e "${RED}[!] 未找到 $CONFIG_PATH 配置文件,请先安装 Mihomo。${PLAIN}" 327 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键返回...${PLAIN}")" 328 | clear 329 | return 330 | fi 331 | 332 | tun_enable=$(yq e '.tun.enable' "$CONFIG_PATH") 333 | mode_val=$(yq e '.mode' "$CONFIG_PATH") 334 | socks_port=$(yq e '.socks-port' "$CONFIG_PATH") 335 | bind_address=$(yq e '.bind-address' "$CONFIG_PATH" | tr -d '"') 336 | has_auth=$(yq e '.authentication // ""' "$CONFIG_PATH") 337 | auth_user_pass=$(yq e '.authentication[0]' "$CONFIG_PATH") 338 | auth_user=$(echo "$auth_user_pass" | cut -d: -f1) 339 | auth_pass=$(echo "$auth_user_pass" | cut -d: -f2) 340 | private_key=$(yq e '.proxies[] | select(.name == "warp") | .private-key' "$CONFIG_PATH") 341 | server=$(yq e '.proxies[] | select(.name == "warp") | .server' "$CONFIG_PATH") 342 | port=$(yq e '.proxies[] | select(.name == "warp") | .port' "$CONFIG_PATH") 343 | public_key=$(yq e '.proxies[] | select(.name == "warp") | .public-key' "$CONFIG_PATH") 344 | mtu=$(yq e '.proxies[] | select(.name == "warp") | .mtu' "$CONFIG_PATH") 345 | ext_ctrl=$(yq e '.external-controller' "$CONFIG_PATH" | tr -d '"') 346 | ext_secret=$(yq e '.secret' "$CONFIG_PATH" | tr -d '"') 347 | 348 | while true; do 349 | clear 350 | echo -e "${BLUE}✦ Mihomo 配置修改 ✦${PLAIN}" 351 | echo -e "${GREEN} 1.${PLAIN}Tun模式: ${YELLOW}$tun_enable${PLAIN}" 352 | echo -e "${GREEN} 2.${PLAIN}出站模式: ${YELLOW}${mode_val}${PLAIN}" 353 | echo -e "${GREEN} 3.${PLAIN}SOCKS端口: ${YELLOW}${socks_port:-无}${PLAIN}" 354 | echo -e "${GREEN} 4.${PLAIN}SOCKS地址: ${YELLOW}${bind_address:-127.0.0.1}${PLAIN}" 355 | echo -e "${GREEN} 5.${PLAIN}SOCKS认证: ${YELLOW}${has_auth:-无}${PLAIN}" 356 | echo -e "${GREEN} 6.${PLAIN}WG Private-key: ${YELLOW}$private_key${PLAIN}" 357 | echo -e "${GREEN} 7.${PLAIN}WG Endpoint: ${YELLOW}$server${PLAIN}" 358 | echo -e "${GREEN} 8.${PLAIN}WG Port: ${YELLOW}$port${PLAIN}" 359 | echo -e "${GREEN} 9.${PLAIN}WG Public-key: ${YELLOW}$public_key${PLAIN}" 360 | echo -e "${GREEN} 10.${PLAIN}WG MTU: ${YELLOW}$mtu${PLAIN}" 361 | echo -e "${GREEN} 11.${PLAIN}控制器地址: ${YELLOW}${ext_ctrl}${PLAIN}" 362 | echo -e "${GREEN} 12.${PLAIN}控制器密码: ${YELLOW}${ext_secret}${PLAIN}" 363 | echo -e "${GREEN} 0.${PLAIN}保存并重启 Mihomo 服务${PLAIN}" 364 | echo -e "${GREEN} q.${PLAIN}放弃修改并返回${PLAIN}" 365 | read -e -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" modchoice 366 | 367 | case $modchoice in 368 | 1) 369 | read -e -p "$(echo -e "${BLUE}Tun模式 (true/false) [当前:$tun_enable]: ${PLAIN}")" newval 370 | newval=${newval:-$tun_enable} 371 | yq e '.tun.enable = '"$newval"'' -i "$CONFIG_PATH" 372 | tun_enable="$newval" 373 | ;; 374 | 2) 375 | echo -e "${YELLOW}Mode出站模式:${PLAIN}" 376 | echo -e "${GREEN} 1.${PLAIN}rule(规则模式)" 377 | echo -e "${GREEN} 2.${PLAIN}global(全局模式)" 378 | echo -e "${GREEN} 3.${PLAIN}direct(直连模式)" 379 | read -e -p "$(echo -e "${BLUE}请选择 [1/2/3] (当前:${mode_val:-rule}): ${PLAIN}")" mode_choice 380 | case "$mode_choice" in 381 | 2) newmode="global" ;; 382 | 3) newmode="direct" ;; 383 | 1|"") newmode="rule" ;; 384 | *) echo -e "${RED}无效选项,未更改。${PLAIN}"; read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")"; continue ;; 385 | esac 386 | yq e '.mode = "'"$newmode"'"' -i "$CONFIG_PATH" 387 | mode_val="$newmode" 388 | ;; 389 | 3) 390 | read -e -p "$(echo -e "${BLUE}SOCKS端口[当前:$socks_port]: ${PLAIN}")" newval 391 | newval=${newval:-$socks_port} 392 | yq e '.socks-port = '"$newval"'' -i "$CONFIG_PATH" 393 | socks_port="$newval" 394 | ;; 395 | 4) 396 | echo -e "${YELLOW}SOCKS地址:${PLAIN}" 397 | echo -e "${GREEN}1.${PLAIN}127.0.0.1 (仅本地访问)" 398 | echo -e "${GREEN}2.${PLAIN}0.0.0.0 (允许外部访问)" 399 | read -e -p "$(echo -e "${BLUE}请选择 [1/2] (当前:${bind_address:-127.0.0.1}): ${PLAIN}")" bind_choice 400 | case "$bind_choice" in 401 | 2) newval="0.0.0.0" ;; 402 | *) newval="127.0.0.1" ;; 403 | esac 404 | yq e '.bind-address = "'"$newval"'"' -i "$CONFIG_PATH" 405 | bind_address="$newval" 406 | ;; 407 | 5) 408 | echo -e "${YELLOW}SOCKS5认证?${PLAIN}" 409 | read -e -p "$(echo -e "${BLUE}启用y,禁用n [y/n] (当前: ${has_auth:-n}): ${PLAIN}")" auth_enable 410 | auth_enable=${auth_enable:-n} 411 | if [[ "$auth_enable" == "y" || "$auth_enable" == "Y" ]]; then 412 | read -e -p "$(echo -e "${BLUE}请输入用户名(默认admin): ${PLAIN}")" newuser 413 | read -e -p "$(echo -e "${BLUE}请输入密码(默认admin): ${PLAIN}")" newpass 414 | newuser=${newuser:-admin} 415 | newpass=${newpass:-admin} 416 | yq e '.authentication = ["'"$newuser:$newpass"'"]' -i "$CONFIG_PATH" 417 | has_auth="yes" 418 | auth_user="$newuser" 419 | auth_pass="$newpass" 420 | else 421 | yq e 'del(.authentication)' -i "$CONFIG_PATH" 422 | has_auth="" 423 | auth_user="" 424 | auth_pass="" 425 | fi 426 | ;; 427 | 6) 428 | read -e -p "$(echo -e "${BLUE}WG Private-key [当前:$private_key]: ${PLAIN}")" newval 429 | newval=${newval:-$private_key} 430 | yq e '(.proxies[] | select(.name == "warp") ).private-key = "'"$newval"'"' -i "$CONFIG_PATH" 431 | private_key="$newval" 432 | ;; 433 | 7) 434 | read -e -p "$(echo -e "${BLUE}WG Server [当前:$server]: ${PLAIN}")" newval 435 | newval=${newval:-$server} 436 | yq e '(.proxies[] | select(.name == "warp") ).server = "'"$newval"'"' -i "$CONFIG_PATH" 437 | server="$newval" 438 | ;; 439 | 8) 440 | read -e -p "$(echo -e "${BLUE}WG Port [当前:$port]: ${PLAIN}")" newval 441 | newval=${newval:-$port} 442 | yq e '(.proxies[] | select(.name == "warp") ).port = '"$newval"'' -i "$CONFIG_PATH" 443 | port="$newval" 444 | ;; 445 | 9) 446 | read -e -p "$(echo -e "${BLUE}WG Public-key [当前:$public_key]: ${PLAIN}")" newval 447 | newval=${newval:-$public_key} 448 | yq e '(.proxies[] | select(.name == "warp") ).public-key = "'"$newval"'"' -i "$CONFIG_PATH" 449 | public_key="$newval" 450 | ;; 451 | 10) 452 | read -e -p "$(echo -e "${BLUE}WG MTU [当前:$mtu]: ${PLAIN}")" newval 453 | newval=${newval:-$mtu} 454 | yq e '(.proxies[] | select(.name == "warp") ).mtu = '"$newval"'' -i "$CONFIG_PATH" 455 | mtu="$newval" 456 | ;; 457 | 11) 458 | echo -e "${YELLOW}控制器地址:${PLAIN}" 459 | echo -e "${GREEN}1.${PLAIN}开启公网访问(0.0.0.0)" 460 | echo -e "${GREEN}2.${PLAIN}仅本机访问(127.0.0.1)" 461 | read -e -p "$(echo -e "${BLUE}请选择 [1/2] (当前:${ext_ctrl:-127.0.0.1:9090}): ${PLAIN}")" ext_ctrl_choice 462 | case "$ext_ctrl_choice" in 463 | 1) ext_ctrl_addr="0.0.0.0" ;; 464 | *) ext_ctrl_addr="127.0.0.1" ;; 465 | esac 466 | curr_port=$(echo "$ext_ctrl" | awk -F: '{print $2}') 467 | read -e -p "$(echo -e "${BLUE}控制器端口 [当前:${curr_port:-9090}]: ${PLAIN}")" ext_ctrl_port 468 | ext_ctrl_port=${ext_ctrl_port:-${curr_port:-9090}} 469 | ext_ctrl_val="${ext_ctrl_addr}:${ext_ctrl_port}" 470 | yq e '.external-controller = "'"$ext_ctrl_val"'"' -i "$CONFIG_PATH" 471 | ext_ctrl="$ext_ctrl_val" 472 | ;; 473 | 12) 474 | read -e -p "$(echo -e "${BLUE}控制器密码(留空为无密码,当前:${ext_secret}): ${PLAIN}")" new_secret 475 | yq e '.secret = "'"$new_secret"'"' -i "$CONFIG_PATH" 476 | ext_secret="$new_secret" 477 | ;; 478 | 0) 479 | clear 480 | echo -e "${BLUE}[*] 保存并重启 Mihomo 服务...${PLAIN}" 481 | sudo systemctl restart ${SERVICE_NAME}.service 482 | sleep 2 483 | sudo systemctl status --no-pager ${SERVICE_NAME}.service 484 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键返回主菜单...${PLAIN}")" 485 | clear 486 | break 487 | ;; 488 | q|Q) 489 | echo -e "${BLUE}[*] 放弃修改,返回主菜单...${PLAIN}" 490 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键返回主菜单...${PLAIN}")" 491 | clear 492 | break 493 | ;; 494 | *) 495 | echo -e "${RED}无效选项,请重新选择。${PLAIN}" 496 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 497 | ;; 498 | esac 499 | done 500 | } 501 | 502 | delete_mihomo() { 503 | clear 504 | echo -e "${RED}[!] 此操作将停止并彻底删除 Mihomo 及其配置,无法恢复!${PLAIN}" 505 | read -e -p "$(echo -e "${YELLOW}确定要删除 Mihomo 及配置吗?(y/n): ${PLAIN}")" confirm 506 | if [[ "$confirm" == "y" || "$confirm" == "Y" ]]; then 507 | echo -e "${BLUE}[*] 停止并禁用 Mihomo systemd...${PLAIN}" 508 | sudo systemctl stop ${SERVICE_NAME}.service 509 | sudo systemctl disable ${SERVICE_NAME}.service 510 | sudo rm -f /etc/systemd/system/${SERVICE_NAME}.service 511 | sudo systemctl daemon-reload 512 | 513 | if [ -d "$MIHOMO_DIR" ]; then 514 | rm -rf "$MIHOMO_DIR" 515 | if [ ! -d "$MIHOMO_DIR" ]; then 516 | echo -e "${GREEN}[*] 已彻底删除 $MIHOMO_DIR 及其中所有内容。${PLAIN}" 517 | else 518 | echo -e "${RED}[!] 删除失败,请检查权限。${PLAIN}" 519 | fi 520 | else 521 | echo -e "${GREEN}[*] 未检测到 $MIHOMO_DIR 目录。${PLAIN}" 522 | fi 523 | echo -e "${GREEN}[*] Mihomo 及配置、systemd单元已全部删除。${PLAIN}" 524 | 525 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 526 | clear 527 | else 528 | echo -e "${BLUE}[*] 已取消删除操作。${PLAIN}" 529 | 530 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 531 | clear 532 | fi 533 | } 534 | 535 | manage_service() { 536 | while true; do 537 | clear 538 | echo -e "${BLUE}✦ Mihomo_Menu ✦${PLAIN}" 539 | echo -e "${GREEN} 1.${PLAIN}查看状态" 540 | echo -e "${GREEN} 2.${PLAIN}修改配置" 541 | echo -e "${GREEN} 3.${PLAIN}停止Mihomo" 542 | echo -e "${GREEN} 4.${PLAIN}重启Mihomo" 543 | echo -e "${GREEN} 5.${PLAIN}删除Mihomo" 544 | echo -e "${GREEN} 0.${PLAIN}返回Kongroo" 545 | read -e -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" subchoice 546 | 547 | case $subchoice in 548 | 1) 549 | clear 550 | echo -e "${BLUE}[*] systemd 查看 Mihomo 状态...${PLAIN}" 551 | sudo systemctl status --no-pager ${SERVICE_NAME}.service 552 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 553 | clear 554 | ;; 555 | 2) 556 | modify_mihomo_config 557 | ;; 558 | 3) 559 | echo -e "${BLUE}[*] systemd 停止 Mihomo...${PLAIN}" 560 | sudo systemctl stop ${SERVICE_NAME}.service 561 | echo -e "${GREEN}[*] Mihomo 已停止${PLAIN}" 562 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 563 | clear 564 | ;; 565 | 4) 566 | echo -e "${BLUE}[*] systemd 重启 Mihomo...${PLAIN}" 567 | sudo systemctl restart ${SERVICE_NAME}.service 568 | echo -e "${GREEN}[*] Mihomo 已重启${PLAIN}" 569 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 570 | clear 571 | ;; 572 | 5) 573 | delete_mihomo 574 | break 575 | ;; 576 | 0) 577 | echo -e "${BLUE}[*] 返回主菜单...${PLAIN}" 578 | clear 579 | break 580 | ;; 581 | *) 582 | echo -e "${RED}无效选项,请重新选择。${PLAIN}" 583 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 584 | clear 585 | ;; 586 | esac 587 | done 588 | } 589 | 590 | while true; do 591 | clear 592 | echo -e "${BLUE}✦ Mihomo_Ver.1.2 ✦${PLAIN}" 593 | echo -e "${GREEN} 1.${PLAIN}安装Mihomo" 594 | echo -e "${GREEN} 2.${PLAIN}管理Mihomo" 595 | echo -e "${GREEN} 3.${PLAIN}更新Mihomo" 596 | echo -e "${GREEN} 0.${PLAIN}退出Kongroo" 597 | read -e -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" choice 598 | 599 | case $choice in 600 | 1) install_mihomo ;; 601 | 2) 602 | if [ ! -f "$MIHOMO_PATH" ]; then 603 | echo -e "${RED}[!] Mihomo 未安装,请先选择选项 1。${PLAIN}" 604 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 605 | clear 606 | continue 607 | fi 608 | manage_service 609 | ;; 610 | 3) 611 | if [ ! -d "${HOME}/clash" ]; then 612 | echo -e "${RED}[!] 未找到 ~/clash 目录,请先选择选项 1 安装。${PLAIN}" 613 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 614 | clear 615 | continue 616 | fi 617 | update_mihomo 618 | ;; 619 | 0) 620 | exit 0 ;; 621 | *) 622 | echo -e "${RED}无效选项,请重新选择。${PLAIN}" 623 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 624 | clear 625 | ;; 626 | esac 627 | done 628 | -------------------------------------------------------------------------------- /Shell/snell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RED='\033[0;31m' 4 | GREEN="\033[1;32m" 5 | YELLOW='\033[1;33m' 6 | BLUE="\033[1;34m" 7 | PLAIN='\033[0m' 8 | 9 | SNELL_BIN="/usr/local/bin/snell-server" 10 | SNELL_ETC="/etc/snell" 11 | SNELL_CONFIGS="${SNELL_ETC}/configs" 12 | SNELL_VERSION_FILE="${SNELL_ETC}/version" 13 | TFO_SYSCTL_CONF="/etc/sysctl.d/local.conf" 14 | 15 | pause_and_clear() { 16 | read -n 1 -s -r -p "$(echo -e "${YELLOW}按任意键继续...${PLAIN}")" 17 | clear 18 | } 19 | 20 | snell_installed() { 21 | [[ -f "$SNELL_BIN" ]] && [[ -x "$SNELL_BIN" ]] 22 | } 23 | 24 | snell_config_exists() { 25 | shopt -s nullglob 26 | local files=("$SNELL_CONFIGS"/*.conf) 27 | [[ -d "$SNELL_CONFIGS" && ${#files[@]} -gt 0 ]] 28 | } 29 | 30 | tfo_enabled() { 31 | [[ "$(sysctl -n net.ipv4.tcp_fastopen 2>/dev/null)" == "3" ]] \ 32 | && grep -Eq '^\s*net\.ipv4\.tcp_fastopen\s*=\s*3\s*$' "$TFO_SYSCTL_CONF" 2>/dev/null 33 | } 34 | 35 | has_ipv4() { 36 | ip -4 addr show scope global | grep -q inet 37 | } 38 | 39 | get_latest_snell_version() { 40 | uname_arch=$(uname -m) 41 | if [[ "$uname_arch" == "i686" ]] || [[ "$uname_arch" == "i386" ]]; then 42 | arch="i386" 43 | elif [[ "$uname_arch" == *"armv7"* ]] || [[ "$uname_arch" == "armv6l" ]]; then 44 | arch="armv7l" 45 | elif [[ "$uname_arch" == *"armv8"* ]] || [[ "$uname_arch" == "aarch64" ]] || [[ "$uname_arch" == "arm64" ]]; then 46 | arch="aarch64" 47 | else 48 | arch="amd64" 49 | fi 50 | 51 | page=$(curl -s "https://kb.nssurge.com/surge-knowledge-base/zh/release-notes/snell") 52 | 53 | all_links=$(echo "$page" | grep -oE "https://dl.nssurge.com/snell/snell-server-v[0-9]+\.[0-9]+\.[0-9]+[a-z0-9]*-linux-${arch}\.zip") 54 | 55 | latest_stable=$(echo "$all_links" | grep -vE 'b[0-9]+|beta' | sort -V | tail -n 1) 56 | latest_beta=$(echo "$all_links" | grep -E 'b[0-9]+|beta' | sort -V | tail -n 1) 57 | 58 | if ! has_ipv4; then 59 | latest_stable=$(echo "$latest_stable" | sed 's|dl.nssurge.com|snell-cdn.pages.dev|') 60 | latest_beta=$(echo "$latest_beta" | sed 's|dl.nssurge.com|snell-cdn.pages.dev|') 61 | fi 62 | 63 | if [[ -n "$latest_stable" ]]; then 64 | SNELL_VERSION=$(echo "$latest_stable" | sed -E "s/.*snell-server-(v[0-9]+\.[0-9]+\.[0-9]+)-linux-${arch}\.zip/\1/") 65 | SNELL_ZIP=$(basename "$latest_stable") 66 | SNELL_URL="$latest_stable" 67 | SNELL_ARCH="$arch" 68 | else 69 | SNELL_VERSION="" 70 | SNELL_ZIP="" 71 | SNELL_URL="" 72 | SNELL_ARCH="$arch" 73 | fi 74 | 75 | if [[ -n "$latest_beta" ]]; then 76 | SNELL_BETA_VERSION=$(echo "$latest_beta" | sed -E "s/.*snell-server-(v[0-9]+\.[0-9]+\.[0-9]+[a-z0-9]*)-linux-${arch}\.zip/\1/") 77 | SNELL_BETA_ZIP=$(basename "$latest_beta") 78 | SNELL_BETA_URL="$latest_beta" 79 | SNELL_BETA_ARCH="$arch" 80 | else 81 | SNELL_BETA_VERSION="" 82 | SNELL_BETA_ZIP="" 83 | SNELL_BETA_URL="" 84 | SNELL_BETA_ARCH="$arch" 85 | fi 86 | } 87 | 88 | get_latest_snell_beta_version() { 89 | get_latest_snell_version 90 | SNELL_VERSION="$SNELL_BETA_VERSION" 91 | SNELL_ZIP="$SNELL_BETA_ZIP" 92 | SNELL_URL="$SNELL_BETA_URL" 93 | SNELL_ARCH="$SNELL_BETA_ARCH" 94 | } 95 | 96 | rollback_snell_v4() { 97 | clear 98 | SNELL_VERSION_TARGET="v4.1.1" 99 | if [[ -f "$SNELL_VERSION_FILE" ]]; then 100 | current_ver=$(cat "$SNELL_VERSION_FILE") 101 | if [[ "$current_ver" == "$SNELL_VERSION_TARGET" ]] && [[ -f "$SNELL_BIN" ]]; then 102 | echo -e "${GREEN}Snell 当前已是 v4.1.1 版本 ${PLAIN}" 103 | pause_and_clear 104 | return 0 105 | fi 106 | fi 107 | 108 | uname_arch=$(uname -m) 109 | if [[ "$uname_arch" == "i686" ]] || [[ "$uname_arch" == "i386" ]]; then 110 | arch="i386" 111 | elif [[ "$uname_arch" == *"armv7"* ]] || [[ "$uname_arch" == "armv6l" ]]; then 112 | arch="armv7l" 113 | elif [[ "$uname_arch" == *"armv8"* ]] || [[ "$uname_arch" == "aarch64" ]] || [[ "$uname_arch" == "arm64" ]]; then 114 | arch="aarch64" 115 | else 116 | arch="amd64" 117 | fi 118 | 119 | SNELL_ZIP="snell-server-v4.1.1-linux-${arch}.zip" 120 | SNELL_URL="https://dl.nssurge.com/snell/snell-server-v4.1.1-linux-${arch}.zip" 121 | if ! has_ipv4; then 122 | SNELL_URL="https://snell-cdn.pages.dev/snell/snell-server-v4.1.1-linux-${arch}.zip" 123 | fi 124 | 125 | mkdir -p "$SNELL_ETC" 126 | cd /tmp 127 | echo -e "${YELLOW}下载 Snell v4.1.1(${arch})...${PLAIN}" 128 | wget --no-check-certificate -N "$SNELL_URL" -O "$SNELL_ZIP" 129 | if [[ ! -e "$SNELL_ZIP" ]]; then 130 | echo -e "${RED}Snell v4.1.1 下载失败,请检查网络连接!${PLAIN}" 131 | pause_and_clear 132 | return 1 133 | else 134 | install_unzip_if_missing 135 | unzip -o "$SNELL_ZIP" 136 | fi 137 | 138 | if [[ ! -e "snell-server" ]]; then 139 | echo -e "${RED}Snell v4.1.1 解压失败!${PLAIN}" 140 | pause_and_clear 141 | return 1 142 | else 143 | rm -f "$SNELL_ZIP" 144 | chmod +x snell-server 145 | mv -f snell-server "${SNELL_BIN}" 146 | echo "$SNELL_VERSION_TARGET" > "${SNELL_VERSION_FILE}" 147 | echo -e "${GREEN}Snell 已回退到 v4.1.1${PLAIN}" 148 | echo -e "${YELLOW}正在重启所有 Snell 服务...${PLAIN}" 149 | systemctl daemon-reload 150 | for svc in /etc/systemd/system/snell@*.service; do 151 | [ ! -e "$svc" ] && continue 152 | svc_name=$(basename "$svc") 153 | systemctl restart "$svc_name" 154 | echo -e "${GREEN}已重启服务: $svc_name${PLAIN}" 155 | done 156 | echo -e "${GREEN}所有 Snell 服务已重启${PLAIN}" 157 | pause_and_clear 158 | return 0 159 | fi 160 | } 161 | 162 | install_unzip_if_missing() { 163 | if ! command -v unzip >/dev/null 2>&1; then 164 | echo -e "${YELLOW}未检测到 unzip,正在自动安装...${PLAIN}" 165 | if command -v apt &>/dev/null; then 166 | apt update && apt install -y unzip 167 | elif command -v dnf &>/dev/null; then 168 | dnf install -y unzip 169 | elif command -v yum &>/dev/null; then 170 | yum install -y unzip 171 | elif command -v apk &>/dev/null; then 172 | apk add unzip 173 | elif command -v pacman &>/dev/null; then 174 | pacman -Sy --noconfirm unzip 175 | elif command -v zypper &>/dev/null; then 176 | zypper --non-interactive install unzip 177 | else 178 | echo -e "${RED}无法识别的包管理器,unzip 安装失败,请手动安装!${PLAIN}" 179 | exit 1 180 | fi 181 | echo -e "${GREEN}unzip 安装完成${PLAIN}" 182 | fi 183 | } 184 | 185 | auto_enable_tcp_fastopen() { 186 | local sysctl_conf="$TFO_SYSCTL_CONF" 187 | mkdir -p "$(dirname "$sysctl_conf")" 188 | 189 | local sysctl_content=$(cat <<'EOF' 190 | net.core.netdev_max_backlog = 4096 191 | net.core.somaxconn = 4096 192 | net.ipv4.tcp_max_syn_backlog = 4096 193 | net.ipv4.tcp_syncookies = 1 194 | net.ipv4.tcp_tw_reuse = 1 195 | net.ipv4.tcp_fin_timeout = 30 196 | net.ipv4.ip_local_port_range = 10000 65000 197 | net.ipv4.tcp_fastopen = 3 198 | net.ipv4.tcp_mtu_probing = 1 199 | net.core.default_qdisc = fq 200 | net.ipv4.tcp_congestion_control = bbr 201 | net.core.rmem_max = 8388608 202 | net.core.wmem_max = 8388608 203 | net.core.optmem_max = 4194304 204 | net.ipv4.udp_rmem_min = 8192 205 | net.ipv4.udp_wmem_min = 8192 206 | EOF 207 | ) 208 | 209 | if [[ ! -f "$sysctl_conf" ]]; then 210 | echo "$sysctl_content" >"$sysctl_conf" 211 | sysctl --system >/dev/null 2>&1 212 | else 213 | local cur="$(sysctl -n net.ipv4.tcp_fastopen 2>/dev/null)" 214 | if [[ "$cur" != "3" ]] && ! grep -Eq '^\s*net\.ipv4\.tcp_fastopen\s*=\s*3\s*$' "$sysctl_conf"; then 215 | echo "$sysctl_content" >"$sysctl_conf" 216 | sysctl --system >/dev/null 2>&1 217 | fi 218 | fi 219 | 220 | [ -w /proc/sys/net/ipv4/tcp_fastopen ] && echo 3 > /proc/sys/net/ipv4/tcp_fastopen 221 | } 222 | 223 | install_snell() { 224 | clear 225 | if snell_installed; then 226 | echo -e "${YELLOW}Snell 已安装,如需更新请选择【4.更新 Snell】${PLAIN}" 227 | pause_and_clear 228 | return 229 | fi 230 | echo -e "${BLUE}开始安装 Snell...${PLAIN}" 231 | 232 | get_latest_snell_version 233 | 234 | if [[ -z "$SNELL_VERSION" || -z "$SNELL_URL" ]]; then 235 | echo -e "${RED}未获取到 Snell 最新正式版信息,请检查网络或稍后再试!${PLAIN}" 236 | pause_and_clear 237 | return 1 238 | fi 239 | 240 | mkdir -p "$SNELL_ETC" 241 | mkdir -p "$SNELL_CONFIGS" 242 | cd /tmp 243 | 244 | echo -e "${YELLOW}下载 Snell(${SNELL_ARCH},${SNELL_VERSION})...${PLAIN}" 245 | wget --no-check-certificate -N "$SNELL_URL" -O "$SNELL_ZIP" 246 | if [[ ! -e "$SNELL_ZIP" ]]; then 247 | echo -e "${RED}Snell 下载失败,请检查网络连接!${PLAIN}" 248 | pause_and_clear 249 | return 1 250 | else 251 | install_unzip_if_missing 252 | unzip -o "$SNELL_ZIP" 253 | fi 254 | 255 | if [[ ! -e "snell-server" ]]; then 256 | echo -e "${RED}Snell 解压失败!${PLAIN}" 257 | pause_and_clear 258 | return 1 259 | else 260 | rm -f "$SNELL_ZIP" 261 | chmod +x snell-server 262 | mv -f snell-server "${SNELL_BIN}" 263 | echo "$SNELL_VERSION" > "${SNELL_VERSION_FILE}" 264 | echo -e "${GREEN}Snell (${SNELL_ARCH}) 已下载安装完成${PLAIN}" 265 | echo -e "${BLUE}请选择【2.配置 Snell】生成并管理配置文件${PLAIN}" 266 | pause_and_clear 267 | return 0 268 | fi 269 | } 270 | 271 | update_snell_stable() { 272 | clear 273 | if ! snell_installed; then 274 | echo -e "${YELLOW}检测到未安装Snell,请先安装并配置${PLAIN}" 275 | pause_and_clear 276 | return 1 277 | fi 278 | 279 | echo -e "${BLUE}开始检查并更新 Snell 正式版 ...${PLAIN}" 280 | 281 | get_latest_snell_version 282 | 283 | if [[ -z "$SNELL_VERSION" || -z "$SNELL_URL" ]]; then 284 | echo -e "${RED}未获取到 Snell 最新正式版信息,请检查网络或稍后再试!${PLAIN}" 285 | pause_and_clear 286 | return 1 287 | fi 288 | 289 | current_ver="" 290 | if [[ -f "$SNELL_VERSION_FILE" ]]; then 291 | current_ver=$(cat "$SNELL_VERSION_FILE") 292 | fi 293 | 294 | if [[ "$current_ver" == "$SNELL_VERSION" && -f "$SNELL_BIN" ]]; then 295 | echo -e "${GREEN}Snell 已经是正式版最新版:${SNELL_VERSION}${PLAIN}" 296 | pause_and_clear 297 | return 0 298 | fi 299 | 300 | cd /tmp 301 | echo -e "${YELLOW}下载 Snell 正式版(${SNELL_ARCH}, ${SNELL_VERSION})...${PLAIN}" 302 | wget --no-check-certificate -N "$SNELL_URL" -O "$SNELL_ZIP" 303 | if [[ ! -e "$SNELL_ZIP" ]]; then 304 | echo -e "${RED}Snell 正式版下载失败,请检查网络连接!${PLAIN}" 305 | pause_and_clear 306 | return 1 307 | else 308 | install_unzip_if_missing 309 | unzip -o "$SNELL_ZIP" 310 | fi 311 | 312 | if [[ ! -e "snell-server" ]]; then 313 | echo -e "${RED}Snell 正式版解压失败!${PLAIN}" 314 | pause_and_clear 315 | return 1 316 | else 317 | rm -f "$SNELL_ZIP" 318 | chmod +x snell-server 319 | mv -f snell-server "${SNELL_BIN}" 320 | echo "$SNELL_VERSION" > "${SNELL_VERSION_FILE}" 321 | echo -e "${GREEN}Snell 已更新到正式版:${SNELL_VERSION} (${SNELL_ARCH})${PLAIN}" 322 | echo -e "${YELLOW}正在重启所有 Snell systemd 服务...${PLAIN}" 323 | systemctl daemon-reload 324 | for svc in /etc/systemd/system/snell@*.service; do 325 | [ ! -e "$svc" ] && continue 326 | svc_name=$(basename "$svc") 327 | systemctl restart "$svc_name" 328 | echo -e "${GREEN}已重启服务: $svc_name${PLAIN}" 329 | done 330 | echo -e "${GREEN}所有 Snell 服务已重启${PLAIN}" 331 | pause_and_clear 332 | return 0 333 | fi 334 | } 335 | 336 | update_snell_beta() { 337 | clear 338 | if ! snell_installed; then 339 | echo -e "${YELLOW}检测到未安装Snell,请先安装并配置${PLAIN}" 340 | pause_and_clear 341 | return 1 342 | fi 343 | echo -e "${BLUE}开始检查并更新 Snell 测试版 ...${PLAIN}" 344 | 345 | get_latest_snell_beta_version 346 | 347 | if [[ -z "$SNELL_VERSION" || -z "$SNELL_URL" ]]; then 348 | echo -e "${RED}未检测到任何 Snell 测试版!${PLAIN}" 349 | pause_and_clear 350 | return 1 351 | fi 352 | 353 | current_ver="" 354 | if [[ -f "$SNELL_VERSION_FILE" ]]; then 355 | current_ver=$(cat "$SNELL_VERSION_FILE") 356 | fi 357 | 358 | if [[ "$current_ver" == "$SNELL_VERSION" && -f "$SNELL_BIN" ]]; then 359 | echo -e "${GREEN}Snell 已经是测试版最新版:${SNELL_VERSION}${PLAIN}" 360 | pause_and_clear 361 | return 0 362 | fi 363 | 364 | cd /tmp 365 | echo -e "${YELLOW}下载 Snell 测试版(${SNELL_ARCH}, ${SNELL_VERSION})...${PLAIN}" 366 | wget --no-check-certificate -N "$SNELL_URL" -O "$SNELL_ZIP" 367 | if [[ ! -e "$SNELL_ZIP" ]]; then 368 | echo -e "${RED}Snell 测试版下载失败,请检查网络连接!${PLAIN}" 369 | pause_and_clear 370 | return 1 371 | else 372 | install_unzip_if_missing 373 | unzip -o "$SNELL_ZIP" 374 | fi 375 | 376 | if [[ ! -e "snell-server" ]]; then 377 | echo -e "${RED}Snell 测试版解压失败!${PLAIN}" 378 | pause_and_clear 379 | return 1 380 | else 381 | rm -f "$SNELL_ZIP" 382 | chmod +x snell-server 383 | mv -f snell-server "${SNELL_BIN}" 384 | echo "$SNELL_VERSION" > "${SNELL_VERSION_FILE}" 385 | echo -e "${GREEN}Snell 已更新到测试版:${SNELL_VERSION} (${SNELL_ARCH})${PLAIN}" 386 | echo -e "${YELLOW}正在重启所有 Snell systemd 服务...${PLAIN}" 387 | systemctl daemon-reload 388 | for svc in /etc/systemd/system/snell@*.service; do 389 | [ ! -e "$svc" ] && continue 390 | svc_name=$(basename "$svc") 391 | systemctl restart "$svc_name" 392 | echo -e "${GREEN}已重启服务: $svc_name${PLAIN}" 393 | done 394 | echo -e "${GREEN}所有 Snell 服务已重启${PLAIN}" 395 | pause_and_clear 396 | return 0 397 | fi 398 | } 399 | 400 | update_snell_menu() { 401 | clear 402 | echo -e "${BLUE}✦ Snell_Update ✦${PLAIN}" 403 | echo -e "${GREEN} 1.${PLAIN}正式版" 404 | echo -e "${GREEN} 2.${PLAIN}测试版" 405 | echo -e "${GREEN} 3.${PLAIN}回退v4版" 406 | echo -e "${GREEN} 0.${PLAIN}返回主页" 407 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" update_choice 408 | case $update_choice in 409 | 1) update_snell_stable ;; 410 | 2) update_snell_beta ;; 411 | 3) rollback_snell_v4 ;; 412 | 0) return ;; 413 | *) echo -e "${RED}无效选项,请重新选择${PLAIN}"; pause_and_clear ;; 414 | esac 415 | } 416 | 417 | delete_all_snell() { 418 | clear 419 | if ! snell_installed && ! snell_config_exists; then 420 | echo -e "${YELLOW}未安装及配置 Snell,请先安装并配置 Snell。${PLAIN}" 421 | pause_and_clear 422 | return 423 | fi 424 | 425 | echo -e "${RED}警告!此操作将彻底删除snell-server及其相关内容、服务${PLAIN}" 426 | read -p "$(echo -e "${YELLOW}确定继续? [y/N]: ${PLAIN}")" confirm 427 | [[ ! "$confirm" =~ ^[yY]$ ]] && echo -e "${YELLOW}操作已取消${PLAIN}" && pause_and_clear && return 428 | 429 | for svc in /etc/systemd/system/snell@*.service; do 430 | [ ! -e "$svc" ] && continue 431 | svc_name=$(basename "$svc") 432 | systemctl disable --now "$svc_name" &>/dev/null 433 | rm -f "$svc" 434 | done 435 | 436 | systemctl daemon-reload 437 | 438 | if [ -d "$SNELL_ETC" ]; then 439 | rm -rf "$SNELL_ETC" 440 | fi 441 | 442 | if [ -f "$SNELL_BIN" ]; then 443 | rm -f "$SNELL_BIN" 444 | fi 445 | 446 | echo -e "${GREEN}已彻底删除snell服务${PLAIN}" 447 | pause_and_clear 448 | } 449 | 450 | generate_and_enable_config() { 451 | clear 452 | local config_dir="$SNELL_CONFIGS" 453 | mkdir -p "$config_dir" 454 | echo -e "${BLUE}请输入配置名称:${PLAIN}" 455 | read -p "$(echo -e "${GREEN}(如: config1): ${PLAIN}")" config_name 456 | [[ -z "$config_name" ]] && echo -e "${RED}配置名称不能为空!${PLAIN}" && pause_and_clear && return 457 | local config_file="${config_dir}/${config_name}.conf" 458 | if [[ -f "$config_file" ]]; then 459 | echo -e "${RED}配置文件 $config_name 已存在!${PLAIN}" 460 | pause_and_clear 461 | return 462 | fi 463 | read -p "$(echo -e "${BLUE}请输入监听端口 ${YELLOW}(默认5000)${BLUE}: ${PLAIN}")" port 464 | port=${port:-5000} 465 | read -p "$(echo -e "${BLUE}请输入PSK密钥 ${YELLOW}(回车随机生成)${BLUE}: ${PLAIN}")" psk 466 | [[ -z "$psk" ]] && psk=$(tr -dc A-Za-z0-9 "$config_file" << EOF 500 | [snell-server] 501 | listen = ::0:${port} 502 | psk = ${psk} 503 | obfs = ${obfs} 504 | $(if [[ "$obfs" == "http" ]]; then echo "obfs-host = ${obfs_host}"; fi) 505 | ipv6 = ${ipv6} 506 | tfo = ${tfo} 507 | dns = ${dns} 508 | EOF 509 | 510 | echo -e "${GREEN}配置文件已生成: $config_file${PLAIN}" 511 | 512 | local config_bin="$SNELL_BIN" 513 | local service_name="snell@${config_name}.service" 514 | cat > "/etc/systemd/system/$service_name" << EOF 515 | [Unit] 516 | Description=Snell Instance (${config_name}) 517 | After=network.target 518 | 519 | [Service] 520 | ExecStart="$config_bin" -c "$config_file" 521 | Restart=always 522 | User=root 523 | 524 | [Install] 525 | WantedBy=multi-user.target 526 | EOF 527 | systemctl daemon-reload 528 | systemctl enable --now $service_name 529 | echo -e "${GREEN}配置 $config_name 已启动并设置为开机自启${PLAIN}" 530 | pause_and_clear 531 | } 532 | 533 | delete_config() { 534 | clear 535 | local config_dir="$SNELL_CONFIGS" 536 | if [[ ! -d "$config_dir" || -z "$(ls -A "$config_dir" 2>/dev/null)" ]]; then 537 | echo -e "${YELLOW}当前没有任何配置文件${PLAIN}" 538 | pause_and_clear 539 | return 540 | fi 541 | echo -e "${BLUE}当前可用配置:${PLAIN}" 542 | list_configs 543 | echo -e "${BLUE}请输入要删除的配置名称,输入99删除全部配置:${PLAIN}" 544 | read -p "$(echo -e "${GREEN}配置名称: ${PLAIN}")" config_name 545 | if [[ "$config_name" == "99" ]]; then 546 | delete_all_configs 547 | return 548 | fi 549 | [[ -z "$config_name" ]] && echo -e "${RED}配置名称不能为空${PLAIN}" && pause_and_clear && return 550 | local config_file="${config_dir}/${config_name}.conf" 551 | local service_name="snell@${config_name}.service" 552 | if [[ ! -f "$config_file" ]]; then 553 | echo -e "${RED}配置文件 $config_name 不存在!${PLAIN}" 554 | pause_and_clear 555 | return 556 | fi 557 | systemctl disable --now "$service_name" &>/dev/null 558 | rm -f "/etc/systemd/system/$service_name" 559 | rm -f "$config_file" 560 | echo -e "${GREEN}配置 $config_name 及其服务已删除${PLAIN}" 561 | pause_and_clear 562 | } 563 | delete_all_configs() { 564 | clear 565 | local config_dir="$SNELL_CONFIGS" 566 | if [[ ! -d "$config_dir" || -z "$(ls -A "$config_dir" 2>/dev/null)" ]]; then 567 | echo -e "${YELLOW}当前没有任何配置文件${PLAIN}" 568 | pause_and_clear 569 | return 570 | fi 571 | local service_prefix="snell@" 572 | echo -e "${RED}警告:即将删除所有配置及服务!${PLAIN}" 573 | read -p "$(echo -e "${YELLOW}确定继续?[y/N]: ${PLAIN}")" choice 574 | [[ ! "$choice" =~ ^[yY]$ ]] && pause_and_clear && return 575 | for config_file in "$config_dir"/*.conf; do 576 | [[ ! -f "$config_file" ]] && continue 577 | local config_name=$(basename "$config_file" .conf) 578 | local service_name="${service_prefix}${config_name}.service" 579 | systemctl disable --now "$service_name" &>/dev/null 580 | rm -f "/etc/systemd/system/$service_name" 581 | done 582 | rm -rf "$config_dir" 583 | echo -e "${GREEN}所有配置及服务已删除${PLAIN}" 584 | pause_and_clear 585 | } 586 | 587 | modify_config() { 588 | clear 589 | local config_dir="$SNELL_CONFIGS" 590 | if [[ ! -d "$config_dir" || -z "$(ls -A "$config_dir" 2>/dev/null)" ]]; then 591 | echo -e "${YELLOW}当前没有任何配置文件,请先生成配置${PLAIN}" 592 | pause_and_clear 593 | return 594 | fi 595 | echo -e "${BLUE}当前可用配置:${PLAIN}" 596 | list_configs 597 | echo -e "${BLUE}请选择要修改的配置名称:${PLAIN}" 598 | read -p "$(echo -e "${GREEN}配置名称: ${PLAIN}")" config_name 599 | [[ -z "$config_name" ]] && echo -e "${RED}配置名称不能为空!${PLAIN}" && pause_and_clear && return 600 | local config_file="${config_dir}/${config_name}.conf" 601 | local service_name="snell@${config_name}.service" 602 | if [[ ! -f "$config_file" ]]; then 603 | echo -e "${RED}配置文件 $config_name 不存在!${PLAIN}" 604 | pause_and_clear 605 | return 606 | fi 607 | 608 | local current_port=$(grep "^listen[[:space:]]*=" "$config_file" | awk -F: '{print $NF}' | tr -d ' ') 609 | local current_psk=$(grep "^psk[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | tr -d ' ') 610 | local current_obfs=$(grep "^obfs[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | tr -d ' ') 611 | local current_obfs_host=$(grep "^obfs-host[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | tr -d ' ') 612 | local current_ipv6=$(grep "^ipv6[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | tr -d ' ') 613 | local current_tfo=$(grep "^tfo[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | tr -d ' ') 614 | local current_dns=$(grep "^dns[[:space:]]*=" "$config_file" | awk -F'=' '{print $2}' | sed 's/^ *//;s/ *$//') 615 | 616 | clear 617 | echo -e "${BLUE}当前配置内容:${PLAIN}" 618 | echo -e "端口: ${GREEN}${current_port}${PLAIN}" 619 | echo -e "PSK: ${GREEN}${current_psk}${PLAIN}" 620 | echo -e "OBFS: ${GREEN}${current_obfs}${PLAIN}" 621 | [[ "$current_obfs" == "http" ]] && echo -e "OBFS域名: ${GREEN}${current_obfs_host}${PLAIN}" 622 | echo -e "IPv6: ${GREEN}${current_ipv6:-false}${PLAIN}" 623 | echo -e "TFO: ${GREEN}${current_tfo:-true}${PLAIN}" 624 | echo -e "DNS: ${GREEN}${current_dns:-8.8.8.8, 1.1.1.1}${PLAIN}" 625 | 626 | local status 627 | status=$(systemctl is-active "$service_name" 2>/dev/null) 628 | if [[ "$status" == "active" ]]; then 629 | echo -e "服务状态: ${GREEN}已启动(active)${PLAIN}" 630 | elif [[ "$status" == "inactive" ]]; then 631 | echo -e "服务状态: ${YELLOW}已停止(inactive)${PLAIN}" 632 | elif [[ "$status" == "failed" ]]; then 633 | echo -e "服务状态: ${RED}启动失败(failed)${PLAIN}" 634 | else 635 | echo -e "服务状态: ${BLUE}未知或未安装${PLAIN}" 636 | fi 637 | 638 | read -p "$(echo -e "${YELLOW}是否修改此配置? (Y/N): ${PLAIN}")" confirm_modify 639 | if [[ "$confirm_modify" =~ ^[nN]$ ]]; then 640 | return 641 | fi 642 | 643 | echo -e "${YELLOW}开始修改配置(回车不变)...${PLAIN}" 644 | read -p "$(echo -e "${BLUE}请输入新端口 ${YELLOW}(当前${current_port})${BLUE}: ${PLAIN}")" port 645 | port=${port:-$current_port} 646 | read -p "$(echo -e "${BLUE}请输入新PSK密钥 ${YELLOW}(当前${current_psk} R随机生成)${BLUE}: ${PLAIN}")" psk 647 | if [[ "$psk" == "r" ]]; then 648 | psk=$(tr -dc A-Za-z0-9 "$config_file" << EOF 695 | [snell-server] 696 | listen = ::0:${port} 697 | psk = ${psk} 698 | obfs = ${obfs} 699 | $(if [[ "$obfs" == "http" ]]; then echo "obfs-host = ${obfs_host}"; fi) 700 | ipv6 = ${ipv6} 701 | tfo = ${tfo} 702 | dns = ${dns} 703 | EOF 704 | 705 | echo -e "${YELLOW}配置已更新,正在重启服务...${PLAIN}" 706 | systemctl restart "$service_name" 707 | echo -e "${GREEN}服务已重启,新配置已生效${PLAIN}" 708 | echo -e "${BLUE}------ 当前服务状态 ------${PLAIN}" 709 | systemctl status "$service_name" --no-pager 710 | pause_and_clear 711 | } 712 | 713 | stop_or_restart_snell() { 714 | clear 715 | local config_dir="$SNELL_CONFIGS" 716 | if [[ ! -d "$config_dir" || -z "$(ls -A "$config_dir" 2>/dev/null)" ]]; then 717 | echo -e "${YELLOW}当前没有任何配置文件${PLAIN}" 718 | pause_and_clear 719 | return 720 | fi 721 | echo -e "${BLUE}当前可用配置:${PLAIN}" 722 | list_configs 723 | echo -e "${BLUE}请输入要停止的配置名称,输入0重启全部配置:${PLAIN}" 724 | read -p "$(echo -e "${GREEN}配置名称: ${PLAIN}")" config_name 725 | if [[ "$config_name" == "0" ]]; then 726 | for config_file in "$config_dir"/*.conf; do 727 | [[ ! -f "$config_file" ]] && continue 728 | local cn=$(basename "$config_file" .conf) 729 | local service_name="snell@${cn}.service" 730 | systemctl restart "$service_name" 731 | echo -e "${GREEN}已重启服务: $service_name${PLAIN}" 732 | done 733 | echo -e "${GREEN}所有 Snell 服务已重启${PLAIN}" 734 | pause_and_clear 735 | return 736 | fi 737 | [[ -z "$config_name" ]] && echo -e "${RED}配置名称不能为空${PLAIN}" && pause_and_clear && return 738 | local config_file="${config_dir}/${config_name}.conf" 739 | local service_name="snell@${config_name}.service" 740 | if [[ ! -f "$config_file" ]]; then 741 | echo -e "${RED}配置文件 $config_name 不存在!${PLAIN}" 742 | pause_and_clear 743 | return 744 | fi 745 | systemctl stop "$service_name" 746 | echo -e "${YELLOW}已停止服务: $service_name${PLAIN}" 747 | pause_and_clear 748 | } 749 | 750 | list_configs() { 751 | local config_dir="$SNELL_CONFIGS" 752 | if [[ ! -d "$config_dir" || -z "$(ls -A "$config_dir")" ]]; then 753 | echo -e "${YELLOW}没有找到任何配置文件${PLAIN}" 754 | return 755 | fi 756 | for f in "$config_dir"/*.conf; do 757 | [[ ! -f "$f" ]] && continue 758 | local name=$(basename "$f" .conf) 759 | echo -e " ${YELLOW}${name}${PLAIN}" 760 | done 761 | } 762 | 763 | config_snell_menu() { 764 | while true; do 765 | show_sub_menu 766 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" sub_choice 767 | case $sub_choice in 768 | 1) generate_and_enable_config ;; 769 | 2) stop_or_restart_snell ;; 770 | 3) modify_config ;; 771 | 4) delete_config ;; 772 | 0) break ;; 773 | *) echo -e "${RED}无效选项,请重新选择${PLAIN}"; pause_and_clear ;; 774 | esac 775 | done 776 | } 777 | 778 | show_sub_menu() { 779 | clear 780 | echo -e "${BLUE}✦ Confing_Menu ✦${PLAIN}" 781 | echo -e "${GREEN} 1.${PLAIN}生成配置" 782 | echo -e "${GREEN} 2.${PLAIN}停止服务" 783 | echo -e "${GREEN} 3.${PLAIN}查看配置" 784 | echo -e "${GREEN} 4.${PLAIN}删除配置" 785 | echo -e "${GREEN} 0.${PLAIN}返回主页" 786 | } 787 | 788 | show_main_menu() { 789 | clear 790 | echo -e "${BLUE}✦ Snell_Ver.1.2 ✦${PLAIN}" 791 | echo -e "${GREEN} 1.${PLAIN}安装Snell" 792 | echo -e "${GREEN} 2.${PLAIN}配置Snell" 793 | echo -e "${GREEN} 3.${PLAIN}删除Snell" 794 | echo -e "${GREEN} 4.${PLAIN}更新Snell" 795 | echo -e "${GREEN} 0.${PLAIN}离开Snell" 796 | } 797 | 798 | main() { 799 | install_unzip_if_missing 800 | auto_enable_tcp_fastopen 801 | while true; do 802 | show_main_menu 803 | read -p "$(echo -e "${BLUE}✦ Steins Gate ✦ : ${PLAIN}")" main_choice 804 | case $main_choice in 805 | 1) install_snell ;; 806 | 2) config_snell_menu ;; 807 | 3) delete_all_snell ;; 808 | 4) update_snell_menu ;; 809 | 0) exit 0 ;; 810 | *) echo -e "${RED}无效选项,请重新选择${PLAIN}"; pause_and_clear ;; 811 | esac 812 | done 813 | } 814 | 815 | main 816 | --------------------------------------------------------------------------------