Update Up

This commit is contained in:
cluntop
2026-05-29 02:25:02 +08:00
parent 44479b0522
commit 50bfc2721f
2 changed files with 1811 additions and 1433 deletions
+1418 -1228
View File
@@ -1,1229 +1,1419 @@
{
"sites": [{
"key": "聚合短剧",
"name": "聚合短剧",
"type": 3,
"api": "./js/聚合短剧.js",
"style": {
"type": "rect",
"ratio": 1.33
},
"changeable": 1
}, {
"key": "金牌影院",
"name": "金牌影院",
"type": 3,
"api": "./js/金牌影院.js"
}, {
"key": "荐片",
"name": "荐片",
"type": 3,
"api": "./js/荐片.js"
}, {
"key": "海龟",
"name": "海龟",
"type": 3,
"api": "./js/海龟.js"
}, {
"key": "鬼片之家",
"name": "鬼片之家",
"type": 3,
"api": "./js/鬼片之家.js"
}, {
"key": "永乐视频",
"name": "永乐视频",
"type": 3,
"api": "./js/永乐视频.js"
}, {
"key": "apple",
"name": "apple",
"type": 3,
"api": "./js/apple.js"
}, {
"key": "1",
"name": "== 1 =="
}, {
"key": "小苹果",
"name": "苹果弹幕",
"type": 3,
"api": "csp_Xpg",
"jar": "./jar/fenghuang.jar",
"ext": {
"danmu": true
}
}, {
"key": "可可影视",
"name": "可可影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/可可.json"
}, {
"key": "旺旺",
"name": "旺旺短剧",
"type": 1,
"api": "https://api.wwzy.tv/api.php/provide/vod/",
"playerType": 1,
"searchable": 1,
"changeable": 1
}, {
"key": "久久影视",
"name": "久久影视",
"type": 3,
"api": "csp_AppYsV2",
"jar": "./jar/qf.jar",
"playerType": 2,
"ext": "http://99cms.jj99.icu:8199/api.php/app/"
}, {
"key": "艾旦影视",
"name": "艾旦影视",
"type": 1,
"ext": {
"proxy": "proxy"
},
"api": "https://www.lovedan.net/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
}, {
"key": "四个圈影视",
"name": "四圈影视",
"type": 1,
"api": "https://pg.fenwe078.cf/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
}, {
"key": "骚火影视",
"name": "骚火影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/骚火.json"
}, {
"key": "小红",
"name": "小红影视",
"type": 3,
"api": "csp_XBPQ",
"filterable": 1,
"ext": "./js/s/小红.json"
}, {
"key": "小镇",
"name": "小镇影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/小镇.json"
}, {
"key": "百思",
"name": "百思影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/百思.json"
}, {
"key": "影院",
"name": "影院大全",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/影院.json"
}, {
"key": "随客",
"name": "随客影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/随客.json"
}, {
"key": "西瓜",
"name": "西瓜影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/西瓜.json"
}, {
"key": "七点影视",
"name": "七点影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/7点.json"
}, {
"key": "三九影视",
"name": "三九影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./XBPQ/三九影视.json"
}, {
"key": "巴士动漫",
"name": "巴士动漫",
"type": 3,
"api": "csp_XYQHiker",
"ext": "./XYQHiker/巴士动漫.json"
}, {
"key": "穷电影",
"name": "穷电影",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/穷电影.json"
}, {
"key": "狐狸君",
"name": "狐狸君",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/狐狸君.json"
}, {
"key": "大白鲨",
"name": "大白鲨",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/大白鲨.json"
}, {
"key": "2",
"name": "== 2 =="
}, {
"key": "白嫖2",
"name": "️白嫖影视",
"type": 3,
"api": "csp_XBPQ",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"ext": "./js/s/白嫖1.json"
}, {
"key": "白嫖3",
"name": "白嫖影视",
"type": 3,
"ua": "okhttp/3.15",
"api": "csp_XBPQ",
"ext": "./js/s/白嫖2.json"
}, {
"key": "白嫖4",
"name": "白嫖影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/白嫖3.json"
}, {
"key": "3",
"name": "== 3 =="
}, {
"key": "py_高清电影",
"name": "高清电影(T3)",
"type": 3,
"api": "./py/高清电影.py"
}, {
"key": "py_金牌影院",
"name": "金牌影院(T3)",
"type": 3,
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"api": "./py/金牌.py",
"order_num": 5,
"ext": ""
}, {
"key": "py_奇优动漫",
"name": "奇优动漫(T3)",
"type": 3,
"api": "./py/奇优动漫.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
}, {
"key": "py_粤漫动漫",
"name": "粤漫动漫(T3)",
"type": 3,
"api": "./py/粤漫.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
}, {
"key": "py_jieyingshi",
"name": "界影视(T3)",
"type": 3,
"api": "./py/py_jieyingshi.py",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
}, {
"key": "py_aigua",
"name": "爱瓜TV(T3)",
"type": 3,
"api": "./py/aigua.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
}, {
"key": "py_国外",
"name": "国外剧情(T3)",
"type": 3,
"api": "./py/py_guowaiju.py",
"quickSearch": 1,
"searchable": 1,
"filterable": 1
}, {
"key": "py_偷乐",
"name": "偷乐短剧(T3)",
"type": 3,
"api": "./py/偷乐短剧.py",
"searchable": 1,
"changeable": 1,
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "py_嗨皮",
"name": "嗨皮影视(T3)",
"type": 3,
"api": "./py/嗨皮影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "py_云端",
"name": "云端影视(T3)",
"type": 3,
"api": "./py/云端影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "py_云速",
"name": "云速影视(T3)",
"type": 3,
"api": "./py/云速影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "py_农牧",
"name": "农牧影视(T3)",
"type": 3,
"api": "./py/农民影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "py_文才",
"name": "文才影视(T3)",
"type": 3,
"api": "./py/文才影视.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"ext": {
"site": "https://www.hkybqufgh.com,https://www.sizhengxt.com,https://0996zp.com,https://9zhoukj.com/,https://www.sizhengxt.com,https://www.tjrongze.com,https://www.jiabaide.cn,https://cqzuoer.com"
}
}, {
"key": "py_4KAV",
"name": "4KAV(T3)",
"type": 3,
"api": "./py/4KAV.py",
"quickSearch": 1,
"searchable": 1,
"filterable": 1
}, {
"key": "3.1",
"name": "== 3.1 =="
}, {
"key": "py_DianYingTanTang",
"name": "🫐电影天堂(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=DianYingTanTang",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
}, {
"key": "py_OleVod",
"name": "欧乐影院(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=OleVod",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
}, {
"key": "py_Dm84",
"name": "动漫巴士(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=Dm84",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
}, {
"key": "4",
"name": "== 4 =="
}, {
"key": "飞快影视",
"name": "飞快影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/飞快.json"
}, {
"key": "人人影视",
"name": "人人影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/人人.json"
}, {
"key": "农民影视",
"name": "农民影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/农民.json"
}, {
"key": "熊猫影视",
"name": "熊猫影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/熊猫.json"
}, {
"key": "秀儿影院",
"name": "秀儿影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/秀儿.json"
}, {
"key": "毒舌影视",
"name": "毒舌影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/毒舌.json"
}, {
"key": "星辰影院",
"name": "星辰影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/星辰.json"
}, {
"key": "全网看",
"name": "全网看",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/全网看.json"
}, {
"key": "free影视",
"name": "free影视",
"type": 3,
"click": "document.querySelector(\"#playleft iframe\").contentWindow.document.querySelector(\"#start\").click();",
"api": "csp_XBPQ",
"ext": "./js/s/free.json"
}, {
"key": "喝茶影视",
"name": "喝茶影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/喝茶.json"
}, {
"key": "策弛影视",
"name": "策弛影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/策弛.json"
}, {
"key": "茶杯狐影视",
"name": "茶杯狐影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/茶杯狐.json"
}, {
"key": "瓜籽影院",
"name": "瓜籽影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/瓜籽.json"
}, {
"key": "来看点播",
"name": "来看点播",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/来看.json"
}, {
"key": "布卡影视",
"name": "布卡影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/布卡.json"
}, {
"key": "一帆影视",
"name": "一帆影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/一帆.json"
}, {
"key": "欧乐影视",
"name": "欧乐影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/欧乐.json"
}, {
"key": "奇迹",
"name": "奇迹影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/奇迹.json"
}, {
"key": "素白白",
"name": "素白白",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/素白白.json"
}, {
"key": "5",
"name": "== 5 =="
}, {
"key": "豆瓣资源",
"name": "豆瓣采集",
"type": 1,
"quickSearch": 1,
"api": "https://caiji.dbzy.tv/api.php/provide/vod/"
}, {
"key": "索尼",
"name": "索尼采集 ",
"type": 1,
"api": "https://suoniapi.com/api.php/provide/vod/",
"playUrl": "https://www.snplayer.com/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
}, {
"key": "量子",
"name": "量子采集",
"type": 1,
"api": "https://cj.lziapi.com/api.php/provide/vod/",
"playUrl": "https://lziplayer.com/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
}, {
"key": "非凡",
"name": "非凡采集",
"type": 1,
"api": "https://cj.ffzyapi.com/api.php/provide/vod/?",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
}, {
"key": "无尽",
"name": "无尽采集",
"type": 1,
"api": "https://api.wujinapi.net/api.php/provide/vod/",
"playUrl": "https://jx.wujinkk.com/dplayer/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧",
"预告片"
]
}, {
"key": "金鹰",
"name": "金鹰采集",
"type": 1,
"api": "https://jyzyapi.com/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"中国动漫",
"日本动漫",
"内地剧"
]
}, {
"key": "速播",
"name": "速播采集",
"type": 1,
"api": "https://subocaiji.com/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"中国动漫",
"日本动漫",
"大陆剧"
]
}, {
"key": "樱花",
"name": "樱花采集",
"type": 1,
"api": "https://m3u8.apiyhzy.com/api.php/provide/vod/",
"playUrl": "https://jx.yhzybf.com/player/jx.php?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日本动漫",
"国产剧"
]
}, {
"key": "黑木耳",
"name": "黑木耳",
"type": 1,
"api": "https://json02.heimuer.xyz/api.php/provide/vod/",
"playUrl": "https://hoplayer.com/index.html?url=",
"quickSearch": 1,
"categories": [
"国产动漫",
"日本动漫",
"国产剧"
]
}, {
"key": "电影天堂",
"name": "电影天堂",
"type": 1,
"api": "http://caiji.dyttzyapi.com/api.php/provide/vod/",
"searchable": 1,
"quickSearch": 1,
"changeable": 0,
"categories": [
"国产动漫",
"日韩动漫",
"连续剧"
]
}, {
"key": "6",
"name": "== 6 =="
}, {
"key": "py_YYMP3",
"name": "YYMP3(T3)",
"type": 3,
"api": "./py/yymp3.py"
}, {
"key": "hipy_js_KTV歌厅[听]1",
"name": "KTV歌厅",
"type": 3,
"api": "./lib/drpy2.min.js",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 0,
"ext": "./js/drpy2.js"
}, {
"key": "直播转点播",
"name": "电视┃直播",
"type": 3,
"searchable": 0,
"api": "./lib/live2vod.js",
"ext": "./lib/feimaolive.json"
}, {
"key": "7",
"name": "== 7 =="
}, {
"key": "MXDM",
"name": "MXDM|动漫",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/mx.json"
}, {
"key": "MiFun",
"name": "MiFun动漫",
"type": 3,
"api": "./py/MiFunP.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "CliCli",
"name": "CliCli|动漫",
"type": 3,
"api": "./py/CliCli动漫.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
}, {
"key": "哆啦",
"name": "哆啦|新番社",
"type": 3,
"api": "csp_XBPQ",
"quickSearch": 1,
"filterable": 1,
"style": {
"type": "list"
},
"ext": "./XBPQ/哆啦新番社.json"
}, {
"key": "8",
"name": "== 8 =="
}, {
"key": "Hdhive",
"name": "影巢网盘",
"type": 3,
"api": "csp_Hdhive",
"quickSearch": 1,
"changeable": 1,
"filterable": 1,
"timeout": 60,
"ext": "./json/tokenm.json$$$proxy$$$1",
"order_num": 9999
}
],
"lives": [{
"name": "cluntop",
"type": 0,
"url": "./lib/iptv.m3u"
}, {
"name": "cluntop_test",
"type": 0,
"url": "./lib/iptv_test.m3u"
}, {
"name": "YY 轮播",
"type": 0,
"url": "https://iptv.clun.top/yylunbo.m3u",
"playerType": 2,
"timeout": 15
}, {
"name": "4GTV",
"type": 0,
"url": "./lib/4gtv.txt"
}, {
"name": "Mursor",
"type": "0",
"url": "https://raw.githubusercontent.com/Mursor/LIVE/main/iptv.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
}, {
"name": "tv_jp",
"type": "0",
"url": "https://gh.clun.top/raw.githubusercontent.com/luongz/iptv-jp/main/jp.m3u"
}, {
"name": "tv_jp_clean",
"type": "0",
"url": "https://gh.clun.top/raw.githubusercontent.com/luongz/iptv-jp/main/jp_clean.m3u"
}, {
"name": "平台直播",
"type": 0,
"url": "https://tv.iill.top/m3u/Live",
"ua": "okhttp/3.15",
"playerType": 2
}, {
"name": "冰茶 TV",
"type": 0,
"url": "https://fy.188766.xyz/?ip=&mishitong=true&mima=mianfeidehaimaiqian&json=true",
"ua": "bingcha/1.1"
}, {
"name": "肥羊虎牙一起看",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/huyayqk.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
}, {
"name": "肥羊B站直播",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/bililive.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
}, {
"name": "肥羊斗鱼一起看",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/douyuyqk.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
}, {
"name": "肥羊YY轮播",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/yylunbo.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
}, {
"name": "YTLive",
"type": 0,
"url": "./lib/yo21.txt"
}, {
"name": "wqwqwq",
"type": 0,
"url": "https://la1.wqwqwq.sbs/tv.m3u"
}, {
"name": "YanG",
"type": 0,
"url": "https://tv.iill.top/m3u/Gather",
"ua": "(Windows NT 10.0; Win64; x64) PotPlayer/25.03.21",
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={name}&date={date}",
"logo": "https://live.fanmingming.com/tv/{name}.png"
}, {
"name": "nctv",
"type": 0,
"url": "http://live.nctv.top/x.txt",
"ua": "okhttp/4.1.0"
}, {
"name": "ofiii",
"type": 0,
"url": "./lib/ofiii.m3u"
}, {
"name": "Guovin",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/Guovin/iptv-api/gd/output/result.m3u"
}, {
"name": "mlzlzj",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mlzlzj/TV/main/output/result.m3u"
}, {
"name": "gambiarras",
"type": 0,
"url": "https://github.com/gambiarras/legal-iptv/blob/main/playlist.m3u"
}, {
"name": "epg.pw All",
"type": 0,
"url": "https://m3u.002397.xyz/all.m3u"
}, {
"name": "iptv.org All",
"type": 0,
"url": "https://m3u.002397.xyz/o_all.m3u"
}, {
"group": "redirect",
"channels": [{
"name": "redirect",
"urls": [
"proxy://do=live&type=live&proxy=&url="
]
}
]
}
],
"doh": [{
"name": "OpenDNS",
"url": "https://dns.www.opendns.com/dns-query",
"ips": [
"208.67.222.222",
"208.67.220.220"
]
}, {
"name": "114dns",
"url": "https://dns.114dns.com/dns-query",
"ips": [
"114.114.114.114",
"114.114.115.115"
]
}, {
"name": "腾讯",
"url": "https://doh.pub/dns-query",
"ips": [
"119.29.29.29"
]
}, {
"name": "阿里",
"url": "https://dns.alidns.com/dns-query",
"ips": [
"223.6.6.6",
"223.5.5.5"
]
}, {
"name": "360",
"url": "https://doh.360.cn/dns-query"
}, {
"name": "Google",
"url": "https://dns.google/dns-query",
"ips": [
"8.8.4.4",
"8.8.8.8"
]
}, {
"name": "Cloudflare",
"url": "https://cloudflare-dns.com/dns-query",
"ips": [
"1.1.1.1",
"1.0.0.1",
"2606:4700:4700::1111",
"2606:4700:4700::1001"
]
}, {
"name": "AdGuard",
"url": "https://dns.adguard.com/dns-query",
"ips": [
"94.140.14.140",
"94.140.14.141"
]
}, {
"name": "DNSWatch",
"url": "https://resolver2.dns.watch/dns-query",
"ips": [
"84.200.69.80",
"84.200.70.40"
]
}, {
"name": "Quad9",
"url": "https://dns.quad9.net/dns-quer",
"ips": [
"9.9.9.9",
"149.112.112.112"
]
}
],
"proxy": [],
"hosts": [],
"rules": [{
"host": "*",
"rule": [
"http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a)\\?.*"
]
}, {
"host": "*",
"rule": [
"http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a)"
]
}, {
"name": "ofiii",
"hosts": [
"www.ofiii.com"
],
"script": [
"const play=document.getElementsByClassName('play_icon')[0],event=new MouseEvent('click',{bubbles:!0,cancelable:!0,view:window,screenX:100,screenY:100,clientX:50,clientY:50,button:0,shiftKey:!1,ctrlKey:!1,altKey:!1,metaKey:!1,modifierState:0});play.dispatchEvent(event);"
]
}, {
"host": "www.djuu.com",
"rule": [
"mp4.djuu.com",
"m4a"
]
}, {
"host": "www.sharenice.net",
"rule": [
"huoshan.com",
"/item/video/"
],
"filter": []
}, {
"host": "www.sharenice.net",
"rule": [
"sovv.qianpailive.com",
"vid="
],
"filter": []
}, {
"host": "www.sharenice.net",
"rule": [
"douyin.com",
"/play/"
]
}, {
"host": "m.ysxs8.vip",
"rule": [
"ysting.ysxs8.vip:81",
"xmcdn.com"
],
"filter": []
}, {
"host": "hdmoli.com",
"rule": [
".m3u8"
]
}, {
"host": "https://api.live.bilibili.com",
"rule": [
"bilivideo.com",
"/index.m3u8"
],
"filter": [
"data.bilibili.com/log/web",
"i0.hdslb.com/bfs/live/"
]
}, {
"host": "www.agemys.cc",
"rule": [
"cdn-tos",
"obj/tos-cn"
]
}, {
"host": "www.fun4k.com",
"rule": [
"https://hd.ijycnd.com/play",
"index.m3u8"
]
}, {
"host": "zjmiao.com",
"rule": [
"play.videomiao.vip/API.php",
"time=",
"key=",
"path="
]
}, {
"name": "火山嗅探",
"hosts": [
"huoshan.com"
],
"regex": [
"item_id="
]
}, {
"name": "抖音嗅探",
"hosts": [
"douyin.com"
],
"regex": [
"is_play_url="
]
}, {
"name": "農民嗅探",
"hosts": [
"toutiaovod.com"
],
"regex": [
"video/tos/cn"
]
}, {
"name": "夜市",
"hosts": [
"yeslivetv.com"
],
"script": [
"document.getElementsByClassName('vjs-big-play-button')[0].click()"
]
}, {
"name": "毛驢",
"hosts": [
"www.maolvys.com"
],
"script": [
"document.getElementsByClassName('swal-button swal-button--confirm')[0].click()"
]
}
],
"headers": [{
"host": "mgtv.ottiptv.cc",
"header": {
"User-Agent": "okHttp/Mod-1.5.0.0",
"Referer": "https://mgtv.ottiptv.cc/"
}
}, {
"host": "hlsztemgsplive.miguvideo.com",
"header": {
"User-Agent": "bingcha/1.1"
}
}
],
"ads": [
"static-mozai.4gtv.tv"
],
"parses": [{
"name": "解析聚合",
"type": 3,
"url": "Web"
}, {
"name": "观山",
"type": 0,
"url": "https://p10.zijincao.cc/?url="
}, {
"name": "抚琴",
"type": 0,
"url": "https://jx.xmflv.com/?url="
}, {
"name": "七哥",
"url": "https://jx.nnxv.cn/tv.php?url=",
"type": 0
}, {
"name": "777",
"type": 0,
"url": "https://www.huaqi.live/?url="
}, {
"name": "jsonplayer",
"type": 0,
"url": "https://jx.jsonplayer.com/player/?url="
}, {
"name": "xmflv",
"type": 0,
"url": "https://jx.xmflv.com/?url="
}, {
"name": "M3U8",
"url": "https://jx.m3u8.tv/jiexi/?url=",
"type": 0
}, {
"name": "PM",
"url": "https://www.playm3u8.cn/jiexi.php?url=",
"type": 0
}
],
"ijk": [{
"group": "软解码",
"options": [{
"category": 4,
"name": "opensles",
"value": "0"
}, {
"category": 4,
"name": "overlay-format",
"value": "842225234"
}, {
"category": 4,
"name": "framedrop",
"value": "1"
}, {
"category": 4,
"name": "soundtouch",
"value": "1"
}, {
"category": 4,
"name": "start-on-prepared",
"value": "1"
}, {
"category": 1,
"name": "http-detect-range-support",
"value": "0"
}, {
"category": 1,
"name": "fflags",
"value": "fastseek"
}, {
"category": 2,
"name": "skip_loop_filter",
"value": "48"
}, {
"category": 4,
"name": "reconnect",
"value": "1"
}, {
"category": 4,
"name": "max-buffer-size",
"value": "8388608"
}, {
"category": 4,
"name": "enable-accurate-seek",
"value": "0"
}, {
"category": 4,
"name": "mediacodec",
"value": "0"
}, {
"category": 4,
"name": "mediacodec-auto-rotate",
"value": "0"
}, {
"category": 4,
"name": "mediacodec-handle-resolution-change",
"value": "0"
}, {
"category": 4,
"name": "mediacodec-hevc",
"value": "0"
}, {
"category": 1,
"name": "dns_cache_timeout",
"value": "600000000"
}
]
}, {
"group": "硬解码",
"options": [{
"category": 4,
"name": "opensles",
"value": "0"
}, {
"category": 4,
"name": "overlay-format",
"value": "842225234"
}, {
"category": 4,
"name": "framedrop",
"value": "1"
}, {
"category": 4,
"name": "soundtouch",
"value": "1"
}, {
"category": 4,
"name": "start-on-prepared",
"value": "1"
}, {
"category": 1,
"name": "http-detect-range-support",
"value": "0"
}, {
"category": 1,
"name": "fflags",
"value": "fastseek"
}, {
"category": 2,
"name": "skip_loop_filter",
"value": "48"
}, {
"category": 4,
"name": "reconnect",
"value": "1"
}, {
"category": 4,
"name": "max-buffer-size",
"value": "12582912"
}, {
"category": 4,
"name": "enable-accurate-seek",
"value": "0"
}, {
"category": 4,
"name": "mediacodec",
"value": "1"
}, {
"category": 4,
"name": "mediacodec-auto-rotate",
"value": "1"
}, {
"category": 4,
"name": "mediacodec-handle-resolution-change",
"value": "1"
}, {
"category": 4,
"name": "mediacodec-hevc",
"value": "1"
}, {
"category": 1,
"name": "dns_cache_timeout",
"value": "600000000"
}
]
}
],
"flags": [
"youku",
"tudou",
"qq",
"qiyi",
"iqiyi",
"leshi",
"letv",
"sohu",
"imgo",
"mgtv",
"bilibili",
"pptv",
"PPTV",
"migu"
],
"disabled_wallpaper": "",
"wallpaper": "./img/0.jpg",
"spider": "./jar/xb.jar",
"logo": "./img/pg.gif",
"warningText": "1"
}
"sites": [
{
"key": "聚合短剧",
"name": "聚合短剧",
"type": 3,
"api": "./js/聚合短剧.js",
"style": {
"type": "rect",
"ratio": 1.33
},
"changeable": 1
},
{
"key": "金牌影院",
"name": "金牌影院",
"type": 3,
"api": "./js/金牌影院.js"
},
{
"key": "荐片",
"name": "荐片",
"type": 3,
"api": "./js/荐片.js"
},
{
"key": "海龟",
"name": "海龟",
"type": 3,
"api": "./js/海龟.js"
},
{
"key": "鬼片之家",
"name": "鬼片之家",
"type": 3,
"api": "./js/鬼片之家.js"
},
{
"key": "永乐视频",
"name": "永乐视频",
"type": 3,
"api": "./js/永乐视频.js"
},
{
"key": "apple",
"name": "apple",
"type": 3,
"api": "./js/apple.js"
},
{
"key": "1",
"name": "== 1 =="
},
{
"key": "小苹果",
"name": "苹果弹幕",
"type": 3,
"api": "csp_Xpg",
"jar": "./jar/fenghuang.jar",
"ext": {
"danmu": true
}
},
{
"key": "可可影视",
"name": "可可影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/可可.json"
},
{
"key": "旺旺",
"name": "旺旺短剧",
"type": 1,
"api": "https://api.wwzy.tv/api.php/provide/vod/",
"playerType": 1,
"searchable": 1,
"changeable": 1
},
{
"key": "久久影视",
"name": "久久影视",
"type": 3,
"api": "csp_AppYsV2",
"jar": "./jar/qf.jar",
"playerType": 2,
"ext": "http://99cms.jj99.icu:8199/api.php/app/"
},
{
"key": "艾旦影视",
"name": "艾旦影视",
"type": 1,
"ext": {
"proxy": "proxy"
},
"api": "https://www.lovedan.net/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
},
{
"key": "四个圈影视",
"name": "四圈影视",
"type": 1,
"api": "https://pg.fenwe078.cf/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
},
{
"key": "骚火影视",
"name": "骚火影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/骚火.json"
},
{
"key": "小红",
"name": "小红影视",
"type": 3,
"api": "csp_XBPQ",
"filterable": 1,
"ext": "./js/s/小红.json"
},
{
"key": "小镇",
"name": "小镇影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/小镇.json"
},
{
"key": "百思",
"name": "百思影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/百思.json"
},
{
"key": "影院",
"name": "影院大全",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/影院.json"
},
{
"key": "随客",
"name": "随客影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/随客.json"
},
{
"key": "西瓜",
"name": "西瓜影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/西瓜.json"
},
{
"key": "七点影视",
"name": "七点影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/7点.json"
},
{
"key": "三九影视",
"name": "三九影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./XBPQ/三九影视.json"
},
{
"key": "巴士动漫",
"name": "巴士动漫",
"type": 3,
"api": "csp_XYQHiker",
"ext": "./XYQHiker/巴士动漫.json"
},
{
"key": "穷电影",
"name": "穷电影",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/穷电影.json"
},
{
"key": "狐狸君",
"name": "狐狸君",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/狐狸君.json"
},
{
"key": "大白鲨",
"name": "大白鲨",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/大白鲨.json"
},
{
"key": "2",
"name": "== 2 =="
},
{
"key": "白嫖2",
"name": "️白嫖影视",
"type": 3,
"api": "csp_XBPQ",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"ext": "./js/s/白嫖1.json"
},
{
"key": "白嫖3",
"name": "白嫖影视",
"type": 3,
"ua": "okhttp/3.15",
"api": "csp_XBPQ",
"ext": "./js/s/白嫖2.json"
},
{
"key": "白嫖4",
"name": "白嫖影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/白嫖3.json"
},
{
"key": "3",
"name": "== 3 =="
},
{
"key": "py_高清电影",
"name": "高清电影(T3)",
"type": 3,
"api": "./py/高清电影.py"
},
{
"key": "py_金牌影院",
"name": "金牌影院(T3)",
"type": 3,
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"api": "./py/金牌.py",
"order_num": 5,
"ext": ""
},
{
"key": "py_奇优动漫",
"name": "奇优动漫(T3)",
"type": 3,
"api": "./py/奇优动漫.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
},
{
"key": "py_粤漫动漫",
"name": "粤漫动漫(T3)",
"type": 3,
"api": "./py/粤漫.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
},
{
"key": "py_jieyingshi",
"name": "影视(T3)",
"type": 3,
"api": "./py/py_jieyingshi.py",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
},
{
"key": "py_aigua",
"name": "爱瓜TV(T3)",
"type": 3,
"api": "./py/aigua.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 5,
"ext": ""
},
{
"key": "py_国外",
"name": "国外剧情(T3)",
"type": 3,
"api": "./py/py_guowaiju.py",
"quickSearch": 1,
"searchable": 1,
"filterable": 1
},
{
"key": "py_偷乐",
"name": "偷乐短剧(T3)",
"type": 3,
"api": "./py/偷乐短剧.py",
"searchable": 1,
"changeable": 1,
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "py_嗨皮",
"name": "嗨皮影视(T3)",
"type": 3,
"api": "./py/嗨皮影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "py_云端",
"name": "云端影视(T3)",
"type": 3,
"api": "./py/云端影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "py_云速",
"name": "云速影视(T3)",
"type": 3,
"api": "./py/云速影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "py_农牧",
"name": "农牧影视(T3)",
"type": 3,
"api": "./py/农民影视.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "py_文才",
"name": "文才影视(T3)",
"type": 3,
"api": "./py/文才影视.py",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"ext": {
"site": "https://www.hkybqufgh.com,https://www.sizhengxt.com,https://0996zp.com,https://9zhoukj.com/,https://www.sizhengxt.com,https://www.tjrongze.com,https://www.jiabaide.cn,https://cqzuoer.com"
}
},
{
"key": "py_4KAV",
"name": "4KAV(T3)",
"type": 3,
"api": "./py/4KAV.py",
"quickSearch": 1,
"searchable": 1,
"filterable": 1
},
{
"key": "3.1",
"name": "== 3.1 =="
},
{
"key": "py_DianYingTanTang",
"name": "🫐电影天堂(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=DianYingTanTang",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
},
{
"key": "py_OleVod",
"name": "欧乐影院(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=OleVod",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
},
{
"key": "py_Dm84",
"name": "动漫巴士(T4)",
"type": 4,
"api": "https://py.doube.eu.org/spider?site=Dm84",
"searchable": 1,
"quickSearch": 0,
"filterable": 0,
"changeable": 0
},
{
"key": "4",
"name": "== 4 =="
},
{
"key": "飞快影视",
"name": "飞快影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/飞快.json"
},
{
"key": "人人影视",
"name": "人人影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/人人.json"
},
{
"key": "农民影视",
"name": "农民影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/农民.json"
},
{
"key": "熊猫影视",
"name": "熊猫影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/熊猫.json"
},
{
"key": "秀儿影院",
"name": "秀儿影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/秀儿.json"
},
{
"key": "毒舌影视",
"name": "毒舌影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/毒舌.json"
},
{
"key": "星辰影院",
"name": "星辰影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/星辰.json"
},
{
"key": "全网看",
"name": "全网看",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/全网看.json"
},
{
"key": "free影视",
"name": "free影视",
"type": 3,
"click": "document.querySelector(\"#playleft iframe\").contentWindow.document.querySelector(\"#start\").click();",
"api": "csp_XBPQ",
"ext": "./js/s/free.json"
},
{
"key": "喝茶影视",
"name": "喝茶影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/喝茶.json"
},
{
"key": "策弛影视",
"name": "策弛影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/策弛.json"
},
{
"key": "茶杯狐影视",
"name": "茶杯狐影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/茶杯狐.json"
},
{
"key": "瓜籽影院",
"name": "瓜籽影院",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/瓜籽.json"
},
{
"key": "来看点播",
"name": "来看点播",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/来看.json"
},
{
"key": "布卡影视",
"name": "布卡影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/布卡.json"
},
{
"key": "一帆影视",
"name": "一帆影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/一帆.json"
},
{
"key": "欧乐影视",
"name": "欧乐影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/欧乐.json"
},
{
"key": "奇迹",
"name": "奇迹影视",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/奇迹.json"
},
{
"key": "素白白",
"name": "素白白",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/素白白.json"
},
{
"key": "5",
"name": "== 5 =="
},
{
"key": "豆瓣资源",
"name": "豆瓣采集",
"type": 1,
"quickSearch": 1,
"api": "https://caiji.dbzy.tv/api.php/provide/vod/"
},
{
"key": "索尼",
"name": "索尼采集 ",
"type": 1,
"api": "https://suoniapi.com/api.php/provide/vod/",
"playUrl": "https://www.snplayer.com/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
},
{
"key": "量子",
"name": "量子采集",
"type": 1,
"api": "https://cj.lziapi.com/api.php/provide/vod/",
"playUrl": "https://lziplayer.com/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
},
{
"key": "非凡",
"name": "非凡采集",
"type": 1,
"api": "https://cj.ffzyapi.com/api.php/provide/vod/?",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧"
]
},
{
"key": "无尽",
"name": "无尽采集",
"type": 1,
"api": "https://api.wujinapi.net/api.php/provide/vod/",
"playUrl": "https://jx.wujinkk.com/dplayer/?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日韩动漫",
"国产剧",
"预告片"
]
},
{
"key": "金鹰",
"name": "金鹰采集",
"type": 1,
"api": "https://jyzyapi.com/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"中国动漫",
"日本动漫",
"内地剧"
]
},
{
"key": "速播",
"name": "速播采集",
"type": 1,
"api": "https://subocaiji.com/api.php/provide/vod/",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"中国动漫",
"日本动漫",
"大陆剧"
]
},
{
"key": "樱花",
"name": "樱花采集",
"type": 1,
"api": "https://m3u8.apiyhzy.com/api.php/provide/vod/",
"playUrl": "https://jx.yhzybf.com/player/jx.php?url=",
"quickSearch": 1,
"searchable": 1,
"changeable": 1,
"categories": [
"国产动漫",
"日本动漫",
"国产剧"
]
},
{
"key": "黑木耳",
"name": "黑木耳",
"type": 1,
"api": "https://json02.heimuer.xyz/api.php/provide/vod/",
"playUrl": "https://hoplayer.com/index.html?url=",
"quickSearch": 1,
"categories": [
"国产动漫",
"日本动漫",
"国产剧"
]
},
{
"key": "电影天堂",
"name": "电影天堂",
"type": 1,
"api": "http://caiji.dyttzyapi.com/api.php/provide/vod/",
"searchable": 1,
"quickSearch": 1,
"changeable": 0,
"categories": [
"国产动漫",
"日韩动漫",
"连续剧"
]
},
{
"key": "6",
"name": "== 6 =="
},
{
"key": "py_YYMP3",
"name": "YYMP3(T3)",
"type": 3,
"api": "./py/yymp3.py"
},
{
"key": "hipy_js_KTV歌厅[听]1",
"name": "KTV歌厅",
"type": 3,
"api": "./lib/drpy2.min.js",
"searchable": 1,
"quickSearch": 1,
"filterable": 1,
"order_num": 0,
"ext": "./js/drpy2.js"
},
{
"key": "直播转点播",
"name": "电视┃直播",
"type": 3,
"searchable": 0,
"api": "./lib/live2vod.js",
"ext": "./lib/feimaolive.json"
},
{
"key": "7",
"name": "== 7 =="
},
{
"key": "MXDM",
"name": "MXDM|动漫",
"type": 3,
"api": "csp_XBPQ",
"ext": "./js/s/mx.json"
},
{
"key": "MiFun",
"name": "MiFun|动漫",
"type": 3,
"api": "./py/MiFunP.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "CliCli",
"name": "CliCli|动漫",
"type": 3,
"api": "./py/CliCli动漫.py",
"quickSearch": 1,
"filterable": 1,
"playerType": 2
},
{
"key": "哆啦",
"name": "哆啦|新番社",
"type": 3,
"api": "csp_XBPQ",
"quickSearch": 1,
"filterable": 1,
"style": {
"type": "list"
},
"ext": "./XBPQ/哆啦新番社.json"
},
{
"key": "8",
"name": "== 8 =="
},
{
"key": "Hdhive",
"name": "影巢网盘",
"type": 3,
"api": "csp_Hdhive",
"quickSearch": 1,
"changeable": 1,
"filterable": 1,
"timeout": 60,
"ext": "./json/tokenm.json$$$proxy$$$1",
"order_num": 9999
}
],
"lives": [
{
"name": "cluntop",
"type": 0,
"url": "./lib/iptv.m3u"
},
{
"name": "cluntop_test",
"type": 0,
"url": "./lib/iptv_test.m3u"
},
{
"name": "YY 轮播",
"type": 0,
"url": "https://iptv.clun.top/yylunbo.m3u",
"playerType": 2,
"timeout": 15
},
{
"name": "4GTV",
"type": 0,
"url": "./lib/4gtv.txt"
},
{
"name": "Mursor",
"type": "0",
"url": "https://raw.githubusercontent.com/Mursor/LIVE/main/iptv.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
},
{
"name": "tv_jp",
"type": "0",
"url": "https://gh.clun.top/raw.githubusercontent.com/luongz/iptv-jp/main/jp.m3u"
},
{
"name": "tv_jp_clean",
"type": "0",
"url": "https://gh.clun.top/raw.githubusercontent.com/luongz/iptv-jp/main/jp_clean.m3u"
},
{
"name": "平台直播",
"type": 0,
"url": "https://tv.iill.top/m3u/Live",
"ua": "okhttp/3.15",
"playerType": 2
},
{
"name": "冰茶 TV",
"type": 0,
"url": "https://fy.188766.xyz/?ip=&mishitong=true&mima=mianfeidehaimaiqian&json=true",
"ua": "bingcha/1.1"
},
{
"name": "肥羊虎牙一起看",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/huyayqk.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
},
{
"name": "肥羊B站直播",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/bililive.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
},
{
"name": "肥羊斗鱼一起看",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/douyuyqk.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
},
{
"name": "肥羊YY轮播",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mursor1985/LIVE/main/yylunbo.m3u",
"playerType": 2,
"timeout": 10,
"ua": "okHttp/Mod-1.5.0.0"
},
{
"name": "YTLive",
"type": 0,
"url": "./lib/yo21.txt"
},
{
"name": "wqwqwq",
"type": 0,
"url": "https://la1.wqwqwq.sbs/tv.m3u"
},
{
"name": "YanG",
"type": 0,
"url": "https://tv.iill.top/m3u/Gather",
"ua": "(Windows NT 10.0; Win64; x64) PotPlayer/25.03.21",
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={name}&date={date}",
"logo": "https://live.fanmingming.com/tv/{name}.png"
},
{
"name": "nctv",
"type": 0,
"url": "http://live.nctv.top/x.txt",
"ua": "okhttp/4.1.0"
},
{
"name": "ofiii",
"type": 0,
"url": "./lib/ofiii.m3u"
},
{
"name": "Guovin",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/Guovin/iptv-api/gd/output/result.m3u"
},
{
"name": "mlzlzj",
"type": 0,
"url": "https://gh.clun.top/raw.githubusercontent.com/mlzlzj/TV/main/output/result.m3u"
},
{
"name": "gambiarras",
"type": 0,
"url": "https://github.com/gambiarras/legal-iptv/blob/main/playlist.m3u"
},
{
"name": "epg.pw All",
"type": 0,
"url": "https://m3u.002397.xyz/all.m3u"
},
{
"name": "iptv.org All",
"type": 0,
"url": "https://m3u.002397.xyz/o_all.m3u"
},
{
"group": "redirect",
"channels": [
{
"name": "redirect",
"urls": [
"proxy://do=live&type=live&proxy=&url="
]
}
]
}
],
"doh": [
{
"name": "OpenDNS",
"url": "https://dns.www.opendns.com/dns-query",
"ips": [
"208.67.222.222",
"208.67.220.220"
]
},
{
"name": "114dns",
"url": "https://dns.114dns.com/dns-query",
"ips": [
"114.114.114.114",
"114.114.115.115"
]
},
{
"name": "腾讯",
"url": "https://doh.pub/dns-query",
"ips": [
"119.29.29.29"
]
},
{
"name": "阿里",
"url": "https://dns.alidns.com/dns-query",
"ips": [
"223.6.6.6",
"223.5.5.5"
]
},
{
"name": "360",
"url": "https://doh.360.cn/dns-query"
},
{
"name": "Google",
"url": "https://dns.google/dns-query",
"ips": [
"8.8.4.4",
"8.8.8.8"
]
},
{
"name": "Cloudflare",
"url": "https://cloudflare-dns.com/dns-query",
"ips": [
"1.1.1.1",
"1.0.0.1",
"2606:4700:4700::1111",
"2606:4700:4700::1001"
]
},
{
"name": "AdGuard",
"url": "https://dns.adguard.com/dns-query",
"ips": [
"94.140.14.140",
"94.140.14.141"
]
},
{
"name": "DNSWatch",
"url": "https://resolver2.dns.watch/dns-query",
"ips": [
"84.200.69.80",
"84.200.70.40"
]
},
{
"name": "Quad9",
"url": "https://dns.quad9.net/dns-quer",
"ips": [
"9.9.9.9",
"149.112.112.112"
]
}
],
"proxy": [],
"hosts": [],
"rules": [
{
"host": "*",
"rule": [
"http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a)\\?.*"
]
},
{
"host": "*",
"rule": [
"http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a)"
]
},
{
"name": "ofiii",
"hosts": [
"www.ofiii.com"
],
"script": [
"const play=document.getElementsByClassName('play_icon')[0],event=new MouseEvent('click',{bubbles:!0,cancelable:!0,view:window,screenX:100,screenY:100,clientX:50,clientY:50,button:0,shiftKey:!1,ctrlKey:!1,altKey:!1,metaKey:!1,modifierState:0});play.dispatchEvent(event);"
]
},
{
"host": "www.djuu.com",
"rule": [
"mp4.djuu.com",
"m4a"
]
},
{
"host": "www.sharenice.net",
"rule": [
"huoshan.com",
"/item/video/"
],
"filter": []
},
{
"host": "www.sharenice.net",
"rule": [
"sovv.qianpailive.com",
"vid="
],
"filter": []
},
{
"host": "www.sharenice.net",
"rule": [
"douyin.com",
"/play/"
]
},
{
"host": "m.ysxs8.vip",
"rule": [
"ysting.ysxs8.vip:81",
"xmcdn.com"
],
"filter": []
},
{
"host": "hdmoli.com",
"rule": [
".m3u8"
]
},
{
"host": "https://api.live.bilibili.com",
"rule": [
"bilivideo.com",
"/index.m3u8"
],
"filter": [
"data.bilibili.com/log/web",
"i0.hdslb.com/bfs/live/"
]
},
{
"host": "www.agemys.cc",
"rule": [
"cdn-tos",
"obj/tos-cn"
]
},
{
"host": "www.fun4k.com",
"rule": [
"https://hd.ijycnd.com/play",
"index.m3u8"
]
},
{
"host": "zjmiao.com",
"rule": [
"play.videomiao.vip/API.php",
"time=",
"key=",
"path="
]
},
{
"name": "火山嗅探",
"hosts": [
"huoshan.com"
],
"regex": [
"item_id="
]
},
{
"name": "抖音嗅探",
"hosts": [
"douyin.com"
],
"regex": [
"is_play_url="
]
},
{
"name": "農民嗅探",
"hosts": [
"toutiaovod.com"
],
"regex": [
"video/tos/cn"
]
},
{
"name": "夜市",
"hosts": [
"yeslivetv.com"
],
"script": [
"document.getElementsByClassName('vjs-big-play-button')[0].click()"
]
},
{
"name": "毛驢",
"hosts": [
"www.maolvys.com"
],
"script": [
"document.getElementsByClassName('swal-button swal-button--confirm')[0].click()"
]
}
],
"headers": [
{
"host": "mgtv.ottiptv.cc",
"header": {
"User-Agent": "okHttp/Mod-1.5.0.0",
"Referer": "https://mgtv.ottiptv.cc/"
}
},
{
"host": "hlsztemgsplive.miguvideo.com",
"header": {
"User-Agent": "bingcha/1.1"
}
}
],
"ads": [
"static-mozai.4gtv.tv"
],
"parses": [
{
"name": "解析聚合",
"type": 3,
"url": "Web"
},
{
"name": "观山",
"type": 0,
"url": "https://p10.zijincao.cc/?url="
},
{
"name": "抚琴",
"type": 0,
"url": "https://jx.xmflv.com/?url="
},
{
"name": "七哥",
"url": "https://jx.nnxv.cn/tv.php?url=",
"type": 0
},
{
"name": "777",
"type": 0,
"url": "https://www.huaqi.live/?url="
},
{
"name": "jsonplayer",
"type": 0,
"url": "https://jx.jsonplayer.com/player/?url="
},
{
"name": "xmflv",
"type": 0,
"url": "https://jx.xmflv.com/?url="
},
{
"name": "M3U8",
"url": "https://jx.m3u8.tv/jiexi/?url=",
"type": 0
},
{
"name": "PM",
"url": "https://www.playm3u8.cn/jiexi.php?url=",
"type": 0
}
],
"ijk": [
{
"group": "软解码",
"options": [
{
"category": 4,
"name": "opensles",
"value": "0"
},
{
"category": 4,
"name": "overlay-format",
"value": "842225234"
},
{
"category": 4,
"name": "framedrop",
"value": "1"
},
{
"category": 4,
"name": "soundtouch",
"value": "1"
},
{
"category": 4,
"name": "start-on-prepared",
"value": "1"
},
{
"category": 1,
"name": "http-detect-range-support",
"value": "0"
},
{
"category": 1,
"name": "fflags",
"value": "fastseek"
},
{
"category": 2,
"name": "skip_loop_filter",
"value": "48"
},
{
"category": 4,
"name": "reconnect",
"value": "1"
},
{
"category": 4,
"name": "max-buffer-size",
"value": "8388608"
},
{
"category": 4,
"name": "enable-accurate-seek",
"value": "0"
},
{
"category": 4,
"name": "mediacodec",
"value": "0"
},
{
"category": 4,
"name": "mediacodec-auto-rotate",
"value": "0"
},
{
"category": 4,
"name": "mediacodec-handle-resolution-change",
"value": "0"
},
{
"category": 4,
"name": "mediacodec-hevc",
"value": "0"
},
{
"category": 1,
"name": "dns_cache_timeout",
"value": "600000000"
}
]
},
{
"group": "硬解码",
"options": [
{
"category": 4,
"name": "opensles",
"value": "0"
},
{
"category": 4,
"name": "overlay-format",
"value": "842225234"
},
{
"category": 4,
"name": "framedrop",
"value": "1"
},
{
"category": 4,
"name": "soundtouch",
"value": "1"
},
{
"category": 4,
"name": "start-on-prepared",
"value": "1"
},
{
"category": 1,
"name": "http-detect-range-support",
"value": "0"
},
{
"category": 1,
"name": "fflags",
"value": "fastseek"
},
{
"category": 2,
"name": "skip_loop_filter",
"value": "48"
},
{
"category": 4,
"name": "reconnect",
"value": "1"
},
{
"category": 4,
"name": "max-buffer-size",
"value": "12582912"
},
{
"category": 4,
"name": "enable-accurate-seek",
"value": "0"
},
{
"category": 4,
"name": "mediacodec",
"value": "1"
},
{
"category": 4,
"name": "mediacodec-auto-rotate",
"value": "1"
},
{
"category": 4,
"name": "mediacodec-handle-resolution-change",
"value": "1"
},
{
"category": 4,
"name": "mediacodec-hevc",
"value": "1"
},
{
"category": 1,
"name": "dns_cache_timeout",
"value": "600000000"
}
]
}
],
"flags": [
"youku",
"tudou",
"qq",
"qiyi",
"iqiyi",
"leshi",
"letv",
"sohu",
"imgo",
"mgtv",
"bilibili",
"pptv",
"PPTV",
"migu"
],
"disabled_wallpaper": "",
"wallpaper": "./img/0.jpg",
"spider": "./jar/xb.jar",
"logo": "./img/pg.gif",
"warningText": "1"
}
+393 -205
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# ====================================================
# 项目名称: Git Master 终端可视化管理脚本
# 项目名称: Git Master 终端可视化管理脚本 (重构优化版)
# 运行环境: 适配 Android / Termux / MT 管理器终端环境
# 核心原则: 保护本地代码为主,提供直观的变更管理与推送控制
# 核心原则: 独立执行单步操作,采用现代 Git 命令,详细注释
# ====================================================
# ================= 配置区 =================
# 您的专属 Github 仓库地址与日志绝对路径 (请勿随意修改)
# 专属 Github 仓库地址与日志绝对路径 (请勿随意修改)
MY_REPO_URL="https://github.com/cluntop/tvbox.git"
LOG_FILE="/data/data/bin.mt.plus/home/tvbox/.github/git.log"
@@ -21,17 +21,28 @@ BOLD='\033[1m'
NC='\033[0m' # 恢复默认配色
# ================= 基础核心函数 =================
# 自动创建日志所在目录,抑制报错输出
mkdir -p "$(dirname "$LOG_FILE")" 2>/dev/null
# 初始化日志目录 (单独执行,避免与其他命令合并)
init_log_dir() {
local log_dir
log_dir=$(dirname "$LOG_FILE")
if [ ! -d "$log_dir" ]; then
mkdir -p "$log_dir" 2>/dev/null
fi
}
init_log_dir
# 统一日志记录器
log() {
if [ -w "$(dirname "$LOG_FILE")" ]; then
local log_dir
log_dir=$(dirname "$LOG_FILE")
# 检查日志目录是否具有可写权限
if [ -w "$log_dir" ]; then
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
fi
}
# 格式化消息输出
# 格式化消息输出函数
success_msg() { echo -e "${GREEN}$1${NC}"; log "成功: $1"; }
error_msg() { echo -e "${RED}$1${NC}"; log "错误: $1"; }
warn_msg() { echo -e "${YELLOW}$1${NC}"; log "警告: $1"; }
@@ -40,327 +51,504 @@ title_msg() { echo -e "\n${BOLD}${PURPLE}>>> $1 <<<${NC}\n"; }
# 依赖检查:验证 Git 是否已安装
check_git() {
# command -v 是检测命令是否存在的标准 POSIX 写法
if ! command -v git > /dev/null 2>&1; then
error_msg "致命错误: 未检测到 Git 环境,请先安装 Git。"
exit 1
fi
}
# 环境检查:验证当前目录是否为有效的 Git 仓库
# 环境检查:验证当前是否处于 Git 仓库工作区内 (支持子目录识别)
check_git_repo() {
if [ ! -d ".git" ]; then
# 现代标准写法:无论在仓库的哪个子目录,只要受 git 管理都会返回 true
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
return 0
else
return 1
fi
return 0
}
# ================= 业务功能模块 =================
# ================= 业务功能模块 (原子化分离) =================
# 1. 增强版提交 (可视化 & 自定义信息) -> 遵守约定: 此步骤绝不自动拉取更新
enhanced_submit() {
title_msg "🚀 提交与推送工作流"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库,请先执行 [6] 初始化"; return 1; fi
# 1. 单独执行:追踪与暂存 (Git Add)
do_add() {
title_msg "📝 步骤 1/3: 暂存文件 (Git Add)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库,请先初始化"
return 1
fi
local changes=$(git status --porcelain)
# 获取工作区变动情况
local changes
changes=$(git status --porcelain)
if [ -z "$changes" ]; then
warn_msg "当前工作区净,没有任何文件被修改或新增,无需提交。"
warn_msg "工作区净,没有需要暂存的修改文件。"
return 0
fi
echo -e "${YELLOW}处理的文件变更概览:${NC}"
echo -e "${YELLOW}暂存的变更文件:${NC}"
git status --short
echo ""
# 捕获用户自定义提交信息,提供默认值以支持快速回车跳过
read -p "📝 输入提交信息 (直接回车默认: Update Up): " msg
[ -z "$msg" ] && msg="Update Up"
info_msg "1/3 正在执行追踪关联 (git add .) ..."
info_msg "正在执行文件追踪 (git add .) ..."
git add .
info_msg "2/3 正在生成本地提交快照 (git commit) ..."
git commit -m "$msg"
# 获取当前所在分支,规避游离分支风险
local curr=$(git branch --show-current)
[ -z "$curr" ] && curr="main"
info_msg "3/3 尝试标准推送至 origin/$curr ..."
if git push origin "$curr"; then
success_msg "推送成功!代码已同步至云端。"
# 单独校验执行结果
if [ $? -eq 0 ]; then
success_msg "所有变更已成功加入暂存区!"
else
warn_msg "标准推送受阻!远程仓库存在本地没有的代码 (fetch first)。"
read -p "⚠ 是否无视冲突,执行暴力强制推送 (警告: 远程额外数据将被彻底覆盖)? (y/n): " force_push
error_msg "暂存失败,请检查文件权限。"
fi
}
# 2. 单独执行:生成快照 (Git Commit)
do_commit() {
title_msg "📦 步骤 2/3: 提交快照 (Git Commit)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库,请先初始化"
return 1
fi
# 检查暂存区是否有待提交的内容
local staged_changes
staged_changes=$(git diff --cached --name-only)
if [ -z "$staged_changes" ]; then
warn_msg "暂存区为空。请先执行 [1] 暂存文件 (Add) 再进行提交。"
return 0
fi
# 捕获用户自定义提交信息
read -p "请输入提交信息 (直接回车默认: Update Up): " msg
if [ -z "$msg" ]; then
msg="Update Up"
fi
info_msg "正在生成本地提交快照..."
git commit -m "$msg"
if [ $? -eq 0 ]; then
success_msg "版本快照生成完毕!"
else
error_msg "提交失败,请检查配置或终端输出。"
fi
}
# 3. 单独执行:推送云端 (Git Push)
do_push() {
title_msg "🚀 步骤 3/3: 推送至云端 (Git Push)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
# 获取当前所在分支 (现代命令 --show-current)
local curr
curr=$(git branch --show-current)
if [ -z "$curr" ]; then
curr="main"
fi
info_msg "正在推送数据包至 origin/$curr ..."
git push origin "$curr"
# 根据状态码判断推送是否成功
if [ $? -eq 0 ]; then
success_msg "代码已成功同步至云端!"
else
warn_msg "常规推送被拒绝。远程仓库可能包含您本地没有的更改。"
read -p "⚠ 是否执行安全强制推送 (使用 --force-with-lease 避免误覆盖他人代码)? (y/n): " force_push
if [[ "$force_push" =~ ^[Yy]$ ]]; then
info_msg "正在执行强推指令 (git push -f) ..."
git push -f --set-upstream origin "$curr" && success_msg "强制推送成功!(远程状态已被本地覆盖)" || error_msg "强制推送失败,请检查网络拦截或写入权限。"
info_msg "启动安全覆盖协议 (git push --force-with-lease) ..."
# 使用更现代、更安全的 force-with-lease 替代危险的 -f
git push --force-with-lease --set-upstream origin "$curr"
if [ $? -eq 0 ]; then
success_msg "安全强推成功!远程状态已被本地更新覆盖。"
else
error_msg "强推失败,可能存在更严重的冲突或网络问题。"
fi
else
info_msg "已中止操作。建议排查远程变更或执行拉取合并。"
info_msg "操作已取消。建议先执行拉取操作。"
fi
fi
}
# 2. 增强版拉取 (附带冲突安全检测)
enhanced_pull() {
title_msg "📥 拉取最新更新"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库"; return 1; fi
# 4. 单独执行:拉取更新 (Git Pull)
do_pull() {
title_msg "📥 拉取最新更新 (Git Pull)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
local curr=$(git branch --show-current)
[ -z "$curr" ] && curr="main"
local curr
curr=$(git branch --show-current)
if [ -z "$curr" ]; then
curr="main"
fi
info_msg "1/2 正在静默探测远程最新状态 (git fetch)..."
info_msg "1/2 探测远程状态 (git fetch)..."
git fetch origin 2>/dev/null
# 冲突阻断机制:防止覆盖本地未保存的心血
local local_changes=$(git status --porcelain)
# 冲突阻断机制
local local_changes
local_changes=$(git status --porcelain)
local stash_choice="n"
if [ -n "$local_changes" ]; then
warn_msg "高危操作拦截:检测到本地有未提交的代码,直接拉取极易产生代码污染或冲突!"
read -p "是否自动暂存(stash)本地未提交的更改,然后再安全拉取? (y/n): " stash_choice
warn_msg "检测到本地有未提交的更改。直接拉取可能导致冲突!"
read -p "是否暂存(stash)本地更改,安全拉取后再恢复? (y/n): " stash_choice
if [[ "$stash_choice" =~ ^[Yy]$ ]]; then
git stash
info_msg "本地未提交更改已打包收入储藏区(stash)。"
info_msg "本地更改已存入 stash。"
fi
fi
info_msg "2/2 正在执行代码下载与合并逻辑 (git pull origin $curr)..."
if git pull origin "$curr" 2>&1; then
success_msg "拉取合并圆满完成,本地库已同步至最新。"
info_msg "2/2 下载与合并 (git pull origin $curr)..."
git pull origin "$curr"
if [ $? -eq 0 ]; then
success_msg "拉取成功,本地已是最新版本。"
else
error_msg "拉取失败,通常由于严重的结构树冲突或网络断联导致。"
if [[ "$stash_choice" =~ ^[Yy]$ ]]; then
warn_msg "补救提示:您刚才暂存的代码依然安全停留在 stash 中,排查完毕后请手动运行 'git stash pop' 恢复。"
fi
error_msg "拉取过程产生冲突或网络连接失败。"
fi
# 如果刚才暂存了代码,提示恢复
if [[ "$stash_choice" =~ ^[Yy]$ ]]; then
warn_msg "请记得手动执行 'git stash pop' 来恢复您刚才暂存的本地代码。"
fi
}
# 3. 分支管理 (创建与跳转)
# 5. 现代版:分支管理 (使用 git switch)
manage_branches() {
title_msg "🌿 分支管理"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库"; return 1; fi
title_msg "🌿 分支管理 (Branch)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
echo -e "${CYAN}当前设备包含的所有分支详情:${NC}"
echo -e "${CYAN}当前分支列表:${NC}"
git branch -a
echo ""
echo "1) 基于当前状态创建并切换至新分支"
echo "2) 切换到已存在的其他分支"
echo "3) 取消操作并返回主菜单"
read -p "请选择分支指令: " b_choice
echo "3) 返回主菜单"
read -p "请选择分支指令编号: " b_choice
case $b_choice in
1)
read -p "请输入欲创建的新分支称 (不能含空格): " b_name
[ -n "$b_name" ] && git checkout -b "$b_name" && success_msg "成功!已切换并处在新分支: $b_name"
read -p "请输入新分支称 (空格): " b_name
if [ -n "$b_name" ]; then
# 现代命令:使用 switch -c 替代 checkout -b
git switch -c "$b_name"
if [ $? -eq 0 ]; then
success_msg "已创建并切换至新分支: $b_name"
else
error_msg "分支创建失败"
fi
fi
;;
2)
read -p "请输入需要跳转的目标分支名称: " b_name
[ -n "$b_name" ] && git checkout "$b_name" && success_msg "成功!工作区已切换至分支: $b_name"
read -p "请输入目标分支名称: " b_name
if [ -n "$b_name" ]; then
# 现代命令:使用 switch 替代 checkout
git switch "$b_name"
if [ $? -eq 0 ]; then
success_msg "成功切换至分支: $b_name"
else
error_msg "分支切换失败"
fi
fi
;;
3)
info_msg "操作取消"
;;
*)
error_msg "无效选项"
;;
esac
}
# 4. 可视化历史日志树状图
view_logs() {
title_msg "📜 Git 提交历史溯源 (树状呈现)"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库"; return 1; fi
# 限制显示最近 15 条,避免终端屏幕被刷爆
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -n 15
echo -e "\n"
}
# 5. 远端关联 (锚定仓库 URL)
# 6. 单独执行:绑定远程地址
bind_remote() {
title_msg "🔗 绑定与修正远程仓库"
check_git_repo || return 1
local current_url=$(git remote get-url origin 2>/dev/null)
title_msg "🔗 绑定远程仓库地址"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
local current_url
current_url=$(git remote get-url origin 2>/dev/null)
echo -e "当前设备识别到的源地址: ${YELLOW}${current_url:-"[本地暂无配置远程源]"}${NC}"
echo -e "脚本预设的强制目标地址: ${GREEN}$MY_REPO_URL${NC}"
echo -e "脚本预设的目标地址: ${GREEN}$MY_REPO_URL${NC}"
read -p "确认将本地代码流指向预设目标地址吗? (y/n): " confirm
read -p "确认将本地仓库指向预设目标地址吗? (y/n): " confirm
if [[ "$confirm" =~ ^[Yy]$ ]]; then
# 分离执行删除和添加,避免合并逻辑隐患
git remote remove origin 2>/dev/null
git remote add origin "$MY_REPO_URL" && success_msg "绑定重置操作完成" || error_msg "指令拒绝,可能源名称冲突或权限不足"
fi
}
# 6. 新仓库地基搭建
init_repo() {
title_msg "📦 原始目录初始化仓库"
if [ -d ".git" ]; then error_msg "阻止操作:当前目录已经是受 Git 监控的仓库"; return 1; fi
# 兼容处理老版本 Git 将默认分支设为 master 的问题,强制更名为 main
git init && git checkout -b main 2>/dev/null || git branch -M main
success_msg "地基搭建完毕!当前所处分支已被统一规划为: main"
}
# 7. 工作区物理路径漫游
change_dir() {
title_msg "📁 切换当前操作的系统物理目录"
echo -e "当前系统位置: ${YELLOW}$(pwd)${NC}"
read -p "请输入您想进入的新路径 (支持相对路径如 ../ 或绝对路径如 /sdcard/): " new_path
if [ -n "$new_path" ]; then
mkdir -p "$new_path" 2>/dev/null
cd "$new_path" && success_msg "系统位置已成功转移至: $(pwd)" || error_msg "进入指定路径失败,请检查路径合法性与访问权限"
fi
}
# 8. 无用对象深度回收清扫
deep_clean() {
title_msg "🧹 .git 隐藏目录瘦身与垃圾回收"
check_git_repo || return 1
info_msg "正在清空历史动作残留 (reflog) 并执行激进的对象压缩 (aggressive gc)..."
git reflog expire --expire=now --all 2>/dev/null
git gc --prune=now --aggressive 2>/dev/null
success_msg "瘦身成功!清理后的 .git 数据库空间占用缩减为: $(du -sh .git 2>/dev/null | cut -f1)"
}
# 9. 单独的定点推送功能
push_only() {
title_msg "📤 单纯执行代码上云操作 (Push Only)"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库"; return 1; fi
local curr=$(git branch --show-current)
[ -z "$curr" ] && curr="main"
info_msg "引擎启动,正在单独向 origin/$curr 推送数据包..."
if git push origin "$curr"; then
success_msg "数据包推送成功!"
else
warn_msg "推送通道受阻!远程服务器已包含您本地未拥有的提交版本 (fetch first)。"
read -p "⚠ 危险选项:是否触发强制推送阀门,直接用本地数据摧毁并覆盖远程数据? (y/n): " force_push
if [[ "$force_push" =~ ^[Yy]$ ]]; then
info_msg "暴力覆盖协议启动 (git push -f) ..."
git push -f --set-upstream origin "$curr" && success_msg "覆盖打击完成!远程数据已被强制重写。" || error_msg "覆盖打击失败,系统拦截了该操作。"
git remote add origin "$MY_REPO_URL"
if [ $? -eq 0 ]; then
success_msg "远程源绑定成功!"
else
info_msg "强制覆盖指令已取消。"
error_msg "绑定失败,请检查权限。"
fi
fi
}
# 10. 新增:细颗粒度审查 (状态与具体变更明细)
# 7. 现代版:初始化仓库
init_repo() {
title_msg "📦 初始化 Git 仓库"
if check_git_repo; then
error_msg "阻止操作:当前已经是受控 Git 仓库"
return 1
fi
# 现代命令:直接在初始化时指定默认主分支为 main (Git 2.28+)
git init --initial-branch=main
if [ $? -eq 0 ]; then
success_msg "仓库初始化完毕!默认主分支已设为: main"
else
error_msg "初始化失败"
fi
}
# 8. 单独执行:历史查询
view_logs() {
title_msg "📜 提交历史溯源"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
# 限制显示 15 条
git --no-pager log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -n 15
echo -e "\n"
}
# 9. 状态剖析与明细
view_status() {
title_msg "📊 库区状态剖析与代码变更明细雷达"
if ! check_git_repo; then error_msg "当前目录非 Git 仓库,无法扫描"; return 1; fi
title_msg "📊 库区状态剖析"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
echo -e "${CYAN}【当前文件级状态概览 (git status -s)】${NC}"
# 显示简短状态:比如 M 代表被修改,?? 代表未追踪的新文件
git status -s
echo ""
echo -e "${CYAN}【工作区尚未打包(未 add)的深层代码变动 (git diff)】${NC}"
# 显示目前本地写了但还没 add 进暂存区的具体代码加减情况
git diff
echo -e "${CYAN}【工作区尚未暂存的代码变动 (git diff)】${NC}"
git --no-pager diff
echo ""
echo -e "${CYAN}【已放入暂存区(已 add)待提交的代码变动 (git diff --cached)】${NC}"
# 显示已经准备好,只要执行 commit 就会生成的代码加减情况
git diff --cached
echo -e "${CYAN}【已放入暂存区待提交的代码变动 (git diff --cached)】${NC}"
git --no-pager diff --cached
echo ""
}
# 10. 系统操作:切换目录
change_dir() {
title_msg "📁 切换物理工作目录"
echo -e "当前系统位置: ${YELLOW}$(pwd)${NC}"
read -p "请输入新路径 (绝对/相对均可): " new_path
if [ -n "$new_path" ]; then
if [ ! -d "$new_path" ]; then
mkdir -p "$new_path" 2>/dev/null
fi
cd "$new_path" || error_msg "无法进入指定路径"
if [ "$(pwd)" = "$new_path" ] || [ "$(pwd)" = "$(realpath "$new_path" 2>/dev/null)" ]; then
success_msg "系统位置已成功转移至: $(pwd)"
fi
fi
}
# 11. 系统操作:深度清理
deep_clean() {
title_msg "🧹 垃圾回收与深度清理"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
info_msg "清理历史动作残留并压缩数据库..."
git reflog expire --expire=now --all 2>/dev/null
git gc --prune=now --aggressive 2>/dev/null
if [ $? -eq 0 ]; then
success_msg "清理成功!当前 .git 体积为: $(du -sh .git 2>/dev/null | cut -f1)"
else
error_msg "清理任务中断或失败。"
fi
}
# 12. 单独执行:恢复暂存代码 (Stash Pop)
restore_stash() {
title_msg "📦 恢复暂存代码 (Git Stash Pop)"
if ! check_git_repo; then
error_msg "当前目录非 Git 仓库"
return 1
fi
# 检查是否有 stash 记录
local stash_count
stash_count=$(git stash list | wc -l)
if [ "$stash_count" -eq 0 ]; then
warn_msg "当前没有发现任何被暂存 (stash) 的代码记录。"
return 0
fi
echo -e "${CYAN}【当前的暂存记录列表 (git stash list)】${NC}"
git --no-pager stash list
echo ""
echo -e "${CYAN}【回顾:上一条(最近一次)提交产生的最终影响 (git show --stat)】${NC}"
# 调出最后一次成功执行 commit 时的文件增减统计报表
git show --stat HEAD
echo ""
# === 新增安全防线:检测工作区是否干净 ===
local local_changes
local_changes=$(git status --porcelain)
if [ -n "$local_changes" ]; then
warn_msg "高危拦截:您的工作区目前存在未提交的修改!"
error_msg "此时强制释放暂存极大概率会导致覆盖报错 (Aborting)。"
info_msg "建议方案:请先按 [1] 暂存并 [2] 提交当前代码,然后再执行此操作。"
read -p "⚠ 是否仍要无视警告强行尝试释放?(y/n): " force_pop
if [[ ! "$force_pop" =~ ^[Yy]$ ]]; then
info_msg "操作已安全取消。"
return 0
fi
fi
# =======================================
read -p "检测到有 $stash_count 条暂存记录,是否立即恢复最新的一条并合并回工作区? (y/n): " pop_choice
if [[ "$pop_choice" =~ ^[Yy]$ ]]; then
info_msg "正在释放暂存区代码 (git stash pop)..."
# 捕获恢复操作的结果
local pop_output
pop_output=$(git stash pop 2>&1)
local pop_status=$?
# 直接打印完整日志以便排错
echo -e "${CYAN}$pop_output${NC}"
if [ $pop_status -eq 0 ]; then
success_msg "恢复成功!您暂存的代码已安全回到工作区。"
elif echo "$pop_output" | grep -q "Aborting"; then
error_msg "恢复被 Git 中止!原因:工作区存在冲突的未保存文件。请先提交或丢弃当前更改。"
else
error_msg "恢复时产生合并冲突!请打开编辑器解决文件内的冲突标记 (<<<<<<<) 后再提交。"
fi
else
info_msg "已取消操作。您的代码依然安全地保留在 stash 中。"
fi
}
# ================= 终端前端 GUI / 菜单仪表盘 =================
show_dashboard() {
clear 2>/dev/null || printf '\033[2J\033[H'
echo -e "${BOLD}${BLUE}══════════════════════════════════════════════${NC}"
echo -e "${BOLD}${CYAN} 🛠️ Git Master 终端控制台核心 ${NC}"
echo -e "${BOLD}${CYAN} 🛠️ Git Master 控制台 (原子重构版) ${NC}"
echo -e "${BOLD}${BLUE}══════════════════════════════════════════════${NC}"
echo -e " 📍 ${BOLD}物理坐标:${NC} ${YELLOW}$(pwd)${NC}"
if check_git_repo; then
local b_name=$(git branch --show-current 2>/dev/null)
local changes=$(git status --porcelain 2>/dev/null | wc -l)
local remote=$(git remote get-url origin 2>/dev/null || echo "未绑定远程")
local b_name
b_name=$(git branch --show-current 2>/dev/null)
local changes
changes=$(git status --porcelain 2>/dev/null | wc -l)
local remote
remote=$(git remote get-url origin 2>/dev/null || echo "未绑定远程")
echo -e " 🌿 ${BOLD}当前分支:${NC} ${GREEN}${b_name:-"游离状态/未命名"}${NC}"
echo -e " 🔗 ${BOLD}远程目标:${NC} ${CYAN}${remote}${NC}"
if [ "$changes" -gt 0 ]; then
echo -e " 📝 ${BOLD}变动预警:${NC} ${RED}检测到工作区存在 $changes未提交的变更文件${NC}"
echo -e " 📝 ${BOLD}变动预警:${NC} ${RED}工作区 $changes变更未处理${NC}"
else
echo -e " 📝 ${BOLD}变动预警:${NC} ${GREEN}工作区完全纯净,与仓库历史保持一致${NC}"
echo -e " 📝 ${BOLD}变动预警:${NC} ${GREEN}工作区完全纯净${NC}"
fi
else
echo -e " ⚠️ ${BOLD}存储核心:${NC} ${RED}尚未建立本地 Git 数据库${NC}"
echo -e " ⚠️ ${BOLD}存储核心:${NC} ${RED}未检测到 Git 数据库${NC}"
fi
echo -e "${BOLD}${BLUE}──────────────────────────────────────────────${NC}"
echo -e " ${GREEN}[1] 🚀 自动融合提交与推送 (Commit & Push)${NC}"
echo -e " ${CYAN}[2] 📥 安全拉取与合并 (Fetch & Pull)${NC}"
echo -e " ${YELLOW}[3] 📜 历史拓扑图溯源 (Log Graph)${NC}"
echo -e " ${PURPLE}[4] 🌿 时间线分支跳转与构建 (Branch Mgt)${NC}"
echo -e " ${BLUE}[5] 🔗 锚定固定远程目标源 (Bind Remote)${NC}"
echo -e " ${CYAN}[6] 📦 从零初始化存储核心 (Init)${NC}"
echo -e " ${YELLOW}[7] 📁 漂移工作目录系统路径 (Change Dir)${NC}"
echo -e " ${RED}[8] 🧹 深度执行空间站垃圾回收 (GC & Clean)${NC}"
echo -e " ${PURPLE}[9] 📤 单纯向服务器输送现有快照 (Push Only)${NC}"
echo -e " ${GREEN}[10] 📊 雷达扫描: 状态剖析与变更明细 (Status & Diff)${NC}"
echo -e " ${BOLD}[0] ❌ 脱离控制台 (Exit)${NC}"
# 菜单打散为独立功能
echo -e " ${YELLOW}[1] 📝 暂存变动 (Git Add)${NC}"
echo -e " ${GREEN}[2] 📦 创建快照 (Git Commit)${NC}"
echo -e " ${CYAN}[3] 🚀 推送云端 (Git Push)${NC}"
echo -e " ${PURPLE}[4] 📥 拉取更新 (Git Pull)${NC}"
echo -e " ${BLUE}[5] 🌿 分支管理 (Branch)${NC}"
echo -e " ${YELLOW}[6] 📊 状态明细 (Status & Diff)${NC}"
echo -e " ${CYAN}[7] 📜 历史查询 (Log Graph)${NC}"
echo -e " ${PURPLE}[8] 🔗 绑定源址 (Bind Remote)${NC}"
echo -e " ${GREEN}[9] 📦 建立仓库 (Init Repo)${NC}"
echo -e " ${YELLOW}[10] 📁 切换目录 (Change Dir)${NC}"
echo -e " ${RED}[11] 🧹 深度清理 (Git GC)${NC}"
echo -e " ${PURPLE}[12] 📦 恢复暂存 (Stash Pop)${NC}"
echo -e " ${BOLD}[0] ❌ 退出终端 (Exit)${NC}"
echo -e "${BOLD}${BLUE}══════════════════════════════════════════════${NC}"
}
# ================= 权限前置防线 =================
if [ "$(id -u)" -ne 0 ]; then
warn_msg "环境提示:未检测到 Root 权限,针对高安全级别目录操作可能会遭受系统拒绝..."
warn_msg "环境提示:未检测到 Root 权限,针对根目录等高权区域可能会读写受阻。"
fi
# 在启动任何操作前检查基础二进制文件
check_git
# ================= 命令行外置参数解析路由器 (独立运行执行) =================
# 允许用户不通过界面,直接执行 ./git.sh status 或 ./git.sh push 等单一指令
# ================= 命令行外置参数解析路由器 =================
if [ $# -gt 0 ]; then
case "$1" in
commit) enhanced_submit ;;
pull) enhanced_pull ;;
log) view_logs ;;
add) do_add ;;
commit) do_commit ;;
push) do_push ;;
pull) do_pull ;;
branch) manage_branches ;;
status) view_status ;;
log) view_logs ;;
bind) bind_remote ;;
init) init_repo ;;
cd) change_dir ;;
clean) deep_clean ;;
push) push_only ;;
status) view_status ;;
stash) restore_stash ;;
help|-h|--help)
echo -e "${CYAN}Git Master CLI 独立模式使用指南:${NC}"
echo -e "语法: $0 [选项]"
echo -e "无参数执行时,自动进入可视化主菜单交互模式。\n"
echo -e "独立运行指令:"
echo -e " commit : 执行代码添加、快照提交并推送到远端"
echo -e " pull : 拉取最新的远程仓库版本并合并"
echo -e " log : 渲染提交历史溯源图"
echo -e " branch : 进入分支切换流"
echo -e " bind : 将远程仓库地址绑定为脚本内配置项"
echo -e " init : 创建新的本地仓库"
echo -e " cd : (在独立模式下无效,由于 shell 进程沙盒机制)"
echo -e " clean : 执行激进的无用数据清理"
echo -e " push : 单独执行本地修改上云推送"
echo -e " status : 打印当前修改详情及暂存区分析报表"
echo -e " add : 暂存当前所有改动"
echo -e " commit : 为暂存的内容创建快照"
echo -e " push : 将本地提交推送到远程仓库"
echo -e " pull : 拉取并合并最新代码"
echo -e " branch : 分支操作"
echo -e " status : 查看仓库状态"
echo -e " ...其他命令见菜单"
;;
*) error_msg "无法识别的外部参数: $1。请输入 '$0 help' 查询使用说明。" ;;
*) error_msg "识别的参数: $1" ;;
esac
exit 0 # 执行完毕自动切断,保证独立单一运行
exit 0
fi
# ================= 交互式生命周期循环 =================
while true; do
show_dashboard
read -p "👉 键入数字并回车,指派操作编号: " choice
read -p "👉 键入数字并回车: " choice
case $choice in
1) enhanced_submit ;;
2) enhanced_pull ;;
3) view_logs ;;
4) manage_branches ;;
5) bind_remote ;;
6) init_repo ;;
7) change_dir ;;
8) deep_clean ;;
9) push_only ;;
10) view_status ;;
0) echo "操作结束,终端控制台已下线。"; exit 0 ;;
*) error_msg "非法的选项指令,请确认您输入的数字属于面板编号范围" ;;
1) do_add ;;
2) do_commit ;;
3) do_push ;;
4) do_pull ;;
5) manage_branches ;;
6) view_status ;;
7) view_logs ;;
8) bind_remote ;;
9) init_repo ;;
10) change_dir ;;
11) deep_clean ;;
12) restore_stash ;;
0) echo "控制台已下线。"; exit 0 ;;
*) error_msg "非法的选项指令,请确认您输入的数字有效" ;;
esac
echo ""
read -p "Press Enter 确认并继续下一步任务流..."
read -p "按 [Enter] 键继续..."
done