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
17a85d99
Commit
17a85d99
authored
Sep 04, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macOS fixes
parent
b0569809
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
79 deletions
+51
-79
launch.json
.vscode/launch.json
+0
-22
settings.json
.vscode/settings.json
+8
-5
tasks.json
.vscode/tasks.json
+1
-25
Program.cs
examples/Titanium.Web.Proxy.Examples.Basic/Program.cs
+6
-2
Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
...es.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
+19
-0
omnisharp.json
omnisharp.json
+4
-1
RunTime.cs
src/Titanium.Web.Proxy/Helpers/RunTime.cs
+13
-24
No files found.
.vscode/launch.json
View file @
17a85d99
...
@@ -11,28 +11,6 @@
...
@@ -11,28 +11,6 @@
"stopAtEntry"
:
false
,
"stopAtEntry"
:
false
,
"console"
:
"integratedTerminal"
,
"console"
:
"integratedTerminal"
,
"preLaunchTask"
:
"build-basic-example-netcore"
"preLaunchTask"
:
"build-basic-example-netcore"
},
{
"name"
:
"Windows|Net45|Debug|Basic Example"
,
"type"
:
"clr"
,
"request"
:
"launch"
,
"program"
:
"${workspaceRoot}/examples/Titanium.Web.Proxy.Examples.Basic/bin/Debug/net45/Titanium.Web.Proxy.Examples.Basic.exe"
,
"args"
:
[],
"cwd"
:
"${workspaceRoot}"
,
"stopAtEntry"
:
false
,
"console"
:
"integratedTerminal"
,
"preLaunchTask"
:
"build-basic-example-net45"
},
{
"name"
:
"Windows|Net45|Debug|Wpf Example"
,
"type"
:
"clr"
,
"request"
:
"launch"
,
"program"
:
"${workspaceRoot}/examples/Titanium.Web.Proxy.Examples.Wpf/bin/x64/Debug/Titanium.Web.Proxy.Examples.Wpf.exe"
,
"args"
:
[],
"cwd"
:
"${workspaceRoot}"
,
"stopAtEntry"
:
false
,
"console"
:
"internalConsole"
,
"preLaunchTask"
:
"build-wpf-example"
}
}
]
]
}
}
\ No newline at end of file
.vscode/settings.json
View file @
17a85d99
...
@@ -9,11 +9,12 @@
...
@@ -9,11 +9,12 @@
"**/bin"
:
true
,
"**/bin"
:
true
,
"**/obj"
:
true
,
"**/obj"
:
true
,
"**/*.DotSettings"
:
true
,
"**/*.DotSettings"
:
true
,
"**/*.sln"
:
true
"**/*.sln"
:
true
,
"**/tests/"
:
true
,
"**/Titanium.Web.Proxy.Examples.Wpf/"
:
true
,
"**/*.Basic.csproj/"
:
true
},
},
"search.exclude"
:
{
"search.exclude"
:
{
//
The
following
will
hide
the
js
and
map
files
in
the
editor
"files.exclude"
:
{
"**/.build"
:
true
,
"**/.build"
:
true
,
"**/.nuget"
:
true
,
"**/.nuget"
:
true
,
"**/.vs"
:
true
,
"**/.vs"
:
true
,
...
@@ -22,7 +23,9 @@
...
@@ -22,7 +23,9 @@
"**/bin"
:
true
,
"**/bin"
:
true
,
"**/obj"
:
true
,
"**/obj"
:
true
,
"**/*.DotSettings"
:
true
,
"**/*.DotSettings"
:
true
,
"**/*.sln"
:
true
"**/*.sln"
:
true
,
}
"**/tests/"
:
true
,
"**/Titanium.Web.Proxy.Examples.Wpf/"
:
true
,
"**/*.Basic.csproj/"
:
true
}
}
}
}
\ No newline at end of file
.vscode/tasks.json
View file @
17a85d99
...
@@ -5,36 +5,12 @@
...
@@ -5,36 +5,12 @@
"label"
:
"build-basic-example-netcore"
,
"label"
:
"build-basic-example-netcore"
,
"type"
:
"process"
,
"type"
:
"process"
,
"command"
:
"dotnet"
,
"command"
:
"dotnet"
,
"args"
:
[
"build"
,
"${workspaceFolder}/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj"
],
"args"
:
[
"build"
,
"${workspaceFolder}/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.
NetCore.
csproj"
],
"problemMatcher"
:
"$msCompile"
,
"problemMatcher"
:
"$msCompile"
,
"group"
:
{
"group"
:
{
"kind"
:
"build"
,
"kind"
:
"build"
,
"isDefault"
:
true
"isDefault"
:
true
}
}
},
{
"label"
:
"build-basic-example-net45"
,
"type"
:
"process"
,
"windows"
:
{
"command"
:
"C:
\\
Program Files (x86)
\\
Microsoft Visual Studio
\\
2017
\\
Community
\\
MSBuild
\\
15.0
\\
Bin
\\
MSBuild.exe"
,
"args"
:
[
"${workspaceFolder}/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj"
,
"/p:Platform=Any CPU"
]
},
"osx"
:
{
"command"
:
"dotnet"
,
"args"
:
[
"${workspaceFolder}/src/Titanium.Web.Proxy.DotNet.sln"
]
},
"linux"
:
{
"command"
:
"dotnet"
,
"args"
:
[
"${workspaceFolder}/src/Titanium.Web.Proxy.DotNet.sln"
]
},
"problemMatcher"
:
"$msCompile"
},
{
"label"
:
"build-wpf-example"
,
"type"
:
"process"
,
"command"
:
"C:
\\
Program Files (x86)
\\
Microsoft Visual Studio
\\
2017
\\
Community
\\
MSBuild
\\
15.0
\\
Bin
\\
MSBuild.exe"
,
"args"
:
[
"${workspaceFolder}/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.csproj"
,
"/p:Platform=x64"
],
"problemMatcher"
:
"$msCompile"
}
}
]
]
}
}
\ No newline at end of file
examples/Titanium.Web.Proxy.Examples.Basic/Program.cs
View file @
17a85d99
using
System
;
using
System
;
using
System.Runtime.InteropServices
;
using
Titanium.Web.Proxy.Examples.Basic.Helpers
;
using
Titanium.Web.Proxy.Examples.Basic.Helpers
;
namespace
Titanium.Web.Proxy.Examples.Basic
namespace
Titanium.Web.Proxy.Examples.Basic
...
@@ -9,8 +10,11 @@ namespace Titanium.Web.Proxy.Examples.Basic
...
@@ -9,8 +10,11 @@ namespace Titanium.Web.Proxy.Examples.Basic
public
static
void
Main
(
string
[]
args
)
public
static
void
Main
(
string
[]
args
)
{
{
// fix console hang due to QuickEdit mode
if
(
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Windows
))
ConsoleHelper
.
DisableQuickEditMode
();
{
// fix console hang due to QuickEdit mode
ConsoleHelper
.
DisableQuickEditMode
();
}
// Start proxy controller
// Start proxy controller
controller
.
StartProxy
();
controller
.
StartProxy
();
...
...
examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
0 → 100644
View file @
17a85d99
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>7.1</LangVersion>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Titanium.Web.Proxy\Titanium.Web.Proxy.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
omnisharp.json
View file @
17a85d99
{
{
"fileOptions"
:
{
"fileOptions"
:
{
"excludeSearchPatterns"
:
[
"excludeSearchPatterns"
:
[
"**/*.Docs.csproj"
"**/*.Docs.csproj"
,
"**/tests/"
,
"**/Titanium.Web.Proxy.Examples.Wpf/"
,
"**/*.Basic.csproj/"
]
]
}
}
}
}
\ No newline at end of file
src/Titanium.Web.Proxy/Helpers/RunTime.cs
View file @
17a85d99
using
System
;
using
System
;
#if NETSTANDARD2_0
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
#endif
namespace
Titanium.Web.Proxy.Helpers
namespace
Titanium.Web.Proxy.Helpers
{
{
/// <summary>
/// <summary>
...
@@ -16,33 +14,24 @@ namespace Titanium.Web.Proxy.Helpers
...
@@ -16,33 +14,24 @@ namespace Titanium.Web.Proxy.Helpers
/// <returns></returns>
/// <returns></returns>
private
static
readonly
Lazy
<
bool
>
isRunningOnMono
=
new
Lazy
<
bool
>(()
=>
Type
.
GetType
(
"Mono.Runtime"
)
!=
null
);
private
static
readonly
Lazy
<
bool
>
isRunningOnMono
=
new
Lazy
<
bool
>(()
=>
Type
.
GetType
(
"Mono.Runtime"
)
!=
null
);
#if NETSTANDARD2_0
/// <summary>
/// <summary>
/// cache for Windows platform check
/// cache for Windows platform check
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
private
static
bool
isRunningOnWindows
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Windows
);
private
static
readonly
Lazy
<
bool
>
isRunningOnWindows
private
static
bool
isRunningOnLinux
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Linux
);
=
new
Lazy
<
bool
>(()
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Windows
));
private
static
bool
isRunningOnMac
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
OSX
);
private
static
readonly
Lazy
<
bool
>
isRunningOnLinux
=
new
Lazy
<
bool
>(()
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Linux
));
#endif
/// <summary>
/// <summary>
/// Is running on Mono?
/// Is running on Mono?
/// </summary>
/// </summary>
internal
static
bool
IsRunningOnMono
=>
isRunningOnMono
.
Value
;
internal
static
bool
IsRunningOnMono
=>
isRunningOnMono
.
Value
;
#if NETSTANDARD2_0
internal
static
bool
IsLinux
=>
isRunningOnLinux
;
internal
static
bool
IsLinux
=>
isRunningOnLinux
.
Value
;
#else
internal
static
bool
IsWindows
=>
isRunningOnWindows
;
internal
static
bool
IsLinux
=>
!
IsWindows
;
#endif
internal
static
bool
IsMac
=>
isRunningOnMac
;
#if NETSTANDARD2_0
internal
static
bool
IsWindows
=>
isRunningOnWindows
.
Value
;
#else
internal
static
bool
IsWindows
=>
true
;
#endif
}
}
}
}
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