Add HTTP(S) proxy (#208)

This commit is contained in:
jie65535 authored and GitHub committed 2023-09-23 10:48:24 +08:00
1 parent 41c644f2af
commit dce7e54675
22 files changed
+1648 -74

No files matched your search

+11
View File
@@ -31,15 +31,26 @@ namespace GrasscutterTools.Utils
private static void Write(string message)
{
#if DEBUG
Console.WriteLine($"{DateTime.Now:mm:ss.fff} {message}");
#else
if (IsSaveLogs)
{
Console.WriteLine($"{DateTime.Now:mm:ss.fff} {message}");
File.AppendAllText(LogPath, $"{DateTime.Now:mm:ss.fff} {message}{Environment.NewLine}");
}
#endif
}
private static void Write(string level, string tag, string message) => Write($"<{level}:{tag}> {message}");
//public static void Debug(string message) => Write("DEBUG", "Proxy", message);
//public static void Info(string info) => Write("INFO", "Proxy", info);
//public static void Error(Exception ex) => Write("ERROR", "Proxy", ex.ToString());
public static void I(string tag, string info) => Write("INFO", tag, info);
public static void W(string tag, string message) => Write("WARR", tag, message);