mirror of
https://github.com/netchx/netch.git
synced 2026-03-24 18:39:47 +08:00
Update build
This commit is contained in:
@@ -29,8 +29,8 @@ Global
|
||||
{4B041B91-5790-4571-8C58-C63FFE4BC9F8}.Release|x64.Build.0 = Release|x64
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Debug|x64.Build.0 = Debug|x64
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Release|x64.ActiveCfg = Release|x64
|
||||
{38240783-9AD2-4A01-84C1-1A3E5F05720F}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace Netch.Utils
|
||||
var mc = new ManagementClass("Win32_SystemDriver");
|
||||
foreach (var obj in mc.GetInstances().Cast<ManagementObject>())
|
||||
{
|
||||
if (!(bool) obj["Started"])
|
||||
if (!(bool)obj["Started"])
|
||||
continue;
|
||||
|
||||
var path = obj["PathName"].ToString();
|
||||
if (path == null)
|
||||
continue;
|
||||
|
||||
var vendorExclude = new[] {"microsoft", "intel", "amd", "nvidia", "realtek"};
|
||||
var vendorExclude = new[] { "microsoft", "intel", "amd", "nvidia", "realtek" };
|
||||
var vendorName = FileVersionInfo.GetVersionInfo(path).LegalCopyright ?? string.Empty;
|
||||
if (!allDriver && vendorExclude.Any(s => vendorName.Contains(s, StringComparison.OrdinalIgnoreCase)))
|
||||
continue;
|
||||
@@ -32,6 +32,7 @@ namespace Netch.Utils
|
||||
public static IEnumerable<string> Processes(bool mask)
|
||||
{
|
||||
var hashset = new HashSet<string>();
|
||||
var windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
|
||||
foreach (var process in Process.GetProcesses())
|
||||
{
|
||||
try
|
||||
@@ -39,8 +40,10 @@ namespace Netch.Utils
|
||||
if (process.Id is 0 or 4)
|
||||
continue;
|
||||
|
||||
if (process.MainModule!.FileName!.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.Windows), StringComparison.OrdinalIgnoreCase))
|
||||
// ! NT Kernel & System
|
||||
if (process.MainModule!.FileName!.StartsWith(windowsFolder, StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
|
||||
var path = process.MainModule.FileName;
|
||||
|
||||
if (mask)
|
||||
|
||||
@@ -22,7 +22,9 @@ param (
|
||||
$PublishSingleFile = $True
|
||||
)
|
||||
|
||||
# .\scripts\download.ps1 $OutputPath
|
||||
Remove-Item -Recurse -Force $OutputPath
|
||||
|
||||
.\scripts\download.ps1 $OutputPath
|
||||
|
||||
# if ( -Not $? ) {
|
||||
# Exit 1
|
||||
|
||||
@@ -20,7 +20,7 @@ New-Item -ItemType Directory -Name bin | Out-Null
|
||||
New-Item -ItemType Directory -Name mode | Out-Null
|
||||
New-Item -ItemType Directory -Name i18n | Out-Null
|
||||
|
||||
Copy-Item -Recurse -Force .\netchdata-master\* .\bin
|
||||
Copy-Item -Recurse -Force .\netchdata-master\* .\bin -Exclude @('tap2socks.bin')
|
||||
Copy-Item -Recurse -Force .\netchmode-master\mode\* .\mode
|
||||
Copy-Item -Recurse -Force .\netchi18n-master\i18n\* .\i18n
|
||||
|
||||
@@ -31,7 +31,7 @@ Remove-Item -Force data.zip
|
||||
Remove-Item -Force mode.zip
|
||||
Remove-Item -Force i18n.zip
|
||||
|
||||
..\scripts\download\aiodns.ps1 -OutputPath bin
|
||||
#..\scripts\download\aiodns.ps1 -OutputPath bin
|
||||
..\scripts\download\cloak.ps1 -OutputPath bin
|
||||
..\scripts\download\xray-core.ps1 -OutputPath bin
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
param([string]$OutputPath)
|
||||
$address="https://github.com/cbeuw/Cloak/releases/download/v2.5.4/ck-client-windows-amd64-v2.5.4.exe"
|
||||
$address="https://github.com/cbeuw/Cloak/releases/download/v2.5.5/ck-client-windows-amd64-v2.5.5.exe"
|
||||
|
||||
Invoke-WebRequest -Uri $address -OutFile ck-client.exe
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
param([string]$OutputPath)
|
||||
$address="https://github.com/XTLS/Xray-core/releases/download/v1.4.2/Xray-windows-64.zip"
|
||||
$address="https://github.com/XTLS/Xray-core/releases/download/v1.4.3/Xray-windows-64.zip"
|
||||
|
||||
Invoke-WebRequest -Uri $address -OutFile xray-core.zip
|
||||
Expand-Archive -Force -Path xray-core.zip -DestinationPath xray-core
|
||||
|
||||
Move-Item -Force xray-core\xray.exe $OutputPath
|
||||
Move-Item -Force xray-core\geoip.dat $OutputPath
|
||||
Move-Item -Force xray-core\geosite.dat $OutputPath
|
||||
# Move-Item -Force xray-core\geoip.dat $OutputPath
|
||||
# Move-Item -Force xray-core\geosite.dat $OutputPath
|
||||
|
||||
Remove-Item -Recurse -Force xray-core
|
||||
Remove-Item -Recurse -Force xray-core.zip
|
||||
|
||||
Reference in New Issue
Block a user