Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Dec 1, 2023
1 parent cf508dc commit c2da526
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 36 deletions.
16 changes: 0 additions & 16 deletions profile/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
16 changes: 0 additions & 16 deletions profile/profile-layered.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
8 changes: 4 additions & 4 deletions status/security_level.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

0 comments on commit c2da526

Please sign in to comment.