You've already forked caddy-opnsense-blocker
Add on-demand IP investigation and richer IP details
This commit is contained in:
@@ -113,6 +113,59 @@ type OPNsenseAction struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type BotMatch struct {
|
||||
ProviderID string `json:"provider_id"`
|
||||
Name string `json:"name"`
|
||||
Icon string `json:"icon"`
|
||||
Method string `json:"method"`
|
||||
Verified bool `json:"verified"`
|
||||
}
|
||||
|
||||
type ReverseDNSInfo struct {
|
||||
PTR string `json:"ptr"`
|
||||
ForwardConfirmed bool `json:"forward_confirmed"`
|
||||
}
|
||||
|
||||
type RegistrationInfo struct {
|
||||
Source string `json:"source"`
|
||||
Handle string `json:"handle"`
|
||||
Name string `json:"name"`
|
||||
Prefix string `json:"prefix"`
|
||||
Organization string `json:"organization"`
|
||||
Country string `json:"country"`
|
||||
AbuseEmail string `json:"abuse_email"`
|
||||
}
|
||||
|
||||
type ReputationInfo struct {
|
||||
SpamhausLookup string `json:"spamhaus_lookup"`
|
||||
SpamhausListed bool `json:"spamhaus_listed"`
|
||||
SpamhausCodes []string `json:"spamhaus_codes,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type IPInvestigation struct {
|
||||
IP string `json:"ip"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Bot *BotMatch `json:"bot,omitempty"`
|
||||
ReverseDNS *ReverseDNSInfo `json:"reverse_dns,omitempty"`
|
||||
Registration *RegistrationInfo `json:"registration,omitempty"`
|
||||
Reputation *ReputationInfo `json:"reputation,omitempty"`
|
||||
}
|
||||
|
||||
type OPNsenseStatus struct {
|
||||
Configured bool `json:"configured"`
|
||||
Present bool `json:"present"`
|
||||
CheckedAt time.Time `json:"checked_at,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type ActionAvailability struct {
|
||||
CanBlock bool `json:"can_block"`
|
||||
CanUnblock bool `json:"can_unblock"`
|
||||
CanClearOverride bool `json:"can_clear_override"`
|
||||
}
|
||||
|
||||
type SourceOffset struct {
|
||||
SourceName string
|
||||
Path string
|
||||
@@ -122,10 +175,13 @@ type SourceOffset struct {
|
||||
}
|
||||
|
||||
type IPDetails struct {
|
||||
State IPState `json:"state"`
|
||||
RecentEvents []Event `json:"recent_events"`
|
||||
Decisions []DecisionRecord `json:"decisions"`
|
||||
BackendActions []OPNsenseAction `json:"backend_actions"`
|
||||
State IPState `json:"state"`
|
||||
RecentEvents []Event `json:"recent_events"`
|
||||
Decisions []DecisionRecord `json:"decisions"`
|
||||
BackendActions []OPNsenseAction `json:"backend_actions"`
|
||||
Investigation *IPInvestigation `json:"investigation,omitempty"`
|
||||
OPNsense OPNsenseStatus `json:"opnsense"`
|
||||
Actions ActionAvailability `json:"actions"`
|
||||
}
|
||||
|
||||
type Overview struct {
|
||||
|
||||
Reference in New Issue
Block a user