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
29de4d43
Commit
29de4d43
authored
Mar 06, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#355 Add an ExcludeTunnelConnect event to decide exlude/include per request
parent
1c6a2455
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+8
-1
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+5
-0
No files found.
Titanium.Web.Proxy/ProxyServer.cs
View file @
29de4d43
...
@@ -285,13 +285,21 @@ namespace Titanium.Web.Proxy
...
@@ -285,13 +285,21 @@ namespace Titanium.Web.Proxy
/// </summary>
/// </summary>
public
event
EventHandler
ServerConnectionCountChanged
;
public
event
EventHandler
ServerConnectionCountChanged
;
/// <summary>
/// Return true if this HTTP connect request should'nt be decrypted and instead be relayed
/// Valid only for explicit endpoints
/// </summary>
public
Func
<
string
,
Task
<
bool
>>
ExcludeTunnelConnect
;
/// <summary>
/// <summary>
/// Intercept tunnel connect request
/// Intercept tunnel connect request
/// Valid only for explicit endpoints
/// </summary>
/// </summary>
public
event
AsyncEventHandler
<
TunnelConnectSessionEventArgs
>
TunnelConnectRequest
;
public
event
AsyncEventHandler
<
TunnelConnectSessionEventArgs
>
TunnelConnectRequest
;
/// <summary>
/// <summary>
/// Intercept tunnel connect response
/// Intercept tunnel connect response
/// Valid only for explicit endpoints
/// </summary>
/// </summary>
public
event
AsyncEventHandler
<
TunnelConnectSessionEventArgs
>
TunnelConnectResponse
;
public
event
AsyncEventHandler
<
TunnelConnectSessionEventArgs
>
TunnelConnectResponse
;
...
@@ -321,7 +329,6 @@ namespace Titanium.Web.Proxy
...
@@ -321,7 +329,6 @@ namespace Titanium.Web.Proxy
/// </summary>
/// </summary>
public
event
AsyncEventHandler
<
SessionEventArgs
>
BeforeResponse
;
public
event
AsyncEventHandler
<
SessionEventArgs
>
BeforeResponse
;
/// <summary>
/// <summary>
/// Callback for error events in proxy
/// Callback for error events in proxy
/// </summary>
/// </summary>
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
29de4d43
...
@@ -77,6 +77,11 @@ namespace Titanium.Web.Proxy
...
@@ -77,6 +77,11 @@ namespace Titanium.Web.Proxy
excluded
=
!
endPoint
.
IncludedHttpsHostNameRegexList
.
Any
(
x
=>
x
.
IsMatch
(
connectHostname
));
excluded
=
!
endPoint
.
IncludedHttpsHostNameRegexList
.
Any
(
x
=>
x
.
IsMatch
(
connectHostname
));
}
}
if
(
ExcludeTunnelConnect
!=
null
)
{
excluded
=
await
ExcludeTunnelConnect
(
connectHostname
);
}
connectRequest
=
new
ConnectRequest
connectRequest
=
new
ConnectRequest
{
{
RequestUri
=
httpRemoteUri
,
RequestUri
=
httpRemoteUri
,
...
...
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