Merge pull request #4 from AisukaYuki/main

2.9.2-rc
pull/5/head
david082321 4 years ago committed by GitHub
commit 52713f4a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Binary file not shown.

Binary file not shown.

@ -15,7 +15,7 @@ if (ACCESS_KEY != ""){ // access_key 是否存在
$out = curl_exec($ch); $out = curl_exec($ch);
curl_close($ch); curl_close($ch);
// 如果是黑名单 // 如果是黑名单
if ($out=="ban"){ if ($out=="ban" || $ep_ban == 1){
if (REPLACE_TYPE=="hlw" || REPLACE_TYPE=="tom" || REPLACE_TYPE=="xyy" || REPLACE_TYPE=="404"){ // 替换成葫芦娃、猫和老鼠、喜羊羊、肥肠抱歉 if (REPLACE_TYPE=="hlw" || REPLACE_TYPE=="tom" || REPLACE_TYPE=="xyy" || REPLACE_TYPE=="404"){ // 替换成葫芦娃、猫和老鼠、喜羊羊、肥肠抱歉
include ("replace.php"); include ("replace.php");
replace(); replace();

@ -9,6 +9,10 @@ define('BILIROAMING', 1); //是否要用哔哩漫游才能使用。0 否, 1 是
define('LOCK_AREA', 0); //服务器锁区,须设置$SERVER_AREA。0 否, 1 是 define('LOCK_AREA', 0); //服务器锁区,须设置$SERVER_AREA。0 否, 1 是
$WHITELIST = array('1', '2', '3'); // 本地白名单,填写 uid可自行添加、删除注意使用英文,和' $WHITELIST = array('1', '2', '3'); // 本地白名单,填写 uid可自行添加、删除注意使用英文,和'
// 封锁指定epid视频
define('BAN_EP', 0); //是否开启ban特定视频
$epid_list = array("369747","371362","371461","371462","371463","371596"); //巨人最终季
// 缓存 // 缓存
define('SAVE_CACHE', 0); //开启缓存须配置MySQL。0 否, 1 是 define('SAVE_CACHE', 0); //开启缓存须配置MySQL。0 否, 1 是
define('CACHE_TIME', 7200); //缓存时长(秒) define('CACHE_TIME', 7200); //缓存时长(秒)
@ -49,6 +53,8 @@ define('IP_RESOLVE', 0); // 开启功能。0 否, 1 是
$ips=array("172.0.0.1","192.168.0.1","1.2.3.4"); $ips=array("172.0.0.1","192.168.0.1","1.2.3.4");
$hosts=array("workers.dev","workers.dev"); $hosts=array("workers.dev","workers.dev");
// 其他 // 其他
define('WELCOME', 'Success!'); //首页欢迎语 define('WELCOME', 'Success!'); //首页欢迎语
define('BLOCK_RETURN', '{"code":-10403,"message":"你已被封锁"}'); //封锁返回内容 define('BLOCK_RETURN', '{"code":-10403,"message":"你已被封锁"}'); //封锁返回内容
@ -61,4 +67,10 @@ define('AREA', @$_GET['area']);
define('CID', @$_GET['cid']); define('CID', @$_GET['cid']);
define('EP_ID', @$_GET['ep_id']); define('EP_ID', @$_GET['ep_id']);
define('TS', @$_GET['ts']); define('TS', @$_GET['ts']);
?> if (in_array(EP_ID, $epid_list) && BAN_EP == 1) {
$ep_ban = 1;
}else {
$ep_ban = 0;
}
?>

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

Loading…
Cancel
Save