├── IdleFishSearchFilter ├── README.md ├── icon.jpg ├── misty.ali-mitm.sgmodule ├── misty.idlefish-search.js └── misty.idlefish-search.sgmodule ├── OzanNoLogout ├── README.md ├── misty.ozannologout.js ├── misty.ozannologout.sgmodule └── misty.ozannologout.snippet ├── README.md ├── eChongdianNoAd ├── misty.echongdian.js ├── misty.echongdian.sgmodule └── misty.echongdian.snippet └── misty-pub.boxjs.json /IdleFishSearchFilter/README.md: -------------------------------------------------------------------------------- 1 | # 闲鱼搜索关键字过滤 2 | 3 | ## 原因: 4 | 5 | 一堆恶心人的暂挂、求购,占用大量屏幕 6 | 7 | ## 相关接口: 8 | 9 | ``` 10 | https://acs.m.goofish.com/gw/mtop.taobao.idle.search.glue/8.0 11 | ``` 12 | 13 | ## 脚本逻辑 14 | 15 | - 解析返回JSON,按照 ret.data.resultList[].data.item.main.exContent.title判断关键字 16 | 17 | 18 | ## 特殊情况 19 | 20 | - 闲鱼会绕开dns直接请求https,需要添加 `force-http-engine-hosts` 来强制解析TLS 21 | - 首次搜索时会卡一段时间 22 | -------------------------------------------------------------------------------- /IdleFishSearchFilter/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/f9e1c45abe608d9521d1ce4b80737fe7f67592b9/IdleFishSearchFilter/icon.jpg -------------------------------------------------------------------------------- /IdleFishSearchFilter/misty.ali-mitm.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Misty-Ali MITM 2 | #!desc=强制对阿里系流量启动MITM 3 | 4 | [MITM] 5 | tcp-connection = true 6 | hostname = %INSERT%, 39.96.*.*:443, 39.97.*.*:443, 39.98.*.*:443, 39.99.*.*:443, 39.100.*.*:443, 39.101.*.*:443, 39.102.*.*:443, 39.103.*.*:443, 39.104.*.*:443, 39.105.*.*:443, 39.106.*.*:443, 39.107.*.*:443, 39.108.*.*:443, 42.96.128.*:443, 42.96.129.*:443, 42.96.130.*:443, 42.96.131.*:443, 42.96.132.*:443, 42.96.133.*:443, 42.96.134.*:443, 42.96.135.*:443, 42.96.136.*:443, 42.96.137.*:443, 42.96.138.*:443, 42.96.139.*:443, 42.96.140.*:443, 42.96.141.*:443, 42.96.142.*:443, 42.96.143.*:443, 42.96.144.*:443, 42.96.145.*:443, 42.96.146.*:443, 42.96.147.*:443, 42.96.148.*:443, 42.96.149.*:443, 42.96.150.*:443, 42.96.151.*:443, 42.96.152.*:443, 42.96.153.*:443, 42.96.154.*:443, 42.96.155.*:443, 42.96.156.*:443, 42.96.157.*:443, 42.96.158.*:443, 42.96.159.*:443, 42.96.160.*:443, 42.96.161.*:443, 42.96.162.*:443, 42.96.163.*:443, 42.96.164.*:443, 42.96.165.*:443, 42.96.166.*:443, 42.96.167.*:443, 42.96.168.*:443, 42.96.169.*:443, 42.96.170.*:443, 42.96.171.*:443, 42.96.172.*:443, 42.96.173.*:443, 42.96.174.*:443, 42.96.175.*:443, 42.96.176.*:443, 42.96.177.*:443, 42.96.178.*:443, 42.96.179.*:443, 42.96.180.*:443, 42.96.181.*:443, 42.96.182.*:443, 42.96.183.*:443, 42.96.184.*:443, 42.96.185.*:443, 42.96.186.*:443, 42.96.187.*:443, 42.96.188.*:443, 42.96.189.*:443, 42.96.190.*:443, 42.96.191.*:443, 42.96.192.*:443, 42.96.193.*:443, 42.96.194.*:443, 42.96.195.*:443, 42.96.196.*:443, 42.96.197.*:443, 42.96.198.*:443, 42.96.199.*:443, 42.96.200.*:443, 42.96.201.*:443, 42.96.202.*:443, 42.96.203.*:443, 42.96.204.*:443, 42.96.205.*:443, 42.96.206.*:443, 42.96.207.*:443, 42.96.208.*:443, 42.96.209.*:443, 42.96.210.*:443, 42.96.211.*:443, 42.96.212.*:443, 42.96.213.*:443, 42.96.214.*:443, 42.96.215.*:443, 42.96.216.*:443, 42.96.217.*:443, 42.96.218.*:443, 42.96.219.*:443, 42.96.220.*:443, 42.96.221.*:443, 42.96.222.*:443, 42.96.223.*:443, 42.96.224.*:443, 42.96.225.*:443, 42.96.226.*:443, 42.96.227.*:443, 42.96.228.*:443, 42.96.229.*:443, 42.96.230.*:443, 42.96.231.*:443, 42.96.232.*:443, 42.96.233.*:443, 42.96.234.*:443, 42.96.235.*:443, 42.96.236.*:443, 42.96.237.*:443, 42.96.238.*:443, 42.96.239.*:443, 42.96.240.*:443, 42.96.241.*:443, 42.96.242.*:443, 42.96.243.*:443, 42.96.244.*:443, 42.96.245.*:443, 42.96.246.*:443, 42.96.247.*:443, 42.96.248.*:443, 42.96.249.*:443, 42.96.250.*:443, 42.96.251.*:443, 42.96.252.*:443, 42.96.253.*:443, 42.96.254.*:443, 42.96.255.*:443, 42.120.*.*:443, 42.121.*.*:443, 42.156.128.*:443, 42.156.129.*:443, 42.156.130.*:443, 42.156.131.*:443, 42.156.132.*:443, 42.156.133.*:443, 42.156.134.*:443, 42.156.135.*:443, 42.156.136.*:443, 42.156.137.*:443, 42.156.138.*:443, 42.156.139.*:443, 42.156.140.*:443, 42.156.141.*:443, 42.156.142.*:443, 42.156.143.*:443, 42.156.144.*:443, 42.156.145.*:443, 42.156.146.*:443, 42.156.147.*:443, 42.156.148.*:443, 42.156.149.*:443, 42.156.150.*:443, 42.156.151.*:443, 42.156.152.*:443, 42.156.153.*:443, 42.156.154.*:443, 42.156.155.*:443, 42.156.156.*:443, 42.156.157.*:443, 42.156.158.*:443, 42.156.159.*:443, 42.156.160.*:443, 42.156.161.*:443, 42.156.162.*:443, 42.156.163.*:443, 42.156.164.*:443, 42.156.165.*:443, 42.156.166.*:443, 42.156.167.*:443, 42.156.168.*:443, 42.156.169.*:443, 42.156.170.*:443, 42.156.171.*:443, 42.156.172.*:443, 42.156.173.*:443, 42.156.174.*:443, 42.156.175.*:443, 42.156.176.*:443, 42.156.177.*:443, 42.156.178.*:443, 42.156.179.*:443, 42.156.180.*:443, 42.156.181.*:443, 42.156.182.*:443, 42.156.183.*:443, 42.156.184.*:443, 42.156.185.*:443, 42.156.186.*:443, 42.156.187.*:443, 42.156.188.*:443, 42.156.189.*:443, 42.156.190.*:443, 42.156.191.*:443, 42.156.192.*:443, 42.156.193.*:443, 42.156.194.*:443, 42.156.195.*:443, 42.156.196.*:443, 42.156.197.*:443, 42.156.198.*:443, 42.156.199.*:443, 42.156.200.*:443, 42.156.201.*:443, 42.156.202.*:443, 42.156.203.*:443, 42.156.204.*:443, 42.156.205.*:443, 42.156.206.*:443, 42.156.207.*:443, 42.156.208.*:443, 42.156.209.*:443, 42.156.210.*:443, 42.156.211.*:443, 42.156.212.*:443, 42.156.213.*:443, 42.156.214.*:443, 42.156.215.*:443, 42.156.216.*:443, 42.156.217.*:443, 42.156.218.*:443, 42.156.219.*:443, 42.156.220.*:443, 42.156.221.*:443, 42.156.222.*:443, 42.156.223.*:443, 42.156.224.*:443, 42.156.225.*:443, 42.156.226.*:443, 42.156.227.*:443, 42.156.228.*:443, 42.156.229.*:443, 42.156.230.*:443, 42.156.231.*:443, 42.156.232.*:443, 42.156.233.*:443, 42.156.234.*:443, 42.156.235.*:443, 42.156.236.*:443, 42.156.237.*:443, 42.156.238.*:443, 42.156.239.*:443, 42.156.240.*:443, 42.156.241.*:443, 42.156.242.*:443, 42.156.243.*:443, 42.156.244.*:443, 42.156.245.*:443, 42.156.246.*:443, 42.156.247.*:443, 42.156.248.*:443, 42.156.249.*:443, 42.156.250.*:443, 42.156.251.*:443, 42.156.252.*:443, 42.156.253.*:443, 42.156.254.*:443, 42.156.255.*:443, 45.113.40.*:443, 45.113.41.*:443, 45.113.42.*:443, 45.113.43.*:443, 47.92.*.*:443, 47.93.*.*:443, 47.94.*.*:443, 47.95.*.*:443, 47.96.*.*:443, 47.97.*.*:443, 47.98.*.*:443, 47.99.*.*:443, 47.100.*.*:443, 47.101.*.*:443, 47.102.*.*:443, 47.103.*.*:443, 47.104.*.*:443, 47.105.*.*:443, 47.106.*.*:443, 47.107.*.*:443, 47.108.*.*:443, 47.109.*.*:443, 47.110.*.*:443, 47.111.*.*:443, 47.112.*.*:443, 47.113.*.*:443, 47.114.*.*:443, 47.115.*.*:443, 47.116.*.*:443, 47.117.*.*:443, 47.118.*.*:443, 47.119.*.*:443, 47.120.*.*:443, 47.121.*.*:443, 47.122.0.*:443, 47.122.1.*:443, 47.122.2.*:443, 47.122.3.*:443, 47.122.4.*:443, 47.122.5.*:443, 47.122.6.*:443, 47.122.7.*:443, 47.122.8.*:443, 47.122.9.*:443, 47.122.10.*:443, 47.122.11.*:443, 47.122.12.*:443, 47.122.13.*:443, 47.122.14.*:443, 47.122.15.*:443, 47.122.16.*:443, 47.122.17.*:443, 47.122.18.*:443, 47.122.19.*:443, 47.122.20.*:443, 47.122.21.*:443, 47.122.22.*:443, 47.122.23.*:443, 47.122.24.*:443, 47.122.25.*:443, 47.122.26.*:443, 47.122.27.*:443, 47.122.28.*:443, 47.122.29.*:443, 47.122.30.*:443, 47.122.31.*:443, 59.82.0.*:443, 59.82.1.*:443, 59.82.2.*:443, 59.82.3.*:443, 59.82.4.*:443, 59.82.5.*:443, 59.82.6.*:443, 59.82.7.*:443, 59.82.8.*:443, 59.82.9.*:443, 59.82.10.*:443, 59.82.11.*:443, 59.82.12.*:443, 59.82.13.*:443, 59.82.14.*:443, 59.82.15.*:443, 59.82.16.*:443, 59.82.17.*:443, 59.82.18.*:443, 59.82.19.*:443, 59.82.20.*:443, 59.82.21.*:443, 59.82.22.*:443, 59.82.23.*:443, 59.82.24.*:443, 59.82.25.*:443, 59.82.26.*:443, 59.82.27.*:443, 59.82.28.*:443, 59.82.29.*:443, 59.82.30.*:443, 59.82.31.*:443, 59.82.32.*:443, 59.82.33.*:443, 59.82.34.*:443, 59.82.35.*:443, 59.82.36.*:443, 59.82.37.*:443, 59.82.38.*:443, 59.82.39.*:443, 59.82.40.*:443, 59.82.41.*:443, 59.82.42.*:443, 59.82.43.*:443, 59.82.44.*:443, 59.82.45.*:443, 59.82.46.*:443, 59.82.47.*:443, 59.82.48.*:443, 59.82.49.*:443, 59.82.50.*:443, 59.82.51.*:443, 59.82.52.*:443, 59.82.53.*:443, 59.82.54.*:443, 59.82.55.*:443, 59.82.56.*:443, 59.82.57.*:443, 59.82.58.*:443, 59.82.59.*:443, 59.82.60.*:443, 59.82.61.*:443, 59.82.62.*:443, 59.82.63.*:443, 59.82.64.*:443, 59.82.65.*:443, 59.82.66.*:443, 59.82.67.*:443, 59.82.68.*:443, 59.82.69.*:443, 59.82.70.*:443, 59.82.71.*:443, 59.82.72.*:443, 59.82.73.*:443, 59.82.74.*:443, 59.82.75.*:443, 59.82.76.*:443, 59.82.77.*:443, 59.82.78.*:443, 59.82.79.*:443, 59.82.80.*:443, 59.82.81.*:443, 59.82.82.*:443, 59.82.83.*:443, 59.82.84.*:443, 59.82.85.*:443, 59.82.86.*:443, 59.82.87.*:443, 59.82.88.*:443, 59.82.89.*:443, 59.82.90.*:443, 59.82.91.*:443, 59.82.92.*:443, 59.82.93.*:443, 59.82.94.*:443, 59.82.95.*:443, 59.82.96.*:443, 59.82.97.*:443, 59.82.98.*:443, 59.82.99.*:443, 59.82.112.*:443, 59.82.113.*:443, 59.82.114.*:443, 59.82.115.*:443, 59.82.116.*:443, 59.82.117.*:443, 59.82.118.*:443, 59.82.119.*:443, 59.82.120.*:443, 59.82.121.*:443, 59.82.122.*:443, 59.82.123.*:443, 59.82.124.*:443, 59.82.125.*:443, 59.82.126.*:443, 59.82.127.*:443, 59.110.*.*:443, 60.205.*.*:443, 101.37.*.*:443, 101.132.*.*:443, 101.133.*.*:443, 101.200.*.*:443, 101.201.*.*:443, 103.52.196.*:443, 103.52.197.*:443, 103.52.198.*:443, 103.52.199.*:443, 106.11.*.*:443, 106.14.*.*:443, 106.15.*.*:443, 110.75.*.*:443, 110.76.0.*:443, 110.76.1.*:443, 110.76.2.*:443, 110.76.3.*:443, 110.76.4.*:443, 110.76.5.*:443, 110.76.6.*:443, 110.76.7.*:443, 110.76.8.*:443, 110.76.9.*:443, 110.76.10.*:443, 110.76.11.*:443, 110.76.12.*:443, 110.76.13.*:443, 110.76.14.*:443, 110.76.15.*:443, 110.76.16.*:443, 110.76.17.*:443, 110.76.18.*:443, 110.76.19.*:443, 110.76.20.*:443, 110.76.21.*:443, 110.76.22.*:443, 110.76.23.*:443, 110.76.24.*:443, 110.76.25.*:443, 110.76.26.*:443, 110.76.27.*:443, 110.76.28.*:443, 110.76.29.*:443, 110.76.30.*:443, 110.76.31.*:443, 110.76.32.*:443, 110.76.33.*:443, 110.76.34.*:443, 110.76.35.*:443, 110.76.36.*:443, 110.76.37.*:443, 110.76.38.*:443, 110.76.39.*:443, 110.76.40.*:443, 110.76.41.*:443, 110.76.42.*:443, 110.76.43.*:443, 110.76.44.*:443, 110.76.45.*:443, 110.76.46.*:443, 110.76.47.*:443, 110.76.48.*:443, 110.76.49.*:443, 110.76.50.*:443, 110.76.51.*:443, 110.76.52.*:443, 110.76.53.*:443, 110.76.54.*:443, 110.76.55.*:443, 110.76.56.*:443, 110.76.57.*:443, 110.76.58.*:443, 110.76.59.*:443, 110.76.60.*:443, 110.76.61.*:443, 110.76.62.*:443, 110.76.63.*:443, 110.173.192.*:443, 110.173.193.*:443, 110.173.194.*:443, 110.173.195.*:443, 110.173.196.*:443, 110.173.197.*:443, 110.173.198.*:443, 110.173.199.*:443, 110.173.200.*:443, 110.173.201.*:443, 110.173.202.*:443, 110.173.203.*:443, 110.173.204.*:443, 110.173.205.*:443, 110.173.206.*:443, 110.173.207.*:443, 110.173.208.*:443, 110.173.209.*:443, 110.173.210.*:443, 110.173.211.*:443, 110.173.212.*:443, 110.173.213.*:443, 110.173.214.*:443, 110.173.215.*:443, 110.173.216.*:443, 110.173.217.*:443, 110.173.218.*:443, 110.173.219.*:443, 110.173.220.*:443, 110.173.221.*:443, 110.173.222.*:443, 110.173.223.*:443, 112.74.*.*:443, 112.124.*.*:443, 112.125.*.*:443, 112.126.*.*:443, 112.127.*.*:443, 114.55.*.*:443, 114.215.*.*:443, 115.28.*.*:443, 115.29.*.*:443, 115.124.16.*:443, 115.124.17.*:443, 115.124.18.*:443, 115.124.19.*:443, 115.124.20.*:443, 115.124.21.*:443, 115.124.22.*:443, 115.124.23.*:443, 115.124.24.*:443, 115.124.25.*:443, 115.124.26.*:443, 115.124.27.*:443, 115.124.28.*:443, 115.124.29.*:443, 115.124.30.*:443, 115.124.31.*:443, 116.62.*.*:443, 118.31.*.*:443, 118.178.*.*:443, 118.190.*.*:443, 119.23.*.*:443, 119.38.208.*:443, 119.38.209.*:443, 119.38.210.*:443, 119.38.211.*:443, 119.38.212.*:443, 119.38.213.*:443, 119.38.214.*:443, 119.38.215.*:443, 119.38.216.*:443, 119.38.217.*:443, 119.38.218.*:443, 119.38.219.*:443, 119.38.220.*:443, 119.38.221.*:443, 119.38.222.*:443, 119.38.223.*:443, 119.42.224.*:443, 119.42.225.*:443, 119.42.226.*:443, 119.42.227.*:443, 119.42.228.*:443, 119.42.229.*:443, 119.42.230.*:443, 119.42.231.*:443, 119.42.232.*:443, 119.42.233.*:443, 119.42.234.*:443, 119.42.235.*:443, 119.42.236.*:443, 119.42.237.*:443, 119.42.238.*:443, 119.42.239.*:443, 119.42.240.*:443, 119.42.241.*:443, 119.42.242.*:443, 119.42.243.*:443, 119.42.244.*:443, 119.42.245.*:443, 119.42.246.*:443, 119.42.247.*:443, 119.42.248.*:443, 119.42.249.*:443, 119.42.250.*:443, 119.42.251.*:443, 119.42.252.*:443, 119.42.253.*:443, 119.42.254.*:443, 119.42.255.*:443, 120.24.*.*:443, 120.25.*.*:443, 120.26.*.*:443, 120.27.*.*:443, 120.55.*.*:443, 120.76.*.*:443, 120.77.*.*:443, 120.78.*.*:443, 120.79.*.*:443, 121.0.16.*:443, 121.0.17.*:443, 121.0.18.*:443, 121.0.19.*:443, 121.0.20.*:443, 121.0.21.*:443, 121.0.22.*:443, 121.0.23.*:443, 121.0.24.*:443, 121.0.25.*:443, 121.0.26.*:443, 121.0.27.*:443, 121.0.28.*:443, 121.0.29.*:443, 121.0.30.*:443, 121.0.31.*:443, 121.40.*.*:443, 121.41.*.*:443, 121.42.*.*:443, 121.43.*.*:443, 121.89.*.*:443, 121.196.*.*:443, 121.197.*.*:443, 121.198.*.*:443, 121.199.*.*:443, 123.56.*.*:443, 123.57.*.*:443, 139.129.*.*:443, 139.196.*.*:443, 139.224.*.*:443, 140.205.*.*:443, 182.92.*.*:443, 203.107.0.*:443, 203.107.1.*:443, 203.107.6.*:443, 203.107.13.*:443, 203.107.20.*:443, 203.107.21.*:443, 203.107.22.*:443, 203.107.23.*:443, 203.107.26.*:443, 203.107.27.*:443, 203.107.28.*:443, 203.107.29.*:443, 203.107.30.*:443, 203.107.31.*:443, 203.107.32.*:443, 203.107.33.*:443, 203.107.34.*:443, 203.107.35.*:443, 203.107.36.*:443, 203.107.37.*:443, 203.107.38.*:443, 203.107.39.*:443, 203.107.40.*:443, 203.107.41.*:443, 203.107.42.*:443, 203.107.43.*:443, 203.107.44.*:443, 203.107.45.*:443, 203.107.46.*:443, 203.107.47.*:443, 203.107.52.*:443, 203.107.53.*:443, 203.107.54.*:443, 203.107.55.*:443, 203.107.56.*:443, 203.107.57.*:443, 203.107.58.*:443, 203.107.59.*:443, 203.107.60.*:443, 203.107.61.*:443, 203.107.62.*:443, 203.107.63.*:443, 203.107.72.*:443, 203.107.73.*:443, 203.107.74.*:443, 203.107.75.*:443, 203.107.76.*:443, 203.107.77.*:443, 203.107.80.*:443, 203.107.81.*:443, 203.107.82.*:443, 203.107.83.*:443, 203.107.96.*:443, 203.107.97.*:443, 203.107.104.*:443, 203.107.105.*:443, 203.107.106.*:443, 203.107.107.*:443, 203.107.108.*:443, 203.107.109.*:443, 203.119.128.*:443, 203.119.129.*:443, 203.119.130.*:443, 203.119.131.*:443, 203.119.132.*:443, 203.119.133.*:443, 203.119.134.*:443, 203.119.135.*:443, 203.119.136.*:443, 203.119.137.*:443, 203.119.138.*:443, 203.119.139.*:443, 203.119.140.*:443, 203.119.141.*:443, 203.119.142.*:443, 203.119.143.*:443, 203.119.144.*:443, 203.119.145.*:443, 203.119.146.*:443, 203.119.147.*:443, 203.119.148.*:443, 203.119.149.*:443, 203.119.150.*:443, 203.119.151.*:443, 203.119.152.*:443, 203.119.153.*:443, 203.119.154.*:443, 203.119.155.*:443, 203.119.156.*:443, 203.119.157.*:443, 203.119.158.*:443, 203.119.159.*:443, 203.119.160.*:443, 203.119.168.*:443, 203.119.169.*:443, 203.119.170.*:443, 203.119.171.*:443, 203.119.172.*:443, 203.119.173.*:443, 203.119.174.*:443, 203.119.175.*:443, 203.119.176.*:443, 203.119.177.*:443, 203.119.178.*:443, 203.119.179.*:443, 203.119.180.*:443, 203.119.181.*:443, 203.119.182.*:443, 203.119.183.*:443, 203.119.184.*:443, 203.119.185.*:443, 203.119.186.*:443, 203.119.187.*:443, 203.119.188.*:443, 203.119.189.*:443, 203.119.190.*:443, 203.119.191.*:443, 203.119.192.*:443, 203.119.193.*:443, 203.119.194.*:443, 203.119.195.*:443, 203.119.196.*:443, 203.119.197.*:443, 203.119.198.*:443, 203.119.199.*:443, 203.119.200.*:443, 203.119.201.*:443, 203.119.202.*:443, 203.119.203.*:443, 203.119.204.*:443, 203.119.205.*:443, 203.119.206.*:443, 203.119.207.*:443, 203.119.208.*:443, 203.119.209.*:443, 203.119.210.*:443, 203.119.211.*:443, 203.119.212.*:443, 203.119.213.*:443, 203.119.214.*:443, 203.119.215.*:443, 203.119.216.*:443, 203.119.217.*:443, 203.119.218.*:443, 203.119.219.*:443, 203.119.220.*:443, 203.119.221.*:443, 203.119.222.*:443, 203.119.223.*:443, 203.119.224.*:443, 203.119.225.*:443, 203.119.226.*:443, 203.119.227.*:443, 203.119.228.*:443, 203.119.229.*:443, 203.119.230.*:443, 203.119.231.*:443, 203.119.232.*:443, 203.119.233.*:443, 203.119.234.*:443, 203.119.235.*:443, 203.119.236.*:443, 203.119.237.*:443, 203.119.238.*:443, 203.119.239.*:443, 203.119.240.*:443, 203.119.241.*:443, 203.119.242.*:443, 203.119.243.*:443, 203.119.244.*:443, 203.119.245.*:443, 203.119.246.*:443, 203.119.247.*:443, 203.119.248.*:443, 203.119.249.*:443, 203.119.250.*:443, 203.119.251.*:443, 203.119.252.*:443, 203.119.253.*:443, 203.119.254.*:443, 203.119.255.*:443, 203.209.224.*:443, 203.209.225.*:443, 203.209.226.*:443, 203.209.227.*:443, 203.209.228.*:443, 203.209.229.*:443, 203.209.230.*:443, 203.209.231.*:443, 203.209.232.*:443, 203.209.233.*:443, 203.209.234.*:443, 203.209.235.*:443, 203.209.236.*:443, 203.209.237.*:443, 203.209.238.*:443, 203.209.239.*:443, 203.209.240.*:443, 203.209.241.*:443, 203.209.242.*:443, 203.209.243.*:443, 203.209.244.*:443, 203.209.245.*:443, 203.209.246.*:443, 203.209.247.*:443, 203.209.248.*:443, 203.209.249.*:443, 203.209.250.*:443, 203.209.251.*:443, 203.209.252.*:443, 203.209.253.*:443, 203.209.254.*:443, 203.209.255.*:443, 218.244.128.*:443, 218.244.129.*:443, 218.244.130.*:443, 218.244.131.*:443, 218.244.132.*:443, 218.244.133.*:443, 218.244.134.*:443, 218.244.135.*:443, 218.244.136.*:443, 218.244.137.*:443, 218.244.138.*:443, 218.244.139.*:443, 218.244.140.*:443, 218.244.141.*:443, 218.244.142.*:443, 218.244.143.*:443, 218.244.144.*:443, 218.244.145.*:443, 218.244.146.*:443, 218.244.147.*:443, 218.244.148.*:443, 218.244.149.*:443, 218.244.150.*:443, 218.244.151.*:443, 218.244.152.*:443, 218.244.153.*:443, 218.244.154.*:443, 218.244.155.*:443, 218.244.156.*:443, 218.244.157.*:443, 218.244.158.*:443, 218.244.159.*:443, 223.4.*.*:443, 223.5.*.*:443, 223.6.*.*:443, 223.7.*.*:443 7 | -------------------------------------------------------------------------------- /IdleFishSearchFilter/misty.idlefish-search.js: -------------------------------------------------------------------------------- 1 | const $ = new Env("misty.idleFish-search"); 2 | 3 | const IDLEFISH_SEARCH_ENABLE_KEY = 'misty.idlefish_search.enabled' 4 | const IDLEFISH_SEARCH_FILTER_KEY = 'misty.idlefish_search.filter' 5 | 6 | function getFilters() { 7 | let FISH_FILTERS = [] 8 | 9 | let _filter_word = $.getdata(IDLEFISH_SEARCH_FILTER_KEY) 10 | if (_filter_word) { 11 | for (var _filter of _filter_word.split('\n')) { 12 | try { 13 | const newRegex = new RegExp(_filter) 14 | FISH_FILTERS.push(newRegex) 15 | } catch (e) { 16 | throw { 17 | regex: _filter, 18 | error: e, 19 | } 20 | } 21 | } 22 | } 23 | return FISH_FILTERS 24 | } 25 | 26 | function isEnable() { 27 | try { 28 | const enableKey = $.getdata(IDLEFISH_SEARCH_ENABLE_KEY) 29 | if (!enableKey) { 30 | return false 31 | } 32 | const enabled = JSON.parse(enableKey) // BoxJS string to boolean 33 | if (enabled) { 34 | return true 35 | } 36 | } catch (e) { 37 | $.log("Failed to parse Enable key, error: " + e) 38 | return false 39 | } 40 | return false 41 | } 42 | 43 | function doProcessResponse(resp) { 44 | if (!isEnable()) { 45 | $.log("已禁用闲鱼关键字过滤!") 46 | return {}; 47 | } else { 48 | $.log("已启用闲鱼关键字过滤!") 49 | } 50 | 51 | const FISH_FILTERS = getFilters() 52 | 53 | var a = JSON.parse(resp.body) 54 | a.data.resultList = a.data.resultList.filter((x) => { 55 | var t = "" 56 | var title = "" 57 | t = x.data.item.main.exContent.title 58 | if (t) { title += t } 59 | t = x.data.item.main.exContent.detailParams?.title 60 | if (t) { title += t } 61 | 62 | for (var filter_regexp of FISH_FILTERS) { 63 | if (title.search(filter_regexp) >= 0) { 64 | console.log("Filtering item: " + title) 65 | return false 66 | } 67 | } 68 | console.log("Passing item: " + title) 69 | return true 70 | }) 71 | 72 | let newbody = JSON.stringify(a) 73 | 74 | let headers = resp.headers; 75 | headers['X-Modified-By'] = 'Surge'; 76 | 77 | return { 78 | headers: headers, 79 | body: newbody, 80 | status: 200 81 | } 82 | } 83 | 84 | function checkRegexp() { 85 | $.log("正在检测关键字是否符合格式") 86 | try { 87 | getFilters() 88 | $.log("检测通过!") 89 | } catch(e) { 90 | if (e.regex) { 91 | $.log("关键字: " + e.regex + "中有非法正则表达式: " + e.error) 92 | } else { 93 | $.log("未知错误: " + e) 94 | } 95 | } 96 | return {} 97 | } 98 | 99 | try { 100 | var ret = {} 101 | if (this.$response) { 102 | ret = doProcessResponse(this.$response) 103 | } else { 104 | ret = checkRegexp() 105 | } 106 | } catch(e) { 107 | $.log("Unknown exception: " + e) 108 | } 109 | 110 | $.done(ret) 111 | 112 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}isShadowrocket(){return"undefined"!=typeof $rocket}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){if(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:i,statusCode:r,headers:o,rawBody:h}=t;e(null,{status:i,statusCode:r,headers:o,rawBody:h},s.decode(h,this.encoding))},t=>{const{message:i,response:r}=t;e(i,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){let i=require("iconv-lite");this.initGotEnv(t);const{url:r,...o}=t;this.got[s](r,o).then(t=>{const{statusCode:s,statusCode:r,headers:o,rawBody:h}=t;e(null,{status:s,statusCode:r,headers:o,rawBody:h},i.decode(h,this.encoding))},t=>{const{message:s,response:r}=t;e(s,r,r&&i.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 113 | -------------------------------------------------------------------------------- /IdleFishSearchFilter/misty.idlefish-search.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Misty-IdleFish Search Filter 2 | #!desc=关键字过滤闲鱼搜索结果 3 | 4 | [Script] 5 | idlefish-search = type=http-response,script-path=https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/IdleFishSearchFilter/misty.idlefish-search.js,pattern=https://(g-acs|acs).m.goofish.com/gw/(mtop.taobao.idle.search.glue/8.0|mtop.taobao.idlemtopsearch.search/1.0),max-size=524288,requires-body=true,timeout=5,debug=true,enable=true 6 | 7 | [MITM] 8 | hostname = %INSERT%, acs.m.goofish.com, g-acs.m.goofish.com -------------------------------------------------------------------------------- /OzanNoLogout/README.md: -------------------------------------------------------------------------------- 1 | # Ozan免掉线模块 2 | 3 | 本脚本将Ozan登入登出等请求拦截,尽最大可能避免自身网络,或服务器不稳定的情况导致Ozan掉登录。 4 | 5 | ## 安装使用 6 | 7 | Surge/Shadowrocket: https://github.com/NyaMisty/MistySurgeScripts/raw/master/OzanNoLogout/misty.ozannologout.sgmodule 8 | QuantumultX: https://github.com/NyaMisty/MistySurgeScripts/raw/master/OzanNoLogout/misty.ozannologout.snippet 9 | 10 | ## 感谢 11 | 12 | 感谢以下群友协助转换qx模块: @ios151 / @Akaman_0723 -------------------------------------------------------------------------------- /OzanNoLogout/misty.ozannologout.js: -------------------------------------------------------------------------------- 1 | $done({ 2 | response: { 3 | status: 200, 4 | body: `{ 5 | "successful": true, 6 | "referenceId": "00000000-0000-0000-0000-000000000000" 7 | }`, 8 | headers: { 9 | 'content-type': 'application/json;charset=UTF-8' 10 | }, 11 | }, 12 | }) 13 | -------------------------------------------------------------------------------- /OzanNoLogout/misty.ozannologout.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Misty-OzanNoLogout 2 | #!desc=Ozan免掉线 3 | 4 | [Rule] 5 | URL-REGEX,^https://op-prod-tr.ozan.com/api/users/logout,REJECT 6 | URL-REGEX,^https://op-prod-tr.ozan.com/api/users/ensecure/deactivate,REJECT 7 | URL-REGEX,^https://op-prod-tr.ozan.com/api/users/forget-device/,REJECT 8 | 9 | [Script] 10 | ozan_fakeensecure = type=http-request,pattern=^https://op-prod-tr.ozan.com/api/users/ensecure/verify,requires-body=0,debug=1,script-path=https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/OzanNoLogout/misty.ozannologout.js 11 | 12 | [MITM] 13 | hostname = %INSERT% op-prod-tr.ozan.com -------------------------------------------------------------------------------- /OzanNoLogout/misty.ozannologout.snippet: -------------------------------------------------------------------------------- 1 | # Misty-OzanNoLogout 2 | # Ozan免掉线 (together made with @ios151 / @Akaman_0723) 3 | 4 | [rewrite_local] 5 | 6 | ^https://op-prod-tr.ozan.com/api/users/ensecure/verify url script-request-header https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/OzanNoLogout/misty.ozannologout.js 7 | 8 | ^https://op-prod-tr.ozan.com/api/users/logout url reject 9 | 10 | ^https://op-prod-tr.ozan.com/api/users/ensecure/deactivate url reject 11 | 12 | ^https://op-prod-tr.ozan.com/api/users/forget-device/ url reject 13 | 14 | 15 | [mitm] 16 | hostname = op-prod-tr.ozan.com -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Misty 自写脚本 2 | 3 | ## 注意 4 | 5 | **仅在Surge上进行了测试,有问题直接联系 TG: @NyaMisty** 6 | 7 | ## 用法 8 | 9 | - 安装BoxJS 10 | - 添加BoxJS订阅:[https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/misty-pub.boxjs.json](http://boxjs.com/#/sub/add/https%3A%2F%2Fraw.githubusercontent.com%2FNyaMisty%2FMistySurgeScripts%2Fmaster%2Fmisty-pub.boxjs.json) 11 | - 添加对应Surge模块 (各个目录下的sgmodule) 12 | - 访问BoxJS进行配置 -------------------------------------------------------------------------------- /eChongdianNoAd/misty.echongdian.js: -------------------------------------------------------------------------------- 1 | console.log("fuck Quantumult!") 2 | const $ = new Env('echongdian'); 3 | 4 | function reGroup(regexp, str, groupI) { 5 | const array = [...str.matchAll(regexp)]; 6 | return array.map(m => m[groupI]); 7 | } 8 | 9 | function cleanHeaders(headers) { 10 | return Object.assign({}, ... 11 | Object.entries(headers) 12 | .filter(([k,v]) => { 13 | const kl = k.toLowerCase() 14 | return !(kl === "connection" || kl === "accept-ranges" || kl === "content-encoding" || kl === "transfer-encoding") 15 | }) 16 | .map(([k,v]) => ({[k]:v})) 17 | ); 18 | } 19 | 20 | const PATCH_OBJ_PREFIX = "patched"; 21 | 22 | const isReq = typeof $response === 'undefined' 23 | const isResp = !isReq 24 | 25 | function doneModResp(resp) { 26 | // Input: surge response object {status?: Int, body: string, headers?: Object} 27 | 28 | // Fuck Quantumult - must clear or manually setup content-length 29 | if (resp.headers && resp.body) { 30 | resp.headers['Content-Length'] = undefined 31 | resp.headers['content-length'] = undefined 32 | // const newLen = resp.body.length 33 | // if (resp.headers['Content-Length']) { 34 | // resp.headers['Content-Length'] = newLen 35 | // } else if (resp.headers['content-length']) { 36 | // resp.headers['content-length'] = newLen 37 | // } 38 | } 39 | if ($.isQuanX()) { 40 | if (resp.status) { 41 | // Fuck Quantumult - status is "StatusLine" instead of "StatusCode" 42 | resp.status = "HTTP/1.1 " + resp.status + "" 43 | } 44 | if (isReq) { 45 | // resp -> const myResponse = { 46 | // status: myStatus, 47 | // headers: myHeaders, // Optional. 48 | // body: myData // Optional. 49 | // }; 50 | return resp // must be used with script-echo-response 51 | } else { 52 | return resp // must be used script-response-body 53 | } 54 | } else { 55 | if (isReq) { 56 | return { 57 | response: resp 58 | } 59 | } else { 60 | return resp 61 | } 62 | } 63 | } 64 | 65 | (async () => { 66 | $.log('echongdian start!') 67 | 68 | 69 | let url = $request.url 70 | 71 | // if (!isReq) { 72 | // const contentType = $response.headers['Content-Type'] || $response.headers['content-type'] 73 | // if (contentType.indexOf("application/json") < 0) { 74 | // return {} 75 | // } 76 | // } 77 | 78 | if (isReq && url.indexOf("datacenter/snapshot-meta") >= 0) { 79 | const lastId = reGroup(/\?lastId=(.*?)($|&)/g, url, 1)[0] 80 | $.log("Got snapshot resp " + url + ", lastId=" + lastId) 81 | let realLastId = "" 82 | if (lastId.startsWith(PATCH_OBJ_PREFIX)){ 83 | realLastId = lastId.substr(PATCH_OBJ_PREFIX.length) 84 | } 85 | const newUrl = url.replace(lastId, realLastId) 86 | $.log("snapshot req url: " + newUrl) 87 | const r = await $.http.get({ 88 | url: newUrl, 89 | headers: $request.headers, 90 | }) 91 | let hdr = cleanHeaders(r.headers) 92 | 93 | $.log("snapshot req resp: " + r.body) 94 | if (!r.body) { 95 | return doneModResp({ 96 | body: "", 97 | headers: hdr 98 | }) 99 | } 100 | let resp = JSON.parse(r.body) // server return empty when no update, but we patched it 101 | if (resp.id === realLastId) { 102 | console.log("respid: " + resp.id + " realid: " + realLastId + " same") 103 | return doneModResp({ 104 | body: "", 105 | headers: hdr 106 | }) 107 | } 108 | 109 | resp.id = PATCH_OBJ_PREFIX + resp.id 110 | return doneModResp({ 111 | body: JSON.stringify(resp), 112 | headers: hdr 113 | }) 114 | } 115 | 116 | if ((isResp || isReq) && url.indexOf("echargenet.com/gw-emas-cdn/") >= 0) { 117 | $.log("Got cdn obj resp!") 118 | const objId = reGroup(/\/gw-emas-cdn\/(.*?)$/g, url, 1)[0] 119 | if (false) { 120 | $.log("Use cdn obj resp body!") // because our url changed to patchedXXXX, we cannot use original body 121 | var oriBody = $response.body 122 | var needPatch = oriBody.indexOf('"configSnapshots"') 123 | var headers = $response.headers 124 | } else { 125 | $.log("Querying for real body!") 126 | var needPatch = objId.startsWith(PATCH_OBJ_PREFIX) 127 | var realObjId = objId.substr(PATCH_OBJ_PREFIX.length) 128 | var r = await $.http.get({ 129 | url: url.replace(objId, realObjId), 130 | headers: $request.headers, 131 | }) 132 | var oriBody = r.body 133 | var headers = r.headers 134 | } 135 | 136 | if (needPatch) { // we got the main object 137 | $.log("Found main config object!!") 138 | let mainJson = JSON.parse(oriBody) 139 | mainJson.id = PATCH_OBJ_PREFIX + mainJson.id 140 | for (var config of mainJson.configSnapshots) { 141 | if (config.name === "SplashConfig") { // kaiping1 142 | config.cases = [] 143 | $.log("Patched SplashConfig!") 144 | } 145 | if (config.name === "BoomConfig") { // kaiping2 146 | config.cases = [] 147 | $.log("Patched BoomConfig!") 148 | } 149 | } 150 | const newBody = JSON.stringify(mainJson) 151 | $.msg(`e充电 热更新Patch成功`) 152 | return doneModResp({ 153 | status: 200, 154 | body: newBody, 155 | headers: cleanHeaders(headers), 156 | }) 157 | } 158 | 159 | return {} 160 | } 161 | 162 | return {} 163 | })() 164 | .then((ret) => { 165 | $.log("script result: " + JSON.stringify(ret)) 166 | $.done(ret) 167 | }) 168 | .catch((e) => { 169 | let e_ = "" + e 170 | if (typeof e === Error) { 171 | e_ = "" + e + '\n' + e.stack 172 | } 173 | $.logErr(e, "Error: " + e_) 174 | $.msg(`e充电 Patch失败`, e_); 175 | }) 176 | .finally(() => { 177 | $.done(); 178 | }); 179 | 180 | 181 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}isShadowrocket(){return"undefined"!=typeof $rocket}isStash(){return"undefined"!=typeof $environment&&$environment["stash-version"]}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,a]=i.split("@"),n={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),a=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){if(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)});else if(this.isQuanX())this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t&&t.error||"UndefinedError"));else if(this.isNode()){let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:i,statusCode:r,headers:o,rawBody:a}=t,n=s.decode(a,this.encoding);e(null,{status:i,statusCode:r,headers:o,rawBody:a,body:n},n)},t=>{const{message:i,response:r}=t;e(i,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t&&t.error||"UndefinedError"));else if(this.isNode()){let i=require("iconv-lite");this.initGotEnv(t);const{url:r,...o}=t;this.got[s](r,o).then(t=>{const{statusCode:s,statusCode:r,headers:o,rawBody:a}=t,n=i.decode(a,this.encoding);e(null,{status:s,statusCode:r,headers:o,rawBody:a,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&i.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,i=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":i}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),this.isSurge()||this.isQuanX()||this.isLoon()?$done(t):this.isNode()&&process.exit(1)}}(t,e)} 182 | -------------------------------------------------------------------------------- /eChongdianNoAd/misty.echongdian.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Misty-eChongdian No AD 2 | #!desc=e充电开屏广告屏蔽 3 | 4 | [Script] 5 | echongdian_ad_metareq = type=http-request,script-path=https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/eChongdianNoAd/misty.echongdian.js,pattern=https://aserver-evone.echargenet.com/orange/datacenter/snapshot-meta,enable=true,max-size=0,requires-body=true,timeout=5,debug=true 6 | 7 | echongdian_ad_patchobj = type=http-response,script-path=https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/eChongdianNoAd/misty.echongdian.js,pattern=http://cdn-evone-ceph.echargenet.com/gw-emas-cdn/patched.*,enable=true,max-size=0,requires-body=true,timeout=5,debug=true 8 | 9 | 10 | [MITM] 11 | hostname = %INSERT%, aserver-evone.echargenet.com -------------------------------------------------------------------------------- /eChongdianNoAd/misty.echongdian.snippet: -------------------------------------------------------------------------------- 1 | # Misty-eChongdian No AD 2 | # e充电开屏广告屏蔽 3 | 4 | # echongdian_ad_metareq 5 | ^https:\/\/aserver-evone.echargenet.com\/orange\/datacenter\/snapshot-meta url script-echo-response https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/eChongdianNoAd/misty.echongdian.js 6 | 7 | # echongdian_ad_patchobj 8 | ^http:\/\/cdn-evone-ceph.echargenet.com\/gw-emas-cdn\/patched.* url script-echo-response https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/eChongdianNoAd/misty.echongdian.js 9 | 10 | hostname = aserver-evone.echargenet.com -------------------------------------------------------------------------------- /misty-pub.boxjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "misty-pub.app.sub", 3 | "name": "Misty应用订阅", 4 | "author": "@NyaMisty", 5 | "icon": "https://avatars.githubusercontent.com/u/5344431", 6 | "repo": "https://github.com/NyaMisty/MistySurgeScripts", 7 | "apps": [ 8 | { 9 | "id": "idlefish-search", 10 | "name": "闲鱼搜索-关键字过滤", 11 | "keys": [ 12 | "misty.idlefish_search.enabled", 13 | "misty.idlefish_search.filter" 14 | ], 15 | "author": "@NyaMisty", 16 | "repo": "https://github.com/NyaMisty/MistySurgeScripts/tree/master/IdleFishSearchFilter", 17 | "icons": ["https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/IdleFishSearchFilter/icon.jpg", "https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/IdleFishSearchFilter/icon.jpg"], 18 | "script": "https://raw.githubusercontent.com/NyaMisty/MistySurgeScripts/master/IdleFishSearchFilter/misty.idlefish-search.js", 19 | "settings": [ 20 | { 21 | "id": "misty.idlefish_search.enabled", 22 | "name": "总功能开关", 23 | "val": true, 24 | "type": "boolean", 25 | "desc": "是否启用此APP修改" 26 | }, 27 | { 28 | "id": "misty.idlefish_search.filter", 29 | "name": "需要过滤的关键字", 30 | "val": "", 31 | "type": "textarea", 32 | "autoGrow": true, 33 | "rows": 5, 34 | "placeholder": "收[^货]\n暂挂", 35 | "desc": "使用回车换行每一个关键字" 36 | } 37 | ] 38 | } 39 | ] 40 | } --------------------------------------------------------------------------------