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
e826d814
Commit
e826d814
authored
Feb 06, 2016
by
titanium007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme format
parent
d8139ff9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
README.md
README.md
+13
-3
ProxyTestController.cs
Titanium.Web.Proxy.Test/ProxyTestController.cs
+5
-3
No files found.
README.md
View file @
e826d814
...
...
@@ -44,7 +44,14 @@ Setup HTTP proxy:
ExcludedHttpsHostNameRegex
=
new
List
<
string
>()
{
"dropbox.com"
}
};
//An explicit endpoint is where the client knows about the existance of proxy
//Exclude Https addresses you don't want to proxy
//Usefull for clients that use certificate pinning
//for example dropbox.com
var
explicitEndPoint
=
new
ExplicitProxyEndPoint
(
IPAddress
.
Any
,
8000
,
true
){
ExcludedHttpsHostNameRegex
=
new
List
<
string
>()
{
"dropbox.com"
}
};
//An explicit endpoint is where the client knows about the existance of a proxy
//So client sends request in a proxy friendly manner
ProxyServer
.
AddEndPoint
(
explicitEndPoint
);
ProxyServer
.
Start
();
...
...
@@ -57,12 +64,15 @@ Setup HTTP proxy:
//In this example only google.com will work for HTTPS requests
//Other sites will receive a certificate mismatch warning on browser
//Please read about it before asking questions!
var
transparentEndPoint
=
new
TransparentProxyEndPoint
(
IPAddress
.
Any
,
8001
,
true
)
{
GenericCertificateName
=
"google.com"
};
var
transparentEndPoint
=
new
TransparentProxyEndPoint
(
IPAddress
.
Any
,
8001
,
true
)
{
GenericCertificateName
=
"google.com"
};
ProxyServer
.
AddEndPoint
(
transparentEndPoint
);
foreach
(
var
endPoint
in
ProxyServer
.
ProxyEndPoints
)
Console
.
WriteLine
(
"Listening on '{0}' endpoint at Ip {1} and port: {2} "
,
endPoint
.
GetType
().
Name
,
endPoint
.
IpAddress
,
endPoint
.
Port
);
Console
.
WriteLine
(
"Listening on '{0}' endpoint at Ip {1} and port: {2} "
,
endPoint
.
GetType
().
Name
,
endPoint
.
IpAddress
,
endPoint
.
Port
);
//You can also add/remove end points after proxy has been started
ProxyServer
.
RemoveEndPoint
(
transparentEndPoint
);
...
...
Titanium.Web.Proxy.Test/ProxyTestController.cs
View file @
e826d814
...
...
@@ -36,12 +36,15 @@ namespace Titanium.Web.Proxy.Test
//In this example only google.com will work for HTTPS requests
//Other sites will receive a certificate mismatch warning on browser
//Please read about it before asking questions!
var
transparentEndPoint
=
new
TransparentProxyEndPoint
(
IPAddress
.
Any
,
8001
,
true
)
{
GenericCertificateName
=
"google.com"
};
var
transparentEndPoint
=
new
TransparentProxyEndPoint
(
IPAddress
.
Any
,
8001
,
true
)
{
GenericCertificateName
=
"google.com"
};
ProxyServer
.
AddEndPoint
(
transparentEndPoint
);
foreach
(
var
endPoint
in
ProxyServer
.
ProxyEndPoints
)
Console
.
WriteLine
(
"Listening on '{0}' endpoint at Ip {1} and port: {2} "
,
endPoint
.
GetType
().
Name
,
endPoint
.
IpAddress
,
endPoint
.
Port
);
Console
.
WriteLine
(
"Listening on '{0}' endpoint at Ip {1} and port: {2} "
,
endPoint
.
GetType
().
Name
,
endPoint
.
IpAddress
,
endPoint
.
Port
);
//You can also add/remove end points after proxy has been started
ProxyServer
.
RemoveEndPoint
(
transparentEndPoint
);
...
...
@@ -59,7 +62,6 @@ namespace Titanium.Web.Proxy.Test
ProxyServer
.
Stop
();
}
//Test On Request, intecept requests
//Read browser URL send back to proxy by the injection script in OnResponse event
public
void
OnRequest
(
object
sender
,
SessionEventArgs
e
)
...
...
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