minimum sdk done
This commit is contained in:
parent
212d08496c
commit
eacf80ed5c
|
@ -1,5 +1,7 @@
|
|||
using AscNet.Common.Util;
|
||||
using AscNet.SDKServer.Models;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AscNet.SDKServer.Controllers
|
||||
|
@ -35,10 +37,10 @@ namespace AscNet.SDKServer.Controllers
|
|||
remoteConfigs.AddConfig("MemoryLimit", 2048);
|
||||
remoteConfigs.AddConfig("CloseMsgEncrypt", false);
|
||||
remoteConfigs.AddConfig("ServerListStr", $"{Common.Common.config.GameServer.RegionName}#{Common.Common.config.GameServer.Host}/api/Login/Login");
|
||||
remoteConfigs.AddConfig("AndroidPayCallbackUrl", $"{Common.Common.config.GameServer.Host}/api/XPay/HeroHgAndroidPayResult"); // i just wanna know what this is
|
||||
remoteConfigs.AddConfig("IosPayCallbackUrl", $"{Common.Common.config.GameServer.Host}/api/XPay/HeroHgIosPayResult"); // i just wanna know what this is
|
||||
remoteConfigs.AddConfig("WatermarkEnabled", true); // i just wanna know what this is
|
||||
remoteConfigs.AddConfig("PicComposition", "empty"); // i just wanna know what this is
|
||||
remoteConfigs.AddConfig("AndroidPayCallbackUrl", $"{Common.Common.config.GameServer.Host}/api/XPay/HeroHgAndroidPayResult");
|
||||
remoteConfigs.AddConfig("IosPayCallbackUrl", $"{Common.Common.config.GameServer.Host}/api/XPay/HeroHgIosPayResult");
|
||||
remoteConfigs.AddConfig("WatermarkEnabled", false); // i just wanna know what this is
|
||||
remoteConfigs.AddConfig("PicComposition", "empty");
|
||||
remoteConfigs.AddConfig("DeepLinkEnabled", true);
|
||||
remoteConfigs.AddConfig("DownloadMethod", 1);
|
||||
remoteConfigs.AddConfig("PcPayCallbackList", $"{Common.Common.config.GameServer.Host}/api/XPay/KuroPayResult");
|
||||
|
@ -46,12 +48,32 @@ namespace AscNet.SDKServer.Controllers
|
|||
return TsvTool.SerializeObject(remoteConfigs);
|
||||
});
|
||||
|
||||
app.MapGet("/prod/client/notice/config/com.kurogame.punishing.grayraven.en.pc/{version}/LoginNotice.json", (HttpContext ctx) =>
|
||||
{
|
||||
return JsonConvert.SerializeObject(new LoginNotice()
|
||||
{
|
||||
BeginTime = 0,
|
||||
EndTime = 0,
|
||||
HtmlUrl = "/",
|
||||
Id = "1",
|
||||
ModifyTime = 0,
|
||||
Title = "NOTICE"
|
||||
});
|
||||
});
|
||||
|
||||
app.MapPost("/feedback", (HttpContext ctx) =>
|
||||
{
|
||||
return ctx.Response.WriteAsJsonAsync(new
|
||||
return "1";
|
||||
});
|
||||
|
||||
app.MapGet("/api/Login/Login", ([FromQuery] int loginType, [FromQuery] int userId, [FromQuery] string token, [FromQuery] string clientIp) =>
|
||||
{
|
||||
return JsonConvert.SerializeObject(new LoginGate()
|
||||
{
|
||||
code = 0,
|
||||
msg = "ok"
|
||||
Code = 0,
|
||||
Ip = Common.Common.config.GameServer.Host,
|
||||
Port = Common.Common.config.GameServer.Port,
|
||||
Token = token
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace AscNet.SDKServer.Models
|
||||
{
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class LoginGate
|
||||
{
|
||||
[JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long? Code { get; set; }
|
||||
|
||||
[JsonProperty("token", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Token { get; set; }
|
||||
|
||||
[JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long? Port { get; set; }
|
||||
|
||||
[JsonProperty("ip", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Ip { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace AscNet.SDKServer.Models
|
||||
{
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class LoginNotice
|
||||
{
|
||||
[JsonProperty("BeginTime", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long BeginTime { get; set; }
|
||||
|
||||
[JsonProperty("EndTime", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long EndTime { get; set; }
|
||||
|
||||
[JsonProperty("HtmlUrl", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string HtmlUrl { get; set; }
|
||||
|
||||
[JsonProperty("Id", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("ModifyTime", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long ModifyTime { get; set; }
|
||||
|
||||
[JsonProperty("Title", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
2
proxy.py
2
proxy.py
|
@ -21,7 +21,7 @@ def next_layer(nextlayer: layer.NextLayer):
|
|||
nextlayer.context.server.address = ("127.0.0.1", 443)
|
||||
|
||||
def request(flow: http.HTTPFlow) -> None:
|
||||
if "kurogame.net" in flow.request.pretty_url or "kurogame-service.com" in flow.request.pretty_url:
|
||||
if "kurogame.net" in flow.request.pretty_url:
|
||||
flow.request.host = "localhost"
|
||||
flow.request.headers["Host"] = "localhost"
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue