-
Notifications
You must be signed in to change notification settings - Fork 0
User manual
The server configuration is stored in config.yaml. Open the file and edit the following fields as needed:
control:
port: 8000 # Port to listen for incoming control messages
peer:
port: 8001 # Port to listen for incoming data to
request
data
auth:
token: "secret" # Token to authenticateThe peer configuration is also stored in config.yaml. Open the file and edit the following fields as needed:
ip: 107.23.96.211
port: 8000 # Port to listen for incoming control messages
peer:
port: 8001 # Port to listen for incoming data or to request data
path: "./files/" # Path of the directory to share
auth:
token: "secret" # Token to authenticate-
Install Dependencies: Ensure you have Python 3 installed. Install required packages using:
pip install -r requirements.txt
-
Run the Server: Navigate to the server directory and run the server:
python3 server.py
-
Install Dependencies: Ensure you have Python 3 installed. Install required packages using:
pip install -r requirements.txt
-
Run the Peer Server: Navigate to the peer directory and run the peer server:
python3 peer.py --server
-
Install Dependencies: Ensure you have Python 3 installed. Install required packages using:
pip install -r requirements.txt
-
Run the Peer Client: Navigate to the peer directory and run the peer client:
python3 peer.py
-
CLI Commands:
-
Help:
help -
Connect to Server:
If no host, port, and token are given, the values in the configuration file will be used.
connect [-h host] [-p port] [-t token]
-
Disconnect from Server:
disconnect
-
List Files:
list
-
Get File Address:
where [-f file]
-
Retrieve File:
get [-f file] [-o output]
-
Exit Program:
exit
-
Help:
-
Connect to Server:
connect -h 127.0.0.1 -p 8000 -t secret
-
List Files:
list
-
Get File Address:
where -f example.txt
-
Retrieve File:
get -f example.txt -o ./downloads/example.txt
-
Disconnect from Server:
disconnect
-
Exit Program:
exit