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
5a121ccd
Commit
5a121ccd
authored
Jul 11, 2017
by
Jehonathan Thomas
Committed by
GitHub
Jul 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #305 from justcoding121/develop
Beta
parents
4186c54c
31da204b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
10 deletions
+19
-10
README.md
README.md
+5
-0
DeflateDecompression.cs
Titanium.Web.Proxy/Decompression/DeflateDecompression.cs
+0
-1
GZipDecompression.cs
Titanium.Web.Proxy/Decompression/GZipDecompression.cs
+0
-1
StreamExtensions.cs
Titanium.Web.Proxy/Extensions/StreamExtensions.cs
+0
-1
HeaderParser.cs
Titanium.Web.Proxy/Http/HeaderParser.cs
+0
-1
HttpWebClient.cs
Titanium.Web.Proxy/Http/HttpWebClient.cs
+12
-2
TcpConnectionFactory.cs
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+0
-1
Titanium.Web.Proxy.nuspec
Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec
+2
-3
No files found.
README.md
View file @
5a121ccd
...
@@ -37,6 +37,11 @@ For stable releases on [stable branch](https://github.com/justcoding121/Titanium
...
@@ -37,6 +37,11 @@ For stable releases on [stable branch](https://github.com/justcoding121/Titanium
Install-Package Titanium.Web.Proxy
Install-Package Titanium.Web.Proxy
Supports
*
.Net Standard 1.6 or above
*
.Net Framework 4.5 or above
Setup HTTP proxy:
Setup HTTP proxy:
```
csharp
```
csharp
...
...
Titanium.Web.Proxy/Decompression/DeflateDecompression.cs
View file @
5a121ccd
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
using
System.IO
;
using
System.IO
;
using
System.IO.Compression
;
using
System.IO.Compression
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Titanium.Web.Proxy.Helpers
;
namespace
Titanium.Web.Proxy.Decompression
namespace
Titanium.Web.Proxy.Decompression
{
{
...
...
Titanium.Web.Proxy/Decompression/GZipDecompression.cs
View file @
5a121ccd
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
using
System.IO
;
using
System.IO
;
using
System.IO.Compression
;
using
System.IO.Compression
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Titanium.Web.Proxy.Helpers
;
namespace
Titanium.Web.Proxy.Decompression
namespace
Titanium.Web.Proxy.Decompression
{
{
...
...
Titanium.Web.Proxy/Extensions/StreamExtensions.cs
View file @
5a121ccd
...
@@ -3,7 +3,6 @@ using System;
...
@@ -3,7 +3,6 @@ using System;
using
System.Globalization
;
using
System.Globalization
;
using
System.IO
;
using
System.IO
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Titanium.Web.Proxy.Helpers
;
namespace
Titanium.Web.Proxy.Extensions
namespace
Titanium.Web.Proxy.Extensions
{
{
...
...
Titanium.Web.Proxy/Http/HeaderParser.cs
View file @
5a121ccd
using
StreamExtended.Network
;
using
StreamExtended.Network
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Titanium.Web.Proxy.Helpers
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Shared
;
using
Titanium.Web.Proxy.Shared
;
...
...
Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
5a121ccd
...
@@ -79,10 +79,20 @@ namespace Titanium.Web.Proxy.Http
...
@@ -79,10 +79,20 @@ namespace Titanium.Web.Proxy.Http
using
(
var
ms
=
new
MemoryStream
())
using
(
var
ms
=
new
MemoryStream
())
using
(
var
writer
=
new
HttpRequestWriter
(
ms
))
using
(
var
writer
=
new
HttpRequestWriter
(
ms
))
{
{
var
upstreamProxy
=
ServerConnection
.
UpStreamHttpProxy
;
bool
useUpstreamProxy
=
upstreamProxy
!=
null
&&
ServerConnection
.
IsHttps
==
false
;
//prepare the request & headers
//prepare the request & headers
writer
.
WriteLine
(
$"
{
Request
.
Method
}
{
Request
.
RequestUri
.
PathAndQuery
}
HTTP/
{
Request
.
HttpVersion
.
Major
}
.
{
Request
.
HttpVersion
.
Minor
}
"
);
if
(
useUpstreamProxy
)
{
writer
.
WriteLine
(
$"
{
Request
.
Method
}
{
Request
.
OriginalRequestUrl
}
HTTP/
{
Request
.
HttpVersion
.
Major
}
.
{
Request
.
HttpVersion
.
Minor
}
"
);
}
else
{
writer
.
WriteLine
(
$"
{
Request
.
Method
}
{
Request
.
RequestUri
.
PathAndQuery
}
HTTP/
{
Request
.
HttpVersion
.
Major
}
.
{
Request
.
HttpVersion
.
Minor
}
"
);
}
var
upstreamProxy
=
ServerConnection
.
UpStreamHttpProxy
;
//Send Authentication to Upstream proxy if needed
//Send Authentication to Upstream proxy if needed
if
(
upstreamProxy
!=
null
if
(
upstreamProxy
!=
null
...
...
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
5a121ccd
using
StreamExtended.Network
;
using
StreamExtended.Network
;
using
System
;
using
System
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Net.Security
;
using
System.Net.Security
;
using
System.Net.Sockets
;
using
System.Net.Sockets
;
...
...
Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec
View file @
5a121ccd
...
@@ -14,13 +14,12 @@
...
@@ -14,13 +14,12 @@
<copyright>
Copyright
©
Titanium. All rights reserved.
</copyright>
<copyright>
Copyright
©
Titanium. All rights reserved.
</copyright>
<tags></tags>
<tags></tags>
<dependencies>
<dependencies>
<group>
<dependency
id=
"StreamExtended"
version=
"1.0.18"
/>
</group>
<group
targetFramework=
"net45"
>
<group
targetFramework=
"net45"
>
<dependency
id=
"StreamExtended"
version=
"1.0.18"
/>
<dependency
id=
"BouncyCastle"
version=
"1.8.1"
/>
<dependency
id=
"BouncyCastle"
version=
"1.8.1"
/>
</group>
</group>
<group
targetFramework=
"netstandard1.6"
>
<group
targetFramework=
"netstandard1.6"
>
<dependency
id=
"StreamExtended"
version=
"1.0.18"
/>
<dependency
id=
"Portable.BouncyCastle"
version=
"1.8.1.2"
/>
<dependency
id=
"Portable.BouncyCastle"
version=
"1.8.1.2"
/>
</group>
</group>
</dependencies>
</dependencies>
...
...
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