Allow users to opt-in to proxies (#888)

* Allow users to opt-in to proxies

* Allow opting in to proxies on the WebSocket
This commit is contained in:
Christopher F
2017-12-07 16:47:01 -05:00
committed by GitHub
parent 39b5d0e74c
commit 678a7238e6
4 changed files with 36 additions and 22 deletions

View File

@@ -22,7 +22,7 @@ namespace Discord.Net.Rest
private CancellationToken _cancelToken;
private bool _isDisposed;
public DefaultRestClient(string baseUrl)
public DefaultRestClient(string baseUrl, bool useProxy = false)
{
_baseUrl = baseUrl;
@@ -30,7 +30,7 @@ namespace Discord.Net.Rest
{
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
UseCookies = false,
UseProxy = false
UseProxy = useProxy,
});
SetHeader("accept-encoding", "gzip, deflate");