mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-14 16:04:36 +01:00
Begin moving things out of allmsgs.proto
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using ASodium;
|
using ASodium;
|
||||||
using EmbedIO;
|
using EmbedIO;
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
using nksrv.Net;
|
||||||
using nksrv.Utils;
|
using nksrv.Utils;
|
||||||
using Swan.Logging;
|
using Swan.Logging;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
|
using nksrv.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
using System;
|
using nksrv.Utils;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace nksrv.LobbyServer.Msgs.Antibot
|
namespace nksrv.LobbyServer.Msgs.Antibot
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace nksrv.LobbyServer.Msgs.Archive
|
namespace nksrv.LobbyServer.Msgs.Archive
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
using nksrv.Net;
|
||||||
using nksrv.Utils;
|
using nksrv.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
|
using nksrv.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
|
using nksrv.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -13,8 +14,9 @@ namespace nksrv.LobbyServer.Msgs.Misc
|
|||||||
protected override async Task HandleAsync()
|
protected override async Task HandleAsync()
|
||||||
{
|
{
|
||||||
var r = new SentryDataResponse();
|
var r = new SentryDataResponse();
|
||||||
// TODO check proper response from real server
|
// TODO: figure out a way to disable sentry so that Shift Up devs wouldn't be annoyed by this server
|
||||||
await WriteDataAsync(r);
|
|
||||||
|
await WriteDataAsync(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
using Google.Protobuf.WellKnownTypes;
|
using nksrv.Utils;
|
||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace nksrv.LobbyServer.Msgs.Misc
|
namespace nksrv.LobbyServer.Msgs.Misc
|
||||||
{
|
{
|
||||||
@@ -13,7 +8,7 @@ namespace nksrv.LobbyServer.Msgs.Misc
|
|||||||
{
|
{
|
||||||
protected override async Task HandleAsync()
|
protected override async Task HandleAsync()
|
||||||
{
|
{
|
||||||
var r = new ResGetServerInfo();
|
var r = new GetServerInfoResponse();
|
||||||
|
|
||||||
// todo: reimplement this as well
|
// todo: reimplement this as well
|
||||||
r.MatchUrl = "https://global-match.nikke-kr.com";
|
r.MatchUrl = "https://global-match.nikke-kr.com";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
using nksrv.Net;
|
||||||
using nksrv.StaticInfo;
|
using nksrv.StaticInfo;
|
||||||
using nksrv.Utils;
|
using nksrv.Utils;
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ namespace nksrv.LobbyServer.Msgs.Misc
|
|||||||
var r = new StaticDataPackResponse();
|
var r = new StaticDataPackResponse();
|
||||||
r.Url = GameConfig.Root.StaticData.Url;
|
r.Url = GameConfig.Root.StaticData.Url;
|
||||||
r.Version = GameConfig.Root.StaticData.Version;
|
r.Version = GameConfig.Root.StaticData.Version;
|
||||||
r.Size = StaticDataParser.Instance.Size;
|
r.FileSize = StaticDataParser.Instance.Size;
|
||||||
r.Sha256Sum = ByteString.CopyFrom(StaticDataParser.Instance.Sha256Hash);
|
r.Sha256Sum = ByteString.CopyFrom(StaticDataParser.Instance.Sha256Hash);
|
||||||
r.Salt1 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt1));
|
r.Salt1 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt1));
|
||||||
r.Salt2 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt2));
|
r.Salt2 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt2));
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using nksrv.StaticInfo;
|
using nksrv.Net;
|
||||||
|
using nksrv.StaticInfo;
|
||||||
using nksrv.Utils;
|
using nksrv.Utils;
|
||||||
using Swan.Logging;
|
using Swan.Logging;
|
||||||
using System;
|
using System;
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
using Swan.Logging;
|
using nksrv.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using static Google.Rpc.Context.AttributeContext.Types;
|
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
|
||||||
|
|
||||||
namespace nksrv.LobbyServer.Msgs.Stage
|
namespace nksrv.LobbyServer.Msgs.Stage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using nksrv.Utils;
|
using nksrv.Net;
|
||||||
|
using nksrv.Utils;
|
||||||
|
|
||||||
namespace nksrv.LobbyServer.Msgs.System
|
namespace nksrv.LobbyServer.Msgs.System
|
||||||
{
|
{
|
||||||
@@ -9,9 +10,9 @@ namespace nksrv.LobbyServer.Msgs.System
|
|||||||
{
|
{
|
||||||
var req = await ReadData<CheckVersionRequest>();
|
var req = await ReadData<CheckVersionRequest>();
|
||||||
var response = new CheckVersionResponse();
|
var response = new CheckVersionResponse();
|
||||||
response.Availability = 0; // None = 0, Available = 1, Mandatory = 2
|
response.VersionStatus = 0;
|
||||||
|
|
||||||
await WriteDataAsync(response);
|
await WriteDataAsync(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,61 +5,6 @@ option csharp_namespace = "nksrv";
|
|||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "google/protobuf/Duration.proto";
|
import "google/protobuf/Duration.proto";
|
||||||
|
|
||||||
// Network structure definitions. Note that I have not included field names for anticheat strucures.
|
|
||||||
|
|
||||||
|
|
||||||
message SentryDataResponse {
|
|
||||||
double samplingRate = 1;
|
|
||||||
double traceSamplingRate = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message CheckVersionRequest {
|
|
||||||
string version = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message CheckVersionResponse {
|
|
||||||
int32 availability = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ResGetServerInfo {
|
|
||||||
int32 worldId = 1;
|
|
||||||
string matchUrl = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
message NetMaintenanceWindow {
|
|
||||||
google.protobuf.Timestamp from = 1;
|
|
||||||
google.protobuf.Timestamp to = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MaintenanceNoticeResponse {
|
|
||||||
NetMaintenanceWindow window = 1;
|
|
||||||
bool isWhitelisted = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ResourceHostRequest {
|
|
||||||
string rversion = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ResourceHostResponse {
|
|
||||||
string version = 1;
|
|
||||||
string baseUrl = 2;
|
|
||||||
map<string, string> coreVersionMap = 3;
|
|
||||||
map<string, string> dataPackVersionMap = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message StaticDataPackRequest {
|
|
||||||
}
|
|
||||||
|
|
||||||
message StaticDataPackResponse {
|
|
||||||
string url = 1;
|
|
||||||
int64 size = 2;
|
|
||||||
bytes sha256Sum = 3;
|
|
||||||
bytes salt1 = 4;
|
|
||||||
bytes salt2 = 5;
|
|
||||||
string version = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum BillingPlatform{
|
enum BillingPlatform{
|
||||||
Unknown = 0;
|
Unknown = 0;
|
||||||
Ios = 1;
|
Ios = 1;
|
||||||
|
|||||||
60
nksrv/Protos/system.proto
Normal file
60
nksrv/Protos/system.proto
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option csharp_namespace = "nksrv.Net";
|
||||||
|
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
import "google/protobuf/Duration.proto";
|
||||||
|
|
||||||
|
message SentryDataResponse {
|
||||||
|
double Unknown1 = 1;
|
||||||
|
double Unknown2 = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CheckVersionRequest {
|
||||||
|
string Version = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CheckVersionResponse {
|
||||||
|
int32 VersionStatus = 1; // 0: good, 1: outdated, 2: unsupported
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetServerInfoRequest {
|
||||||
|
|
||||||
|
}
|
||||||
|
message GetServerInfoResponse {
|
||||||
|
int32 worldId = 1;
|
||||||
|
string matchUrl = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NetMaintenanceWindow {
|
||||||
|
google.protobuf.Timestamp from = 1;
|
||||||
|
google.protobuf.Timestamp to = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MaintenanceNoticeResponse {
|
||||||
|
NetMaintenanceWindow window = 1;
|
||||||
|
bool isWhitelisted = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResourceHostRequest {
|
||||||
|
string rversion = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResourceHostResponse {
|
||||||
|
string version = 1;
|
||||||
|
string baseUrl = 2;
|
||||||
|
map<string, string> coreVersionMap = 3;
|
||||||
|
map<string, string> dataPackVersionMap = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message StaticDataPackRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message StaticDataPackResponse {
|
||||||
|
string Url = 1;
|
||||||
|
int64 FileSize = 2;
|
||||||
|
bytes Sha256Sum = 3;
|
||||||
|
bytes Salt1 = 4;
|
||||||
|
bytes Salt2 = 5;
|
||||||
|
string Version = 6;
|
||||||
|
}
|
||||||
@@ -1,15 +1,8 @@
|
|||||||
using ASodium;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using nksrv.LobbyServer;
|
using nksrv.LobbyServer;
|
||||||
using nksrv.LobbyServer.Msgs.Stage;
|
using nksrv.Net;
|
||||||
using nksrv.StaticInfo;
|
using nksrv.StaticInfo;
|
||||||
using Swan.Logging;
|
using Swan.Logging;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using static Google.Rpc.Context.AttributeContext.Types;
|
|
||||||
|
|
||||||
namespace nksrv.Utils
|
namespace nksrv.Utils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
|
using nksrv.Net;
|
||||||
|
|
||||||
using nksrv.StaticInfo;
|
using nksrv.StaticInfo;
|
||||||
using Swan.Logging;
|
using Swan.Logging;
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace nksrv.Utils
|
namespace nksrv.Utils
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user