Browse Source

generate some file to root, delete unused ungzip

tags/4.1.9.2-nbbnu
Student Main 5 years ago
parent
commit
f327038bac
8 changed files with 22 additions and 37 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/I18N.cs
  2. +0
    -1
      shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs
  3. +1
    -1
      shadowsocks-csharp/Encryption/MbedTLS.cs
  4. +1
    -1
      shadowsocks-csharp/Encryption/OpenSSL.cs
  5. +1
    -1
      shadowsocks-csharp/Encryption/Sodium.cs
  6. +2
    -2
      shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs
  7. +0
    -19
      shadowsocks-csharp/Util/Util.cs
  8. +16
    -11
      shadowsocks-csharp/shadowsocks-csharp.csproj

+ 1
- 1
shadowsocks-csharp/Controller/I18N.cs View File

@@ -76,7 +76,7 @@ namespace Shadowsocks.Controller
static I18N() static I18N()
{ {
string locale = CultureInfo.CurrentCulture.Name; string locale = CultureInfo.CurrentCulture.Name;
string i18n = File.ReadAllText(Utils.GetDataPath(I18N_FILE), Encoding.UTF8);
string i18n = File.ReadAllText(I18N_FILE, Encoding.UTF8);
Logging.Info("Current language is: " + locale); Logging.Info("Current language is: " + locale);
Init(i18n, locale); Init(i18n, locale);
} }


+ 0
- 1
shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs View File

@@ -7,7 +7,6 @@ using System.Net.Sockets;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Shadowsocks.Model; using Shadowsocks.Model;
using Shadowsocks.Properties;
using Shadowsocks.Util; using Shadowsocks.Util;
using Shadowsocks.Util.ProcessManagement; using Shadowsocks.Util.ProcessManagement;


+ 1
- 1
shadowsocks-csharp/Encryption/MbedTLS.cs View File

@@ -16,7 +16,7 @@ namespace Shadowsocks.Encryption
static MbedTLS() static MbedTLS()
{ {
LoadLibrary(Utils.GetDataPath(DLLNAME));
LoadLibrary(DLLNAME);
} }
public static byte[] MD5(byte[] input) public static byte[] MD5(byte[] input)


+ 1
- 1
shadowsocks-csharp/Encryption/OpenSSL.cs View File

@@ -24,7 +24,7 @@ namespace Shadowsocks.Encryption
static OpenSSL() static OpenSSL()
{ {
LoadLibrary(Utils.GetDataPath(DLLNAME));
LoadLibrary(DLLNAME);
} }
public static IntPtr GetCipherInfo(string cipherName) public static IntPtr GetCipherInfo(string cipherName)


+ 1
- 1
shadowsocks-csharp/Encryption/Sodium.cs View File

@@ -18,7 +18,7 @@ namespace Shadowsocks.Encryption
static Sodium() static Sodium()
{ {
LoadLibrary(Utils.GetDataPath(DLLNAME));
LoadLibrary(DLLNAME);
lock (_initLock) lock (_initLock)
{ {


+ 2
- 2
shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs View File

@@ -150,9 +150,9 @@ namespace Shadowsocks.Util.SystemProxy
using (var process = new Process()) using (var process = new Process())
{ {
// Configure the process using the StartInfo properties. // Configure the process using the StartInfo properties.
process.StartInfo.FileName = Utils.GetDataPath(SysproxyName);
process.StartInfo.FileName = SysproxyName;
process.StartInfo.Arguments = arguments; process.StartInfo.Arguments = arguments;
process.StartInfo.WorkingDirectory = Utils.GetDataPath();
process.StartInfo.WorkingDirectory = Directory.GetCurrentDirectory();
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false; process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true; process.StartInfo.RedirectStandardError = true;


+ 0
- 19
shadowsocks-csharp/Util/Util.cs View File

@@ -139,25 +139,6 @@ namespace Shadowsocks.Util
} }
} }
public static string UnGzip(byte[] buf)
{
byte[] buffer = new byte[1024];
int n;
using (MemoryStream sb = new MemoryStream())
{
using (GZipStream input = new GZipStream(new MemoryStream(buf),
CompressionMode.Decompress,
false))
{
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
{
sb.Write(buffer, 0, n);
}
}
return System.Text.Encoding.UTF8.GetString(sb.ToArray());
}
}
public static string FormatBandwidth(long n) public static string FormatBandwidth(long n)
{ {
var result = GetBandwidthScale(n); var result = GetBandwidthScale(n);


+ 16
- 11
shadowsocks-csharp/shadowsocks-csharp.csproj View File

@@ -255,9 +255,6 @@
<None Include="app.manifest"> <None Include="app.manifest">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Data\i18n.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
@@ -273,24 +270,32 @@
<Content Include="Data\default-abp-rule.js"> <Content Include="Data\default-abp-rule.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Data\libsscrypto.dll">
<ContentWithTargetPath Include="Data\libsscrypto.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<TargetPath>libsscrypto.dll</TargetPath>
</ContentWithTargetPath >
<Content Include="Data\privoxy.exe"> <Content Include="Data\privoxy.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Data\privoxy_conf.txt"> <Content Include="Data\privoxy_conf.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Data\sysproxy.exe">
<ContentWithTargetPath Include="Data\sysproxy.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Data\sysproxy64.exe">
<TargetPath>sysproxy.exe</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="Data\sysproxy64.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Data\user-rule.txt">
<TargetPath>sysproxy64.exe</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="Data\user-rule.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<TargetPath>user-rule.txt</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="Data\i18n.csv">
<TargetPath>i18n.csv</TargetPath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</ContentWithTargetPath >
<None Include="FodyWeavers.xml"> <None Include="FodyWeavers.xml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>


Loading…
Cancel
Save