Merge pull request #1 from david082321/main

同步更新
pull/5/head
AisukaYuki 4 years ago committed by GitHub
commit 48f9b2d89a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,7 +6,7 @@
## 下载:
* [下载(GitHub) v2.9.2](https://github.com/david082321/BiliRoaming-PHP-Server/raw/main/Server_v2.9.2.zip)
* [下载(GitHub) v2.9.3](https://github.com/david082321/BiliRoaming-PHP-Server/raw/main/Server_v2.9.3.zip)
## 用法:

Binary file not shown.

Binary file not shown.

@ -5,7 +5,6 @@ if(!defined('SYSTEM')){
exit(BLOCK_RETURN);
}
if (ACCESS_KEY != ""){ // access_key 是否存在
$url = "https://black.qimo.ink/?access_key=".ACCESS_KEY;
$ch = curl_init();
@ -15,7 +14,7 @@ if (ACCESS_KEY != ""){ // access_key 是否存在
$out = curl_exec($ch);
curl_close($ch);
// 如果是黑名单
if ($out=="ban" || $ep_ban == 1){
if ($out=="ban" || $baned == 1){
if (REPLACE_TYPE=="hlw" || REPLACE_TYPE=="tom" || REPLACE_TYPE=="xyy" || REPLACE_TYPE=="404"){ // 替换成葫芦娃、猫和老鼠、喜羊羊、肥肠抱歉
include ("replace.php");
replace();

@ -8,6 +8,7 @@ if(!defined('SYSTEM')){
// 参数
$refresh_cache = 0;
// 判断登录状态
if (ACCESS_KEY ==""){
define('TYPE', 0); //未登录
}else{
@ -94,5 +95,4 @@ function write_cache(){
}
}
}
?>

@ -12,6 +12,9 @@ $WHITELIST = array('1', '2', '3'); // 本地白名单,填写 uid可自行
// 封锁指定epid视频
define('BAN_EP', 0); //是否开启ban特定视频
$epid_list = array("369747","371362","371461","371462","371463","371596"); //巨人最终季
// 封锁指定cid视频
define('BAN_CID', 0); //是否开启ban特定视频
$cid_list = array();
// 缓存
define('SAVE_CACHE', 0); //开启缓存须配置MySQL。0 否, 1 是
@ -53,8 +56,6 @@ define('IP_RESOLVE', 0); // 开启功能。0 否, 1 是
$ips=array("172.0.0.1","192.168.0.1","1.2.3.4");
$hosts=array("workers.dev","workers.dev");
// 其他
define('WELCOME', 'Success!'); //首页欢迎语
define('BLOCK_RETURN', '{"code":-10403,"message":"你已被封锁"}'); //封锁返回内容
@ -67,10 +68,11 @@ define('AREA', @$_GET['area']);
define('CID', @$_GET['cid']);
define('EP_ID', @$_GET['ep_id']);
define('TS', @$_GET['ts']);
$baned = 0;
if (in_array(EP_ID, $epid_list) && BAN_EP == 1) {
$ep_ban = 1;
}else {
$ep_ban = 0;
$baned = 1;
}
if (in_array(CID, $cid_list) && BAN_CID == 1) {
$baned = 1;
}
?>

@ -89,7 +89,6 @@ if (IP_RESOLVE==1) {
curl_close($ch);
}
print($output);
// 写入缓存
if (SAVE_CACHE==1) {
write_cache();

@ -18,6 +18,7 @@ try{
//pass
}
// 判断登录状态
if (ACCESS_KEY !=""){
$sqlco = "SELECT `uid` as num FROM `keys` WHERE `access_key` = '".ACCESS_KEY."'";
$cres = $dbh -> query($sqlco);

@ -12,7 +12,7 @@ if (ACCESS_KEY != ""){ // access_key 是否存在
$uid = get_uid(); // 从API获取
}
// 是否在白名单内
if (!in_array($uid, $WHITELIST) || $ep_ban == 1) {
if (!in_array($uid, $WHITELIST) || $baned == 1) {
if (REPLACE_TYPE=="hlw" || REPLACE_TYPE=="tom" || REPLACE_TYPE=="xyy" || REPLACE_TYPE=="404"){ // 替换成葫芦娃、猫和老鼠、喜羊羊、肥肠抱歉
include ("replace.php");
replace();

Loading…
Cancel
Save