Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic for different user agents for all network accesses.
- Loading branch information
Showing
5 changed files
with
69 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace AppsDownloader.Libraries | ||
{ | ||
using System; | ||
using SilDev; | ||
|
||
internal static class UserAgents | ||
{ | ||
internal static string Default { get; } = "Wget/1.16 (linux-gnu)"; | ||
|
||
internal static string Empty { get; } = string.Empty; | ||
|
||
internal static string Internal { get; } = $"Wget/{EnvironmentEx.Version} (Windows NT/{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}; {(Environment.Is64BitOperatingSystem ? "Win64; x64" : "Win32; x86")}) {AssemblyInfo.Product}/{AssemblyInfo.Version}"; | ||
|
||
internal static string WindowsChrome { get; } = $"Mozilla/5.0 (Windows NT 10.0; {(Environment.Is64BitOperatingSystem ? "Win64; x64" : "WOW64")}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3752.0 Safari/537.36"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Updater.Libraries | ||
{ | ||
using System; | ||
using SilDev; | ||
|
||
internal static class UserAgents | ||
{ | ||
internal static string Default { get; } = "Wget/1.16 (linux-gnu)"; | ||
|
||
internal static string Internal { get; } = $"Wget/{EnvironmentEx.Version} (Windows NT/{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}; {(Environment.Is64BitOperatingSystem ? "Win64; x64" : "Win32; x86")}) {AssemblyInfo.Product}/{AssemblyInfo.Version}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters