From 6b1b8b49459c6c26974d77a407a8d3990f8299cd Mon Sep 17 00:00:00 2001 From: bobo liu <7552030+fakeboboliu@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:25:41 +0800 Subject: [PATCH] macOS user friendly tweaks (#35) * Upgrade to .net8 * Cleanup Path seeker * Load correct locale for macOS * make macOS permission less confusing --- .github/workflows/build-linux.yml | 8 +- .github/workflows/build-macos.yml | 8 +- .github/workflows/build-release.yml | 10 +-- .github/workflows/build-windows.yml | 2 +- MainForm.cs | 19 ++++- NextTraceWrapper.cs | 112 +++++++++++++++++++--------- OpenTrace.csproj | 2 +- Program.cs | 44 ++++++++++- Properties/Resources.Designer.cs | 37 +++++++++ Properties/Resources.resx | 19 +++++ Properties/Resources.zh-CN.resx | 19 +++++ Properties/Resources.zh-HK.resx | 19 +++++ Properties/Resources.zh-TW.resx | 19 +++++ 13 files changed, 261 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 1a2ccaf..3ff5d37 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -27,7 +27,7 @@ jobs: runtime: [linux-x64] include: - runtime: linux-x64 - artifact_path: ./bin/Gtk/Release/net6.0/linux-x64 + artifact_path: ./bin/Gtk/Release/net8.0/linux-x64 self_contained: "--self-contained" runs-on: ubuntu-latest @@ -38,11 +38,11 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8 - name: Build for ${{ matrix.runtime }} run: | - dotnet build OpenTrace.csproj --runtime ${{ matrix.runtime }} --configuration Release ${{ matrix.self_contained }} -f net6.0 + dotnet build OpenTrace.csproj --runtime ${{ matrix.runtime }} --configuration Release ${{ matrix.self_contained }} -f net8.0 - name: Make tarball run: cd ${{ matrix.artifact_path }} && chmod +x ./OpenTrace && tar -cvzf ../${{ matrix.runtime }}.tar.gz ./ @@ -52,5 +52,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ matrix.runtime }}.tar.gz - path: ./bin/Gtk/Release/net6.0/${{ matrix.runtime }}.tar.gz + path: ./bin/Gtk/Release/net8.0/${{ matrix.runtime }}.tar.gz diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 7db2566..10acb1f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -35,17 +35,17 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8 - name: Build for ${{ matrix.runtime }} run: | - dotnet build OpenTrace.csproj --runtime ${{ matrix.runtime }} --configuration Release --self-contained -f net6.0 + dotnet build OpenTrace.csproj --runtime ${{ matrix.runtime }} --configuration Release --self-contained -f net8.0 - name: Make tarball - run: cd ./bin/Mac64/Release/net6.0/${{ matrix.runtime }} && tar -cvzf OpenTrace_${{ matrix.runtime }}.app.tar.gz OpenTrace.app + run: cd ./bin/Mac64/Release/net8.0/${{ matrix.runtime }} && tar -cvzf OpenTrace_${{ matrix.runtime }}.app.tar.gz OpenTrace.app - name: Upload artifact for ${{ matrix.runtime }} uses: actions/upload-artifact@v3 with: name: OpenTrace_${{ matrix.runtime }}.app.tar.gz - path: ./bin/Mac64/Release/net6.0/${{ matrix.runtime }}/OpenTrace_${{ matrix.runtime }}.app.tar.gz + path: ./bin/Mac64/Release/net8.0/${{ matrix.runtime }}/OpenTrace_${{ matrix.runtime }}.app.tar.gz diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 4a2ce01..6c831ec 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -23,17 +23,17 @@ jobs: archive_command: "zip -r" archive_extension: zip - runtime: linux-x64 - artifact_path: ./bin/Gtk/Release/net6.0/linux-x64 + artifact_path: ./bin/Gtk/Release/net8.0/linux-x64 self_contained: "--self-contained" - framework: net6.0 + framework: net8.0 nt_file: nexttrace_linux_amd64 nt_fn: nexttrace archive_command: "tar -cvzf" archive_extension: tar.gz - runtime: osx-x64 - artifact_path: ./bin/Mac64/Release/net6.0/osx-x64 + artifact_path: ./bin/Mac64/Release/net8.0/osx-x64 self_contained: "--self-contained" - framework: net6.0 + framework: net8.0 nt_file: nexttrace_darwin_amd64 nt_fn: OpenTrace.app/Contents/MacOS/nexttrace pack_target: OpenTrace.app @@ -49,7 +49,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6 + dotnet-version: 8 - name: Build run: dotnet build OpenTrace.csproj --runtime ${{ matrix.runtime }} --configuration Release ${{ matrix.self_contained }} -f ${{ matrix.framework }} diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 6051203..1d9a6f2 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -39,7 +39,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8 - name: Build for ${{ matrix.runtime }} run: | diff --git a/MainForm.cs b/MainForm.cs index e8e6902..d40fb60 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -191,8 +191,8 @@ public MainForm() ResetMap(); }; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && UserSettings.hideAddICMPFirewallRule != true) tryAddICMPFirewallRule(); - + platformChecks(); + // 绑定窗口事件 SizeChanged += MainForm_SizeChanged; MouseDown += Dragging_MouseDown; @@ -261,6 +261,21 @@ private void LoadDNSResolvers() dnsResolverSelection.SelectedIndex = 0; } + // 初始化期间进行平台特定检查 + private void platformChecks() + { + + // macOS 被隔离,请求释放 + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && AppDomain.CurrentDomain.BaseDirectory.StartsWith("/private/var/folders")) + { + App.app.Invoke(() => { + MessageBox.Show(Resources.MACOS_QUARANTINE); + }); + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && UserSettings.hideAddICMPFirewallRule != true) tryAddICMPFirewallRule(); + } + private void tryAddICMPFirewallRule() { // 提示 Windows 用户添加防火墙规则放行 ICMP diff --git a/NextTraceWrapper.cs b/NextTraceWrapper.cs index b4d160e..80bb534 100644 --- a/NextTraceWrapper.cs +++ b/NextTraceWrapper.cs @@ -46,36 +46,37 @@ internal class NextTraceWrapper public event EventHandler AppQuit; public event EventHandler ExceptionalOutput; private string nexttracePath; + private bool builtinNT = false; private int errorOutputCount = 0; public ObservableCollection Output { get; } = new ObservableCollection(); public NextTraceWrapper() { + string curDir = AppDomain.CurrentDomain.BaseDirectory; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // 妫鏌 Windows 骞冲彴鍙墽琛屾枃浠 List winBinaryList = new List { "nexttrace.exe", "nexttrace_windows_amd64.exe", "nexttrace_windows_arm64.exe", "nexttrace_windows_armv7.exe", "nexttrace_windows_386.exe" }; foreach (string winBinaryName in winBinaryList) { - if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, winBinaryName))) + if (File.Exists(Path.Combine(curDir, winBinaryName))) { // 鍏堟鏌ユ牴鐩綍 - nexttracePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, winBinaryName); + nexttracePath = Path.Combine(curDir, winBinaryName); break; - } else { - // 鍐嶆鏌ATH鍙橀噺 - string pathVar = Environment.GetEnvironmentVariable("PATH"); - string[] pathDirs = pathVar.Split(Path.PathSeparator); - foreach (string pathDir in pathDirs) + } + // 鍐嶆鏌ATH鍙橀噺 + string pathVar = Environment.GetEnvironmentVariable("PATH"); + string[] pathDirs = pathVar.Split(Path.PathSeparator); + foreach (string pathDir in pathDirs) + { + if (File.Exists(Path.Combine(pathDir, winBinaryName))) { - if (File.Exists(Path.Combine(pathDir, winBinaryName))) - { - nexttracePath = Path.Combine(pathDir, winBinaryName); - break; - } + nexttracePath = Path.Combine(pathDir, winBinaryName); + break; } - if (nexttracePath != null) break; } + if (nexttracePath != null) break; } } else @@ -84,35 +85,33 @@ public NextTraceWrapper() List otherBinaryList = new List { "nexttrace", "nexttrace_android_arm64", "nexttrace_darwin_amd64", "nexttrace_darwin_arm64", "nexttrace_dragonfly_amd64", "nexttrace_freebsd_386", "nexttrace_freebsd_amd64", "nexttrace_freebsd_arm64", "nexttrace_freebsd_armv7", "nexttrace_linux_386", "nexttrace_linux_amd64", "nexttrace_linux_arm64", "nexttrace_linux_armv5", "nexttrace_linux_armv6", "nexttrace_linux_armv7", "nexttrace_linux_mips", "nexttrace_linux_mips64", "nexttrace_linux_mips64le", "nexttrace_linux_mipsle", "nexttrace_linux_ppc64", "nexttrace_linux_ppc64le", "nexttrace_linux_riscv64", "nexttrace_linux_s390x", "nexttrace_openbsd_386", "nexttrace_openbsd_amd64", "nexttrace_openbsd_arm64", "nexttrace_openbsd_armv7" }; foreach (string otherBinaryName in otherBinaryList) { - if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, otherBinaryName))) + if (File.Exists(Path.Combine(curDir, "OpenTrace.app/Contents/MacOS", otherBinaryName))) { - // 鍏堟鏌ユ牴鐩綍 - nexttracePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, otherBinaryName); + nexttracePath = Path.Combine(curDir, "OpenTrace.app/Contents/MacOS", otherBinaryName); + builtinNT = true; break; } - else + if (File.Exists(Path.Combine(curDir, otherBinaryName))) { - // 鍐嶆鏌ATH鍙橀噺 - string pathVar = Environment.GetEnvironmentVariable("PATH"); - string[] pathDirs = pathVar.Split(Path.PathSeparator); - foreach (string pathDir in pathDirs) - { - if (File.Exists(Path.Combine(pathDir, otherBinaryName))) - { - nexttracePath = Path.Combine(pathDir, otherBinaryName); - break; - } - } - if (nexttracePath != null) break; - else if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OpenTrace.app/Contents/MacOS", otherBinaryName))) + nexttracePath = Path.Combine(curDir, otherBinaryName); + builtinNT = true; + break; + } + + string pathVar = Environment.GetEnvironmentVariable("PATH"); + string[] pathDirs = pathVar.Split(Path.PathSeparator); + foreach (string pathDir in pathDirs) + { + if (File.Exists(Path.Combine(pathDir, otherBinaryName))) { - nexttracePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OpenTrace.app/Contents/MacOS", otherBinaryName); + nexttracePath = Path.Combine(pathDir, otherBinaryName); break; } } + if (nexttracePath != null) break; } } - + // 妫鏌ユ槸鍚︽墜鍔ㄦ寚瀹氫簡鍙墽琛屾枃浠 if (UserSettings.executablePath != "") { @@ -132,10 +131,11 @@ public NextTraceWrapper() } } - public void Run(string host,bool MTRMode, params string[] extraArgs) + public void Run(string host, bool MTRMode, params string[] extraArgs) { Task.Run(() => { + Console.WriteLine($"Using NextTrace: {nexttracePath}"); string arguments; if (MTRMode) { @@ -145,6 +145,45 @@ public void Run(string host,bool MTRMode, params string[] extraArgs) { arguments = ArgumentBuilder(host, extraArgs); } + +#if NET8_0_OR_GREATER + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && + Array.Find(extraArgs, e => e == "-T" || e == "-U") != null && + Environment.UserName != "root") + { + FileSystemInfo fa = new FileInfo(nexttracePath); + if ((fa.UnixFileMode & UnixFileMode.SetUser) == 0) + { + if (!builtinNT) + App.app.Invoke(() => { + Eto.Forms.MessageBox.Show(Resources.MISSING_COMP_PRIV_MACOS); + }); + else + { + var elvp = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "/usr/bin/osascript", + ArgumentList = { + "-e", + $"do shell script \"chown root:admin '{nexttracePath}' && chmod +sx '{nexttracePath}'\" with administrator privileges with prompt \"{Resources.MISSING_PRIV_MACOS}\"", + }, + UseShellExecute = false, + RedirectStandardOutput = false, + RedirectStandardError = false, + CreateNoWindow = true + } + }; + elvp.Start(); + elvp.WaitForExit(); + } + Status = AppStatus.Quit; + AppQuit?.Invoke(this, new AppQuitEventArgs(0)); + return; + } + } +#endif _process = new Process { StartInfo = new ProcessStartInfo @@ -158,6 +197,7 @@ public void Run(string host,bool MTRMode, params string[] extraArgs) CreateNoWindow = true } }; + if (UserSettings.IPInsightToken != "") _process.StartInfo.EnvironmentVariables.Add("NEXTTRACE_IPINSIGHT_TOKEN", UserSettings.IPInsightToken); if (UserSettings.IPInfoToken != "") _process.StartInfo.EnvironmentVariables.Add("NEXTTRACE_IPINFO_TOKEN", UserSettings.IPInfoToken); if (UserSettings.ChunZhenEndpoint != "") _process.StartInfo.EnvironmentVariables.Add("NEXTTRACE_CHUNZHENURL", UserSettings.ChunZhenEndpoint); @@ -167,7 +207,7 @@ public void Run(string host,bool MTRMode, params string[] extraArgs) if (MTRMode) // 娣诲姞鐜鍙橀噺璁㎞extTrace杩涘叆鎸佺画杩借釜妯″紡 _process.StartInfo.EnvironmentVariables.Add("NEXTTRACE_UNINTERRUPTED", "1"); - + Regex match1stLine = new Regex(@"^\d{1,2}\|"); _process.OutputDataReceived += (sender, e) => { @@ -295,9 +335,9 @@ private string ArgumentBuilder(string host, string[] extraArgs, string[] ignoreU UserSettings userSettings = new UserSettings(); foreach (var setting in userSettings.GetType().GetProperties()) { - if(checkArgsFromConfList.Contains(setting.Name) && (ignoreUserArgs == null || !ignoreUserArgs.Contains(setting.Name))) + if (checkArgsFromConfList.Contains(setting.Name) && (ignoreUserArgs == null || !ignoreUserArgs.Contains(setting.Name))) { - if((string)setting.GetValue(userSettings, null) != "") + if ((string)setting.GetValue(userSettings, null) != "") finalArgs.Add("--" + setting.Name.Replace('_', '-') + " " + (string)setting.GetValue(userSettings, null)); } } diff --git a/OpenTrace.csproj b/OpenTrace.csproj index 13bcc19..5854a55 100644 --- a/OpenTrace.csproj +++ b/OpenTrace.csproj @@ -7,7 +7,7 @@ --> - ;net48;net6.0 + ;net48;net8.0 False Exe https://github.com/Archeb/opentrace diff --git a/Program.cs b/Program.cs index b16b7d2..ad362ea 100644 --- a/Program.cs +++ b/Program.cs @@ -4,12 +4,20 @@ using System; using System.Collections.ObjectModel; using System.Configuration; +using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Windows.Input; +using OpenTrace.Properties; namespace OpenTrace { + + class App + { + public static Application app; + } + internal class Program { [STAThread] @@ -17,13 +25,40 @@ static void Main(string[] args) { UserSettings.LoadSettings(); - if (UserSettings.language != "" && UserSettings.language != null) +#if NET8_0_OR_GREATER + // 涓 macOS 杞藉叆姝g‘鐨 locale + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var asp = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "/usr/bin/osascript", + ArgumentList = { "-e", "user locale of (get system info)" }, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = false, + CreateNoWindow = true + } + }; + asp.Start(); + try + { + var line = asp.StandardOutput.ReadLine()?.Replace("_","-"); + var curCulture = new CultureInfo(line?.Trim()??""); + CultureInfo.CurrentUICulture = curCulture; + } + catch (Exception e) {} + } +#endif + + if (!string.IsNullOrWhiteSpace(UserSettings.language)) { - System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(UserSettings.language); + CultureInfo.CurrentUICulture = new CultureInfo(UserSettings.language); } // 鏈湴鍖栬缃 - if (System.Threading.Thread.CurrentThread.CurrentUICulture.Name == "zh-CN" && TimeZoneInfo.Local.Id == "China Standard Time") + if (CultureInfo.CurrentUICulture.Name == "zh-CN" && TimeZoneInfo.Local.Id == "China Standard Time") { if (UserSettings.mapProvider == "" && UserSettings.mapProvider != null) UserSettings.mapProvider = "baidu"; if (UserSettings.POWProvider == "" && UserSettings.POWProvider != null) UserSettings.POWProvider = "sakura"; @@ -34,7 +69,8 @@ static void Main(string[] args) if (UserSettings.POWProvider == "" && UserSettings.POWProvider != null) UserSettings.POWProvider = "api.leo.moe"; } - new Application(Eto.Platform.Detect).Run(new MainForm()); + App.app = new Application(Eto.Platform.Detect); + App.app.Run(new MainForm()); } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index d1324f2..ffda0c1 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -645,6 +645,20 @@ public static string LOSS { } } + /// + /// 鏌ユ壘绫讳技 OpenTrace is quarantined by macOS, something may be inoperative. + ///Please release OpenTrace as follows: + /// + ///sudo xattr -r -d com.apple.quarantine <drag and drop OpenTrace here> + /// + ///And restart OpenTrace after execution. 鐨勬湰鍦板寲瀛楃涓层 + /// + public static string MACOS_QUARANTINE { + get { + return ResourceManager.GetString("MACOS_QUARANTINE", resourceCulture); + } + } + /// /// 鏌ユ壘绫讳技 Map Provider 鐨勬湰鍦板寲瀛楃涓层 /// @@ -699,6 +713,20 @@ public static string MISSING_COMP { } } + /// + /// 鏌ユ壘绫讳技 OpenTrace requires privileges to perform TCP/UDP trace. + ///Please set the permissions of NextTrace as follows: + /// + ///sudo xattr -r -d com.apple.quarantine /path/to/nexttrace + ///sudo chown root:admin /path/to/nexttrace + ///sudo chmod +sx /path/to/nexttrace 鐨勬湰鍦板寲瀛楃涓层 + /// + public static string MISSING_COMP_PRIV_MACOS { + get { + return ResourceManager.GetString("MISSING_COMP_PRIV_MACOS", resourceCulture); + } + } + /// /// 鏌ユ壘绫讳技 OpenTrace requires the NextTrace utility to function properly. This executable is currently missing. ///NextTrace can be placed in either: @@ -732,6 +760,15 @@ public static string MISSING_COMP_TEXT_MACOS { } } + /// + /// 鏌ユ壘绫讳技 OpenTrace requires privileges to perform TCP/UDP trace 鐨勬湰鍦板寲瀛楃涓层 + /// + public static string MISSING_PRIV_MACOS { + get { + return ResourceManager.GetString("MISSING_PRIV_MACOS", resourceCulture); + } + } + /// /// 鏌ユ壘绫讳技 NextTrace could not be found in "{0}". 鐨勬湰鍦板寲瀛楃涓层 /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index ad35c3b..2bb3ca8 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -344,6 +344,17 @@ And specify the path in the settings. Would you like to download the NextTrace utility now? + + OpenTrace requires privileges to perform TCP/UDP trace. +Please set the permissions of NextTrace as follows: + +sudo xattr -r -d com.apple.quarantine /path/to/nexttrace +sudo chown root:admin /path/to/nexttrace +sudo chmod +sx /path/to/nexttrace + + + OpenTrace requires privileges to perform TCP/UDP trace + NextTrace could not be found in "{0}". @@ -461,4 +472,12 @@ To use an offline database, please refer to the NextTrace documentation to set i Worst + + OpenTrace is quarantined by macOS, something may be inoperative. +Please release OpenTrace as follows: + +sudo xattr -r -d com.apple.quarantine <drag and drop OpenTrace here> + +And restart OpenTrace after execution. + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index e29ff7f..f766432 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -341,6 +341,17 @@ sudo chmod +sx /path/to/nexttrace 鏄惁鐜板湪涓嬭浇 NextTrace锛 + + OpenTrace 闇瑕佹潈闄愭墠鑳借繘琛 TCP/UDP 杩借釜銆 +璇蜂负 NextTrace 璁剧疆鏉冮檺: + +sudo xattr -r -d com.apple.quarantine /path/to/nexttrace +sudo chown root:admin /path/to/nexttrace +sudo chmod +sx /path/to/nexttrace + + + OpenTrace 闇瑕佹潈闄愭墠鑳借繘琛 TCP/UDP 杩借釜 + 鏈兘鍦ㄦ寚瀹氱殑浣嶇疆 "{0}" 涓壘鍒 NextTrace銆 @@ -456,4 +467,12 @@ sudo chmod +sx /path/to/nexttrace 鏈澶у欢杩 + + OpenTrace 琚 macOS 闅旂锛屽伐浣滃彲鑳戒笉瀹屽叏姝e父銆 +璇锋墦寮缁堢锛屼娇鐢ㄤ笅闈㈢殑鍛戒护閲婃斁 OpenTrace: + +sudo xattr -r -d com.apple.quarantine <灏 OpenTrace 鎷栨斁鑷虫> + +骞跺湪瀹屾垚閲婃斁鍚庨噸鍚 OpenTrace. + \ No newline at end of file diff --git a/Properties/Resources.zh-HK.resx b/Properties/Resources.zh-HK.resx index 49c3f72..d169903 100644 --- a/Properties/Resources.zh-HK.resx +++ b/Properties/Resources.zh-HK.resx @@ -301,6 +301,14 @@ 涓熷寘鐜% + + OpenTrace 琚 macOS 闅旈洟锛屽伐浣滃彲鑳戒笉瀹屽叏姝e父銆 +璜嬫墦闁嬬祩绔紝浣跨敤涓嬮潰鐨勫懡浠ら噵鏀 OpenTrace: + +sudo xattr -r -d com.apple.quarantine <灏 OpenTrace 鎷栨斁鑷虫> + +涓﹀湪瀹屾垚閲嬫斁寰岄噸鍟 OpenTrace. + 鍦板湒鏁告摎婧 @@ -319,6 +327,14 @@ 绲勪欢缂哄け + + OpenTrace 闇瑕佹瑠闄愭墠鑳介茶 TCP/UDP 杩借工銆 +璜嬬偤 NextTrace 瑷疆娆婇檺: + +sudo xattr -r -d com.apple.quarantine /path/to/nexttrace +sudo chown root:admin /path/to/nexttrace +sudo chmod +sx /path/to/nexttrace + OpenTrace 闇瑕 NextTrace 鎵嶈兘姝e父宸ヤ綔锛屼絾鏈兘鎵惧埌鍙煼琛屾枃浠躲 鎮ㄥ彲浠ユ妸 NextTrace 鍙煼琛屾枃浠舵斁缃柤锛 @@ -340,6 +356,9 @@ sudo chmod +sx /path/to/nexttrace 鏄惁鐝惧湪涓嬭級 NextTrace锛 + + OpenTrace 闇瑕佹瑠闄愭墠鑳介茶 TCP/UDP 杩借工 + 鏈兘鍦ㄦ寚瀹氱殑浣嶇疆 "{0}" 涓壘鍒 NextTrace銆 diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index c43e3aa..9b3f2ff 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -301,6 +301,14 @@ 涓熷寘鐜% + + OpenTrace 琚 macOS 闅旈洟锛屽伐浣滃彲鑳戒笉瀹屽叏姝e父銆 +璜嬮枊鍟熺祩绔紝浣跨敤涓嬮潰鐨勫懡浠ら噵鏀 OpenTrace: + +sudo xattr -r -d com.apple.quarantine <灏 OpenTrace 鎷栨斁鑷虫> + +涓﹀湪瀹屾垚閲嬫斁寰岄噸鍟 OpenTrace. + 鍦板湒璩囨枡渚嗘簮 @@ -319,6 +327,14 @@ 鍏冧欢缂哄け + + OpenTrace 闇瑕佹瑠闄愭墠鑳介茶 TCP/UDP 杩借工銆 +璜嬬偤 NextTrace 瑷疆娆婇檺: + +sudo xattr -r -d com.apple.quarantine /path/to/nexttrace +sudo chown root:admin /path/to/nexttrace +sudo chmod +sx /path/to/nexttrace + OpenTrace 闇瑕 NextTrace 鎵嶈兘姝e父宸ヤ綔锛屼絾鏈兘鎵惧埌鍙煼琛屾獢妗堛 鎮ㄥ彲浠ユ妸 NextTrace 鍙煼琛屾獢妗堟斁缃柤锛 @@ -340,6 +356,9 @@ sudo chmod +sx /path/to/nexttrace 鏄惁鐝惧湪涓嬭級 NextTrace锛 + + OpenTrace 闇瑕佹瑠闄愭墠鑳介茶 TCP/UDP 杩借工 + 鏈兘鍦ㄦ寚瀹氱殑浣嶇疆 "{0}" 涓壘鍒 NextTrace銆