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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user