Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 1639103

Browse files
committed
organize files; remove unused usings
1 parent 33d86a5 commit 1639103

File tree

71 files changed

+423
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+423
-432
lines changed

examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ private async Task<IExternalProxy> onGetCustomUpStreamProxyFunc(SessionEventArgs
156156
// this is just to show the functionality, provided values are junk
157157
return new ExternalProxy
158158
{
159-
BypassLocalhost = false, HostName = "127.0.0.9", Port = 9090, Password = "fake", UserName = "fake",
159+
BypassLocalhost = false,
160+
HostName = "127.0.0.9",
161+
Port = 9090,
162+
Password = "fake",
163+
UserName = "fake",
160164
UseDefaultCredentials = false
161165
};
162166
}
@@ -168,7 +172,11 @@ private async Task<IExternalProxy> onCustomUpStreamProxyFailureFunc(SessionEvent
168172
// this is just to show the functionality, provided values are junk
169173
return new ExternalProxy
170174
{
171-
BypassLocalhost = false, HostName = "127.0.0.10", Port = 9191, Password = "fake2", UserName = "fake2",
175+
BypassLocalhost = false,
176+
HostName = "127.0.0.10",
177+
Port = 9191,
178+
Password = "fake2",
179+
UserName = "fake2",
172180
UseDefaultCredentials = false
173181
};
174182
}

examples/Titanium.Web.Proxy.Examples.Basic/SampleClientState.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Text;
1+
using System.Text;
32

43
namespace Titanium.Web.Proxy.Examples.Basic
54
{

examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public MainWindow()
104104
Dispatcher.Invoke(() => { ServerConnectionCount = proxyServer.ServerConnectionCount; });
105105
};
106106
proxyServer.Start();
107-
107+
108108
proxyServer.SetAsSystemProxy(explicitEndPoint, ProxyProtocolType.AllHttp);
109109

110110
InitializeComponent();
@@ -279,7 +279,7 @@ private SessionListItem createSessionListItem(SessionEventArgsBase e)
279279
li.SentDataCount += args.Count;
280280

281281
//if (tunnelType == TunnelType.Http2)
282-
AppendTransferLog( session.GetHashCode() + (isTunnelConnect ? "_tunnel" : "") + "_sent",
282+
AppendTransferLog(session.GetHashCode() + (isTunnelConnect ? "_tunnel" : "") + "_sent",
283283
args.Buffer, args.Offset, args.Count);
284284
}
285285
};

src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs renamed to src/Titanium.Web.Proxy/Certificates/BCCertificateMaker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private static X509Certificate2 withPrivateKey(X509Certificate certificate, Asym
162162
const string password = "password";
163163
Pkcs12Store store;
164164

165-
if(RunTime.IsRunningOnMono)
165+
if (RunTime.IsRunningOnMono)
166166
{
167167
var builder = new Pkcs12StoreBuilder();
168168
builder.SetUseDerEncoding(true);
@@ -172,7 +172,7 @@ private static X509Certificate2 withPrivateKey(X509Certificate certificate, Asym
172172
{
173173
store = new Pkcs12Store();
174174
}
175-
175+
176176
var entry = new X509CertificateEntry(certificate);
177177
store.SetCertificateEntry(certificate.SubjectDN.ToString(), entry);
178178

src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMakerFast.cs renamed to src/Titanium.Web.Proxy/Certificates/BCCertificateMakerFast.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private static X509Certificate2 withPrivateKey(X509Certificate certificate, Asym
171171
const string password = "password";
172172
Pkcs12Store store;
173173

174-
if(RunTime.IsRunningOnMono)
174+
if (RunTime.IsRunningOnMono)
175175
{
176176
var builder = new Pkcs12StoreBuilder();
177177
builder.SetUseDerEncoding(true);
@@ -181,7 +181,7 @@ private static X509Certificate2 withPrivateKey(X509Certificate certificate, Asym
181181
{
182182
store = new Pkcs12Store();
183183
}
184-
184+
185185
var entry = new X509CertificateEntry(certificate);
186186
store.SetCertificateEntry(certificate.SubjectDN.ToString(), entry);
187187

src/Titanium.Web.Proxy/Network/CachedCertificate.cs renamed to src/Titanium.Web.Proxy/Certificates/CachedCertificate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public CachedCertificate(X509Certificate2 certificate)
1212
{
1313
Certificate = certificate;
1414
}
15-
15+
1616
internal X509Certificate2 Certificate { get; }
1717

1818
/// <summary>

src/Titanium.Web.Proxy/Network/CertificateManager.cs renamed to src/Titanium.Web.Proxy/Certificates/CertificateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public enum CertificateEngine
2525
BouncyCastle = 0,
2626

2727
BouncyCastleFast = 2,
28-
28+
2929
/// <summary>
3030
/// Uses Windows Certification Generation API and only valid in Windows OS.
3131
/// Observed to be faster than BouncyCastle.

src/Titanium.Web.Proxy/Network/DefaultCertificateDiskCache.cs renamed to src/Titanium.Web.Proxy/Certificates/DefaultCertificateDiskCache.cs

File renamed without changes.

src/Titanium.Web.Proxy/Network/ICertificateCache.cs renamed to src/Titanium.Web.Proxy/Certificates/ICertificateCache.cs

File renamed without changes.

src/Titanium.Web.Proxy/Network/Certificate/ICertificateMaker.cs renamed to src/Titanium.Web.Proxy/Certificates/ICertificateMaker.cs

File renamed without changes.

0 commit comments

Comments
 (0)