From 1b638a6e58ea4db800716d8a15c3824d4bd8b5dc Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 12 Sep 2019 11:24:28 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/GlobalConfig.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index cb47ca3cc..afac84f79 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -143,7 +143,8 @@ namespace ArchiSteamFarm { [JsonProperty] public readonly string WebProxyUsername = DefaultWebProxyUsername; - internal WebProxy WebProxy { + [PublicAPI] + public WebProxy WebProxy { get { if (BackingWebProxy != null) { return BackingWebProxy; @@ -163,7 +164,7 @@ namespace ArchiSteamFarm { return null; } - BackingWebProxy = new WebProxy { + WebProxy proxy = new WebProxy { Address = uri, BypassProxyOnLocal = true }; @@ -179,10 +180,12 @@ namespace ArchiSteamFarm { credentials.Password = WebProxyPassword; } - BackingWebProxy.Credentials = credentials; + proxy.Credentials = credentials; } - return BackingWebProxy; + BackingWebProxy = proxy; + + return proxy; } }