Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Replace with generic proxmox-server hostname across all documentation and code comments.
3.1 KiB
3.1 KiB
Pull Request Summary
PR #100: Fix Proxmox Remote Add Error
URL: #100
Branch: fix/proxmox-remote-add-error → beta
Version: 1.2.3 → 1.2.4
Problem
Users could not add Proxmox remotes when providing URLs with port numbers (e.g., https://proxmox-server:8006). The error displayed was: "Failed to add remote"
Root Cause
The RemotesPage.tsx component incorrectly parsed URLs containing ports:
- User enters:
https://proxmox-server:8006 - Code strips protocol →
proxmox-server:8006 - Code uses this with port still attached as hostname
- Code also sends separate port parameter:
8006 - Backend receives malformed:
url: "proxmox-server:8006"+port: 8006 - Connection fails
Solution
Added URL parsing logic to properly handle ports in both add and edit operations:
// Parse URL to extract hostname and port
let hostname = config.url.replace(/^https?:\/\//, '');
let port = config.type === 'pve' ? 8006 : 8007;
// If URL contains port, extract it
const portMatch = hostname.match(/:(\d+)$/);
if (portMatch) {
port = parseInt(portMatch[1], 10);
hostname = hostname.replace(/:\d+$/, '');
}
Now correctly handles:
- ✅ Full URLs with ports:
https://proxmox-server:8006→ hostname:proxmox-server, port:8006 - ✅ Hostnames only:
proxmox-server→ hostname:proxmox-server, port:8006(default) - ✅ Custom ports:
https://192.168.1.100:8443→ hostname:192.168.1.100, port:8443
Changes
Modified Files
src/pages/Proxmox/RemotesPage.tsx- Fixed
handleAddRemote()function - Fixed
handleEditRemote()function - Added port extraction logic
- Properly separates hostname from port
- Fixed
Version Bump
package.json:1.2.3→1.2.4src-tauri/Cargo.toml:1.2.3→1.2.4src-tauri/tauri.conf.json:1.2.3→1.2.4src-tauri/Cargo.lock: Updatedsrc-tauri/gen/schemas/macOS-schema.json: Regenerated
Commits
666de6dd-fix(proxmox): parse port from URL when adding remote58cbe525-chore: bump version to 1.2.40b409c32-chore: update Cargo.lock and schema for v1.2.4
Testing
Completed
- ESLint checks passed
- Rust compilation successful
- Database corruption fixed (removed 0-byte DB)
Required Before Merge
- Manual test: Add remote with
https://proxmox-server:8006 - Manual test: Add remote with
proxmox-server(should use port 8006) - Manual test: Add PBS remote with custom port
- Manual test: Edit existing remote and verify port changes
- Verify remote connection succeeds
- Verify VMs/containers load after adding remote
- Test with self-signed certificates
- Test with API token authentication
Stats
- Files changed: 6
- Additions: +263 lines
- Deletions: -10 lines
- State: Open, mergeable
- CI Status: Pending
Next Steps
- ✅ Branch pushed to origin
- ✅ PR created (#100)
- ⏳ Awaiting review
- ⏳ Manual testing
- ⏳ Merge to beta
- ⏳ Test on beta branch
- ⏳ Merge to master (if applicable)