mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 19:37:35 +08:00
feat: Trojan Reality support and protocol distribution optimizations
This commit is contained in:
@@ -26,6 +26,11 @@ abstract class AbstractProtocol
|
||||
*/
|
||||
protected $clientVersion;
|
||||
|
||||
/**
|
||||
* @var string|null 原始 User-Agent
|
||||
*/
|
||||
protected $userAgent;
|
||||
|
||||
/**
|
||||
* @var array 协议标识
|
||||
*/
|
||||
@@ -48,13 +53,15 @@ abstract class AbstractProtocol
|
||||
* @param array $servers 服务器信息
|
||||
* @param string|null $clientName 客户端名称
|
||||
* @param string|null $clientVersion 客户端版本
|
||||
* @param string|null $userAgent 原始 User-Agent
|
||||
*/
|
||||
public function __construct($user, $servers, $clientName = null, $clientVersion = null)
|
||||
public function __construct($user, $servers, $clientName = null, $clientVersion = null, $userAgent = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->servers = $servers;
|
||||
$this->clientName = $clientName;
|
||||
$this->clientVersion = $clientVersion;
|
||||
$this->userAgent = $userAgent;
|
||||
$this->protocolRequirements = $this->normalizeProtocolRequirements($this->protocolRequirements);
|
||||
$this->servers = HookManager::filter('protocol.servers.filtered', $this->filterServersByVersion());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user