Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Oct 21, 2019
1 parent 5349434 commit e6ca254
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 24 deletions.
19 changes: 19 additions & 0 deletions v2rayN/v2rayN/Handler/StatisticsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
using System.Net.Sockets;
using System.Threading;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Protos.Statistics;
using v2rayN.Tool;

namespace v2rayN.Handler
{
Expand Down Expand Up @@ -66,6 +68,23 @@ public ulong Down

public StatisticsHandler(Mode.Config config, Action<ulong, ulong, ulong, ulong, List<Mode.ServerStatistics>> update)
{
try
{
if (Environment.Is64BitOperatingSystem)
{
FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x64.dll"), Resources.grpc_csharp_ext_x64_dll);
}
else
{
FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x86.dll"), Resources.grpc_csharp_ext_x86_dll);
}
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);

}

config_ = config;
enabled_ = config.enableStatistics;
UpdateUI = false;
Expand Down
1 change: 0 additions & 1 deletion v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static PrivoxyHandler()
_privoxyJob = new Job();

FileManager.UncompressFile(Utils.GetTempPath("v2ray_privoxy.exe"), Resources.privoxy_exe);
FileManager.UncompressFile(Utils.GetTempPath("mgwz.dll"), Resources.mgwz_dll);
}
catch (IOException ex)
{
Expand Down
25 changes: 18 additions & 7 deletions v2rayN/v2rayN/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions v2rayN/v2rayN/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,15 @@
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="grpc_csharp_ext_x64_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\grpc_csharp_ext.x64.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="grpc_csharp_ext_x86_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\grpc_csharp_ext.x86.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mgwz_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\mgwz.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file removed v2rayN/v2rayN/Resources/mgwz.dll.gz
Binary file not shown.
Binary file removed v2rayN/v2rayN/grpc_csharp_ext.x64.dll
Binary file not shown.
Binary file removed v2rayN/v2rayN/grpc_csharp_ext.x86.dll
Binary file not shown.
21 changes: 8 additions & 13 deletions v2rayN/v2rayN/v2rayN.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@
<Compile Include="Mode\ServerStatistics.cs" />
<Compile Include="Mode\SysproxyConfig.cs" />
<Compile Include="Mode\EConfigType.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Resx\ResUI.zh-Hans.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down Expand Up @@ -319,14 +324,9 @@
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="app.config">
<SubType>Designer</SubType>
</EmbeddedResource>
Expand All @@ -342,6 +342,8 @@
</Compile>
<Protobuf Include="Protos\Statistics.proto" />
<None Include="Resources\abp.js.gz" />
<None Include="Resources\grpc_csharp_ext.x64.dll.gz" />
<None Include="Resources\grpc_csharp_ext.x86.dll.gz" />
<None Include="Resources\pac.txt.gz" />
<None Include="Resources\sysproxy.exe.gz" />
<None Include="Resources\sysproxy64.exe.gz" />
Expand Down Expand Up @@ -392,7 +394,6 @@
<EmbeddedResource Include="Sample\SampleServerConfig.txt" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\mgwz.dll.gz" />
<None Include="Resources\privoxy.exe.gz" />
<None Include="Resources\restart.png" />
</ItemGroup>
Expand Down Expand Up @@ -420,12 +421,6 @@
<EmbeddedResource Include="LIB\System.Runtime.CompilerServices.Unsafe.dll" />
<EmbeddedResource Include="LIB\zxing.dll" />
<EmbeddedResource Include="LIB\zxing.presentation.dll" />
<Content Include="grpc_csharp_ext.x64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="grpc_csharp_ext.x86.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="LIB\netstandard.dll" />
<Content Include="Resources\help.png" />
<None Include="Resources\notify.png" />
Expand Down

0 comments on commit e6ca254

Please sign in to comment.