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
d11fec92
Commit
d11fec92
authored
Sep 12, 2016
by
ilushka85
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass ConnectHeaders
parent
26aea8a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
SessionEventArgs.cs
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+3
-0
HttpWebClient.cs
Titanium.Web.Proxy/Http/HttpWebClient.cs
+2
-0
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+3
-6
No files found.
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
d11fec92
...
@@ -56,6 +56,9 @@ namespace Titanium.Web.Proxy.EventArguments
...
@@ -56,6 +56,9 @@ namespace Titanium.Web.Proxy.EventArguments
public
ExternalProxy
CustomUpStreamHttpsProxyUsed
{
get
;
set
;
}
public
ExternalProxy
CustomUpStreamHttpsProxyUsed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// Constructor to initialize the proxy
/// Constructor to initialize the proxy
/// </summary>
/// </summary>
...
...
Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
d11fec92
...
@@ -19,6 +19,8 @@ namespace Titanium.Web.Proxy.Http
...
@@ -19,6 +19,8 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
/// </summary>
internal
TcpConnection
ServerConnection
{
get
;
set
;
}
internal
TcpConnection
ServerConnection
{
get
;
set
;
}
public
List
<
HttpHeader
>
ConnectHeaders
{
get
;
set
;
}
public
Request
Request
{
get
;
set
;
}
public
Request
Request
{
get
;
set
;
}
public
Response
Response
{
get
;
set
;
}
public
Response
Response
{
get
;
set
;
}
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
d11fec92
...
@@ -294,7 +294,7 @@ namespace Titanium.Web.Proxy
...
@@ -294,7 +294,7 @@ namespace Titanium.Web.Proxy
//Now create the request
//Now create the request
await
HandleHttpSessionRequest
(
tcpClient
,
httpCmd
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
await
HandleHttpSessionRequest
(
tcpClient
,
httpCmd
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
endPoint
.
EnableSsl
?
endPoint
.
GenericCertificateName
:
null
,
null
);
endPoint
.
EnableSsl
?
endPoint
.
GenericCertificateName
:
null
,
null
);
}
}
/// <summary>
/// <summary>
/// This is the core request handler method for a particular connection from client
/// This is the core request handler method for a particular connection from client
...
@@ -442,10 +442,7 @@ namespace Titanium.Web.Proxy
...
@@ -442,10 +442,7 @@ namespace Titanium.Web.Proxy
{
{
if
(
GetCustomUpStreamHttpsProxyFunc
!=
null
)
if
(
GetCustomUpStreamHttpsProxyFunc
!=
null
)
{
{
foreach
(
var
header
in
args
.
WebSession
.
Request
.
RequestHeaders
.
Values
)
args
.
WebSession
.
ConnectHeaders
=
connectHeaders
;
{
connectHeaders
.
Add
(
header
);
}
customUpStreamHttpsProxy
=
await
GetCustomUpStreamHttpsProxyFunc
(
args
).
ConfigureAwait
(
false
);
customUpStreamHttpsProxy
=
await
GetCustomUpStreamHttpsProxyFunc
(
args
).
ConfigureAwait
(
false
);
}
}
}
}
...
@@ -462,7 +459,7 @@ namespace Titanium.Web.Proxy
...
@@ -462,7 +459,7 @@ namespace Titanium.Web.Proxy
}
}
else
else
{
{
if
(
connection
.
IsHttps
)
if
(
connection
.
IsHttps
)
{
{
args
.
CustomUpStreamHttpsProxyUsed
=
connection
.
UpStreamHttpsProxy
;
args
.
CustomUpStreamHttpsProxyUsed
=
connection
.
UpStreamHttpsProxy
;
...
...
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