Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
c1f7c7a6
Commit
c1f7c7a6
authored
Jul 07, 2015
by
Arachis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted ProxyServer, and RequestHandler to utilize CertificateManager.
Added CertificateManager.cs to the project.
parent
1f58d0d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
119 deletions
+133
-119
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+16
-3
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+2
-2
Titanium.Web.Proxy.csproj
Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
+115
-114
No files found.
Titanium.Web.Proxy/ProxyServer.cs
View file @
c1f7c7a6
...
@@ -55,6 +55,13 @@ namespace Titanium.Web.Proxy
...
@@ -55,6 +55,13 @@ namespace Titanium.Web.Proxy
}
}
}
}
public
static
CertificateManager
CertManager
{
get
;
set
;
}
static
ProxyServer
()
{
CertManager
=
new
CertificateManager
(
"Titanium"
,
"Titanium Root Certificate"
);
}
public
ProxyServer
()
public
ProxyServer
()
{
{
...
@@ -93,7 +100,13 @@ namespace Titanium.Web.Proxy
...
@@ -93,7 +100,13 @@ namespace Titanium.Web.Proxy
FireFoxHelper
.
AddFirefox
();
FireFoxHelper
.
AddFirefox
();
RootCertificateName
=
RootCertificateName
==
null
?
"DO_NOT_TRUST_FiddlerRoot"
:
RootCertificateName
;
RootCertificateName
=
RootCertificateName
==
null
?
"DO_NOT_TRUST_FiddlerRoot"
:
RootCertificateName
;
CertificateHelper
.
InstallCertificate
(
Path
.
Combine
(
System
.
IO
.
Path
.
GetDirectoryName
(
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
Location
),
string
.
Concat
(
RootCertificateName
,
".cer"
)));
bool
certTrusted
=
CertManager
.
CreateTrustedRootCertificate
();
if
(!
certTrusted
)
{
// The user didn't want to install the self-signed certificate to the root store.
}
//CertificateHelper.InstallCertificate(Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), string.Concat(RootCertificateName, ".cer")));
if
(
EnableSSL
)
if
(
EnableSSL
)
{
{
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
c1f7c7a6
...
@@ -120,7 +120,7 @@ namespace Titanium.Web.Proxy
...
@@ -120,7 +120,7 @@ namespace Titanium.Web.Proxy
return
;
return
;
}
}
Monitor
.
Enter
(
certificateAccessLock
);
Monitor
.
Enter
(
certificateAccessLock
);
var
_certificate
=
CertificateHelper
.
GetCertificate
(
RootCertificateName
,
tunnelHostName
);
var
_certificate
=
ProxyServer
.
CertManager
.
CreateCertificate
(
tunnelHostName
);
//
CertificateHelper.GetCertificate(RootCertificateName, tunnelHostName);
Monitor
.
Exit
(
certificateAccessLock
);
Monitor
.
Exit
(
certificateAccessLock
);
SslStream
sslStream
=
null
;
SslStream
sslStream
=
null
;
...
...
Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
View file @
c1f7c7a6
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"Helpers\CertificateManager.cs"
/>
<Compile
Include=
"Helpers\Firefox.cs"
/>
<Compile
Include=
"Helpers\Firefox.cs"
/>
<Compile
Include=
"Helpers\SystemProxy.cs"
/>
<Compile
Include=
"Helpers\SystemProxy.cs"
/>
<Compile
Include=
"RequestHandler.cs"
/>
<Compile
Include=
"RequestHandler.cs"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment