add minecraft protocol
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
--- /dev/null
|
||||
+++ b/option/minecraft.go
|
||||
@@ -0,0 +1,53 @@
|
||||
+// OMV
|
||||
+package option
|
||||
+
|
||||
+import "encoding/json"
|
||||
+
|
||||
+type MinecraftInboundOptions struct {
|
||||
+ ListenOptions
|
||||
+ Users []MinecraftUser `json:"users,omitempty"`
|
||||
+ Status *MinecraftStatus `json:"status,omitempty"`
|
||||
+ Fallback *MinecraftFallbackOptions `json:"fallback,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftFallbackOptions struct {
|
||||
+ ServerOptions
|
||||
+ Tag string `json:"tag,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftStatus struct {
|
||||
+ Forward bool `json:"forward,omitempty"`
|
||||
+ Version *MinecraftStatusVersion `json:"version,omitempty"`
|
||||
+ Description json.RawMessage `json:"description,omitempty"`
|
||||
+ Players *MinecraftStatusPlayers `json:"players,omitempty"`
|
||||
+ Favicon string `json:"favicon,omitempty"`
|
||||
+ EnforcesSecureChat bool `json:"enforces_secure_chat,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftStatusVersion struct {
|
||||
+ Name string `json:"name,omitempty"`
|
||||
+ Protocol int `json:"protocol,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftStatusPlayers struct {
|
||||
+ Max int `json:"max,omitempty"`
|
||||
+ Online int `json:"online,omitempty"`
|
||||
+ Sample []MinecraftStatusPlayerSample `json:"sample,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftStatusPlayerSample struct {
|
||||
+ Name string `json:"name"`
|
||||
+ ID string `json:"id"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftUser struct {
|
||||
+ Username string `json:"username,omitempty"`
|
||||
+ Password string `json:"password,omitempty"`
|
||||
+}
|
||||
+
|
||||
+type MinecraftOutboundOptions struct {
|
||||
+ DialerOptions
|
||||
+ ServerOptions
|
||||
+ Username string `json:"username,omitempty"`
|
||||
+ Password string `json:"password,omitempty"`
|
||||
+}
|
||||
Reference in New Issue
Block a user