Skip to content

Conversation

@RichardAnderson
Copy link
Member

@RichardAnderson RichardAnderson commented Jan 29, 2026

NOTE:

This is very much a draft PR! Creating for visibility, but there is a lot more work required!

Summary

This pull request introduces a new abstraction for server connections, enabling seamless support for both local and remote servers. It adds a new command for creating local servers, introduces a unified ServerConnection contract, and implements the local connection logic via Unix sockets. The SSH facade is updated to automatically route commands to either SSH or the new local socket implementation based on the server type.

Local server support and connection abstraction:

  • Added a new Artisan command CreateLocalServerCommand to create and configure local servers with pre-installed services, firewall rules, and user/project assignment. (app/Console/Commands/CreateLocalServerCommand.php)
  • Introduced the ServerConnection interface to define a unified contract for server connection operations, covering initialization, command execution, file upload/download, and logging. (app/Contracts/ServerConnection.php)
  • Implemented a base abstract class AbstractServerConnection to handle common connection logic, user switching, and logging for all server connection types. (app/Helpers/AbstractServerConnection.php)
  • Added LocalSocket, a concrete implementation of ServerConnection for local servers, communicating via a Unix socket and supporting command execution, file transfer, and service management. (app/Helpers/LocalSocket.php)

SSH facade and routing improvements:

  • Updated the SSH facade to route server operations to LocalSocket for local servers and to SSH for remote servers, including support for fakes in testing. (app/Facades/SSH.php)

@RichardAnderson RichardAnderson changed the base branch from 3.x to 4.x January 30, 2026 20:26
@RichardAnderson RichardAnderson changed the base branch from 4.x to 3.x January 30, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant