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
fce77d70
Unverified
Commit
fce77d70
authored
Dec 28, 2019
by
honfika
Committed by
GitHub
Dec 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #726 from justcoding121/master
beta
parents
f3528b77
27791e02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
ProxyTestController.cs
.../Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
+5
-0
HttpStream.cs
src/Titanium.Web.Proxy/Helpers/HttpStream.cs
+6
-1
RequestHandler.cs
src/Titanium.Web.Proxy/RequestHandler.cs
+6
-1
No files found.
examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
View file @
fce77d70
...
...
@@ -42,6 +42,11 @@ namespace Titanium.Web.Proxy.Examples.Basic
await
writeToConsole
(
exception
.
Message
,
ConsoleColor
.
Red
);
}
};
proxyServer
.
TcpTimeWaitSeconds
=
10
;
proxyServer
.
ConnectionTimeOutSeconds
=
15
;
proxyServer
.
ReuseSocket
=
false
;
proxyServer
.
EnableConnectionPool
=
false
;
proxyServer
.
ForwardToUpstreamGateway
=
true
;
proxyServer
.
CertificateManager
.
SaveFakeCertificates
=
true
;
//proxyServer.ProxyBasicAuthenticateFunc = async (args, userName, password) =>
...
...
src/Titanium.Web.Proxy/Helpers/HttpStream.cs
View file @
fce77d70
...
...
@@ -1096,7 +1096,12 @@ namespace Titanium.Web.Proxy.Helpers
{
while
(
true
)
{
string
chunkHead
=
(
await
ReadLineAsync
(
cancellationToken
))!;
string
?
chunkHead
=
await
ReadLineAsync
(
cancellationToken
);
if
(
chunkHead
==
null
)
{
return
;
}
int
idx
=
chunkHead
.
IndexOf
(
";"
);
if
(
idx
>=
0
)
{
...
...
src/Titanium.Web.Proxy/RequestHandler.cs
View file @
fce77d70
...
...
@@ -169,6 +169,7 @@ namespace Titanium.Web.Proxy
if
(
part1
&
part2
)
{
//connection is closed
await
tcpConnectionFactory
.
Release
(
connection
,
true
);
connection
=
null
;
}
}
...
...
@@ -297,7 +298,11 @@ namespace Titanium.Web.Proxy
if
(
args
.
HttpClient
.
Request
.
UpgradeToWebSocket
)
{
args
.
HttpClient
.
ConnectRequest
!.
TunnelType
=
TunnelType
.
Websocket
;
// connectRequest can be null for SOCKS connection
if
(
args
.
HttpClient
.
ConnectRequest
!=
null
)
{
args
.
HttpClient
.
ConnectRequest
!.
TunnelType
=
TunnelType
.
Websocket
;
}
// if upgrading to websocket then relay the request without reading the contents
await
handleWebSocketUpgrade
(
args
,
args
.
ClientStream
,
connection
,
cancellationTokenSource
,
cancellationToken
);
...
...
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