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
0ea53fab
Commit
0ea53fab
authored
Mar 14, 2018
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample code updated
parent
6ea74abc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
MainWindow.xaml.cs
Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
+6
-0
README.md
README.md
+4
-6
No files found.
Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
View file @
0ea53fab
...
@@ -115,6 +115,12 @@ namespace Titanium.Web.Proxy.Examples.Wpf
...
@@ -115,6 +115,12 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private
async
Task
ProxyServer_BeforeTunnelConnectRequest
(
object
sender
,
TunnelConnectSessionEventArgs
e
)
private
async
Task
ProxyServer_BeforeTunnelConnectRequest
(
object
sender
,
TunnelConnectSessionEventArgs
e
)
{
{
string
hostname
=
e
.
WebSession
.
Request
.
RequestUri
.
Host
;
if
(
hostname
.
EndsWith
(
"webex.com"
))
{
e
.
Excluded
=
true
;
}
await
Dispatcher
.
InvokeAsync
(()
=>
await
Dispatcher
.
InvokeAsync
(()
=>
{
{
AddSession
(
e
);
AddSession
(
e
);
...
...
README.md
View file @
0ea53fab
...
@@ -126,18 +126,16 @@ Sample request and response event handlers
...
@@ -126,18 +126,16 @@ Sample request and response event handlers
private
IDictionary
<
Guid
,
string
>
requestBodyHistory
private
IDictionary
<
Guid
,
string
>
requestBodyHistory
=
new
ConcurrentDictionary
<
Guid
,
string
>();
=
new
ConcurrentDictionary
<
Guid
,
string
>();
private
async
Task
<
bool
>
OnBeforeTunnelConnect
(
string
hostnam
e
)
private
async
Task
OnBeforeTunnelConnectRequest
(
object
sender
,
TunnelConnectSessionEventArgs
e
)
{
{
string
hostname
=
e
.
WebSession
.
Request
.
RequestUri
.
Host
;
if
(
hostname
.
Contains
(
"dropbox.com"
))
if
(
hostname
.
Contains
(
"dropbox.com"
))
{
{
//Exclude Https addresses you don't want to proxy
//Exclude Https addresses you don't want to proxy
//Useful for clients that use certificate pinning
//Useful for clients that use certificate pinning
//for example dropbox.com
//for example dropbox.com
return
await
Task
.
FromResult
(
true
);
e
.
Excluded
=
true
;
}
else
{
return
await
Task
.
FromResult
(
false
);
}
}
}
}
...
...
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