feat: add SSH transport, rsync-style CLI, and --stdio server mode
- Replace send()/recv() with read()/write() + io_set_fds() for fd abstraction - Add client_connect_ssh() via socketpair + fork/exec; reap child in client_disconnect() - Add server --stdio flag for SSH invocation - Replace handle_arg() with rsync-style positional args (fastsync <src> <dest>) - Add SSH vs TCP auto-detection via is_remote_dest() - Add TransportType and ssh_destination to Config, fix uninitialized fields in config_receive() (pre-existing multithreaded crash) - Sender threads now wait for server STATUS_OK before disconnecting - Add --help, error handling for sendfile+SSH combos - Add pre-flight checks and Posix Args test case to test.py - Add test_config_ssh_dest() unit test
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef enum {
|
||||
TRANSPORT_TCP,
|
||||
TRANSPORT_SSH
|
||||
} TransportType;
|
||||
|
||||
typedef struct Config {
|
||||
char *version;
|
||||
char *send_directory;
|
||||
@@ -16,6 +21,8 @@ typedef struct Config {
|
||||
bool use_metadata;
|
||||
int compression_level;
|
||||
int num_connections;
|
||||
TransportType transport;
|
||||
char *ssh_destination;
|
||||
} Config;
|
||||
|
||||
Config *config_create(char *version, char *send_directory,
|
||||
|
||||
Reference in New Issue
Block a user