diff --git a/README.md b/README.md index 772ea2b..85a2c80 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ dsfx is a robust, secure, and distributed file exchange system written in Go. De ## Features -- **End-to-End Security:** Uses modern cryptographic primitives to ensure that all file exchanges are encrypted and authenticated. +- **End-to-End Security:** Uses modern cryptographic primitives (ECDSA keys, for example) to ensure that all file exchanges are encrypted and authenticated. - **Distributed Architecture:** Designed for secure file exchange across multiple nodes with built-in support for key-based authentication. - **High Performance:** Optimized for low latency and high throughput, with a focus on reliable and predictable behavior. -- **Administrative and Metrics Interface:** The dsfx client is not only used for file exchange but also to obtain real-time metrics and perform administrative actions against the dsfx server. +- **Administrative and Test Tools:** The dsfx client can be used to test connectivity and perform preliminary administrative actions against the dsfx server. - **Easy Integration:** Built in Go with minimal external dependencies, dsfx is simple to deploy and integrate into existing systems. --- @@ -25,22 +25,18 @@ dsfx is a robust, secure, and distributed file exchange system written in Go. De Clone the repository: -```bash git clone https://koti.casa/numenor-labs/dsfx.git cd dsfx -``` Build the project: -```bash -go build -o build-path-here ./... -``` +go build -o dsfx-server ./dsfx-server +go build -o dsfx-client ./dsfx-client -Install dsfx on your system (optional): +You can also install the executables to your $GOPATH/bin: -```bash -go install ./... -``` +go install ./dsfx-server +go install ./dsfx-client --- @@ -48,33 +44,59 @@ go install ./... ### Starting the Server -To start a dsfx server, run: +The dsfx-server requires a listening host, port, and a master key (ECDSA private key in PEM format). For example: -```bash -dsfx-server -config /path/to/server/config.yaml -``` +./dsfx-server -host localhost -port 8000 -masterKey /path/to/masterkey.pem -The server listens for incoming secure file exchange requests on the defined TCP port. Configuration options (such as server keys, port, and logging settings) can be adjusted in the configuration file. +Command-line flags for dsfx-server: + +-host (default "localhost") +The host interface on which the server will listen. + +-port (default 8000) +The TCP port on which the server will accept connections. + +-masterKey (required) +File path to the PEM-encoded ECDSA private key that serves as the server’s master key. + +Once started, the server will bind to the specified host and port and wait for incoming secure file exchange (or other test) connections. When a client connects, the initial payload (up to 1024 bytes) from the client is read and logged. ### Running the Client -The dsfx client is used to obtain metrics and perform administrative actions against the server. For example: +The dsfx-client uses a private key for the client (also an ECDSA key in PEM format) and currently supports only the “test” command for checking connectivity to the server. -```bash -dsfx-client -config /path/to/client/config.yaml -action metrics -dsfx-client -config /path/to/client/config.yaml -action admin -command "restart" -``` +Client command usage: -The client uses the server’s public key to verify its identity before initiating any admin actions or retrieving metrics. +./dsfx-client -key /path/to/clientkey.pem test -### Command-Line Options +Where: -Both the server and client come with a set of command-line flags. Use the help flag for detailed options: +-key (required) +Specifies the file path to your client’s PEM-encoded private key. + +The command-line arguments for the dsfx-client are as follows: + +Command: test +Tests the connection against the remote dsfx-server instance. + +: +The address of the server in the format “dsfx://IP:PORT#PUBLIC_KEY_BASE_64”. +For example, “dsfx://127.0.0.1:8000#” or “dsfx://127.0.0.1:8000#eyJuIjoiLy8v..." + +Example: + +./dsfx-client -key ./dsfx-client/masterkey test dsfx://127.0.0.1:8000#eyJuIjoiLy8v.. + +If no command or an unrecognized command is provided, the client will print a brief usage message and exit. + +### Help and Usage Information + +For quick help, simply pass the -h flag: -```bash ./dsfx-server -h ./dsfx-client -h -``` + +This will display the usage information along with available flags. --- @@ -85,13 +107,13 @@ Contributions to dsfx are welcome and encouraged! ### How to Contribute 1. **Fork the Repository:** Create your own branch from the latest code in `main`. -2. **Make Your Changes:** Follow the [TigerStyle for Go](./TIGERSTYLE.md) guidelines to ensure code consistency and safety. -3. **Write Tests:** Ensure new features and bug fixes include proper tests. +2. **Make Your Changes:** Follow the [TigerStyle for Go](./TIGERSTYLE.md) guidelines to ensure code consistency and quality. +3. **Write Tests:** Ensure that new features and bug fixes include proper tests. 4. **Submit a Pull Request:** Document your changes clearly in your pull request. ### Reporting Issues -Please use the Git repository's issue tracker to report bugs or suggest new features. Include as much detail as possible to help reproduce and address the issue. +Please use the Git repository's issue tracker to report bugs or to suggest new features. Provide as much detail as possible to help reproduce and address any issues. ---