From Wiki96
Jump to: navigation, search
(Restructure)
Line 1: Line 1:
P3, also known as '''Psuedo Peer-to-Peer''' or '''PPP''', is a protocol developed by utf#7185 for simulating P2P connections on Windows 96. The official relay server, which is hosted on <nowiki>https://p3.windows96.net</nowiki>, broke in August 2022, but as of January 2023 is up and running again. P3 was first seen in [[Windows 96 v2|Windows 96 v2sp2]], and continues to remain. During the development of [[Windows 96 v3|v3]], a replacement for P3 called '''Bell''' was created, but never finished in time, so v3 shipped with P3 instead.
P3, also known as '''Pseudo Peer-to-Peer''' or '''PPP''', is a communication protocol and program that was introduced in Windows96 v2.34 ([[Windows 96 v2]] Service Pack 2). Its purpose is to allow developers to have intercommunication between programs, without having to rely on hosting a server themselves.


P3 works by contacting a relay server to give you a static or dynamic address. When you have a P3 address, you can either host a P3 server, or connect to one. Each P3 address has different "ports" to listen on, to allow one P3 address to run multiple servers. Some common ports are 121, the default [[SuperTerm]] port; 140, the port used for [[Remote Console]], and 737, which is used for connecting to a [[P3FS]]. The discovery feature of P3 allows you to broadcast open ports via flags that you can search for. This allows people to search for publicly available services and easily connect to them.
P3 has been marked as obsolete since [[Windows 96 v3]] release 3.0.1, with no replacement being officially announced.


P3 contacts a relay server through SocketIO, a popular library for WebSockets. Connections to the P3 network are initiated by sending a '''hello''' message to the relay server, along with your P3 key. I (themirrazz) have documented the P3 protocol on my alt GitHub account at [https://github.com/themirrazzalt/p3protocol themirrazzalt/p3protocol], you can learn more about the interior of P3's protocol there. On [[Windows 96 v2|v2sp2]], you can obtain a custom address if you have a [[Windows 96 Product Key]] that you have activated your installation with.
== Network function ==
In order to initiate a connection with a peer, the system must first connect to a P3 relay server (by default, this server is <code>wss://p3.windows96.net</code>) using Socket.IO. The relay handles address assignment, authentication, message exchange and peer discovery.


== Third-Party/Unofficial P3 Libraries ==
=== HELLO ===
The only current third-party P3 library that I know of that exists is my [https://www.npmjs.com/package/mikesoftp3 mikesoftp3 NodeJS library], but if you know of any others, don't be afraid to add them to this page and submit an issue on my GitHub.
Logging in on the relay is accomplished by sending a <code>hello</code> packet containing the address secret as well as the desired subdomain in a JSON-encoded, semicolon-separated string.
"sub=hello;mySecret"
If the user does not wish to use  a subdomain, the <code>sub</code> argument can be omitted:
"mySecret"
If the user has a [[Windows 96 Product Key]], the secret is ignored, and the key's domain is used instead. Product key authentication is done by sending the <code>Authorization</code> HTTP header before connecting:
Authorization: Bearer <product-key>
Successful authentication will result in a <code>hello</code> response, indicating the user's address, secret and MOTD if the server has one:
{ "success": true, "address": "hello.kyblozsdhc.ppp", "secret": "mySecret", "message": "example MOTD" }
Invalid parameters will result in a message containing the error:
{ "success": false, "message": "PPP Server Error: Subdomain is invalid" }
 
== Use ==
 
* [[SuperTerm]] uses the Rich Text over P3 (RToP) protocol with 121 as default port.
* [[Remote Console]] uses RToP on port 140.
* [[P3FS]] uses P3 on port 737.
 
== See also ==
 
* [[P3FS]]
* [[P3.Compiled]]
* [[Remote Console]]
* [[SuperTerm]]
 
== External links ==
 
* [https://github.com/socketio/socket.io Socket.IO on GitHub]
* [https://github.com/themirrazzalt/p3protocol Unofficial P3 documentation]

Revision as of 16:45, 12 February 2023

P3, also known as Pseudo Peer-to-Peer or PPP, is a communication protocol and program that was introduced in Windows96 v2.34 (Windows 96 v2 Service Pack 2). Its purpose is to allow developers to have intercommunication between programs, without having to rely on hosting a server themselves.

P3 has been marked as obsolete since Windows 96 v3 release 3.0.1, with no replacement being officially announced.

Network function

In order to initiate a connection with a peer, the system must first connect to a P3 relay server (by default, this server is wss://p3.windows96.net) using Socket.IO. The relay handles address assignment, authentication, message exchange and peer discovery.

HELLO

Logging in on the relay is accomplished by sending a hello packet containing the address secret as well as the desired subdomain in a JSON-encoded, semicolon-separated string.

"sub=hello;mySecret"

If the user does not wish to use a subdomain, the sub argument can be omitted:

"mySecret"

If the user has a Windows 96 Product Key, the secret is ignored, and the key's domain is used instead. Product key authentication is done by sending the Authorization HTTP header before connecting:

Authorization: Bearer <product-key>

Successful authentication will result in a hello response, indicating the user's address, secret and MOTD if the server has one:

{ "success": true, "address": "hello.kyblozsdhc.ppp", "secret": "mySecret", "message": "example MOTD" } 

Invalid parameters will result in a message containing the error:

{ "success": false, "message": "PPP Server Error: Subdomain is invalid" }

Use

  • SuperTerm uses the Rich Text over P3 (RToP) protocol with 121 as default port.
  • Remote Console uses RToP on port 140.
  • P3FS uses P3 on port 737.

See also

External links