mirror of
				https://gitee.com/ledc/IYUUAutoReseed
				synced 2025-10-31 16:59:49 +00:00 
			
		
		
		
	SSD加入辅种计数器(限制每次辅种10个),降低初次辅种过多ban禁IP的可能性。
This commit is contained in:
		| @@ -13,7 +13,7 @@ use IYUU\Library\Table; | |||||||
| class AutoReseed | class AutoReseed | ||||||
| { | { | ||||||
|     // 版本号 |     // 版本号 | ||||||
|     const VER = '1.7.9'; |     const VER = '1.8.1'; | ||||||
|     // RPC连接 |     // RPC连接 | ||||||
|     private static $links = []; |     private static $links = []; | ||||||
|     // 客户端配置 |     // 客户端配置 | ||||||
| @@ -218,7 +218,7 @@ class AutoReseed | |||||||
|                         $errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!'; |                         $errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!'; | ||||||
|                         if (strpos($errmsg, 'http error 404: Not Found') !== false) { |                         if (strpos($errmsg, 'http error 404: Not Found') !== false) { | ||||||
|                             self::sendNotify('404'); |                             self::sendNotify('404'); | ||||||
|                         } else if (strpos($errmsg, 'http error 403: Forbidden')  !== false) { |                         } elseif (strpos($errmsg, 'http error 403: Forbidden')  !== false) { | ||||||
|                             self::sendNotify('403'); |                             self::sendNotify('403'); | ||||||
|                         } |                         } | ||||||
|                         print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL; |                         print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL; | ||||||
| @@ -412,6 +412,12 @@ class AutoReseed | |||||||
|                     $reseedPass = false; |                     $reseedPass = false; | ||||||
|                     // 特殊站点:种子元数据推送给下载器 |                     // 特殊站点:种子元数据推送给下载器 | ||||||
|                     switch ($siteName) { |                     switch ($siteName) { | ||||||
|  |                         case 'ssd': | ||||||
|  |                             // 辅种计数器 | ||||||
|  |                             if (isset($configALL[$siteName]['count']) && $configALL[$siteName]['count'] > 10) { | ||||||
|  |                                 $configALL[$siteName]['limit'] = 1; | ||||||
|  |                             } | ||||||
|  |                             break; | ||||||
|                         case 'hdchina': |                         case 'hdchina': | ||||||
|                             $cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : ''; |                             $cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : ''; | ||||||
|                             $userAgent = $configALL['default']['userAgent']; |                             $userAgent = $configALL['default']['userAgent']; | ||||||
| @@ -525,6 +531,12 @@ class AutoReseed | |||||||
|                         case 'hdcity': |                         case 'hdcity': | ||||||
|                             $url = $_url; |                             $url = $_url; | ||||||
|                             break; |                             break; | ||||||
|  |                         case 'ssd': | ||||||
|  |                             // 辅种计数器 | ||||||
|  |                             if ($ret) { | ||||||
|  |                                 $configALL[$siteName]['count']++; | ||||||
|  |                             } | ||||||
|  |                             break; | ||||||
|                         default: |                         default: | ||||||
|                             break; |                             break; | ||||||
|                     } |                     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user