Files
FreeSR/FreeSR.Dispatch/Handlers/QueryGatewayHandler.cs
2025-03-04 09:48:38 +07:00

39 lines
1.2 KiB
C#

namespace FreeSR.Dispatch.Handlers
{
using Ceen;
using FreeSR.Dispatch.Util;
using FreeSR.Proto;
using System.Threading.Tasks;
internal class QueryGatewayHandler : IHttpModule
{
public async Task<bool> HandleAsync(IHttpContext context)
{
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "text/plain";
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new Gateserver
{
Retcode = 0,
Msg = "OK",
Ip = "127.0.0.1",
RegionName = "FreeSR",
Port = 22301,
UseTcp = true,
EnableWatermark = true,
EnableCdnIpv6 = 1,
EnableVersionUpdate = true,
EnableAndroidMiddlePackage = true,
EnableDesignDataVersionUpdate = true,
EnableUploadBattleLog = true,
EnableSaveReplayFile = true,
AssetBundleUrl = "",
ExResourceUrl = "",
IfixVersion = "",
LuaUrl = "",
})));
return true;
}
}
}