mirror of
https://github.com/safing/portmaster
synced 2025-09-01 10:09:11 +00:00
Fix linter errors
This commit is contained in:
parent
cf508dcd34
commit
c2da5268b9
3 changed files with 4 additions and 36 deletions
|
@ -143,22 +143,6 @@ var (
|
|||
// Setting "DNS Exit Node Rules" at order 148.
|
||||
)
|
||||
|
||||
// A list of all security level settings.
|
||||
var securityLevelSettings = []string{
|
||||
CfgOptionBlockScopeInternetKey,
|
||||
CfgOptionBlockScopeLANKey,
|
||||
CfgOptionBlockScopeLocalKey,
|
||||
CfgOptionBlockP2PKey,
|
||||
CfgOptionBlockInboundKey,
|
||||
CfgOptionFilterSubDomainsKey,
|
||||
CfgOptionFilterCNAMEKey,
|
||||
CfgOptionRemoveOutOfScopeDNSKey,
|
||||
CfgOptionRemoveBlockedDNSKey,
|
||||
CfgOptionDomainHeuristicsKey,
|
||||
CfgOptionPreventBypassingKey,
|
||||
CfgOptionDisableAutoPermitKey,
|
||||
}
|
||||
|
||||
var (
|
||||
// SPNRulesQuickSettings are now generated automatically shorty after start.
|
||||
SPNRulesQuickSettings = []config.QuickSetting{
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/safing/portbase/runtime"
|
||||
"github.com/safing/portmaster/intel"
|
||||
"github.com/safing/portmaster/profile/endpoints"
|
||||
"github.com/safing/portmaster/status"
|
||||
)
|
||||
|
||||
// LayeredProfile combines multiple Profiles.
|
||||
|
@ -444,14 +443,6 @@ func (lp *LayeredProfile) MatchFilterLists(ctx context.Context, entity *intel.En
|
|||
return endpoints.NoMatch, nil
|
||||
}
|
||||
|
||||
func (lp *LayeredProfile) wrapSecurityLevelOption(configKey string, globalConfig config.IntOption) config.BoolOption {
|
||||
activeAtLevels := lp.wrapIntOption(configKey, globalConfig)
|
||||
|
||||
return func() bool {
|
||||
return uint8(activeAtLevels())&status.SecurityLevelNormal > 0
|
||||
}
|
||||
}
|
||||
|
||||
func (lp *LayeredProfile) wrapBoolOption(configKey string, globalConfig config.BoolOption) config.BoolOption {
|
||||
var revCnt uint64 = 0
|
||||
var value bool
|
||||
|
@ -561,10 +552,3 @@ func (lp *LayeredProfile) wrapStringOption(configKey string, globalConfig config
|
|||
return value
|
||||
}
|
||||
}
|
||||
|
||||
func max(a, b uint8) uint8 {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ const DisplayHintSecurityLevel string = "security level"
|
|||
|
||||
// Security levels.
|
||||
const (
|
||||
// SecurityLevelOff uint8 = 0
|
||||
SecurityLevelNormal uint8 = 1
|
||||
// SecurityLevelHigh uint8 = 2
|
||||
// SecurityLevelExtreme uint8 = 4
|
||||
SecurityLevelOff uint8 = 0
|
||||
SecurityLevelNormal uint8 = 1
|
||||
SecurityLevelHigh uint8 = 2
|
||||
SecurityLevelExtreme uint8 = 4
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue