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
190da80f
Commit
190da80f
authored
May 10, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add TODO comments
parent
7747e583
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
ExplicitClientHandler.cs
Titanium.Web.Proxy/ExplicitClientHandler.cs
+4
-3
TransparentClientHandler.cs
Titanium.Web.Proxy/TransparentClientHandler.cs
+5
-0
No files found.
Titanium.Web.Proxy/ExplicitClientHandler.cs
View file @
190da80f
...
@@ -135,14 +135,15 @@ namespace Titanium.Web.Proxy
...
@@ -135,14 +135,15 @@ namespace Titanium.Web.Proxy
{
{
// test server HTTP/2 support
// test server HTTP/2 support
// todo: this is a hack, because Titanium does not support HTTP protocol changing currently
// todo: this is a hack, because Titanium does not support HTTP protocol changing currently
// When connection pool becomes stable we can connect to server preemptively in a separate task here without awaiting
// using HTTPS CONNECT hostname. Then by releasing server connection
// back to connection pool we can authenticate against client/server concurrently and save time.
var
connection
=
await
getServerConnection
(
connectArgs
,
true
,
var
connection
=
await
getServerConnection
(
connectArgs
,
true
,
SslExtensions
.
Http2ProtocolAsList
,
cancellationToken
);
SslExtensions
.
Http2ProtocolAsList
,
cancellationToken
);
http2Supported
=
connection
.
NegotiatedApplicationProtocol
==
SslApplicationProtocol
.
Http2
;
http2Supported
=
connection
.
NegotiatedApplicationProtocol
==
SslApplicationProtocol
.
Http2
;
//release connection back to pool intead of closing when connection pool is enabled
//release connection back to pool intead of closing when connection pool is enabled.
//In future we can connect to server preemptively here for all HTTPS connections using connect hostname
//and then release it back to pool so that we can save time when reading client headers
await
tcpConnectionFactory
.
Release
(
connection
,
!
EnableConnectionPool
);
await
tcpConnectionFactory
.
Release
(
connection
,
!
EnableConnectionPool
);
}
}
...
...
Titanium.Web.Proxy/TransparentClientHandler.cs
View file @
190da80f
...
@@ -61,6 +61,11 @@ namespace Titanium.Web.Proxy
...
@@ -61,6 +61,11 @@ namespace Titanium.Web.Proxy
{
{
SslStream
sslStream
=
null
;
SslStream
sslStream
=
null
;
// When connection pool becomes stable we can connect to server preemptively in a separate task here without awaiting
// for all HTTPS requests using SNI hostname. Then by releasing server connection
// back to connection pool we can authenticate against client/server concurrently and save time.
//do client authentication using fake certificate
try
try
{
{
sslStream
=
new
SslStream
(
clientStream
);
sslStream
=
new
SslStream
(
clientStream
);
...
...
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