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
158b6143
Commit
158b6143
authored
Feb 13, 2015
by
justcoding121
Committed by
justcoding121
Feb 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix event handler
parent
487b8912
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
Capture.PNG
Titanium.ProxyTest/Capture.PNG
+0
-0
Program.cs
Titanium.ProxyTest/Program.cs
+6
-4
ProxyTestController.cs
Titanium.ProxyTest/ProxyTestController.cs
+17
-14
No files found.
Titanium.ProxyTest/Capture.PNG
View replaced file @
487b8912
View file @
158b6143
27.1 KB
|
W:
|
H:
23.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Titanium.ProxyTest/Program.cs
View file @
158b6143
...
...
@@ -19,17 +19,19 @@ namespace Titanium.HTTPProxyServer.Test
//Start proxy controller
var
controller
=
new
ProxyTestController
();
controller
.
StartProxy
();
controller
.
Visited
+=
PageVisited
;
Console
.
WriteLine
(
"Do you want to monitor HTTPS? (Y/N)"
);
controller
.
StartProxy
();
Console
.
Write
(
"Do you want to monitor HTTPS? (Y/N):"
);
if
(
Console
.
ReadLine
().
Trim
().
ToLower
()==
"y"
)
{
InstallCertificate
(
System
.
IO
.
Path
.
GetDirectoryName
(
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
Location
));
SystemProxyUtility
.
EnableProxyHTTPS
(
"localhost"
,
controller
.
ListeningPort
);
}
Console
.
WriteLine
(
"Hit any key to exit"
);
Console
.
WriteLine
(
"Hit any key to exit.."
);
Console
.
WriteLine
();
Console
.
Read
();
//Reset System Proxy on exit
...
...
@@ -54,7 +56,7 @@ namespace Titanium.HTTPProxyServer.Test
}
private
static
void
PageVisited
(
VisitedEventArgs
e
)
{
Console
.
WriteLine
(
string
.
Concat
(
"Visited:"
,
e
.
URL
));
Console
.
WriteLine
(
string
.
Concat
(
"Visited:
"
,
e
.
URL
));
}
static
bool
ConsoleEventCallback
(
int
eventType
)
{
...
...
Titanium.ProxyTest/ProxyTestController.cs
View file @
158b6143
...
...
@@ -17,34 +17,37 @@ namespace Titanium.HTTPProxyServer.Test
{
private
List
<
string
>
_URLList
=
new
List
<
string
>();
private
string
_lastURL
=
string
.
Empty
;
private
ProxyServer
_server
;
public
int
ListeningPort
{
get
;
set
;
}
public
void
StartProxy
()
{
_server
=
new
ProxyServer
();
_server
.
BeforeRequest
+=
OnRequest
;
_server
.
BeforeResponse
+=
OnResponse
;
_server
.
Start
();
if
(
Visited
!=
null
)
{
ProxyServer
.
BeforeRequest
+=
OnRequest
;
ProxyServer
.
BeforeResponse
+=
OnResponse
;
}
ProxyServer
.
Start
();
SystemProxyUtility
.
EnableProxyHTTP
(
"localhost"
,
_s
erver
.
ListeningPort
);
SystemProxyUtility
.
EnableProxyHTTP
(
"localhost"
,
ProxyS
erver
.
ListeningPort
);
FireFoxUtility
.
AddFirefox
();
ListeningPort
=
_s
erver
.
ListeningPort
;
ListeningPort
=
ProxyS
erver
.
ListeningPort
;
Console
.
WriteLine
(
String
.
Format
(
"Proxy listening on local machine port: {0} "
,
_s
erver
.
ListeningPort
));
Console
.
WriteLine
(
String
.
Format
(
"Proxy listening on local machine port: {0} "
,
ProxyS
erver
.
ListeningPort
));
}
public
void
Stop
()
{
_server
.
BeforeRequest
-=
OnRequest
;
_server
.
BeforeResponse
-=
OnResponse
;
_server
.
Stop
();
if
(
Visited
!=
null
)
{
ProxyServer
.
BeforeRequest
-=
OnRequest
;
ProxyServer
.
BeforeResponse
-=
OnResponse
;
}
ProxyServer
.
Stop
();
}
...
...
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