Quick Start¶
This guide will help you get started with FuryMesh quickly. We'll cover the basics of setting up a node, connecting to the network, and transferring files.
Basic Usage¶
Starting a Node¶
First, let's start a FuryMesh node:
# Start a node with default settings
furymesh start
# Or with custom settings
furymesh start --port 8080 --data-dir ./data
This will start a FuryMesh node that listens for incoming connections and can participate in the network.
Connecting to the Network¶
To connect to the FuryMesh network, you need to bootstrap your node with known peers:
# Start a node with bootstrap peers
furymesh start --bootstrap peer1.example.com:8080,peer2.example.com:8080
Alternatively, you can specify bootstrap peers in your configuration file:
And then start the node with this configuration:
Sharing a File¶
To share a file with the network:
This will chunk the file, generate a unique file ID, and make it available for other peers to download. The command will output the file ID, which you can share with others.
File shared successfully:
File ID: 3f7b8a1c2d9e4f5a6b7c8d9e0f1a2b3c
File Name: file.txt
File Size: 1.2 MB
Chunks: 5
Listing Shared Files¶
To see a list of files you're sharing:
This will show all files that your node is currently sharing:
+----------------------------------+-------------+----------+-------+
| File ID | Name | Size | Chunks |
+----------------------------------+-------------+----------+-------+
| 3f7b8a1c2d9e4f5a6b7c8d9e0f1a2b3c | file.txt | 1.2 MB | 5 |
| 7a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d | image.jpg | 2.5 MB | 10 |
+----------------------------------+-------------+----------+-------+
Downloading a File¶
To download a file from a peer:
# Download a file
furymesh download --peer-id peer-id-here --file-id file-id-here --output /path/to/output
You can monitor the progress of the download:
Downloading file 3f7b8a1c2d9e4f5a6b7c8d9e0f1a2b3c from peer abc123...
Progress: [====================] 100% Complete
File saved to /path/to/output/file.txt
Multi-Peer Download¶
To download a file from multiple peers simultaneously:
# Download a file from multiple peers
furymesh download --file-id file-id-here --multi-peer --output /path/to/output
This will automatically discover peers that have the file and download different chunks from different peers.
Resuming a Transfer¶
If a transfer is interrupted, you can resume it:
FuryMesh will automatically continue from where it left off, downloading only the missing chunks.
Using the Configuration File¶
FuryMesh can be configured using a YAML configuration file:
# config.yaml
node:
id: "my-node"
port: 8080
data_dir: "./data"
dht:
bootstrap_peers:
- "peer1.example.com:8080"
- "peer2.example.com:8080"
webrtc:
stun_servers:
- "stun:stun.l.google.com:19302"
turn_servers:
- url: "turn:turn.example.com:3478"
username: "username"
password: "password"
transfer:
concurrent_transfers: 5
chunk_size: 1048576 # 1MB
chunk_selection_strategy: "rarest_first" # or "round_robin"
Start FuryMesh with this configuration:
Advanced Commands¶
Listing Peers¶
To see a list of connected peers:
Checking Transfer Status¶
To check the status of ongoing transfers:
Getting Storage Statistics¶
To see storage usage statistics:
Deleting a File¶
To delete a file from your node:
Running as a Service¶
Linux (systemd)¶
Create a systemd service file:
Add the following content:
[Unit]
Description=FuryMesh P2P File Sharing
After=network.target
[Service]
ExecStart=/usr/local/bin/furymesh start --config /etc/furymesh/config.yaml
Restart=on-failure
User=furymesh
Group=furymesh
[Install]
WantedBy=multi-user.target
Enable and start the service:
macOS (launchd)¶
Create a launchd plist file:
Add the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tfmv.furymesh</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/furymesh</string>
<string>start</string>
<string>--config</string>
<string>/Users/username/furymesh/config.yaml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
Load the service:
Windows (Windows Service)¶
Install FuryMesh as a Windows service using NSSM:
nssm install FuryMesh C:\path\to\furymesh.exe start --config C:\path\to\config.yaml
nssm start FuryMesh
Next Steps¶
Now that you have a basic understanding of FuryMesh, you can:
- Learn about Configuration options
- Explore Multi-Peer Transfers
- Understand Resume Support
- Check out the Command Line Reference