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
f9c7ba4e
Commit
f9c7ba4e
authored
Mar 08, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove firefox proxy manager; fix obsolete msg
parent
f2a567b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
61 deletions
+2
-61
Firefox.cs
Titanium.Web.Proxy/Helpers/Firefox.cs
+0
-52
EndPoint.cs
Titanium.Web.Proxy/Models/EndPoint.cs
+2
-2
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+0
-7
No files found.
Titanium.Web.Proxy/Helpers/Firefox.cs
deleted
100644 → 0
View file @
f2a567b4
using
System
;
using
System.IO
;
namespace
Titanium.Web.Proxy.Helpers
{
/// <summary>
/// A helper class to set proxy settings for firefox
/// </summary>
internal
class
FireFoxProxySettingsManager
{
/// <summary>
/// Add Firefox settings.
/// </summary>
internal
void
UseSystemProxy
()
{
try
{
var
myProfileDirectory
=
new
DirectoryInfo
(
Environment
.
GetFolderPath
(
Environment
.
SpecialFolder
.
ApplicationData
)
+
"\\Mozilla\\Firefox\\Profiles\\"
)
.
GetDirectories
(
"*.default"
);
string
myFfPrefFile
=
myProfileDirectory
[
0
].
FullName
+
"\\prefs.js"
;
if
(!
File
.
Exists
(
myFfPrefFile
))
{
return
;
}
// We have a pref file so let''s make sure it has the proxy setting
var
myReader
=
new
StreamReader
(
myFfPrefFile
);
string
myPrefContents
=
myReader
.
ReadToEnd
();
myReader
.
Close
();
for
(
int
i
=
0
;
i
<=
4
;
i
++)
{
string
searchStr
=
$"user_pref(\"network.proxy.type\",
{
i
}
);"
;
if
(
myPrefContents
.
Contains
(
searchStr
))
{
// Add the proxy enable line and write it back to the file
myPrefContents
=
myPrefContents
.
Replace
(
searchStr
,
"user_pref(\"network.proxy.type\", 5);"
);
}
}
File
.
Delete
(
myFfPrefFile
);
File
.
WriteAllText
(
myFfPrefFile
,
myPrefContents
);
}
catch
(
Exception
)
{
// Only exception should be a read/write error because the user opened up FireFox so they can be ignored.
}
}
}
}
Titanium.Web.Proxy/Models/EndPoint.cs
View file @
f9c7ba4e
...
@@ -78,7 +78,7 @@ namespace Titanium.Web.Proxy.Models
...
@@ -78,7 +78,7 @@ namespace Titanium.Web.Proxy.Models
/// <summary>
/// <summary>
/// List of host names to exclude using Regular Expressions.
/// List of host names to exclude using Regular Expressions.
/// </summary>
/// </summary>
[
Obsolete
(
"ExcludedHttpsHostNameRegex is deprecated, please use
ExcludeTunnelConnec
t instead."
)]
[
Obsolete
(
"ExcludedHttpsHostNameRegex is deprecated, please use
BeforeTunnelConnect even
t instead."
)]
public
IEnumerable
<
string
>
ExcludedHttpsHostNameRegex
public
IEnumerable
<
string
>
ExcludedHttpsHostNameRegex
{
{
get
{
return
ExcludedHttpsHostNameRegexList
?.
Select
(
x
=>
x
.
ToString
()).
ToList
();
}
get
{
return
ExcludedHttpsHostNameRegexList
?.
Select
(
x
=>
x
.
ToString
()).
ToList
();
}
...
@@ -96,7 +96,7 @@ namespace Titanium.Web.Proxy.Models
...
@@ -96,7 +96,7 @@ namespace Titanium.Web.Proxy.Models
/// <summary>
/// <summary>
/// List of host names to exclude using Regular Expressions.
/// List of host names to exclude using Regular Expressions.
/// </summary>
/// </summary>
[
Obsolete
(
"IncludedHttpsHostNameRegex is deprecated, please use
ExcludeTunnelConnec
t instead."
)]
[
Obsolete
(
"IncludedHttpsHostNameRegex is deprecated, please use
BeforeTunnelConnect even
t instead."
)]
public
IEnumerable
<
string
>
IncludedHttpsHostNameRegex
public
IEnumerable
<
string
>
IncludedHttpsHostNameRegex
{
{
get
{
return
IncludedHttpsHostNameRegexList
?.
Select
(
x
=>
x
.
ToString
()).
ToList
();
}
get
{
return
IncludedHttpsHostNameRegexList
?.
Select
(
x
=>
x
.
ToString
()).
ToList
();
}
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
f9c7ba4e
...
@@ -51,11 +51,6 @@ namespace Titanium.Web.Proxy
...
@@ -51,11 +51,6 @@ namespace Titanium.Web.Proxy
/// </summary>
/// </summary>
private
SystemProxyManager
systemProxySettingsManager
{
get
;
}
private
SystemProxyManager
systemProxySettingsManager
{
get
;
}
/// <summary>
/// Set firefox to use default system proxy
/// </summary>
private
readonly
FireFoxProxySettingsManager
firefoxProxySettingsManager
=
new
FireFoxProxySettingsManager
();
/// <summary>
/// <summary>
/// An default exception log func
/// An default exception log func
/// </summary>
/// </summary>
...
@@ -485,8 +480,6 @@ namespace Titanium.Web.Proxy
...
@@ -485,8 +480,6 @@ namespace Titanium.Web.Proxy
endPoint
.
IsSystemHttpsProxy
=
true
;
endPoint
.
IsSystemHttpsProxy
=
true
;
}
}
firefoxProxySettingsManager
.
UseSystemProxy
();
string
proxyType
=
null
;
string
proxyType
=
null
;
switch
(
protocolType
)
switch
(
protocolType
)
{
{
...
...
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