Introduction to JavaPT
Nice to see you in this page. I assume you are either a developer or a PT site master who want to find a Java based PT(private tracker). After several days of development, this project is almost good here.
I write this post just to clarify all the protocols and interfaces that I used in this project, in case some people need to develop a better frontier or do second development.
For the part of interfaces
, I would like to introduce the format of returned data from server. How to process them and how to link them together.
For JSON
part, I will list all entities that are involved in the data transmission. Frontier developers need to know the format and their corresponding meaning.
For the part of protocols
, I actually just used and enhanced the ttorrent tracker server. I will introduce the BitTorrent implemented in this project, answer some confusing questions about Bit Torrent.
Interfaces
One important thing is the Authentication fields
in request header.Authentication fields
are id
and credential
fields in header. Corresponding to the information of user who currently log in client.
A sample request is shown as below:
1 |
|
Almost every POST
PUT
and DELETE
request are required to include authentication fields for user identity verification. Some GET
are also require to do so. This is actually a good way to simplify Restful
.
Some special requests are not authetication required. Please strictly follow the sample HTTP request in each specific API.
Request that should have authetication fields but does not will get:
1 |
|
JSON
JSON data format are generally used througout this application.
Listed classes are for demonstration usage.
If developers want to set up client or front-end, please also follow the same rule of class structure.
Protocols
- BitTorrent