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
33904916
Commit
33904916
authored
Apr 29, 2017
by
justcoding121
Committed by
justcoding121
Apr 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
5efe457e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+5
-4
No files found.
Titanium.Web.Proxy/RequestHandler.cs
View file @
33904916
...
@@ -30,7 +30,6 @@ namespace Titanium.Web.Proxy
...
@@ -30,7 +30,6 @@ namespace Titanium.Web.Proxy
private
async
Task
HandleClient
(
ExplicitProxyEndPoint
endPoint
,
TcpClient
tcpClient
)
private
async
Task
HandleClient
(
ExplicitProxyEndPoint
endPoint
,
TcpClient
tcpClient
)
{
{
Stream
clientStream
=
tcpClient
.
GetStream
();
Stream
clientStream
=
tcpClient
.
GetStream
();
clientStream
.
ReadTimeout
=
ConnectionTimeOutSeconds
*
1000
;
clientStream
.
ReadTimeout
=
ConnectionTimeOutSeconds
*
1000
;
...
@@ -57,7 +56,8 @@ namespace Titanium.Web.Proxy
...
@@ -57,7 +56,8 @@ namespace Titanium.Web.Proxy
//Find the request Verb
//Find the request Verb
var
httpVerb
=
httpCmdSplit
[
0
];
var
httpVerb
=
httpCmdSplit
[
0
];
httpRemoteUri
=
httpVerb
.
ToUpper
()
==
"CONNECT"
?
new
Uri
(
"http://"
+
httpCmdSplit
[
1
])
:
new
Uri
(
httpCmdSplit
[
1
]);
httpRemoteUri
=
httpVerb
.
ToUpper
()
==
"CONNECT"
?
new
Uri
(
"http://"
+
httpCmdSplit
[
1
])
:
new
Uri
(
httpCmdSplit
[
1
]);
//parse the HTTP version
//parse the HTTP version
var
version
=
new
Version
(
1
,
1
);
var
version
=
new
Version
(
1
,
1
);
...
@@ -70,9 +70,10 @@ namespace Titanium.Web.Proxy
...
@@ -70,9 +70,10 @@ namespace Titanium.Web.Proxy
version
=
new
Version
(
1
,
0
);
version
=
new
Version
(
1
,
0
);
}
}
}
}
//filter out excluded host names
var
excluded
=
endPoint
.
ExcludedHttpsHostNameRegex
!=
null
&&
endPoint
.
ExcludedHttpsHostNameRegex
.
Any
(
x
=>
Regex
.
IsMatch
(
httpRemoteUri
.
Host
,
x
));
//filter out excluded host names
var
excluded
=
endPoint
.
ExcludedHttpsHostNameRegex
!=
null
&&
endPoint
.
ExcludedHttpsHostNameRegex
.
Any
(
x
=>
Regex
.
IsMatch
(
httpRemoteUri
.
Host
,
x
));
List
<
HttpHeader
>
connectRequestHeaders
=
null
;
List
<
HttpHeader
>
connectRequestHeaders
=
null
;
...
...
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