You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* implemented proxy support for BlobStorageTarget
* using booleans instead of Layout for `UseProxy` and `UseDefaultCredentialsForProxy`
leave `BlobClientOptions` null unless proxy support is enabled
* Using `NoProxy` to disable the use of any proxies
only creating a custom `Transport` for `BlobClientOptions` if it is warranted (custom proxy/proxy credentials, disabling proxy or using default credentials for proxy)
* Using `ProxyType` to control what kind of proxy we get instead, replacing `NoProxy`
* only create a BlobClientInstance for a custom proxy configuration
* CreateProxy is now only used to really create a custom proxy
made RequiresManualProxyConfiguration even more precise
* moved `HttpPipelineTransport` creation `ProxyHelper`
* moved `HttpClientTransport` creation to ProxyHelpers
* using NoProxy to control whether proxy bypass is enabled
removed ProxyType
* implemented proxy support for AzureDataTables, AzureEventGrid and AzureQueueStorage targets
* fixed XML comment for NoProxy (wrongly referenced ProxyPassword instead of ProxyAddress)
simplified XML comment for UseDefaultCredentialsForProxy (removed statement about NoProxy)
---------
Co-authored-by: Stephan Steiner <[email protected]>
Copy file name to clipboardExpand all lines: src/NLog.Extensions.AzureBlobStorage/BlobStorageTarget.cs
+59-8Lines changed: 59 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
usingSystem;
2
2
usingSystem.Collections.Generic;
3
+
usingSystem.Net.Http;
3
4
usingSystem.Text;
4
5
usingSystem.Threading;
5
6
usingSystem.Threading.Tasks;
7
+
usingAzure.Core.Pipeline;
6
8
usingAzure.Storage.Blobs;
7
9
usingAzure.Storage.Blobs.Specialized;
8
10
usingNLog.Common;
9
11
usingNLog.Config;
12
+
usingNLog.Extensions.AzureBlobStorage;
10
13
usingNLog.Extensions.AzureStorage;
11
14
usingNLog.Layouts;
12
15
@@ -105,6 +108,32 @@ public sealed class BlobStorageTarget : AsyncTaskTarget
105
108
/// </summary>
106
109
publicLayoutClientAuthSecret{get;set;}
107
110
111
+
/// <summary>
112
+
/// Bypasses any system proxy and proxy in <see cref="ProxyAddress"/> when set to <see langword="true"/>.
113
+
/// Overrides <see cref="ProxyAddress"/>.
114
+
/// </summary>
115
+
publicboolNoProxy{get;set;}
116
+
117
+
/// <summary>
118
+
/// Address of the proxy server to use (e.g. http://proxyserver:8080).
119
+
/// </summary>
120
+
publicLayoutProxyAddress{get;set;}
121
+
122
+
/// <summary>
123
+
/// Login to use for the proxy server. Requires <see cref="ProxyPassword"/>.
124
+
/// </summary>
125
+
publicLayoutProxyLogin{get;set;}
126
+
127
+
/// <summary>
128
+
/// Password to use for the proxy server. Requires <see cref="ProxyLogin"/>.
129
+
/// </summary>
130
+
publicLayoutProxyPassword{get;set;}
131
+
132
+
/// <summary>
133
+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
_clientAuthSecret_ - clientSecret for `ClientSecretCredential` authentication. Requires `serviceUri`,`tenantIdentity` and `clientAuthId`.
59
59
60
+
_noProxy_ - Bypasses any system proxy and proxy in `ProxyAddress` when set to `true`.
61
+
62
+
_proxyAddress_ - Address of the proxy server to use (e.g. http://proxyserver:8080).
63
+
64
+
_proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
65
+
66
+
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
67
+
68
+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server, overriding any values that may have been set in `proxyLogin` and `proxyPassword`.
69
+
60
70
### Batching Policy
61
71
62
72
_batchSize_ - Number of EventData items to send in a single batch (Default=100)
Copy file name to clipboardExpand all lines: src/NLog.Extensions.AzureDataTables/DataTablesTarget.cs
+59-7Lines changed: 59 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
usingAzure.Data.Tables;
7
7
usingNLog.Common;
8
8
usingNLog.Config;
9
+
usingNLog.Extensions.AzureBlobStorage;
9
10
usingNLog.Extensions.AzureStorage;
10
11
usingNLog.Layouts;
11
12
@@ -144,6 +145,33 @@ public override int GetHashCode()
144
145
/// </summary>
145
146
publicLayoutClientAuthSecret{get;set;}
146
147
148
+
/// <summary>
149
+
/// Bypasses any system proxy and proxy in <see cref="ProxyAddress"/> when set to <see langword="true"/>.
150
+
/// Overrides <see cref="ProxyAddress"/>.
151
+
/// </summary>
152
+
publicboolNoProxy{get;set;}
153
+
154
+
/// <summary>
155
+
/// Address of the proxy server to use (e.g. http://proxyserver:8080).
156
+
/// </summary>
157
+
publicLayoutProxyAddress{get;set;}
158
+
159
+
/// <summary>
160
+
/// Login to use for the proxy server. Requires <see cref="ProxyPassword"/>.
161
+
/// </summary>
162
+
publicLayoutProxyLogin{get;set;}
163
+
164
+
/// <summary>
165
+
/// Password to use for the proxy server. Requires <see cref="ProxyLogin"/>.
166
+
/// </summary>
167
+
publicLayoutProxyPassword{get;set;}
168
+
169
+
/// <summary>
170
+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
171
+
/// </summary>
172
+
publicboolUseDefaultCredentialsForProxy{get;set;}
173
+
174
+
147
175
/// <summary>
148
176
/// Gets or sets the name of the Azure table where log entries will be stored.
_clientAuthSecret_ - clientSecret for `ClientSecretCredential` authentication. Requires `serviceUri`,`tenantIdentity` and `clientAuthId`.
50
50
51
+
_noProxy_ - Bypasses any system proxy and proxy in `ProxyAddress` when set to `true`.
52
+
53
+
_proxyAddress_ - Address of the proxy server to use (e.g. http://proxyserver:8080).
54
+
55
+
_proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
56
+
57
+
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
58
+
59
+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server, overriding any values that may have been set in `proxyLogin` and `proxyPassword`.
0 commit comments