-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3656418
commit f696c31
Showing
17 changed files
with
201 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
api/src/main/java/net/azisaba/azipluginmessaging/api/protocol/PacketFlow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
package net.azisaba.azipluginmessaging.api.protocol; | ||
|
||
public enum PacketFlow { | ||
/** | ||
* Server (Backend) -> Proxy | ||
*/ | ||
TO_PROXY, | ||
/** | ||
* Proxy -> Server (Backend) | ||
*/ | ||
TO_SERVER, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
api/src/main/java/net/azisaba/azipluginmessaging/api/server/Connection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package net.azisaba.azipluginmessaging.api.server; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.security.KeyPair; | ||
import java.security.PublicKey; | ||
|
||
/** | ||
* Represents something that can have a connection. | ||
*/ | ||
public interface Connection { | ||
/** | ||
* Marks the connection as encrypted. | ||
* @param encrypted true if the connection is encrypted; false otherwise | ||
*/ | ||
void setEncrypted(boolean encrypted); | ||
|
||
/** | ||
* Checks if the connection is encrypted. | ||
* @return true if the connection is encrypted; false otherwise | ||
*/ | ||
boolean isEncrypted(); | ||
|
||
/** | ||
* Gets the local key pair for encrypting packets. | ||
* @return the local key pair | ||
*/ | ||
@NotNull | ||
KeyPair getKeyPair(); | ||
|
||
/** | ||
* Gets the remote public key for decrypting packets. | ||
* @return the remote public key | ||
*/ | ||
@NotNull | ||
PublicKey getRemotePublicKey(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.