Update data versions

Serve file format in expected response for serverList.xml
Fix authentication urls
Add GetUidMicaQueue
Check Tunnelling.
Add Passport Controller pre-emptively
Update proxycontrol for additional urls
add userProtocol_en_v005.txt
This commit is contained in:
BSRevival 2024-05-28 01:38:34 -07:00
parent febd87782d
commit b258ec6a17
9 changed files with 192 additions and 62 deletions

View File

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
namespace Elisa.GameServer.Controllers;
public class FileController : Controller
{
[HttpGet("image/imageconfig.txt", Name = "ImageConfig")]
public async Task<IResult> ImageConfig()
{
return Results.Text(System.IO.File.ReadAllText(@"Resources\image\ImageConfig.txt"));
}
[HttpGet("userProtocol_en_v005.txt", Name = "Terms Of Service")]
public async Task<IResult> TermsOfService()
{
return Results.Text(System.IO.File.ReadAllText(@"Resources\userProtocol_en_v005.txt"));
}
}

View File

@ -8,10 +8,13 @@ public class IndexController : Controller
[HttpPost("index.php", Name = "ServerList")] [HttpPost("index.php", Name = "ServerList")]
public async Task<IResult> ServerList() public async Task<IResult> ServerList()
{ {
return Results.Text(System.IO.File.ReadAllText(@"Resources\serverList.xml")); //read the serverlist
var text = System.IO.File.ReadAllText(@"Resources\serverList.xml");
return Results.Content(text, "text/html");
} }
[HttpGet("index.php/1001/index/version", Name = "Version")] [HttpPost("index.php/1001/index/version", Name = "Version")]
public async Task<IResult> Version([FromQuery] string req_id) public async Task<IResult> Version([FromQuery] string req_id)
{ {
return Results.Json(new return Results.Json(new
@ -26,16 +29,28 @@ public class IndexController : Controller
ab_version = GameServer.ABVersion, ab_version = GameServer.ABVersion,
is_kick = "0", is_kick = "0",
weekday = 1, weekday = 1,
authentication_url = $"http://realauth.ucenter.ppgame.com/authoriz.html?appid={0}&openid={1}&accounttype=1&language=zh" authentication_url = @"http://realauth.ucenter.ppgame.com/authoriz.html?appid={0}&openid={1}&accounttype=1&language=zh"
}); });
} }
[HttpPost("index.php/1001/index/getUidEnMicaQueue", Name = "GetUidMicaQueue")]
[HttpGet("image/imageconfig.txt", Name = "ImageConfig")] public async Task<IResult> GetUidMicaQueue([FromQuery] string req_id)
public async Task<IResult> ImageConfig()
{ {
return Results.Text(System.IO.File.ReadAllText(@"Resources\image\ImageConfig.txt")); return Results.Json(new
{
uid = "9303",
sign = "1f8063d3eb961af28f3fa5b90e9d3ba0",
is_username_exist = true,
real_name = 0,
authentication_url = @"http://realauth.ucenter.ppgame.com/authoriz.html?appid={0}&openid={1}&accounttype=1&language=zh",
tc_order_retry = 0
});
}
[HttpPost("index.php/1001/index/Index", Name = "Index")]
public async Task<IResult> Index([FromQuery] string req_id)
{
return Results.Json(new
{ });
} }
/* /*
[Route("{*url}")] [Route("{*url}")]
public async Task<IActionResult> HandleAll(string url) public async Task<IActionResult> HandleAll(string url)

View File

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
namespace Elisa.GameServer.Controllers;
public class PassportController : Controller
{
[HttpPost("/passport/userProtocol", Name = "UserProtocol")]
public async Task<IResult> UserProtocol()
{
return Results.Json(new
{
user_protocol = "http://127.0.0.1/userProtocol_en_v005.txt",
delete_protocol = "http://127.0.0.1/passport/deleteProtocol",
delete_notice= @"<p class=MsoPlainText><span lang=EN-US style='font-family:宋体'>1.Please perform this on a safe and frequently-used network and devices.</span></p><p class=MsoPlainText><span lang=EN-US style='font-family:宋体'>2.If there are any unused paid services or virtual currency on the linked accounts, they will all be lost along with the account. All game account information on the Sunborn Network will be deleted, so please take care when performing this action.</span></p><p class=MsoPlainText><span lang=EN-US style='font-family:宋体'>3.Please read the Deletion Terms below carefully. Your account cannot be restored once it is deleted, so please consider your decision carefully.</span></p>",
twitter_disable = true
});
}
}

View File

@ -33,6 +33,9 @@
<None Update="Resources\text\table\*.json"> <None Update="Resources\text\table\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="Resources\userProtocol_en_v005.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -11,8 +11,8 @@ namespace Elisa.GameServer;
public static class GameServer public static class GameServer
{ {
public static string ClientVersion = 30400.ToString(); public static string ClientVersion = 30400.ToString();
public static string DataVersion = "d630eea53a1b869fa4d7d1479a3d09e7"; public static string DataVersion = "4e7d9f82634fd8c557600524b55c8efe";
public static string ABVersion = 2024051417.ToString(); public static string ABVersion = 2024052719.ToString();
public static void Main(string[] args) public static void Main(string[] args)
{ {

View File

@ -14,7 +14,7 @@
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"launchUrl": "swagger", "launchUrl": "swagger",
"applicationUrl": "http://127.0.0.1", "applicationUrl": "https://127.0.0.1;http://127.0.0.1;",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
@ -24,7 +24,7 @@
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger",
"applicationUrl": "https://localhost:7010;http://localhost:5208", "applicationUrl": "https://localhost:443;http://localhost:80",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

View File

@ -8,18 +8,28 @@ namespace Elisa.GameServer;
public class ProxyControl public class ProxyControl
{ {
static readonly Regex HostFilter = new Regex("(.*).(girlfrontline\\.co\\.kr|ppgame\\.com|txwy\\.tw|sunborngame\\.com|aihelp.net.cn).*"); static readonly Regex HostFilter = new Regex("(.*).(girlfrontline\\.co\\.kr|ppgame\\.com|txwy\\.tw|sunborngame\\.com|aihelp\\.net).*");
static readonly Regex AWSFilter = new Regex(@"s3.*.amazonaws.com");
static readonly Regex DLlistFilter = new Regex(@"dl.listdl.com");
readonly string forwardIpAddress; readonly string forwardIpAddress;
readonly ProxyServer proxyServer; readonly ProxyServer proxyServer;
readonly ExplicitProxyEndPoint explicitEndPoint; readonly ExplicitProxyEndPoint explicitEndPoint;
public ProxyControl(string forwardIpAddress, int port = 9000) public ProxyControl(string forwardIpAddress, int port = 8888)
{ {
this.forwardIpAddress = forwardIpAddress; this.forwardIpAddress = forwardIpAddress;
proxyServer = new ProxyServer(); proxyServer = new ProxyServer();
explicitEndPoint = new ExplicitProxyEndPoint(System.Net.IPAddress.Any, port, true); explicitEndPoint = new ExplicitProxyEndPoint(System.Net.IPAddress.Any, port, true);
proxyServer.BeforeRequest += OnRequest; proxyServer.BeforeRequest += OnRequest;
//Ssl handling
explicitEndPoint.BeforeTunnelConnectRequest += OnBeforeTunnelConnectRequest;
/*
proxyServer.ServerCertificateValidationCallback += OnCertificateValidation;
proxyServer.ClientCertificateSelectionCallback += OnCertificateSelection;
*/
} }
public void Start() public void Start()
@ -34,11 +44,61 @@ public class ProxyControl
public void Stop() public void Stop()
{ {
proxyServer.BeforeRequest -= OnRequest; proxyServer.BeforeRequest -= OnRequest;
//Ssl Handling
/*proxyServer.ServerCertificateValidationCallback -= OnCertificateValidation;
proxyServer.ClientCertificateSelectionCallback -= OnCertificateSelection;
*/
explicitEndPoint.BeforeTunnelConnectRequest -= OnBeforeTunnelConnectRequest;
proxyServer.Stop(); proxyServer.Stop();
} }
private async Task OnBeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
{
string hostname = e.HttpClient.Request.RequestUri.Host;
//show the hostname
Log.Information($"Tunnel Connect Request for {hostname}");
//Forward to our domain --this doesn't work
/*
if (HostFilter.IsMatch(hostname) || AWSFilter.IsMatch(hostname) || DLlistFilter.IsMatch(hostname))
{
Log.Information($"Forwarding tunnel connect request for {hostname} to {forwardIpAddress}");
e.DecryptSsl = true;
e.HttpClient.Request.RequestUri = new Uri("https://" + forwardIpAddress);
}*/
if (hostname.Contains("gf-passport.sunborngame.com"))
{
// Exclude Https addresses you don't want to proxy
// Useful for clients that use certificate pinning
// for example dropbox.com
e.DecryptSsl = false;
}
}
public Task OnCertificateValidation(object sender, CertificateValidationEventArgs e)
{
// set IsValid to true/false based on Certificate Errors
//if (e.SslPolicyErrors == System.Net.Security.SslPolicyErrors.None)
e.IsValid = true;
return Task.CompletedTask;
}
// Allows overriding default client certificate selection logic during mutual authentication
public Task OnCertificateSelection(object sender, CertificateSelectionEventArgs e)
{
// set e.clientCertificate to override
return Task.CompletedTask;
}
private async Task OnRequest(object sender, SessionEventArgs e) private async Task OnRequest(object sender, SessionEventArgs e)
{ {
if (e.IsHttps)
{
Log.Information("HTTPS request detected, skipping");
return;
}
Uri requestUri = e.HttpClient.Request.RequestUri; Uri requestUri = e.HttpClient.Request.RequestUri;
if (HostFilter.IsMatch(requestUri.Host)) if (HostFilter.IsMatch(requestUri.Host))
{ {
@ -51,5 +111,24 @@ public class ProxyControl
// Bubble it out to user // Bubble it out to user
} }
//Test for aws
else if (AWSFilter.IsMatch(requestUri.Host))
{
Log.Information($"Forwarding AWS request for {requestUri} to {forwardIpAddress}");
Uri newUri = new Uri("http://" + forwardIpAddress + requestUri.PathAndQuery, UriKind.Absolute);
Log.Information($"Forwarded request to {newUri}");
e.HttpClient.Request.RequestUri = newUri;
}
else if (DLlistFilter.IsMatch(requestUri.Host))
{
Log.Information($"Forwarding DLList request for {requestUri} to {forwardIpAddress}");
Uri newUri = new Uri("http://" + forwardIpAddress + requestUri.PathAndQuery, UriKind.Absolute);
Log.Information($"Forwarded request to {newUri}");
e.HttpClient.Request.RequestUri = newUri;
}
} }
} }

View File

@ -1,19 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<servers> <servers>
<server> <server>
<name>GRIFFIN</name> <name>GRIFFIN</name>
<addr>http://127.0.0.1/</addr> <addr>http://127.0.0.1/index.php/1001/</addr>
<worldId>1001</worldId> <worldId>1001</worldId>
<recommended>0</recommended> <recommended>0</recommended>
<condition>0</condition> <condition>0</condition>
<is_check>0</is_check> <is_check>0</is_check>
<nc>0</nc> <nc>0</nc>
<ab_version>2024051417</ab_version> <ab_version>2024052719</ab_version>
<open_time>1714705161</open_time> <open_time>1715129630</open_time>
<naive_switch>1</naive_switch> <naive_switch>1</naive_switch>
</server> </server>
<config> <config>
<notice_url>http://127.0.0.1/pages/notice</notice_url> <notice_url>http://127.0.0.1/pages/notice</notice_url>
<update_log_url>http://127.0.0.1/pages/update_url</update_log_url> <update_log_url>http://127.0.0.1/pages/update_url</update_log_url>
@ -22,26 +20,25 @@
<client_version>30400</client_version> <client_version>30400</client_version>
<platform>https://play.google.com/store/apps/details?id=com.sunborn.girlsfrontline.en</platform> <platform>https://play.google.com/store/apps/details?id=com.sunborn.girlsfrontline.en</platform>
<top_client_version>20410</top_client_version> <top_client_version>20410</top_client_version>
<version_desc> <version_desc>v.3.0400 Update Content:
v.3.0400 Update Content:
[Mobile Armor System Optimizations] [Mobile Armor System Optimizations]
1. Optimized: The "Mobile Armor" combat results screen now shows the remaining HP and other such info of the Mobile Armor units in question. An option to "Armor Enhancement" has been added to the Mission Failed screen. 1. Optimized: The &quot;Mobile Armor&quot; combat results screen now shows the remaining HP and other such info of the Mobile Armor units in question. An option to &quot;Armor Enhancement&quot; has been added to the Mission Failed screen.
2. Optimized: If a Mobile Armor 4unit is not "In Combat", Fire Support Units assigned to the armor in question can be independently deployed as normal. 2. Optimized: If a Mobile Armor unit is not &quot;In Combat&quot;, Fire Support Units assigned to the armor in question can be independently deployed as normal.
3. Optimized: The "Tech Tree" display of the Mobile Armor system now features a before and after display of effects when activating certain nodes. 3. Optimized: The &quot;Tech Tree&quot; display of the Mobile Armor system now features a before and after display of effects when activating certain nodes.
4. Optimized: Mobile Armor support skills are now labelled with the [Support] tag. 4. Optimized: Mobile Armor support skills are now labelled with the [Support] tag.
5. Optimized: The Armor Design Shop's item preview function now adds an indication that an item is being previewed, as well as showing if a certain mobile armor design will clash with others. You can also instantly purchase a desired item after trying it out. Changing an armor's degisn blueprint no longer clears out equipped designs. 5. Optimized: The Armor Design Shop's item preview function now adds an indication that an item is being previewed, as well as showing if a certain mobile armor design will clash with others. You can also instantly purchase a desired item after trying it out. Changing an armor's degisn blueprint no longer clears out equipped designs.
The "Armor Design" set display mode has also been added. You may use this function to preview the look of a scerain set of armor designs as well as purchase it immediately. The &quot;Armor Design&quot; set display mode has also been added. You may use this function to preview the look of a scerain set of armor designs as well as purchase it immediately.
The "Armor Design" purchase screen has been made easier to use. The &quot;Armor Design&quot; purchase screen has been made easier to use.
The arrangement of items in the "Armor Design" blueprint display screen has been improved. The arrangement of items in the &quot;Armor Design&quot; blueprint display screen has been improved.
6. Optimized: Information display for non-generic components has been improved and the equip screen has been mae easier to use. 6. Optimized: Information display for non-generic components has been improved and the equip screen has been mae easier to use.
@ -50,26 +47,26 @@
[Other New Content] [Other New Content]
1. Added: "Armored Assault" mode in "Gray Zone Exploration" now has the "Sweep" function. If you have already cleared up to a certain point in the stage, you can click "Sweep" to expend attempts to directly obtain the stage rewards. 1. Added: &quot;Armored Assault&quot; mode in &quot;Gray Zone Exploration&quot; now has the &quot;Sweep&quot; function. If you have already cleared up to a certain point in the stage, you can click &quot;Sweep&quot; to expend attempts to directly obtain the stage rewards.
2. Added: The "Gray Zone Exploration" system now features a new Proxy Planning function. At the "Echelon Formation" or the "Gray Zone Exploration" difficulty select, you can click the newly-added "Echelon Pre-Select" button to enter the echelon pre-selection screen. 2. Added: The &quot;Gray Zone Exploration&quot; system now features a new Proxy Planning function. At the &quot;Echelon Formation&quot; or the &quot;Gray Zone Exploration&quot; difficulty select, you can click the newly-added &quot;Echelon Pre-Select&quot; button to enter the echelon pre-selection screen.
On this screen, you can edit and select echelons for use in Proxy Battle mode, as well as deciding whether the echelons in question will take part in day or night battles. On this screen, you can edit and select echelons for use in Proxy Battle mode, as well as deciding whether the echelons in question will take part in day or night battles.
Once you have finished editing, selected and activated your pre-selected echelons, the system will only use these echelons or units during Proxy Battle mode. Once you have finished editing, selected and activated your pre-selected echelons, the system will only use these echelons or units during Proxy Battle mode.
3. Added: Combat Simulations now have the "Sweep" function. During "EXP Mode", "Data Mode", "Capsule Mode", "Neural Cloud Corridor" and "Coalition Drill, you can select the number of times you want to sweep the simulation in question and press the "Sweep" button to expend the corresponding amount of attempts and gain the appropriate materials as rewards. 3. Added: Combat Simulations now have the &quot;Sweep&quot; function. During &quot;EXP Mode&quot;, &quot;Data Mode&quot;, &quot;Capsule Mode&quot;, &quot;Neural Cloud Corridor&quot; and &quot;Coalition Drill, you can select the number of times you want to sweep the simulation in question and press the &quot;Sweep&quot; button to expend the corresponding amount of attempts and gain the appropriate materials as rewards.
4. Added: The "Echelon Formation" screen now has a Share function. By clicking the "Share" button, you can convert your current echelon's data into a bar code or QR code which can be shared with other Commanders. This code can be used by other Commanders to reproduce your echelon. 4. Added: The &quot;Echelon Formation&quot; screen now has a Share function. By clicking the &quot;Share&quot; button, you can convert your current echelon's data into a bar code or QR code which can be shared with other Commanders. This code can be used by other Commanders to reproduce your echelon.
This function is not currently available for vehicle echelons. This function is not currently available for vehicle echelons.
5. Added: The "Search" function has ben aded to the unit display screen. You can enter keywords to search for units which meet the criteria. 5. Added: The &quot;Search&quot; function has ben aded to the unit display screen. You can enter keywords to search for units which meet the criteria.
6. Added: The "Favorite" function has been added to unit detail pages. By clicking it, you can favorite the unit in question, which enables the filter option "Only show favorited" units. 6. Added: The &quot;Favorite&quot; function has been added to unit detail pages. By clicking it, you can favorite the unit in question, which enables the filter option &quot;Only show favorited&quot; units.
7. Added: The armor components "Vehicle Shotgun", "Mini Mortar", "Laser Rangefinder", "Camouflage Netting", "Top Slat Armor" can be obtained through exploring the "Vitrified - Hell" region during "Gray Zone Exploration". 7. Added: The armor components &quot;Vehicle Shotgun&quot;, &quot;Mini Mortar&quot;, &quot;Laser Rangefinder&quot;, &quot;Camouflage Netting&quot;, &quot;Top Slat Armor&quot; can be obtained through exploring the &quot;Vitrified - Hell&quot; region during &quot;Gray Zone Exploration&quot;.
[Other Optimizations] [Other Optimizations]
1. Optimized: The "Repair All " option now includes Fire Support Units and Mobile Armors. 1. Optimized: The &quot;Repair All &quot; option now includes Fire Support Units and Mobile Armors.
2. Optimized: Mid-battle nformation display for Fire Support Units has been improved. You can view information on Fire Support Units and Mobile Armors units by clicking and holding on them. 2. Optimized: Mid-battle nformation display for Fire Support Units has been improved. You can view information on Fire Support Units and Mobile Armors units by clicking and holding on them.
@ -77,9 +74,9 @@
4. Optimized: The overall functional experience of the Proxy Battle system in Gray Zone Exploration has been improved. 4. Optimized: The overall functional experience of the Proxy Battle system in Gray Zone Exploration has been improved.
5. Optimized: The Chip Enhancement system for Fire Support Units has been improved. The Chip Enhancement screen now has options to "Max-Enhance One Chip" and "Max-Enhance Multiple Chips". 5. Optimized: The Chip Enhancement system for Fire Support Units has been improved. The Chip Enhancement screen now has options to &quot;Max-Enhance One Chip&quot; and &quot;Max-Enhance Multiple Chips&quot;.
6. Optimized: Data display for "Equipment" has been improved. A special equipment buff tab has been added for the equipment detail display screen. 6. Optimized: Data display for &quot;Equipment&quot; has been improved. A special equipment buff tab has been added for the equipment detail display screen.
7. Optimized: The Echelon Formation screen now gives the option to select multiple echelons at once. Also, certain Fire Support Units selection screens allow you to select multiple Fire Support Units at once. 7. Optimized: The Echelon Formation screen now gives the option to select multiple echelons at once. Also, certain Fire Support Units selection screens allow you to select multiple Fire Support Units at once.
@ -95,7 +92,6 @@
13. Optimized: A problem where one could not drag or shrink unit CGs when inspecting them in the Unit Details screen. 13. Optimized: A problem where one could not drag or shrink unit CGs when inspecting them in the Unit Details screen.
14. Optimized: A problem where the rewards screen would be displayed multiple times after certain Ranking Mode stages were made permanently available in the campaign tab. 14. Optimized: A problem where the rewards screen would be displayed multiple times after certain Ranking Mode stages were made permanently available in the campaign tab.</version_desc>
</version_desc>
</config> </config>
</servers> </servers>

View File

@ -0,0 +1 @@
Suck me TOS