[admin] agent allow&deny

This commit is contained in:
xiaomlove
2022-02-25 18:09:31 +08:00
parent e2f30ecf0c
commit 9edbaf49ca
25 changed files with 1420 additions and 28 deletions
+15 -2
View File
@@ -6,11 +6,24 @@ class AgentAllow extends NexusModel
{
protected $table = 'agent_allowed_family';
public $timestamps = true;
protected $fillable = [
'family', 'start_name', 'exception', 'allowhttps', 'comment',
'peer_id_pattern', 'peer_id_match_num', 'peer_id_matchtype', 'peer_id_start',
'agent_pattern', 'agent_match_num', 'agent_matchtype', 'agent_start',
];
const MATCH_TYPE_DEC = 'dec';
const MATCH_TYPE_HEX = 'hex';
public static $matchTypes = [
self::MATCH_TYPE_DEC => 'dec',
self::MATCH_TYPE_HEX => 'hex',
];
public function denies(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(AgentDeny::class, 'family_id');
}
}