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")]
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)
{
return Results.Json(new
@ -26,16 +29,28 @@ public class IndexController : Controller
ab_version = GameServer.ABVersion,
is_kick = "0",
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"
});
}
[HttpGet("image/imageconfig.txt", Name = "ImageConfig")]
public async Task<IResult> ImageConfig()
[HttpPost("index.php/1001/index/getUidEnMicaQueue", Name = "GetUidMicaQueue")]
public async Task<IResult> GetUidMicaQueue([FromQuery] string req_id)
{
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}")]
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">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\userProtocol_en_v005.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>

View File

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

View File

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

View File

@ -8,18 +8,28 @@ namespace Elisa.GameServer;
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 ProxyServer proxyServer;
readonly ExplicitProxyEndPoint explicitEndPoint;
public ProxyControl(string forwardIpAddress, int port = 9000)
public ProxyControl(string forwardIpAddress, int port = 8888)
{
this.forwardIpAddress = forwardIpAddress;
proxyServer = new ProxyServer();
explicitEndPoint = new ExplicitProxyEndPoint(System.Net.IPAddress.Any, port, true);
proxyServer.BeforeRequest += OnRequest;
//Ssl handling
explicitEndPoint.BeforeTunnelConnectRequest += OnBeforeTunnelConnectRequest;
/*
proxyServer.ServerCertificateValidationCallback += OnCertificateValidation;
proxyServer.ClientCertificateSelectionCallback += OnCertificateSelection;
*/
}
public void Start()
@ -34,11 +44,61 @@ public class ProxyControl
public void Stop()
{
proxyServer.BeforeRequest -= OnRequest;
//Ssl Handling
/*proxyServer.ServerCertificateValidationCallback -= OnCertificateValidation;
proxyServer.ClientCertificateSelectionCallback -= OnCertificateSelection;
*/
explicitEndPoint.BeforeTunnelConnectRequest -= OnBeforeTunnelConnectRequest;
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)
{
if (e.IsHttps)
{
Log.Information("HTTPS request detected, skipping");
return;
}
Uri requestUri = e.HttpClient.Request.RequestUri;
if (HostFilter.IsMatch(requestUri.Host))
{
@ -51,5 +111,24 @@ public class ProxyControl
// 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"?>
<servers>
<server>
<name>GRIFFIN</name>
<addr>http://127.0.0.1/</addr>
<addr>http://127.0.0.1/index.php/1001/</addr>
<worldId>1001</worldId>
<recommended>0</recommended>
<condition>0</condition>
<is_check>0</is_check>
<nc>0</nc>
<ab_version>2024051417</ab_version>
<open_time>1714705161</open_time>
<ab_version>2024052719</ab_version>
<open_time>1715129630</open_time>
<naive_switch>1</naive_switch>
</server>
<config>
<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>
@ -22,80 +20,78 @@
<client_version>30400</client_version>
<platform>https://play.google.com/store/apps/details?id=com.sunborn.girlsfrontline.en</platform>
<top_client_version>20410</top_client_version>
<version_desc>
v.3.0400 Update Content:
<version_desc>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.
7. Optimized: Information display and filtering for generic components has been improved.
7. Optimized: Information display and filtering for generic components has been improved.
[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.
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.
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.
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.
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.
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.
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.
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.
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".
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.
[Other Optimizations]
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;.
1. Optimized: The "Repair All " option now includes Fire Support Units and Mobile Armors.
[Other Optimizations]
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.
1. Optimized: The &quot;Repair All &quot; option now includes Fire Support Units and Mobile Armors.
3. Optimized: The post-mission reward display screen in Gray Zone Exploration has been tweaked.
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.
4. Optimized: The overall functional experience of the Proxy Battle system in Gray Zone Exploration has been improved.
3. Optimized: The post-mission reward display screen in Gray Zone Exploration has been tweaked.
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".
4. Optimized: The overall functional experience of the Proxy Battle system in Gray Zone Exploration has been improved.
6. Optimized: Data display for "Equipment" has been improved. A special equipment buff tab has been added for the equipment detail display screen.
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;.
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.
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.
8. Optimized: The maximum amount of Surplus EXP that can be held at one time has been increased. Kalina's speed of writing combat reports has also been increased.
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.
9. Optimized: Alerts have been added for the addition of new Career Missions.
8. Optimized: The maximum amount of Surplus EXP that can be held at one time has been increased. Kalina's speed of writing combat reports has also been increased.
10. Optimized: Unit selection displays have been improved. The option to select units based on their Repair, Move Speed and other stats has also been added.
9. Optimized: Alerts have been added for the addition of new Career Missions.
11. Optimized: The potential dropped items display for missions ahas been improved. It now has popups for unlock conditions and the layout has been improved.
10. Optimized: Unit selection displays have been improved. The option to select units based on their Repair, Move Speed and other stats has also been added.
12. Optimized: Planning Mode AP expenditures now display extra APs for echelons and vehicle fuel supply status.
11. Optimized: The potential dropped items display for missions ahas been improved. It now has popups for unlock conditions and the layout has been improved.
13. Optimized: A problem where one could not drag or shrink unit CGs when inspecting them in the Unit Details screen.
12. Optimized: Planning Mode AP expenditures now display extra APs for echelons and vehicle fuel supply status.
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>
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.</version_desc>
</config>
</servers>
</servers>

View File

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