mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-29 03:50:18 +00:00
chore: remove legacy proxy handlers and unused functions
Remove legacy V1 handlers replaced by V2 versions: - sendError (replaced by sendErrorV2) - handleGetStatus (replaced by handleGetStatusV2) - handleEnsureClusterKeys (replaced by handleEnsureClusterKeysV2) - handleRegisterNodes (replaced by handleRegisterNodesV2) - handleGetTemperature (replaced by handleGetTemperatureV2) Also remove related unused functions: - getPublicKey wrapper (only getPublicKeyFrom is used) - pushSSHKey wrapper (only pushSSHKeyFrom is used) - nodeValidator.ipAllowed method (standalone ipAllowed is used) - validateConfigFile (never called) - runServiceDebug (Windows debug mode, never called)
This commit is contained in:
parent
2a5520ef25
commit
3fce14469c
6 changed files with 1 additions and 252 deletions
|
|
@ -591,21 +591,6 @@ func (v *nodeValidator) getClusterMembers(ctx context.Context) (map[string]struc
|
|||
return result, nil
|
||||
}
|
||||
|
||||
func (v *nodeValidator) ipAllowed(ip net.IP) bool {
|
||||
if ip == nil {
|
||||
return false
|
||||
}
|
||||
if _, ok := v.allowHosts[ip.String()]; ok {
|
||||
return true
|
||||
}
|
||||
for _, network := range v.allowCIDRs {
|
||||
if network.Contains(ip) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func ipAllowed(ip net.IP, hosts map[string]struct{}, cidrs []*net.IPNet) bool {
|
||||
if ip == nil {
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue