mirror of
https://git.numenor-labs.us/dsfx.git
synced 2025-04-29 08:10:34 +00:00
more improvements
This commit is contained in:
parent
a193a5e398
commit
2b291900b9
@ -48,10 +48,10 @@ go install ./...
|
||||
|
||||
### Starting the Server
|
||||
|
||||
The dsfx-server requires a listening host, port, and a master key (ECDSA private key in PEM format). For example:
|
||||
The dsfx-server requires a listening host, port, and an identity key (ECDSA private key in PEM format). For example:
|
||||
|
||||
```sh
|
||||
dsfx-server -host localhost -port 8000 -masterKey /path/to/masterkey.pem
|
||||
dsfx-server -host localhost -port 8000 -key /path/to/serverkey.pem
|
||||
```
|
||||
|
||||
> Note, if you need to generate a new ECDSA key, you can use the following command: `go run ./cmd/genkey > path/to/masterkey.pem`
|
||||
@ -64,7 +64,7 @@ The host interface on which the server will listen.
|
||||
-port (default 8000)
|
||||
The TCP port on which the server will accept connections.
|
||||
|
||||
-masterKey (required)
|
||||
-key (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.
|
||||
@ -91,7 +91,7 @@ Tests the connection against the remote dsfx-server instance.
|
||||
|
||||
<remote_addr>:
|
||||
The address of the server in the format “dsfx://IP:PORT#PUBLIC_KEY_BASE_64”.
|
||||
For example, “dsfx://127.0.0.1:8000#<base64 pubkey>” or “dsfx://127.0.0.1:8000#eyJuIjoiLy8v..."
|
||||
For example, `dsfx://127.0.0.1:8000#<base64 pubkey>” or “dsfx://127.0.0.1:8000#eyJuIjoiLy8v...`
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -44,7 +44,7 @@ func main() {
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
|
||||
flagKey := flag.String("key", "", "the path to the private key file")
|
||||
flagKey := flag.String("key", "", "the path to the key file")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
|
@ -14,9 +14,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
flagHost = flag.String("host", "localhost", "the host to listen on")
|
||||
flagPort = flag.Int("port", 8000, "the port to listen on")
|
||||
flagMasterKey = flag.String("masterKey", "", "the path to the master key file")
|
||||
flagHost = flag.String("host", "localhost", "the host to listen on")
|
||||
flagPort = flag.Int("port", 8000, "the port to listen on")
|
||||
flagKey = flag.String("key", "", "the path to the key file")
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -43,12 +43,12 @@ func main() {
|
||||
|
||||
flag.Parse()
|
||||
|
||||
if *flagMasterKey == "" {
|
||||
if *flagKey == "" {
|
||||
slog.ErrorContext(ctx, "master key path is required")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
masterKey, err := dcrypto.LoadSigningKeyFromFile(*flagMasterKey)
|
||||
masterKey, err := dcrypto.LoadSigningKeyFromFile(*flagKey)
|
||||
if err != nil {
|
||||
logger.ErrorContext(ctx, "failed to load master key", slog.Any("error", err))
|
||||
os.Exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user