Some updates

This commit is contained in:
Namhyeon Go 2025-04-05 17:27:38 +09:00
parent be37951807
commit 2896cc6bf1
5 changed files with 3 additions and 16 deletions

View File

@ -258,14 +258,5 @@ namespace WelsonJS.Launcher.Properties {
return ResourceManager.GetString("WhoisServerUrl", resourceCulture); return ResourceManager.GetString("WhoisServerUrl", resourceCulture);
} }
} }
/// <summary>
/// Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.3124.77과(와) 유사한 지역화된 문자열을 찾습니다.
/// </summary>
internal static string WhoisUserAgent {
get {
return ResourceManager.GetString("WhoisUserAgent", resourceCulture);
}
}
} }
} }

View File

@ -178,9 +178,6 @@
<data name="WhoisServerUrl" xml:space="preserve"> <data name="WhoisServerUrl" xml:space="preserve">
<value>https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois.jsc</value> <value>https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois.jsc</value>
</data> </data>
<data name="WhoisUserAgent" xml:space="preserve">
<value>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.3124.77</value>
</data>
<data name="BlobServerPrefix" xml:space="preserve"> <data name="BlobServerPrefix" xml:space="preserve">
<value>https://catswords.blob.core.windows.net/welsonjs/</value> <value>https://catswords.blob.core.windows.net/welsonjs/</value>
</data> </data>

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Reflection; using System.Reflection;
@ -9,7 +8,6 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml.Linq;
namespace WelsonJS.Launcher namespace WelsonJS.Launcher
{ {
@ -132,8 +130,10 @@ namespace WelsonJS.Launcher
string blobServerPrefix = Program.GetAppConfig("BlobServerPrefix"); string blobServerPrefix = Program.GetAppConfig("BlobServerPrefix");
string url = $"{blobServerPrefix}{path}"; string url = $"{blobServerPrefix}{path}";
string userAgent = Program.GetAppConfig("DefaultUserAgent");
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.UserAgent.ParseAdd(context.Request.UserAgent);
HttpResponseMessage response = await client.SendAsync(request); HttpResponseMessage response = await client.SendAsync(request);
if (!response.IsSuccessStatusCode) if (!response.IsSuccessStatusCode)

View File

@ -44,7 +44,7 @@ namespace WelsonJS.Launcher.ResourceTools
}; };
request.Headers.Add("Accept", "*/*"); request.Headers.Add("Accept", "*/*");
request.Headers.Add("User-Agent", Program.GetAppConfig("WhoisUserAgent")); request.Headers.Add("User-Agent", context.Request.UserAgent);
client.DefaultRequestHeaders.Referrer = new Uri(Program.GetAppConfig("WhoisReferrerUrl")); client.DefaultRequestHeaders.Referrer = new Uri(Program.GetAppConfig("WhoisReferrerUrl"));
try try

View File

@ -9,7 +9,6 @@
<add key="AzureAiServiceApiKey" value=""/> <add key="AzureAiServiceApiKey" value=""/>
<add key="WhoisServerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois.jsc"/> <add key="WhoisServerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois.jsc"/>
<add key="WhoisReferrerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois/whois.jsp"/> <add key="WhoisReferrerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois/whois.jsp"/>
<add key="WhoisUserAgent" value="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.3124.77"/>
<add key="WhoisClientAddress" value="141.101.82.1"/> <add key="WhoisClientAddress" value="141.101.82.1"/>
<add key="DnsServerAddress" value="1.1.1.1"/> <add key="DnsServerAddress" value="1.1.1.1"/>
<add key="BlobServerPrefix" value="https://catswords.blob.core.windows.net/welsonjs/"/> <add key="BlobServerPrefix" value="https://catswords.blob.core.windows.net/welsonjs/"/>