mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 19:41:17 +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
|
|
@ -327,11 +327,6 @@ func loadProxmoxHostKeys(host string) ([][]byte, error) {
|
|||
return entries, nil
|
||||
}
|
||||
|
||||
// getPublicKey reads the SSH public key from the default directory
|
||||
func (p *Proxy) getPublicKey() (string, error) {
|
||||
return p.getPublicKeyFrom(p.sshKeyPath)
|
||||
}
|
||||
|
||||
// getPublicKeyFrom reads the SSH public key from a specific directory
|
||||
func (p *Proxy) getPublicKeyFrom(keyDir string) (string, error) {
|
||||
pubKeyPath := filepath.Join(keyDir, "id_ed25519.pub")
|
||||
|
|
@ -527,12 +522,6 @@ func (p *Proxy) pushSSHKeyFrom(nodeHost, keyDir string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// pushSSHKey adds the proxy's public key to a node's authorized_keys with IP restrictions
|
||||
// Automatically upgrades old keys without from= restrictions
|
||||
func (p *Proxy) pushSSHKey(nodeHost string) error {
|
||||
return p.pushSSHKeyFrom(nodeHost, p.sshKeyPath)
|
||||
}
|
||||
|
||||
// testSSHConnection verifies SSH connectivity to a node
|
||||
func (p *Proxy) testSSHConnection(nodeHost string) error {
|
||||
startTime := time.Now()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue