Skip to content

Peer local web app in peer-to-peer network for sharing files using Django and PeerJS

Notifications You must be signed in to change notification settings

maiquang04/simple-torrent-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-torrent-client

Specification

  • JSON example torrent
{
	"announce": f"{tracker_url}/announce",
	"info": {
		"length": file_length,
		"name": filename,
		"piece length": piece_length,
		"pieces": pieces,
	},
	"user": { # Person who creates it
		"current directory": current_dir,
		"peer id": peer_id,
		"file path": file_path,
	},
}
  • Peer list
{
	"peers": [
		{
			"file_directory": "current_dir_1",
			"peer_id": "peer_id_1",
			"file_path": "file_path_1"
		},
		{
			"file_directory": "current_dir_2",
			"peer_id": "peer_id_2",
			"file_path": "file_path_2"
		}
	]
}
  • Peer request
{
	"type": "request",
	"file_length": file_length,
	"filename": filename,
	"file_directory": current_dir,
	"file_path": file_path,
	"piece_length": piece_length,
	"piece_hashes": piece_hashes,
	"piece_range": [
		{
			"piece_hash": piece_hash,
			"piece_index": piece_index,
		},
	],
	"sender_peer_id": peer_id
}
  • Seed request
{

}

About

Peer local web app in peer-to-peer network for sharing files using Django and PeerJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published