1.6.55
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
AppDomain.CurrentDomain.UnhandledException += OnFatalException;
|
||||
|
||||
Console.Title = Title;
|
||||
Console.WriteLine("FreeSR is a free and open-source software, if you paid for this, you have been scammed!");
|
||||
Console.WriteLine("FreeSR是一个免费且开源的软件,如果你是花钱买来的,则说明你被骗了!");
|
||||
Console.WriteLine("https://git.xeondev.com/Moux23333/FreeSR");
|
||||
|
||||
s_log.Info("Initializing...");
|
||||
|
||||
ConfigurationManager<DispatchServerConfiguration>.Instance.Initialize("DispatchServer.json");
|
||||
|
||||
21
FreeSR.Dispatch/DispatchServer.json
Normal file
21
FreeSR.Dispatch/DispatchServer.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Network": {
|
||||
"Host": "0.0.0.0",
|
||||
"Port": 8888
|
||||
},
|
||||
"Database": {
|
||||
"ConnectionString": "mongodb://127.0.0.1:27017/",
|
||||
"Name": "FreeSR",
|
||||
"Entries": [
|
||||
{
|
||||
"CollectionName": "accounts",
|
||||
"Type": "Account"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Region": {
|
||||
"Name": "FreeSR",
|
||||
"EnvType": "2",
|
||||
"DispatchUrl": "http://dispatch.starrails.com/query_gateway"
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
context.Response.StatusCode = HttpStatusCode.OK;
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Message("OK")
|
||||
.Object("data", dataObject)
|
||||
.Build());
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
context.Response.StatusCode = HttpStatusCode.OK;
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Message("OK")
|
||||
.Object("data", Data)
|
||||
.Build());
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
context.Response.StatusCode = HttpStatusCode.OK;
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Boolean("success", true)
|
||||
.String("message", "")
|
||||
.Build());
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (account == null)
|
||||
{
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_FAIL)
|
||||
.Retcode((int)RetcodeStatus.RetFail)
|
||||
.Message("Account not found.")
|
||||
.Object("data", null)
|
||||
.Build());
|
||||
@@ -38,7 +38,7 @@
|
||||
// no password check, because client patch is closed-source for now.
|
||||
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Message("OK")
|
||||
.Object("data", new JObject
|
||||
{
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
context.Response.StatusCode = HttpStatusCode.OK;
|
||||
context.Response.ContentType = "text/plain";
|
||||
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new DispatchRegionsData
|
||||
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new RegionList
|
||||
{
|
||||
Retcode = Retcode.RETCODE_RET_SUCC,
|
||||
TopSeverRegionName = RegionManager.GetTopServerRegionName(),
|
||||
RegionList = RegionManager.GetRegionList()
|
||||
Retcode = (uint)RetcodeStatus.RetSucc,
|
||||
TopServerRegionName = RegionManager.GetTopServerRegionName(),
|
||||
RegionInfoLists = { RegionManager.GetRegionList() }
|
||||
})));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -13,19 +13,22 @@
|
||||
context.Response.ContentType = "text/plain";
|
||||
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new Gateserver
|
||||
{
|
||||
Retcode = Retcode.RETCODE_RET_SUCC,
|
||||
Msg = "OK",
|
||||
Retcode = 0,
|
||||
Msg0 = "OK",
|
||||
Ip = "127.0.0.1",
|
||||
RegionName = "FreeSR",
|
||||
Port = 22301,
|
||||
Mljaogdhcki = true,
|
||||
LoginWhiteMsg = "Access verification failed. Please check if you have logged in to the correct account and server.",
|
||||
Jcdlppbocpe = true,
|
||||
Gifijbibiin = true,
|
||||
Ibplbfhmgkf = true,
|
||||
MbResVersion = "5335706",
|
||||
AssetBundleUrl = "https://autopatchos.starrails.com/asb/V1.3Live/output_5355192_0007722cfc",
|
||||
ExResourceUrl = "https://autopatchos.starrails.com/design_data/V1.3Live/output_5371504_9fdb2fe63e",
|
||||
B1 = true,
|
||||
B2 = true,
|
||||
B3 = true,
|
||||
B4 = true,
|
||||
B5 = true,
|
||||
B6 = true,
|
||||
B7 = true,
|
||||
Gfemaboifee = true,
|
||||
//MdkResVersion = "5335706",
|
||||
AssetBundleUrl = "https://autopatchcn.bhsr.com/asb/BetaLive/output_6355877_591cdefefe9b",
|
||||
ExResourceUrl = "https://autopatchcn.bhsr.com/design_data/BetaLive/output_6367879_26191d7cc23b",
|
||||
})));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
context.Response.StatusCode = HttpStatusCode.OK;
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Message("OK")
|
||||
.Object("data", CaptchaData)
|
||||
.Build());
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if (account == null)
|
||||
{
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_FAIL)
|
||||
.Retcode((int)RetcodeStatus.RetFail)
|
||||
.Message("Account not found.")
|
||||
.Object("data", null)
|
||||
.Build());
|
||||
@@ -34,7 +34,7 @@
|
||||
else if (account.Token != token)
|
||||
{
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_FAIL)
|
||||
.Retcode((int)RetcodeStatus.RetFail)
|
||||
.Message("Invalid user token.")
|
||||
.Object("data", null)
|
||||
.Build());
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
|
||||
.Retcode(Retcode.RETCODE_RET_SUCC)
|
||||
.Retcode((int)RetcodeStatus.RetSucc)
|
||||
.Message("OK")
|
||||
.Object("data", new JObject
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
s_configuration = configuration;
|
||||
}
|
||||
|
||||
public static List<RegionEntry> GetRegionList()
|
||||
public static RegionInfo GetRegionList()
|
||||
{
|
||||
var region = new RegionEntry
|
||||
var region = new RegionInfo
|
||||
{
|
||||
EnvType = s_configuration.EnvType,
|
||||
DispatchUrl = s_configuration.DispatchUrl,
|
||||
@@ -23,7 +23,7 @@
|
||||
Title = s_configuration.Name
|
||||
};
|
||||
|
||||
return new List<RegionEntry> { region };
|
||||
return region;
|
||||
}
|
||||
|
||||
public static string GetTopServerRegionName() => s_configuration.Name;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{
|
||||
{"uid", model.Uid},
|
||||
{"name", model.Name},
|
||||
{"email", ""},
|
||||
{"email", "reversedrooms"},
|
||||
{"mobile", ""},
|
||||
{"is_email_verify", "0"},
|
||||
{"realname", ""},
|
||||
|
||||
Reference in New Issue
Block a user