diff --git a/.github/update.log b/.github/update.log index b69971dbea..34cd58a33e 100644 --- a/.github/update.log +++ b/.github/update.log @@ -834,3 +834,4 @@ Update On Wed Nov 20 19:36:13 CET 2024 Update On Thu Nov 21 19:38:10 CET 2024 Update On Fri Nov 22 19:38:14 CET 2024 Update On Sat Nov 23 19:33:03 CET 2024 +Update On Sun Nov 24 19:33:36 CET 2024 diff --git a/bbdown/BBDown/BBDownMuxer.cs b/bbdown/BBDown/BBDownMuxer.cs index b9f7fc721a..256607a6b6 100644 --- a/bbdown/BBDown/BBDownMuxer.cs +++ b/bbdown/BBDown/BBDownMuxer.cs @@ -44,7 +44,7 @@ static partial class BBDownMuxer return string.IsNullOrEmpty(str) ? str : str.Replace("\"", "'").Replace("\\", "\\\\"); } - private static int MuxByMp4box(string videoPath, string audioPath, string outPath, string desc, string title, string author, string episodeId, string pic, string lang, List? subs, bool audioOnly, bool videoOnly, List? points) + private static int MuxByMp4box(string url, string videoPath, string audioPath, string outPath, string desc, string title, string author, string episodeId, string pic, string lang, List? subs, bool audioOnly, bool videoOnly, List? points) { StringBuilder inputArg = new(); StringBuilder metaArg = new(); @@ -73,7 +73,8 @@ static partial class BBDownMuxer metaArg.Append($":album=\"{title}\":title=\"{episodeId}\""); else metaArg.Append($":title=\"{title}\""); - metaArg.Append($":comment=\"{desc}\""); + metaArg.Append($":sdesc=\"{desc}\""); + metaArg.Append($":comment=\"{url}\""); metaArg.Append($":artist=\"{author}\""); if (subs != null) @@ -90,12 +91,12 @@ static partial class BBDownMuxer } //----分析完毕 - var arguments = (Config.DEBUG_LOG ? " -verbose " : "") + inputArg.ToString() + (metaArg.ToString() == "" ? "" : " -itags tool=" + metaArg.ToString()) + $" -new -- \"{outPath}\""; + var arguments = (Config.DEBUG_LOG ? " -v " : "") + inputArg + (metaArg.ToString() == "" ? "" : " -itags tool=" + metaArg) + $" -new -- \"{outPath}\""; LogDebug("mp4box命令: {0}", arguments); return RunExe(MP4BOX, arguments, MP4BOX != "mp4box"); } - public static int MuxAV(bool useMp4box, string videoPath, string audioPath, List audioMaterial, string outPath, string desc = "", string title = "", string author = "", string episodeId = "", string pic = "", string lang = "", List? subs = null, bool audioOnly = false, bool videoOnly = false, List? points = null, long pubTime = 0, bool simplyMux = false) + public static int MuxAV(bool useMp4box, string bvid, string videoPath, string audioPath, List audioMaterial, string outPath, string desc = "", string title = "", string author = "", string episodeId = "", string pic = "", string lang = "", List? subs = null, bool audioOnly = false, bool videoOnly = false, List? points = null, long pubTime = 0, bool simplyMux = false) { if (audioOnly && audioPath != "") videoPath = ""; @@ -104,10 +105,11 @@ static partial class BBDownMuxer desc = EscapeString(desc); title = EscapeString(title); episodeId = EscapeString(episodeId); + var url = $"https://www.bilibili.com/video/{bvid}/"; if (useMp4box) { - return MuxByMp4box(videoPath, audioPath, outPath, desc, title, author, episodeId, pic, lang, subs, audioOnly, videoOnly, points); + return MuxByMp4box(url, videoPath, audioPath, outPath, desc, title, author, episodeId, pic, lang, subs, audioOnly, videoOnly, points); } if (outPath.Contains('/') && ! Directory.Exists(Path.GetDirectoryName(outPath))) @@ -179,6 +181,7 @@ static partial class BBDownMuxer argsBuilder.Append(metaArg); if (!simplyMux) { argsBuilder.Append($"-metadata title=\"{(episodeId == "" ? title : episodeId)}\" "); + argsBuilder.Append($"-metadata comment=\"{url}\" "); if (lang != "") argsBuilder.Append($"-metadata:s:a:0 language={lang} "); if (!string.IsNullOrWhiteSpace(desc)) argsBuilder.Append($"-metadata description=\"{desc}\" "); if (!string.IsNullOrEmpty(author)) argsBuilder.Append($"-metadata artist=\"{author}\" "); diff --git a/bbdown/BBDown/Program.cs b/bbdown/BBDown/Program.cs index 9036d71374..e5771b2891 100644 --- a/bbdown/BBDown/Program.cs +++ b/bbdown/BBDown/Program.cs @@ -244,7 +244,7 @@ partial class Program Log("获取aid..."); aidOri = await GetAvIdAsync(input); - Log("获取aid结束: " + aidOri); + Log($"获取aid结束: {aidOri}"); if (string.IsNullOrEmpty(aidOri)) { @@ -287,6 +287,11 @@ partial class Program { Log("发布时间: " + FormatTimeStamp(pubTime, "yyyy-MM-dd HH:mm:ss zzz")); } + var bvid = vInfo.PagesInfo.FirstOrDefault()?.bvid; + if (!string.IsNullOrEmpty(bvid)) + { + Log($"视频URL: https://www.bilibili.com/video/{bvid}/"); + } var mid = vInfo.PagesInfo.FirstOrDefault(p => !string.IsNullOrEmpty(p.ownerMid))?.ownerMid; if (!string.IsNullOrEmpty(mid)) { @@ -664,7 +669,7 @@ partial class Program Log($"开始合并音视频{(subtitleInfo.Any() ? "和字幕" : "")}..."); if (myOption.AudioOnly) savePath = savePath[..^4] + ".m4a"; - int code = BBDownMuxer.MuxAV(myOption.UseMP4box, videoPath, audioPath, audioMaterial, savePath, + int code = BBDownMuxer.MuxAV(myOption.UseMP4box, p.bvid, videoPath, audioPath, audioMaterial, savePath, desc, title, p.ownerName ?? "", @@ -753,7 +758,7 @@ partial class Program Log($"开始混流视频{(subtitleInfo.Any() ? "和字幕" : "")}..."); if (myOption.AudioOnly) savePath = savePath[..^4] + ".m4a"; - int code = BBDownMuxer.MuxAV(false, videoPath, "", audioMaterial, savePath, + int code = BBDownMuxer.MuxAV(false, p.bvid, videoPath, "", audioMaterial, savePath, desc, title, p.ownerName ?? "", diff --git a/bbdown/Binary/aria2c.exe b/bbdown/Binary/aria2c.exe deleted file mode 100644 index 18b2b7bcb2..0000000000 Binary files a/bbdown/Binary/aria2c.exe and /dev/null differ diff --git a/bbdown/Binary/mp4box.exe b/bbdown/Binary/mp4box.exe deleted file mode 100644 index aaabc072e3..0000000000 Binary files a/bbdown/Binary/mp4box.exe and /dev/null differ diff --git a/bbdown/Binary/本目录文件请与BBDown.exe同目录或将本目录路径加入环境变量PATH.txt b/bbdown/Binary/本目录文件请与BBDown.exe同目录或将本目录路径加入环境变量PATH.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index 70e46e8aa6..e5effcf7e8 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -74,7 +74,7 @@ dependencies = [ "async-executor", "async-task", "atspi", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "futures-util", "serde", "zbus 4.4.0", @@ -185,9 +185,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "ambassador" @@ -264,9 +264,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -279,9 +279,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" @@ -319,9 +319,9 @@ checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -464,8 +464,8 @@ checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.1", - "futures-lite 2.3.0", + "fastrand 2.2.0", + "futures-lite 2.5.0", "slab", ] @@ -477,22 +477,22 @@ checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ "async-lock", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.5.0", ] [[package]] name = "async-io" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "parking", - "polling 3.7.3", + "polling 3.7.4", "rustix", "slab", "tracing", @@ -518,7 +518,7 @@ checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ "async-io", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.5.0", ] [[package]] @@ -535,7 +535,7 @@ dependencies = [ "blocking", "cfg-if", "event-listener 5.3.1", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "rustix", "tracing", ] @@ -661,7 +661,7 @@ checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" dependencies = [ "atspi-common", "atspi-proxies", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "zbus 4.4.0", ] @@ -680,11 +680,12 @@ dependencies = [ [[package]] name = "auto-launch" version = "0.5.0" -source = "git+https://github.com/zzzgydi/auto-launch.git#a0b2680ef3487c186a67ae52d4083b619f1b3a32" +source = "git+https://github.com/libnyanpasu/auto-launch.git#729d5429dd689067047489af4a0a32f7013854c8" dependencies = [ "dirs 5.0.1", - "thiserror 1.0.69", - "windows-registry 0.2.0", + "thiserror 2.0.3", + "windows-registry 0.3.0", + "windows-result 0.2.0", ] [[package]] @@ -732,7 +733,7 @@ dependencies = [ "http-body-util", "hyper", "hyper-util", - "itoa 1.0.11", + "itoa 1.0.13", "matchit", "memchr", "mime", @@ -744,7 +745,7 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tokio", "tokio-tungstenite", "tower", @@ -768,7 +769,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", "tracing", @@ -780,7 +781,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" dependencies = [ - "fastrand 2.1.1", + "fastrand 2.2.0", "gloo-timers", "tokio", ] @@ -794,7 +795,7 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.0", + "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", @@ -802,9 +803,9 @@ dependencies = [ [[package]] name = "base62" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f879ef8fc74665ed7f0e6127cb106315888fc2744f68e14b74f83edbb2a08992" +checksum = "48fa474cf7492f9a299ba6019fb99ec673e1739556d48e8a90eabaea282ef0e4" [[package]] name = "base64" @@ -900,9 +901,9 @@ dependencies = [ [[package]] name = "bitstream-io" -version = "2.5.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" [[package]] name = "block" @@ -946,7 +947,7 @@ dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "piper", ] @@ -1127,9 +1128,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "serde", @@ -1152,9 +1153,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -1245,7 +1246,7 @@ checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.6.0", "log", - "polling 3.7.3", + "polling 3.7.4", "rustix", "slab", "thiserror 1.0.69", @@ -1322,9 +1323,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -1466,9 +1467,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "clash-nyanpasu" @@ -1572,7 +1573,7 @@ dependencies = [ "tauri-plugin-updater", "tempfile", "test-log", - "thiserror 1.0.69", + "thiserror 2.0.3", "timeago", "tokio", "tracing", @@ -1585,7 +1586,7 @@ dependencies = [ "url", "uuid", "webview2-com", - "which 6.0.3", + "which 7.0.0", "whoami", "window-vibrancy", "windows-core 0.58.0", @@ -1716,7 +1717,7 @@ checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" dependencies = [ "castaway 0.2.3", "cfg-if", - "itoa 1.0.11", + "itoa 1.0.13", "rustversion", "ryu", "static_assertions", @@ -1869,9 +1870,9 @@ checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1999,9 +2000,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", "syn 2.0.89", @@ -2034,9 +2035,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.77+curl-8.10.1" +version = "0.4.78+curl-8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f469e8a5991f277a208224f6c7ad72ecb5f986e36d09ae1f2c1bb9259478a480" +checksum = "8eec768341c5c7789611ae51cf6c459099f22e64a5d5d0ce4892434e33821eaf" dependencies = [ "cc", "libc", @@ -2184,9 +2185,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -2328,7 +2329,7 @@ dependencies = [ [[package]] name = "dirs-utils" version = "0.1.0" -source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#f1b93fe1cd57b2fd2b07ea2af6c4a4da9034514b" +source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#7316f2c5408424fd26ac5efb8dc737d6443c4bbf" dependencies = [ "dirs 5.0.1", "thiserror 1.0.69", @@ -2618,9 +2619,9 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e24052d7be71f0efb50c201557f6fe7d237cfd5a64fd5bcd7fd8fe32dbbffa" +checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379" dependencies = [ "cc", "memchr", @@ -2798,15 +2799,14 @@ dependencies = [ [[package]] name = "exr" -version = "1.72.0" +version = "1.73.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" dependencies = [ "bit_field", - "flume", "half", "lebe", - "miniz_oxide 0.7.4", + "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", @@ -2841,15 +2841,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fdeflate" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab" +checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" dependencies = [ "simd-adler32", ] @@ -2900,7 +2900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -2918,15 +2918,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "flume" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" -dependencies = [ - "spin", -] - [[package]] name = "fnv" version = "1.0.7" @@ -3094,11 +3085,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ - "fastrand 2.1.1", + "fastrand 2.2.0", "futures-core", "futures-io", "parking", @@ -3422,9 +3413,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "global-hotkey" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b75248f33c73df1ed69673f6cb36d2e048ae84d29aa1d3e53199d138ebb1df" +checksum = "b00d88f1be7bf4cd2e61623ce08e84be2dfa4eab458e5d632d3dab95f16c1f64" dependencies = [ "crossbeam-channel", "keyboard-types", @@ -3446,7 +3437,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -3680,9 +3671,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -3749,9 +3740,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -3849,7 +3840,7 @@ checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", - "itoa 1.0.11", + "itoa 1.0.13", ] [[package]] @@ -3860,7 +3851,7 @@ checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", - "itoa 1.0.11", + "itoa 1.0.13", ] [[package]] @@ -3909,9 +3900,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -3921,7 +3912,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.11", + "itoa 1.0.13", "pin-project-lite", "smallvec", "tokio", @@ -3964,9 +3955,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -4169,7 +4160,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -4177,9 +4168,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.4" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", @@ -4263,7 +4254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -4329,9 +4320,9 @@ dependencies = [ [[package]] name = "interprocess" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +checksum = "894148491d817cb36b6f778017b8ac46b17408d522dd90f539d677ea938362eb" dependencies = [ "doctest-file", "futures-core", @@ -4473,9 +4464,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "javascriptcore-rs" @@ -4685,19 +4676,18 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libfuzzer-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" dependencies = [ "arbitrary", "cc", - "once_cell", ] [[package]] @@ -4717,14 +4707,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libnghttp2-sys" @@ -4773,9 +4763,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "litrs" @@ -4820,7 +4810,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -4922,6 +4912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", + "rayon", ] [[package]] @@ -5025,15 +5016,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -5089,9 +5071,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.1" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" dependencies = [ "crossbeam-channel", "dpi", @@ -5459,7 +5441,7 @@ dependencies = [ [[package]] name = "nyanpasu-ipc" version = "1.0.7" -source = "git+https://github.com/libnyanpasu/nyanpasu-service.git#560746f9101d15d30985224d84646d25284d2524" +source = "git+https://github.com/libnyanpasu/nyanpasu-service.git#86ecb390c1cfda5fcd0a5e49e562c1641193b7a6" dependencies = [ "anyhow", "axum", @@ -5493,7 +5475,7 @@ dependencies = [ [[package]] name = "nyanpasu-utils" version = "0.1.0" -source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#f1b93fe1cd57b2fd2b07ea2af6c4a4da9034514b" +source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#7316f2c5408424fd26ac5efb8dc737d6443c4bbf" dependencies = [ "constcat", "derive_builder", @@ -5827,9 +5809,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.4.0+3.4.0" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] @@ -5884,7 +5866,7 @@ dependencies = [ [[package]] name = "os-utils" version = "0.1.0" -source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#f1b93fe1cd57b2fd2b07ea2af6c4a4da9034514b" +source = "git+https://github.com/libnyanpasu/nyanpasu-utils.git#7316f2c5408424fd26ac5efb8dc737d6443c4bbf" dependencies = [ "nix 0.29.0", "shared_child", @@ -6429,7 +6411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.1", + "fastrand 2.2.0", "futures-io", ] @@ -6462,7 +6444,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -6483,9 +6465,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.3" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", @@ -6510,9 +6492,9 @@ checksum = "325a6d2ac5dee293c3b2612d4993b98aec1dff096b0a2dae70ed7d95784a05da" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -6701,9 +6683,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", @@ -6712,34 +6694,38 @@ dependencies = [ "rustc-hash 2.0.0", "rustls", "socket2", - "thiserror 1.0.69", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom 0.2.15", "rand 0.8.5", "ring", "rustc-hash 2.0.0", "rustls", + "rustls-pki-types", "slab", - "thiserror 1.0.69", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases 0.2.1", "libc", "once_cell", "socket2", @@ -6883,6 +6869,7 @@ dependencies = [ "loop9", "quick-error", "rav1e", + "rayon", "rgb", ] @@ -6990,7 +6977,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -7005,9 +6992,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -7076,7 +7063,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "system-configuration", "tokio", "tokio-native-tls", @@ -7282,9 +7269,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.39" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -7295,9 +7282,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "log", "once_cell", @@ -7322,6 +7309,9 @@ name = "rustls-pki-types" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -7381,9 +7371,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -7455,9 +7445,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -7503,9 +7493,9 @@ dependencies = [ [[package]] name = "semver-parser" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" dependencies = [ "pest", ] @@ -7574,7 +7564,7 @@ version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "itoa 1.0.11", + "itoa 1.0.13", "memchr", "ryu", "serde", @@ -7586,7 +7576,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ - "itoa 1.0.11", + "itoa 1.0.13", "serde", ] @@ -7617,7 +7607,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.11", + "itoa 1.0.13", "ryu", "serde", ] @@ -7655,10 +7645,10 @@ dependencies = [ [[package]] name = "serde_yaml_ng" version = "0.10.0" -source = "git+https://github.com/libnyanpasu/serde-yaml-ng.git#35bb2380acd886667df58b057406cd565e54212d" +source = "git+https://github.com/libnyanpasu/serde-yaml-ng.git#39cfdee3ab2a9bf220bc285e8004bb1950fa317f" dependencies = [ "indexmap 2.6.0", - "itoa 1.0.11", + "itoa 1.0.13", "ryu", "serde", "unsafe-libyaml", @@ -7671,7 +7661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e76bab63c3fd98d27c17f9cbce177f64a91f5e69ac04cafe04e1bb25d1dc3c" dependencies = [ "indexmap 2.6.0", - "itoa 1.0.11", + "itoa 1.0.13", "libyml", "log", "memchr", @@ -7986,7 +7976,7 @@ dependencies = [ "async-net", "async-process", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.5.0", ] [[package]] @@ -8061,9 +8051,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "spirv" @@ -8222,9 +8209,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -8242,9 +8229,9 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" dependencies = [ "libc", ] @@ -8313,9 +8300,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.30.6" +version = "0.30.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833b4d43383d76d5078d72f3acd977f47eb5b6751eb40baa665d13828e7b79df" +checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da" dependencies = [ "bitflags 2.6.0", "cocoa", @@ -8369,9 +8356,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -8424,7 +8411,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.1", + "thiserror 2.0.3", "tokio", "tray-icon", "url", @@ -8477,7 +8464,7 @@ dependencies = [ "sha2 0.10.8", "syn 2.0.89", "tauri-utils", - "thiserror 2.0.1", + "thiserror 2.0.3", "time", "url", "uuid", @@ -8500,9 +8487,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa4e6c94cb1d635f65a770c69e23de1bc054b0e4c554fa037a7cc7676333d39" +checksum = "e753f2a30933a9bbf0a202fa47d7cc4a3401f06e8d6dcc53b79aa62954828c79" dependencies = [ "anyhow", "glob", @@ -8711,7 +8698,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 2.0.1", + "thiserror 2.0.3", "url", "windows 0.58.0", ] @@ -8771,7 +8758,7 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.1", + "thiserror 2.0.3", "toml 0.8.19", "url", "urlpattern", @@ -8807,7 +8794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", - "fastrand 2.1.1", + "fastrand 2.2.0", "once_cell", "rustix", "windows-sys 0.59.0", @@ -8943,11 +8930,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.1" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c1e40dd48a282ae8edc36c732cbc219144b87fb6a4c7316d611c6b1f06ec0c" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ - "thiserror-impl 2.0.1", + "thiserror-impl 2.0.3", ] [[package]] @@ -8963,9 +8950,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.1" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874aa7e446f1da8d9c3a5c95b1c5eb41d800045252121dc7f8e0ba370cee55f5" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", @@ -9010,7 +8997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", - "itoa 1.0.11", + "itoa 1.0.13", "js-sys", "libc", "num-conv", @@ -9383,9 +9370,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c92af36a182b46206723bdf8a7942e20838cde1cf062e5b97854d57eb01763b" +checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" dependencies = [ "core-graphics 0.24.0", "crossbeam-channel", @@ -9563,9 +9550,9 @@ checksum = "2f322b60f6b9736017344fa0635d64be2f458fbc04eef65f6be22976dd1ffd5b" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-linebreak" @@ -9797,7 +9784,7 @@ checksum = "9170e001f458781e92711d2ad666110f153e4e50bfd5cbd02db6547625714187" dependencies = [ "float-cmp 0.10.0", "halfbrown", - "itoa 1.0.11", + "itoa 1.0.13", "ryu", ] @@ -10210,9 +10197,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -10384,6 +10371,18 @@ dependencies = [ "winsafe", ] +[[package]] +name = "which" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" +dependencies = [ + "either", + "home", + "rustix", + "winsafe", +] + [[package]] name = "whoami" version = "1.5.2" @@ -10986,9 +10985,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.47.0" +version = "0.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553ca1ce149982123962fac2506aa75b8b76288779a77e72b12fa2fc34938647" +checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73" dependencies = [ "base64 0.22.1", "block2", @@ -11082,9 +11081,9 @@ dependencies = [ [[package]] name = "xcb" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e75181b5a62b6eeaa72f303d3cef7dbb841e22885bf6d3e66fe23e88c55dc6" +checksum = "f1e2f212bb1a92cd8caac8051b829a6582ede155ccb60b5d5908b81b100952be" dependencies = [ "bitflags 1.3.2", "libc", @@ -11134,9 +11133,9 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "xml-rs" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" +checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" [[package]] name = "xmlwriter" @@ -11152,9 +11151,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", @@ -11164,9 +11163,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", @@ -11353,18 +11352,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", @@ -11416,9 +11415,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" dependencies = [ "aes", "arbitrary", @@ -11436,7 +11435,7 @@ dependencies = [ "pbkdf2", "rand 0.8.5", "sha1", - "thiserror 1.0.69", + "thiserror 2.0.3", "time", "zeroize", "zopfli", diff --git a/clash-nyanpasu/backend/Cargo.toml b/clash-nyanpasu/backend/Cargo.toml index 8f6d55f199..4137087f72 100644 --- a/clash-nyanpasu/backend/Cargo.toml +++ b/clash-nyanpasu/backend/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0" authors = ["zzzgydi", "keiko233"] [workspace.dependencies] -thiserror = "1" +thiserror = "2" tracing = "0.1" boa_engine = { version = "0.19.1" } diff --git a/clash-nyanpasu/backend/tauri/Cargo.toml b/clash-nyanpasu/backend/tauri/Cargo.toml index b047df829c..8e83246c06 100644 --- a/clash-nyanpasu/backend/tauri/Cargo.toml +++ b/clash-nyanpasu/backend/tauri/Cargo.toml @@ -109,12 +109,12 @@ atomic_enum = "0.3.0" enumflags2 = "0.7" # System Utilities -auto-launch = { git = "https://github.com/zzzgydi/auto-launch.git", version = "0.5" } +auto-launch = { git = "https://github.com/libnyanpasu/auto-launch.git", version = "0.5" } delay_timer = { version = "0.11", git = "https://github.com/libnyanpasu/delay-timer.git" } # Task scheduler with timer dunce = "1.0.4" # for cross platform path normalization runas = { git = "https://github.com/libnyanpasu/rust-runas.git" } single-instance = "0.3.3" -which = "6" +which = "7" dirs = "5.0.1" open = "5.0.1" sysinfo = "0.32" diff --git a/clash-nyanpasu/backend/tauri/gen/schemas/desktop-schema.json b/clash-nyanpasu/backend/tauri/gen/schemas/desktop-schema.json index 78d8749916..9e54e5242e 100644 --- a/clash-nyanpasu/backend/tauri/gen/schemas/desktop-schema.json +++ b/clash-nyanpasu/backend/tauri/gen/schemas/desktop-schema.json @@ -84,7 +84,7 @@ } }, "permissions": { - "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```", + "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```", "type": "array", "items": { "$ref": "#/definitions/PermissionEntry" diff --git a/clash-nyanpasu/backend/tauri/gen/schemas/windows-schema.json b/clash-nyanpasu/backend/tauri/gen/schemas/windows-schema.json index 78d8749916..9e54e5242e 100644 --- a/clash-nyanpasu/backend/tauri/gen/schemas/windows-schema.json +++ b/clash-nyanpasu/backend/tauri/gen/schemas/windows-schema.json @@ -84,7 +84,7 @@ } }, "permissions": { - "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```", + "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```", "type": "array", "items": { "$ref": "#/definitions/PermissionEntry" diff --git a/clash-nyanpasu/backend/tauri/src/cmds/mod.rs b/clash-nyanpasu/backend/tauri/src/cmds/mod.rs index 469846c646..a9569ab180 100644 --- a/clash-nyanpasu/backend/tauri/src/cmds/mod.rs +++ b/clash-nyanpasu/backend/tauri/src/cmds/mod.rs @@ -36,6 +36,8 @@ enum Commands { #[arg(raw = true)] args: Vec, }, + /// Show a panic dialog while the application is enter panic handler. + PanicDialog { message: String }, } struct DelayedExitGuard; @@ -87,6 +89,9 @@ pub fn parse() -> anyhow::Result<()> { let envs = crate::utils::collect::collect_envs().unwrap(); println!("{:#?}", envs); } + Commands::PanicDialog { message } => { + crate::utils::dialog::panic_dialog(message); + } } drop(guard); std::process::exit(0); diff --git a/clash-nyanpasu/backend/tauri/src/lib.rs b/clash-nyanpasu/backend/tauri/src/lib.rs index afcb0f12c4..6b90bb4866 100644 --- a/clash-nyanpasu/backend/tauri/src/lib.rs +++ b/clash-nyanpasu/backend/tauri/src/lib.rs @@ -108,7 +108,6 @@ pub fn run() -> std::io::Result<()> { crate::log_err!(init::init_config()); // Panic Hook to show a panic dialog and save logs - let default_panic = std::panic::take_hook(); std::panic::set_hook(Box::new(move |panic_info| { use std::backtrace::{Backtrace, BacktraceStatus}; let payload = panic_info.payload(); @@ -124,7 +123,7 @@ pub fn run() -> std::io::Result<()> { let location = panic_info.location().map(|l| l.to_string()); let (backtrace, note) = { - let backtrace = Backtrace::capture(); + let backtrace = Backtrace::force_capture(); let note = (backtrace.status() == BacktraceStatus::Disabled) .then_some("run with RUST_BACKTRACE=1 environment variable to display a backtrace"); (Some(backtrace), note) @@ -145,20 +144,29 @@ pub fn run() -> std::io::Result<()> { return; } - utils::dialog::panic_dialog(&format!( - "payload: {:#?}\nlocation: {:?}\nbacktrace: {:#?}\n\nnote: {:?}", - payload, location, backtrace, note - )); + // FIXME: maybe move this logic to a util function? + let msg = format!( + "Oops, we encountered some issues and program will exit immediately.\n\npayload: {:#?}\nlocation: {:?}\nbacktrace: {:#?}\n\n", + payload, location, backtrace, + ); + let child = std::process::Command::new(tauri::utils::platform::current_exe().unwrap()) + .arg("panic-dialog") + .arg(msg.as_str()) + .spawn(); + // fallback to show a dialog directly + if child.is_err() { + utils::dialog::panic_dialog(msg.as_str()); + } - // cleanup the core manager - let task = std::thread::spawn(move || { - nyanpasu_utils::runtime::block_on(async { - let _ = crate::core::CoreManager::global().stop_core().await; - }); - }); - let _ = task.join(); - default_panic(panic_info); - std::process::exit(1); // exit if default panic handler doesn't exit + match Handle::global().app_handle.lock().as_ref() { + Some(app_handle) => { + app_handle.exit(1); + } + None => { + log::error!("app handle is not initialized"); + std::process::exit(1); + } + } })); let verge = { Config::verge().latest().language.clone().unwrap() }; @@ -322,39 +330,35 @@ pub fn run() -> std::io::Result<()> { .build(tauri::generate_context!()) .expect("error while running tauri application"); app.run(|app_handle, e| match e { - tauri::RunEvent::ExitRequested { api, .. } => { + tauri::RunEvent::ExitRequested { api, code, .. } if code.is_none() => { api.prevent_exit(); } - tauri::RunEvent::Exit => { - resolve::resolve_reset(); + tauri::RunEvent::ExitRequested { .. } => { + utils::help::cleanup_processes(app_handle); } - tauri::RunEvent::WindowEvent { label, event, .. } => { - if label == "main" { - match event { - tauri::WindowEvent::ScaleFactorChanged { scale_factor, .. } => { - core::tray::on_scale_factor_changed(scale_factor); - } - tauri::WindowEvent::CloseRequested { .. } => { - log::debug!(target: "app", "window close requested"); - let _ = resolve::save_window_state(app_handle, true); - #[cfg(target_os = "macos")] - log_err!(app_handle.run_on_main_thread(|| { - crate::utils::dock::macos::hide_dock_icon(); - })); - } - tauri::WindowEvent::Destroyed => { - log::debug!(target: "app", "window destroyed"); - reset_window_open_counter(); - } - tauri::WindowEvent::Moved(_) | tauri::WindowEvent::Resized(_) => { - log::debug!(target: "app", "window moved or resized"); - std::thread::sleep(std::time::Duration::from_nanos(1)); - let _ = resolve::save_window_state(app_handle, false); - } - _ => {} - } + tauri::RunEvent::WindowEvent { label, event, .. } if label == "main" => match event { + tauri::WindowEvent::ScaleFactorChanged { scale_factor, .. } => { + core::tray::on_scale_factor_changed(scale_factor); } - } + tauri::WindowEvent::CloseRequested { .. } => { + log::debug!(target: "app", "window close requested"); + let _ = resolve::save_window_state(app_handle, true); + #[cfg(target_os = "macos")] + log_err!(app_handle.run_on_main_thread(|| { + crate::utils::dock::macos::hide_dock_icon(); + })); + } + tauri::WindowEvent::Destroyed => { + log::debug!(target: "app", "window destroyed"); + reset_window_open_counter(); + } + tauri::WindowEvent::Moved(_) | tauri::WindowEvent::Resized(_) => { + log::debug!(target: "app", "window moved or resized"); + std::thread::sleep(std::time::Duration::from_nanos(1)); + let _ = resolve::save_window_state(app_handle, false); + } + _ => {} + }, _ => {} }); diff --git a/clash-nyanpasu/backend/tauri/src/utils/help.rs b/clash-nyanpasu/backend/tauri/src/utils/help.rs index 8be939373b..0bf87ee3fb 100644 --- a/clash-nyanpasu/backend/tauri/src/utils/help.rs +++ b/clash-nyanpasu/backend/tauri/src/utils/help.rs @@ -247,9 +247,7 @@ pub fn cleanup_processes(app_handle: &AppHandle) { #[instrument(skip(app_handle))] pub fn quit_application(app_handle: &AppHandle) { - cleanup_processes(app_handle); app_handle.exit(0); - std::process::exit(0); } #[instrument(skip(app_handle))] diff --git a/clash-nyanpasu/frontend/nyanpasu/package.json b/clash-nyanpasu/frontend/nyanpasu/package.json index 5f6e12c24c..7787fd786f 100644 --- a/clash-nyanpasu/frontend/nyanpasu/package.json +++ b/clash-nyanpasu/frontend/nyanpasu/package.json @@ -10,8 +10,8 @@ "serve": "vite preview" }, "dependencies": { - "@dnd-kit/core": "6.1.0", - "@dnd-kit/sortable": "8.0.0", + "@dnd-kit/core": "6.2.0", + "@dnd-kit/sortable": "9.0.0", "@dnd-kit/utilities": "3.2.2", "@emotion/styled": "11.13.5", "@juggle/resize-observer": "3.4.0", @@ -29,7 +29,7 @@ "country-code-emoji": "2.3.0", "dayjs": "1.11.13", "framer-motion": "12.0.0-alpha.2", - "i18next": "23.16.8", + "i18next": "24.0.0", "jotai": "2.10.3", "json-schema": "0.4.0", "material-react-table": "3.0.1", diff --git a/clash-nyanpasu/manifest/version.json b/clash-nyanpasu/manifest/version.json index f2909d20df..def8cd328c 100644 --- a/clash-nyanpasu/manifest/version.json +++ b/clash-nyanpasu/manifest/version.json @@ -5,7 +5,7 @@ "mihomo_alpha": "alpha-eb985b0", "clash_rs": "v0.7.1", "clash_premium": "2023-09-05-gdcc8d87", - "clash_rs_alpha": "0.7.1-alpha+sha.92b5bfc" + "clash_rs_alpha": "0.7.1-alpha+sha.a4b59dc" }, "arch_template": { "mihomo": { @@ -69,5 +69,5 @@ "linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf" } }, - "updated_at": "2024-11-21T22:20:51.459Z" + "updated_at": "2024-11-23T22:20:39.660Z" } diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index 457fca7c20..a6fa7d3ed4 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -184,11 +184,11 @@ importers: frontend/nyanpasu: dependencies: '@dnd-kit/core': - specifier: 6.1.0 - version: 6.1.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) + specifier: 6.2.0 + version: 6.2.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) '@dnd-kit/sortable': - specifier: 8.0.0 - version: 8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(react@19.0.0-rc.1) + specifier: 9.0.0 + version: 9.0.0(@dnd-kit/core@6.2.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(react@19.0.0-rc.1) '@dnd-kit/utilities': specifier: 3.2.2 version: 3.2.2(react@19.0.0-rc.1) @@ -241,8 +241,8 @@ importers: specifier: 12.0.0-alpha.2 version: 12.0.0-alpha.2(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) i18next: - specifier: 23.16.8 - version: 23.16.8 + specifier: 24.0.0 + version: 24.0.0(typescript@5.7.2) jotai: specifier: 2.10.3 version: 2.10.3(react@19.0.0-rc.1)(types-react@19.0.0-rc.1) @@ -275,7 +275,7 @@ importers: version: 7.4.0(c6eqiv3v4ro6nnqx6e4soqhoku) react-i18next: specifier: 15.1.1 - version: 15.1.1(i18next@23.16.8)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) + version: 15.1.1(i18next@24.0.0(typescript@5.7.2))(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) react-markdown: specifier: 9.0.1 version: 9.0.1(react@19.0.0-rc.1)(types-react@19.0.0-rc.1) @@ -468,7 +468,7 @@ importers: version: 4.1.2(react@19.0.0-rc.1) react-i18next: specifier: 15.1.1 - version: 15.1.1(i18next@23.16.8)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) + version: 15.1.1(i18next@24.0.0(typescript@5.7.2))(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) react-use: specifier: 17.5.1 version: 17.5.1(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) @@ -1294,21 +1294,21 @@ packages: resolution: {integrity: sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ==} engines: {node: '>=14'} - '@dnd-kit/accessibility@3.1.0': - resolution: {integrity: sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ==} + '@dnd-kit/accessibility@3.1.1': + resolution: {integrity: sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==} peerDependencies: react: '>=16.8.0' - '@dnd-kit/core@6.1.0': - resolution: {integrity: sha512-J3cQBClB4TVxwGo3KEjssGEXNJqGVWx17aRTZ1ob0FliR5IjYgTxl5YJbKTzA6IzrtelotH19v6y7uoIRUZPSg==} + '@dnd-kit/core@6.2.0': + resolution: {integrity: sha512-KVK/CJmaYGTxTPU6P0+Oy4itgffTUa80B8317sXzfOr1qUzSL29jE7Th11llXiu2haB7B9Glpzo2CDElin+geQ==} peerDependencies: react: '>=16.8.0' react-dom: '>=16.8.0' - '@dnd-kit/sortable@8.0.0': - resolution: {integrity: sha512-U3jk5ebVXe1Lr7c2wU7SBZjcWdQP+j7peHJfCspnA81enlu88Mgd7CC8Q+pub9ubP7eKVETzJW+IBAhsqbSu/g==} + '@dnd-kit/sortable@9.0.0': + resolution: {integrity: sha512-3/9r8Mmba0nKTbo8kPnVSFZKf/VSy94nXZ3aUwzPEh78j/LooQ/EFKRZENak4PHKBkN53mgTF/z+Sd8H+FcAnQ==} peerDependencies: - '@dnd-kit/core': ^6.1.0 + '@dnd-kit/core': ^6.2.0 react: '>=16.8.0' '@dnd-kit/utilities@3.2.2': @@ -4849,8 +4849,13 @@ packages: hyphenate-style-name@1.1.0: resolution: {integrity: sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==} - i18next@23.16.8: - resolution: {integrity: sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==} + i18next@24.0.0: + resolution: {integrity: sha512-ORGCwMrXxpmB/AljFbGEe0UK/9Pz6umb9aZgLZ9qJGE+kjKhlnLj423WX2mt+N0MlEJ78pQXFMBmeMzrkLxriQ==} + peerDependencies: + typescript: ^5 + peerDependenciesMeta: + typescript: + optional: true iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} @@ -8777,22 +8782,22 @@ snapshots: '@ctrl/tinycolor@4.1.0': {} - '@dnd-kit/accessibility@3.1.0(react@19.0.0-rc.1)': + '@dnd-kit/accessibility@3.1.1(react@19.0.0-rc.1)': dependencies: react: 19.0.0-rc.1 tslib: 2.7.0 - '@dnd-kit/core@6.1.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)': + '@dnd-kit/core@6.2.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)': dependencies: - '@dnd-kit/accessibility': 3.1.0(react@19.0.0-rc.1) + '@dnd-kit/accessibility': 3.1.1(react@19.0.0-rc.1) '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc.1) react: 19.0.0-rc.1 react-dom: 19.0.0-rc.1(react@19.0.0-rc.1) tslib: 2.7.0 - '@dnd-kit/sortable@8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(react@19.0.0-rc.1)': + '@dnd-kit/sortable@9.0.0(@dnd-kit/core@6.2.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(react@19.0.0-rc.1)': dependencies: - '@dnd-kit/core': 6.1.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) + '@dnd-kit/core': 6.2.0(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc.1) react: 19.0.0-rc.1 tslib: 2.7.0 @@ -12589,9 +12594,11 @@ snapshots: hyphenate-style-name@1.1.0: {} - i18next@23.16.8: + i18next@24.0.0(typescript@5.7.2): dependencies: '@babel/runtime': 7.26.0 + optionalDependencies: + typescript: 5.7.2 iconv-lite@0.6.3: dependencies: @@ -14113,11 +14120,11 @@ snapshots: dependencies: react: 19.0.0-rc.1 - react-i18next@15.1.1(i18next@23.16.8)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1): + react-i18next@15.1.1(i18next@24.0.0(typescript@5.7.2))(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1): dependencies: '@babel/runtime': 7.26.0 html-parse-stringify: 3.0.1 - i18next: 23.16.8 + i18next: 24.0.0(typescript@5.7.2) react: 19.0.0-rc.1 optionalDependencies: react-dom: 19.0.0-rc.1(react@19.0.0-rc.1) diff --git a/lede/package/kernel/r8125/Makefile b/lede/package/kernel/r8125/Makefile index ba8c82425c..bf8d5cd778 100644 --- a/lede/package/kernel/r8125/Makefile +++ b/lede/package/kernel/r8125/Makefile @@ -33,7 +33,9 @@ $(call KernelPackage/r8125) endef ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y + PKG_MAKE_FLAGS += \ + ENABLE_RSS_SUPPORT=y \ + ENABLE_MULTIPLE_TX_QUEUE=y endif PKG_MAKE_FLAGS += CONFIG_ASPM=n diff --git a/lede/package/kernel/r8126/Makefile b/lede/package/kernel/r8126/Makefile index 2c4bd4b3f8..acf82a9930 100644 --- a/lede/package/kernel/r8126/Makefile +++ b/lede/package/kernel/r8126/Makefile @@ -33,7 +33,9 @@ $(call KernelPackage/r8126) endef ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y + PKG_MAKE_FLAGS += \ + ENABLE_RSS_SUPPORT=y \ + ENABLE_MULTIPLE_TX_QUEUE=y endif PKG_MAKE_FLAGS += CONFIG_ASPM=n diff --git a/lede/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-srcm3588-io.dts b/lede/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-srcm3588-io.dts index 63719f05ec..6c1498498f 100644 --- a/lede/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-srcm3588-io.dts +++ b/lede/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-srcm3588-io.dts @@ -296,10 +296,6 @@ }; }; -/* - * fspi is unavailable - * use i2c instead - */ &i2c8 { pinctrl-names = "default"; pinctrl-0 = <&i2c8m1_xfer>; @@ -840,9 +836,6 @@ status = "okay"; }; -/* - * Disabled due to driver bug. - */ &usb_host2_xhci { - status = "disabled"; + status = "okay"; }; diff --git a/lede/target/linux/rockchip/patches-6.1/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch b/lede/target/linux/rockchip/patches-6.1/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch new file mode 100644 index 0000000000..a272403869 --- /dev/null +++ b/lede/target/linux/rockchip/patches-6.1/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch @@ -0,0 +1,39 @@ +--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi +@@ -225,6 +225,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY0>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf0>; + #phy-cells = <1>; +--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi +@@ -1686,6 +1686,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY1_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY1>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf1>; + #phy-cells = <1>; +@@ -1702,6 +1703,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY2_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY2>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf2>; + #phy-cells = <1>; +--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c ++++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +@@ -299,7 +299,7 @@ static int rockchip_combphy_parse_dt(str + + priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk"); + +- priv->phy_rst = devm_reset_control_array_get_exclusive(dev); ++ priv->phy_rst = devm_reset_control_get(dev, "phy"); + if (IS_ERR(priv->phy_rst)) + return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n"); + diff --git a/lede/target/linux/rockchip/patches-6.6/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch b/lede/target/linux/rockchip/patches-6.6/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch new file mode 100644 index 0000000000..12101f3975 --- /dev/null +++ b/lede/target/linux/rockchip/patches-6.6/220-phy-rockchip-naneng-combphy-fix-phy-reset.patch @@ -0,0 +1,39 @@ +--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi +@@ -225,6 +225,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY0>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf0>; + #phy-cells = <1>; +--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi +@@ -1719,6 +1719,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY1_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY1>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf1>; + #phy-cells = <1>; +@@ -1735,6 +1736,7 @@ + assigned-clocks = <&pmucru CLK_PCIEPHY2_REF>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_PIPEPHY2>; ++ reset-names = "phy"; + rockchip,pipe-grf = <&pipegrf>; + rockchip,pipe-phy-grf = <&pipe_phy_grf2>; + #phy-cells = <1>; +--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c ++++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +@@ -324,7 +324,7 @@ static int rockchip_combphy_parse_dt(str + + priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk"); + +- priv->phy_rst = devm_reset_control_array_get_exclusive(dev); ++ priv->phy_rst = devm_reset_control_get(dev, "phy"); + if (IS_ERR(priv->phy_rst)) + return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n"); + diff --git a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index 7bf8776265..7c5aa59252 100644 --- a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -98,9 +98,50 @@ if not fs.access(CACHE_PATH) then fs.mkdir(CACHE_PATH) end +local LOCAL_EXTEND_ARG = "" if LOCAL_GROUP == "nil" then LOCAL_GROUP = nil - log(" * 注意:国内分组名未设置,可能会导致 DNS 解析异常!") + log(" * 注意:国内分组名未设置,可能会导致 DNS 分流错误!") +else + --从smartdns配置中读取参数 + local custom_conf_path = "/etc/smartdns/custom.conf" + local options = { + {key = "dualstack_ip_selection", config_key = "dualstack-ip-selection", yes_no = true, arg_yes = "-d yes", arg_no = "-d no", default = "yes"}, + {key = "speed_check_mode", config_key = "speed-check-mode", prefix = "-c ", default = "ping,tcp:80,tcp:443"}, + {key = "serve_expired", config_key = "serve-expired", yes_no = true, arg_yes = "", arg_no = "-no-serve-expired", default = "yes"}, + {key = "response_mode", config_key = "response-mode", prefix = "-r ", default = "first-ping"}, + {key = "rr_ttl", config_key = "rr-ttl", prefix = "-rr-ttl "}, + {key = "rr_ttl_min", config_key = "rr-ttl-min", prefix = "-rr-ttl-min "}, + {key = "rr_ttl_max", config_key = "rr-ttl-max", prefix = "-rr-ttl-max "} + } + -- 从 custom.conf 中读取值,以最后出现的值为准 + local custom_config = {} + local f_in = io.open(custom_conf_path, "r") + if f_in then + for line in f_in:lines() do + line = line:match("^%s*(.-)%s*$") + if line ~= "" and not line:match("^#") then + local param, value = line:match("^(%S+)%s+(%S+)$") + if param and value then custom_config[param] = value end + end + end + f_in:close() + end + -- 从 smartdns 配置中读取值,优先级以 custom.conf 为准 + for _, opt in ipairs(options) do + local val = custom_config[opt.config_key] or uci:get("smartdns", "@smartdns[0]", opt.key) or opt.default + if val == "yes" then val = "1" elseif val == "no" then val = "0" end + if opt.yes_no then + local arg = (val == "1" and opt.arg_yes or opt.arg_no) + if arg and arg ~= "" then + LOCAL_EXTEND_ARG = LOCAL_EXTEND_ARG .. (LOCAL_EXTEND_ARG ~= "" and " " or "") .. arg + end + else + if val and (not opt.value or (opt.invert and val ~= opt.value) or (not opt.invert and val == opt.value)) then + LOCAL_EXTEND_ARG = LOCAL_EXTEND_ARG .. (LOCAL_EXTEND_ARG ~= "" and " " or "") .. (opt.prefix or "") .. (opt.arg or val) + end + end + end end if not REMOTE_GROUP or REMOTE_GROUP == "nil" then @@ -167,6 +208,8 @@ if DEFAULT_DNS_GROUP then if NO_PROXY_IPV6 == "1" and only_global == 1 and uci:get(appname, TCP_NODE, "protocol") ~= "_shunt" then domain_rules_str = domain_rules_str .. " -address #6" end + elseif DEFAULT_DNS_GROUP == LOCAL_GROUP then + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") end table.insert(config_lines, domain_rules_str) end @@ -226,6 +269,7 @@ if is_file_nonzero(file_vpslist) then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_vpslist,#6:" .. setflag .. "passwall_vpslist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--8") log(string.format(" - 节点列表中的域名(vpslist)使用分组:%s", LOCAL_GROUP or "默认")) @@ -256,6 +300,7 @@ if USE_DIRECT_LIST == "1" and is_file_nonzero(file_direct_host) then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_whitelist,#6:" .. setflag .. "passwall_whitelist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--6") log(string.format(" - 域名白名单(whitelist)使用分组:%s", LOCAL_GROUP or "默认")) @@ -328,6 +373,7 @@ if CHN_LIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then if CHN_LIST == "direct" then local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_chnroute,#6:" .. setflag .. "passwall_chnroute6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--2") log(string.format(" - 中国域名表(chnroute)使用分组:%s", LOCAL_GROUP or "默认")) @@ -419,6 +465,7 @@ if uci:get(appname, TCP_NODE, "protocol") == "_shunt" then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_whitelist,#6:" .. setflag .. "passwall_whitelist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--3") end diff --git a/sing-box/adapter/inbound.go b/sing-box/adapter/inbound.go index fd9c5405d4..f5d5c95b8f 100644 --- a/sing-box/adapter/inbound.go +++ b/sing-box/adapter/inbound.go @@ -70,10 +70,12 @@ type InboundContext struct { InboundOptions option.InboundOptions UDPDisableDomainUnmapping bool UDPConnect bool - NetworkStrategy C.NetworkStrategy - NetworkType []C.InterfaceType - FallbackNetworkType []C.InterfaceType - FallbackDelay time.Duration + UDPTimeout time.Duration + + NetworkStrategy C.NetworkStrategy + NetworkType []C.InterfaceType + FallbackNetworkType []C.InterfaceType + FallbackDelay time.Duration DNSServer string diff --git a/sing-box/adapter/outbound/default.go b/sing-box/adapter/outbound/default.go deleted file mode 100644 index 573673f287..0000000000 --- a/sing-box/adapter/outbound/default.go +++ /dev/null @@ -1,157 +0,0 @@ -package outbound - -import ( - "context" - "net" - "net/netip" - "os" - "time" - - "github.com/sagernet/sing-box/adapter" - "github.com/sagernet/sing-box/common/dialer" - C "github.com/sagernet/sing-box/constant" - "github.com/sagernet/sing/common" - "github.com/sagernet/sing/common/buf" - "github.com/sagernet/sing/common/bufio" - "github.com/sagernet/sing/common/canceler" - E "github.com/sagernet/sing/common/exceptions" - M "github.com/sagernet/sing/common/metadata" - N "github.com/sagernet/sing/common/network" -) - -func NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata adapter.InboundContext) error { - defer conn.Close() - ctx = adapter.WithContext(ctx, &metadata) - var outConn net.Conn - var err error - if len(metadata.DestinationAddresses) > 0 { - outConn, err = dialer.DialSerialNetwork(ctx, this, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) - } else { - outConn, err = this.DialContext(ctx, N.NetworkTCP, metadata.Destination) - } - if err != nil { - return N.ReportHandshakeFailure(conn, err) - } - err = N.ReportConnHandshakeSuccess(conn, outConn) - if err != nil { - outConn.Close() - return err - } - return CopyEarlyConn(ctx, conn, outConn) -} - -func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata adapter.InboundContext) error { - defer conn.Close() - ctx = adapter.WithContext(ctx, &metadata) - var ( - outPacketConn net.PacketConn - outConn net.Conn - destinationAddress netip.Addr - err error - ) - if metadata.UDPConnect { - if len(metadata.DestinationAddresses) > 0 { - if parallelDialer, isParallelDialer := this.(dialer.ParallelInterfaceDialer); isParallelDialer { - outConn, err = dialer.DialSerialNetwork(ctx, parallelDialer, N.NetworkUDP, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) - } else { - outConn, err = N.DialSerial(ctx, this, N.NetworkUDP, metadata.Destination, metadata.DestinationAddresses) - } - } else { - outConn, err = this.DialContext(ctx, N.NetworkUDP, metadata.Destination) - } - if err != nil { - return N.ReportHandshakeFailure(conn, err) - } - outPacketConn = bufio.NewUnbindPacketConn(outConn) - connRemoteAddr := M.AddrFromNet(outConn.RemoteAddr()) - if connRemoteAddr != metadata.Destination.Addr { - destinationAddress = connRemoteAddr - } - } else { - if len(metadata.DestinationAddresses) > 0 { - outPacketConn, destinationAddress, err = dialer.ListenSerialNetworkPacket(ctx, this, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) - } else { - outPacketConn, err = this.ListenPacket(ctx, metadata.Destination) - } - if err != nil { - return N.ReportHandshakeFailure(conn, err) - } - } - err = N.ReportPacketConnHandshakeSuccess(conn, outPacketConn) - if err != nil { - outPacketConn.Close() - return err - } - if destinationAddress.IsValid() { - var originDestination M.Socksaddr - if metadata.RouteOriginalDestination.IsValid() { - originDestination = metadata.RouteOriginalDestination - } else { - originDestination = metadata.Destination - } - if metadata.Destination != M.SocksaddrFrom(destinationAddress, metadata.Destination.Port) { - if metadata.UDPDisableDomainUnmapping { - outPacketConn = bufio.NewUnidirectionalNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), originDestination) - } else { - outPacketConn = bufio.NewNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), originDestination) - } - } - if natConn, loaded := common.Cast[bufio.NATPacketConn](conn); loaded { - natConn.UpdateDestination(destinationAddress) - } - } - switch metadata.Protocol { - case C.ProtocolSTUN: - ctx, conn = canceler.NewPacketConn(ctx, conn, C.STUNTimeout) - case C.ProtocolQUIC: - ctx, conn = canceler.NewPacketConn(ctx, conn, C.QUICTimeout) - case C.ProtocolDNS: - ctx, conn = canceler.NewPacketConn(ctx, conn, C.DNSTimeout) - } - return bufio.CopyPacketConn(ctx, conn, bufio.NewPacketConn(outPacketConn)) -} - -func CopyEarlyConn(ctx context.Context, conn net.Conn, serverConn net.Conn) error { - if cachedReader, isCached := conn.(N.CachedReader); isCached { - payload := cachedReader.ReadCached() - if payload != nil && !payload.IsEmpty() { - _, err := serverConn.Write(payload.Bytes()) - payload.Release() - if err != nil { - serverConn.Close() - return err - } - return bufio.CopyConn(ctx, conn, serverConn) - } - } - if earlyConn, isEarlyConn := common.Cast[N.EarlyConn](serverConn); isEarlyConn && earlyConn.NeedHandshake() { - payload := buf.NewPacket() - err := conn.SetReadDeadline(time.Now().Add(C.ReadPayloadTimeout)) - if err != os.ErrInvalid { - if err != nil { - payload.Release() - serverConn.Close() - return err - } - _, err = payload.ReadOnceFrom(conn) - if err != nil && !E.IsTimeout(err) { - payload.Release() - serverConn.Close() - return E.Cause(err, "read payload") - } - err = conn.SetReadDeadline(time.Time{}) - if err != nil { - payload.Release() - serverConn.Close() - return err - } - } - _, err = serverConn.Write(payload.Bytes()) - payload.Release() - if err != nil { - serverConn.Close() - return N.ReportHandshakeFailure(conn, err) - } - } - return bufio.CopyConn(ctx, conn, serverConn) -} diff --git a/sing-box/constant/protocol.go b/sing-box/constant/protocol.go index 1485408945..dbe16e51c4 100644 --- a/sing-box/constant/protocol.go +++ b/sing-box/constant/protocol.go @@ -10,6 +10,7 @@ const ( ProtocolDTLS = "dtls" ProtocolSSH = "ssh" ProtocolRDP = "rdp" + ProtocolNTP = "ntp" ) const ( diff --git a/sing-box/constant/timeout.go b/sing-box/constant/timeout.go index 67ae6f6644..3b5a452bed 100644 --- a/sing-box/constant/timeout.go +++ b/sing-box/constant/timeout.go @@ -9,8 +9,6 @@ const ( TCPTimeout = 15 * time.Second ReadPayloadTimeout = 300 * time.Millisecond DNSTimeout = 10 * time.Second - QUICTimeout = 30 * time.Second - STUNTimeout = 15 * time.Second UDPTimeout = 5 * time.Minute DefaultURLTestInterval = 3 * time.Minute DefaultURLTestIdleTimeout = 30 * time.Minute @@ -19,3 +17,18 @@ const ( FatalStopTimeout = 10 * time.Second FakeIPMetadataSaveInterval = 10 * time.Second ) + +var PortProtocols = map[uint16]string{ + 53: ProtocolDNS, + 123: ProtocolNTP, + 3478: ProtocolSTUN, + 443: ProtocolQUIC, +} + +var ProtocolTimeouts = map[string]time.Duration{ + ProtocolDNS: 10 * time.Second, + ProtocolNTP: 10 * time.Second, + ProtocolSTUN: 10 * time.Second, + ProtocolQUIC: 30 * time.Second, + ProtocolDTLS: 30 * time.Second, +} diff --git a/sing-box/docs/changelog.md b/sing-box/docs/changelog.md index e6d36e81af..3e775bc181 100644 --- a/sing-box/docs/changelog.md +++ b/sing-box/docs/changelog.md @@ -2,6 +2,19 @@ icon: material/alert-decagram --- +#### 1.11.0-alpha.23 + +* Fixes and improvements + +#### 1.11.0-alpha.22 + +* Add UDP timeout route option **1** +* Fixes and improvements + +**1**: + +See [Rule Action](/configuration/route/rule_action/#udp_timeout). + #### 1.11.0-alpha.20 * Add UDP GSO support for WireGuard diff --git a/sing-box/docs/configuration/route/rule_action.md b/sing-box/docs/configuration/route/rule_action.md index 63e2b00b75..fae52e8540 100644 --- a/sing-box/docs/configuration/route/rule_action.md +++ b/sing-box/docs/configuration/route/rule_action.md @@ -41,7 +41,8 @@ See `route-options` fields below. "network_strategy": "", "fallback_delay": "", "udp_disable_domain_unmapping": false, - "udp_connect": false + "udp_connect": false, + "udp_timeout": "" } ``` @@ -86,6 +87,28 @@ do not support receiving UDP packets with domain addresses, such as Surge. If enabled, attempts to connect UDP connection to the destination instead of listen. +#### udp_timeout + +Timeout for UDP connections. + +Setting a larger value than the UDP timeout in inbounds will have no effect. + +Default value for protocol sniffed connections: + +| Timeout | Protocol | +|---------|----------------------| +| `10s` | `dns`, `ntp`, `stun` | +| `30s` | `quic`, `dtls` | + +If no protocol is sniffed, the following ports will be recognized as protocols by default: + +| Port | Protocol | +|------|----------| +| 53 | `dns` | +| 123 | `ntp` | +| 443 | `quic` | +| 3478 | `stun` | + ### reject ```json diff --git a/sing-box/docs/configuration/route/rule_action.zh.md b/sing-box/docs/configuration/route/rule_action.zh.md index 7959fced45..2f558f4e46 100644 --- a/sing-box/docs/configuration/route/rule_action.zh.md +++ b/sing-box/docs/configuration/route/rule_action.zh.md @@ -37,7 +37,8 @@ icon: material/new-box "network_strategy": "", "fallback_delay": "", "udp_disable_domain_unmapping": false, - "udp_connect": false + "udp_connect": false, + "udp_timeout": "" } ``` @@ -84,6 +85,28 @@ icon: material/new-box 如果启用,将尝试将 UDP 连接 connect 到目标而不是 listen。 +#### udp_timeout + +UDP 连接超时时间。 + +设置比入站 UDP 超时更大的值将无效。 + +已探测协议连接的默认值: + +| 超时 | 协议 | +|-------|----------------------| +| `10s` | `dns`, `ntp`, `stun` | +| `30s` | `quic`, `dtls` | + +如果没有探测到协议,以下端口将默认识别为协议: + +| 端口 | 协议 | +|------|--------| +| 53 | `dns` | +| 123 | `ntp` | +| 443 | `quic` | +| 3478 | `stun` | + ### reject ```json diff --git a/sing-box/go.mod b/sing-box/go.mod index e773f84d21..adaba41bda 100644 --- a/sing-box/go.mod +++ b/sing-box/go.mod @@ -25,7 +25,7 @@ require ( github.com/sagernet/gvisor v0.0.0-20241123041152-536d05261cff github.com/sagernet/quic-go v0.48.1-beta.1 github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 - github.com/sagernet/sing v0.6.0-alpha.18 + github.com/sagernet/sing v0.6.0-alpha.20 github.com/sagernet/sing-dns v0.4.0-alpha.3 github.com/sagernet/sing-mux v0.3.0-alpha.1 github.com/sagernet/sing-quic v0.4.0-alpha.4 diff --git a/sing-box/go.sum b/sing-box/go.sum index 680cdac464..b828c4fda1 100644 --- a/sing-box/go.sum +++ b/sing-box/go.sum @@ -110,8 +110,8 @@ github.com/sagernet/quic-go v0.48.1-beta.1/go.mod h1:1WgdDIVD1Gybp40JTWketeSfKA/ github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc= github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU= github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo= -github.com/sagernet/sing v0.6.0-alpha.18 h1:ih4CurU8KvbhfagYjSqVrE2LR0oBSXSZTNH2sAGPGiM= -github.com/sagernet/sing v0.6.0-alpha.18/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak= +github.com/sagernet/sing v0.6.0-alpha.20 h1:coxvnzeEGSLNNPntUW7l8WUEHPIwqKszZNbU019To9c= +github.com/sagernet/sing v0.6.0-alpha.20/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak= github.com/sagernet/sing-dns v0.4.0-alpha.3 h1:TcAQdz68Gs28VD9o9zDIW7IS8A9LZDruTPI9g9JbGHA= github.com/sagernet/sing-dns v0.4.0-alpha.3/go.mod h1:9LHcYKg2bGQpbtXrfNbopz8ok/zBK9ljiI2kmFG9JKg= github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg= diff --git a/sing-box/option/rule_action.go b/sing-box/option/rule_action.go index ce3b92d9e9..29c5a0c30e 100644 --- a/sing-box/option/rule_action.go +++ b/sing-box/option/rule_action.go @@ -148,8 +148,9 @@ type RawRouteOptionsActionOptions struct { NetworkStrategy NetworkStrategy `json:"network_strategy,omitempty"` FallbackDelay uint32 `json:"fallback_delay,omitempty"` - UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"` - UDPConnect bool `json:"udp_connect,omitempty"` + UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"` + UDPConnect bool `json:"udp_connect,omitempty"` + UDPTimeout badoption.Duration `json:"udp_timeout,omitempty"` } type RouteOptionsActionOptions RawRouteOptionsActionOptions diff --git a/sing-box/option/wireguard.go b/sing-box/option/wireguard.go index b9860d1199..43d3139c5e 100644 --- a/sing-box/option/wireguard.go +++ b/sing-box/option/wireguard.go @@ -14,7 +14,7 @@ type WireGuardEndpointOptions struct { PrivateKey string `json:"private_key"` ListenPort uint16 `json:"listen_port,omitempty"` Peers []WireGuardPeer `json:"peers,omitempty"` - UDPTimeout UDPTimeoutCompat `json:"udp_timeout,omitempty"` + UDPTimeout badoption.Duration `json:"udp_timeout,omitempty"` Workers int `json:"workers,omitempty"` DialerOptions } diff --git a/sing-box/protocol/group/selector.go b/sing-box/protocol/group/selector.go index 0bb3cd6644..9806e03354 100644 --- a/sing-box/protocol/group/selector.go +++ b/sing-box/protocol/group/selector.go @@ -10,6 +10,7 @@ import ( C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/option" + "github.com/sagernet/sing/common/atomic" E "github.com/sagernet/sing/common/exceptions" "github.com/sagernet/sing/common/logger" M "github.com/sagernet/sing/common/metadata" @@ -21,17 +22,22 @@ func RegisterSelector(registry *outbound.Registry) { outbound.Register[option.SelectorOutboundOptions](registry, C.TypeSelector, NewSelector) } -var _ adapter.OutboundGroup = (*Selector)(nil) +var ( + _ adapter.OutboundGroup = (*Selector)(nil) + _ adapter.ConnectionHandlerEx = (*Selector)(nil) + _ adapter.PacketConnectionHandlerEx = (*Selector)(nil) +) type Selector struct { outbound.Adapter ctx context.Context - outboundManager adapter.OutboundManager + outbound adapter.OutboundManager + connection adapter.ConnectionManager logger logger.ContextLogger tags []string defaultTag string outbounds map[string]adapter.Outbound - selected adapter.Outbound + selected atomic.TypedValue[adapter.Outbound] interruptGroup *interrupt.Group interruptExternalConnections bool } @@ -40,7 +46,8 @@ func NewSelector(ctx context.Context, router adapter.Router, logger log.ContextL outbound := &Selector{ Adapter: outbound.NewAdapter(C.TypeSelector, tag, nil, options.Outbounds), ctx: ctx, - outboundManager: service.FromContext[adapter.OutboundManager](ctx), + outbound: service.FromContext[adapter.OutboundManager](ctx), + connection: service.FromContext[adapter.ConnectionManager](ctx), logger: logger, tags: options.Outbounds, defaultTag: options.Default, @@ -55,15 +62,16 @@ func NewSelector(ctx context.Context, router adapter.Router, logger log.ContextL } func (s *Selector) Network() []string { - if s.selected == nil { + selected := s.selected.Load() + if selected == nil { return []string{N.NetworkTCP, N.NetworkUDP} } - return s.selected.Network() + return selected.Network() } func (s *Selector) Start() error { for i, tag := range s.tags { - detour, loaded := s.outboundManager.Outbound(tag) + detour, loaded := s.outbound.Outbound(tag) if !loaded { return E.New("outbound ", i, " not found: ", tag) } @@ -77,7 +85,7 @@ func (s *Selector) Start() error { if selected != "" { detour, loaded := s.outbounds[selected] if loaded { - s.selected = detour + s.selected.Store(detour) return nil } } @@ -89,16 +97,16 @@ func (s *Selector) Start() error { if !loaded { return E.New("default outbound not found: ", s.defaultTag) } - s.selected = detour + s.selected.Store(detour) return nil } - s.selected = s.outbounds[s.tags[0]] + s.selected.Store(s.outbounds[s.tags[0]]) return nil } func (s *Selector) Now() string { - selected := s.selected + selected := s.selected.Load() if selected == nil { return s.tags[0] } @@ -114,10 +122,9 @@ func (s *Selector) SelectOutbound(tag string) bool { if !loaded { return false } - if s.selected == detour { + if s.selected.Swap(detour) == detour { return true } - s.selected = detour if s.Tag() != "" { cacheFile := service.FromContext[adapter.CacheFile](s.ctx) if cacheFile != nil { @@ -132,7 +139,7 @@ func (s *Selector) SelectOutbound(tag string) bool { } func (s *Selector) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) { - conn, err := s.selected.DialContext(ctx, network, destination) + conn, err := s.selected.Load().DialContext(ctx, network, destination) if err != nil { return nil, err } @@ -140,32 +147,30 @@ func (s *Selector) DialContext(ctx context.Context, network string, destination } func (s *Selector) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) { - conn, err := s.selected.ListenPacket(ctx, destination) + conn, err := s.selected.Load().ListenPacket(ctx, destination) if err != nil { return nil, err } return s.interruptGroup.NewPacketConn(conn, interrupt.IsExternalConnectionFromContext(ctx)), nil } -// TODO -// Deprecated -func (s *Selector) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error { +func (s *Selector) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) { ctx = interrupt.ContextWithIsExternalConnection(ctx) - if legacyHandler, ok := s.selected.(adapter.ConnectionHandler); ok { - return legacyHandler.NewConnection(ctx, conn, metadata) + selected := s.selected.Load() + if outboundHandler, isHandler := selected.(adapter.ConnectionHandlerEx); isHandler { + outboundHandler.NewConnectionEx(ctx, conn, metadata, onClose) } else { - return outbound.NewConnection(ctx, s.selected, conn, metadata) + s.connection.NewConnection(ctx, selected, conn, metadata, onClose) } } -// TODO -// Deprecated -func (s *Selector) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error { +func (s *Selector) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) { ctx = interrupt.ContextWithIsExternalConnection(ctx) - if legacyHandler, ok := s.selected.(adapter.PacketConnectionHandler); ok { - return legacyHandler.NewPacketConnection(ctx, conn, metadata) + selected := s.selected.Load() + if outboundHandler, isHandler := selected.(adapter.PacketConnectionHandlerEx); isHandler { + outboundHandler.NewPacketConnectionEx(ctx, conn, metadata, onClose) } else { - return outbound.NewPacketConnection(ctx, s.selected, conn, metadata) + s.connection.NewPacketConnection(ctx, selected, conn, metadata, onClose) } } diff --git a/sing-box/protocol/group/urltest.go b/sing-box/protocol/group/urltest.go index fcada7dc3b..564c2373ea 100644 --- a/sing-box/protocol/group/urltest.go +++ b/sing-box/protocol/group/urltest.go @@ -36,7 +36,8 @@ type URLTest struct { outbound.Adapter ctx context.Context router adapter.Router - outboundManager adapter.OutboundManager + outbound adapter.OutboundManager + connection adapter.ConnectionManager logger log.ContextLogger tags []string link string @@ -52,7 +53,8 @@ func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLo Adapter: outbound.NewAdapter(C.TypeURLTest, tag, []string{N.NetworkTCP, N.NetworkUDP}, options.Outbounds), ctx: ctx, router: router, - outboundManager: service.FromContext[adapter.OutboundManager](ctx), + outbound: service.FromContext[adapter.OutboundManager](ctx), + connection: service.FromContext[adapter.ConnectionManager](ctx), logger: logger, tags: options.Outbounds, link: options.URL, @@ -70,13 +72,13 @@ func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLo func (s *URLTest) Start() error { outbounds := make([]adapter.Outbound, 0, len(s.tags)) for i, tag := range s.tags { - detour, loaded := s.outboundManager.Outbound(tag) + detour, loaded := s.outbound.Outbound(tag) if !loaded { return E.New("outbound ", i, " not found: ", tag) } outbounds = append(outbounds, detour) } - group, err := NewURLTestGroup(s.ctx, s.outboundManager, s.logger, outbounds, s.link, s.interval, s.tolerance, s.idleTimeout, s.interruptExternalConnections) + group, err := NewURLTestGroup(s.ctx, s.outbound, s.logger, outbounds, s.link, s.interval, s.tolerance, s.idleTimeout, s.interruptExternalConnections) if err != nil { return err } @@ -160,18 +162,14 @@ func (s *URLTest) ListenPacket(ctx context.Context, destination M.Socksaddr) (ne return nil, err } -// TODO -// Deprecated -func (s *URLTest) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error { +func (s *URLTest) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) { ctx = interrupt.ContextWithIsExternalConnection(ctx) - return outbound.NewConnection(ctx, s, conn, metadata) + s.connection.NewConnection(ctx, s, conn, metadata, onClose) } -// TODO -// Deprecated -func (s *URLTest) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error { +func (s *URLTest) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) { ctx = interrupt.ContextWithIsExternalConnection(ctx) - return outbound.NewPacketConnection(ctx, s, conn, metadata) + s.connection.NewPacketConnection(ctx, s, conn, metadata, onClose) } func (s *URLTest) InterfaceUpdated() { diff --git a/sing-box/route/conn.go b/sing-box/route/conn.go index dad896d331..a3d4d96530 100644 --- a/sing-box/route/conn.go +++ b/sing-box/route/conn.go @@ -6,11 +6,14 @@ import ( "net" "net/netip" "sync/atomic" + "time" "github.com/sagernet/sing-box/adapter" "github.com/sagernet/sing-box/common/dialer" + C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing/common" "github.com/sagernet/sing/common/bufio" + "github.com/sagernet/sing/common/canceler" E "github.com/sagernet/sing/common/exceptions" "github.com/sagernet/sing/common/logger" M "github.com/sagernet/sing/common/metadata" @@ -79,39 +82,34 @@ func (m *ConnectionManager) connectionCopy(ctx context.Context, source io.Reader if cachedSrc, isCached := source.(N.CachedReader); isCached { cachedBuffer := cachedSrc.ReadCached() if cachedBuffer != nil { - if !cachedBuffer.IsEmpty() { - dataLen := cachedBuffer.Len() - for _, counter := range readCounters { - counter(int64(dataLen)) - } - _, err := destination.Write(cachedBuffer.Bytes()) - if err != nil { - m.logger.ErrorContext(ctx, "connection upload payload: ", err) - cachedBuffer.Release() - if done.Swap(true) { - if onClose != nil { - onClose(err) - } - common.Close(source, destination) - } - return - } - for _, counter := range writeCounters { - counter(int64(dataLen)) - } - } + dataLen := cachedBuffer.Len() + _, err := destination.Write(cachedBuffer.Bytes()) cachedBuffer.Release() - continue + if err != nil { + m.logger.ErrorContext(ctx, "connection upload payload: ", err) + if done.Swap(true) { + if onClose != nil { + onClose(err) + } + } + common.Close(source, destination) + return + } + for _, counter := range readCounters { + counter(int64(dataLen)) + } + for _, counter := range writeCounters { + counter(int64(dataLen)) + } } + continue } break } - var ( - dstDuplex bool - err error - ) - _, err = bufio.CopyWithCounters(destination, source, originSource, readCounters, writeCounters) - if _, dstDuplex = common.Cast[N.WriteCloser](destination); dstDuplex && err == nil { + _, err := bufio.CopyWithCounters(destination, source, originSource, readCounters, writeCounters) + if err != nil { + common.Close(destination, source) + } else if _, dstDuplex := destination.(N.WriteCloser); dstDuplex { N.CloseWrite(destination) } else { common.Close(destination) @@ -206,6 +204,21 @@ func (m *ConnectionManager) NewPacketConnection(ctx context.Context, this N.Dial natConn.UpdateDestination(destinationAddress) } } + var udpTimeout time.Duration + if metadata.UDPTimeout > 0 { + udpTimeout = metadata.UDPTimeout + } else { + protocol := metadata.Protocol + if protocol == "" { + protocol = C.PortProtocols[metadata.Destination.Port] + } + if protocol != "" { + udpTimeout = C.ProtocolTimeouts[protocol] + } + } + if udpTimeout > 0 { + ctx, conn = canceler.NewPacketConn(ctx, conn, udpTimeout) + } destination := bufio.NewPacketConn(remotePacketConn) if ctx.Done() != nil { onClose = N.AppendClose(onClose, m.monitor.Add(ctx, conn)) @@ -273,11 +286,11 @@ func (m *ConnectionManager) packetConnectionCopy(ctx context.Context, source N.P } } if !done.Swap(true) { - common.Close(source, destination) if onClose != nil { onClose(err) } } + common.Close(source, destination) } /*type udpHijacker struct { diff --git a/sing-box/route/route.go b/sing-box/route/route.go index 67eb2c691b..3424327480 100644 --- a/sing-box/route/route.go +++ b/sing-box/route/route.go @@ -132,23 +132,11 @@ func (r *Router) routeConnection(ctx context.Context, conn net.Conn, metadata ad if r.tracker != nil { conn = r.tracker.RoutedConnection(ctx, conn, metadata, selectedRule, selectedOutbound) } - legacyOutbound, isLegacy := selectedOutbound.(adapter.ConnectionHandler) - if isLegacy { - err = legacyOutbound.NewConnection(ctx, conn, metadata) - if err != nil { - conn.Close() - if onClose != nil { - onClose(err) - } - return E.Cause(err, F.ToString("outbound/", selectedOutbound.Type(), "[", selectedOutbound.Tag(), "]")) - } else { - if onClose != nil { - onClose(nil) - } - } - return nil + if outboundHandler, isHandler := selectedOutbound.(adapter.ConnectionHandlerEx); isHandler { + outboundHandler.NewConnectionEx(ctx, conn, metadata, onClose) + } else { + r.connection.NewConnection(ctx, selectedOutbound, conn, metadata, onClose) } - r.connection.NewConnection(ctx, selectedOutbound, conn, metadata, onClose) return nil } @@ -440,6 +428,9 @@ match: if routeOptions.UDPConnect { metadata.UDPConnect = true } + if routeOptions.UDPTimeout > 0 { + metadata.UDPTimeout = routeOptions.UDPTimeout + } } switch action := currentRule.Action().(type) { case *rule.RuleActionSniff: diff --git a/sing-box/route/rule/rule_action.go b/sing-box/route/rule/rule_action.go index 1b4099c903..34354cc0d3 100644 --- a/sing-box/route/rule/rule_action.go +++ b/sing-box/route/rule/rule_action.go @@ -47,6 +47,7 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti FallbackDelay: time.Duration(action.RouteOptionsOptions.FallbackDelay), UDPDisableDomainUnmapping: action.RouteOptionsOptions.UDPDisableDomainUnmapping, UDPConnect: action.RouteOptionsOptions.UDPConnect, + UDPTimeout: time.Duration(action.RouteOptionsOptions.UDPTimeout), }, nil case C.RuleActionTypeDirect: directDialer, err := dialer.New(ctx, option.DialerOptions(action.DirectOptions)) @@ -152,6 +153,7 @@ type RuleActionRouteOptions struct { FallbackDelay time.Duration UDPDisableDomainUnmapping bool UDPConnect bool + UDPTimeout time.Duration } func (r *RuleActionRouteOptions) Type() string { diff --git a/sing-box/transport/wireguard/device_system.go b/sing-box/transport/wireguard/device_system.go index 4237a8a6bb..fa54f33293 100644 --- a/sing-box/transport/wireguard/device_system.go +++ b/sing-box/transport/wireguard/device_system.go @@ -71,6 +71,7 @@ func (w *systemDevice) Start() error { Inet6RouteAddress: common.Filter(w.options.AllowedAddress, func(it netip.Prefix) bool { return it.Addr().Is6() }), InterfaceMonitor: networkManager.InterfaceMonitor(), InterfaceFinder: networkManager.InterfaceFinder(), + Logger: w.options.Logger, } // works with Linux, macOS with IFSCOPE routes, not tested on Windows if runtime.GOOS == "darwin" { diff --git a/small/gn/Makefile b/small/gn/Makefile index c4fcd0605c..4edf3097f0 100644 --- a/small/gn/Makefile +++ b/small/gn/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git -PKG_SOURCE_DATE:=2024-10-14 -PKG_SOURCE_VERSION:=feafd1012a32c05ec6095f69ddc3850afb621f3a -PKG_MIRROR_HASH:=c5e7d8357105b8b6708772490d6c2a7670c9298472efc203e8e409f229de8fb7 +PKGOURCE_DATE:=2024-11-22 +PKG_SOURCE_VERSION:=468c6128db7fabe32a29d4753460ef53594406fc +PKG_MIRROR_HASH:=22b5814a82742e8a39835c26390550a22ecbac5f2d853216057ab3fb4e377fd9 PKG_LICENSE:=BSD 3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/small/gn/src/out/last_commit_position.h b/small/gn/src/out/last_commit_position.h index 76c370f71b..4af53984b7 100644 --- a/small/gn/src/out/last_commit_position.h +++ b/small/gn/src/out/last_commit_position.h @@ -3,7 +3,7 @@ #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ -#define LAST_COMMIT_POSITION_NUM 2202 -#define LAST_COMMIT_POSITION "2202 (feafd1012a32)" +#define LAST_COMMIT_POSITION_NUM 2205 +#define LAST_COMMIT_POSITION "2205 (468c6128db7f)" #endif // OUT_LAST_COMMIT_POSITION_H_ diff --git a/small/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js b/small/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js index 757d7a94bb..58b8493263 100644 --- a/small/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js +++ b/small/luci-app-mihomo/htdocs/luci-static/resources/view/mihomo/config.js @@ -378,10 +378,10 @@ return view.extend({ o = s.taboption('external_control', form.Value, 'ui_url', '*' + ' ' + _('UI Url')); o.rmempty = false; - o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip', 'MetaCubeXD'); - o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip', 'YACD'); - o.value('https://mirror.ghproxy.com/https://github.com/MetaCubeX/Razord-meta/archive/refs/heads/gh-pages.zip', 'Razord'); - o.value('https://mirror.ghproxy.com/https://github.com/Zephyruso/sing-box-dashboard/archive/refs/heads/gh-pages.zip', 'SD'); + o.value('https://ghp.ci/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip', 'MetaCubeXD'); + o.value('https://ghp.ci/https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip', 'YACD'); + o.value('https://ghp.ci/https://github.com/MetaCubeX/Razord-meta/archive/refs/heads/gh-pages.zip', 'Razord'); + o.value('https://ghp.ci/https://github.com/Zephyruso/zashboard/archive/refs/heads/gh-pages.zip', 'Zashboard'); o = s.taboption('external_control', form.Value, 'api_port', '*' + ' ' + _('API Port')); o.datatype = 'port'; diff --git a/small/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/small/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index 7bf8776265..7c5aa59252 100644 --- a/small/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/small/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -98,9 +98,50 @@ if not fs.access(CACHE_PATH) then fs.mkdir(CACHE_PATH) end +local LOCAL_EXTEND_ARG = "" if LOCAL_GROUP == "nil" then LOCAL_GROUP = nil - log(" * 注意:国内分组名未设置,可能会导致 DNS 解析异常!") + log(" * 注意:国内分组名未设置,可能会导致 DNS 分流错误!") +else + --从smartdns配置中读取参数 + local custom_conf_path = "/etc/smartdns/custom.conf" + local options = { + {key = "dualstack_ip_selection", config_key = "dualstack-ip-selection", yes_no = true, arg_yes = "-d yes", arg_no = "-d no", default = "yes"}, + {key = "speed_check_mode", config_key = "speed-check-mode", prefix = "-c ", default = "ping,tcp:80,tcp:443"}, + {key = "serve_expired", config_key = "serve-expired", yes_no = true, arg_yes = "", arg_no = "-no-serve-expired", default = "yes"}, + {key = "response_mode", config_key = "response-mode", prefix = "-r ", default = "first-ping"}, + {key = "rr_ttl", config_key = "rr-ttl", prefix = "-rr-ttl "}, + {key = "rr_ttl_min", config_key = "rr-ttl-min", prefix = "-rr-ttl-min "}, + {key = "rr_ttl_max", config_key = "rr-ttl-max", prefix = "-rr-ttl-max "} + } + -- 从 custom.conf 中读取值,以最后出现的值为准 + local custom_config = {} + local f_in = io.open(custom_conf_path, "r") + if f_in then + for line in f_in:lines() do + line = line:match("^%s*(.-)%s*$") + if line ~= "" and not line:match("^#") then + local param, value = line:match("^(%S+)%s+(%S+)$") + if param and value then custom_config[param] = value end + end + end + f_in:close() + end + -- 从 smartdns 配置中读取值,优先级以 custom.conf 为准 + for _, opt in ipairs(options) do + local val = custom_config[opt.config_key] or uci:get("smartdns", "@smartdns[0]", opt.key) or opt.default + if val == "yes" then val = "1" elseif val == "no" then val = "0" end + if opt.yes_no then + local arg = (val == "1" and opt.arg_yes or opt.arg_no) + if arg and arg ~= "" then + LOCAL_EXTEND_ARG = LOCAL_EXTEND_ARG .. (LOCAL_EXTEND_ARG ~= "" and " " or "") .. arg + end + else + if val and (not opt.value or (opt.invert and val ~= opt.value) or (not opt.invert and val == opt.value)) then + LOCAL_EXTEND_ARG = LOCAL_EXTEND_ARG .. (LOCAL_EXTEND_ARG ~= "" and " " or "") .. (opt.prefix or "") .. (opt.arg or val) + end + end + end end if not REMOTE_GROUP or REMOTE_GROUP == "nil" then @@ -167,6 +208,8 @@ if DEFAULT_DNS_GROUP then if NO_PROXY_IPV6 == "1" and only_global == 1 and uci:get(appname, TCP_NODE, "protocol") ~= "_shunt" then domain_rules_str = domain_rules_str .. " -address #6" end + elseif DEFAULT_DNS_GROUP == LOCAL_GROUP then + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") end table.insert(config_lines, domain_rules_str) end @@ -226,6 +269,7 @@ if is_file_nonzero(file_vpslist) then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_vpslist,#6:" .. setflag .. "passwall_vpslist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--8") log(string.format(" - 节点列表中的域名(vpslist)使用分组:%s", LOCAL_GROUP or "默认")) @@ -256,6 +300,7 @@ if USE_DIRECT_LIST == "1" and is_file_nonzero(file_direct_host) then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_whitelist,#6:" .. setflag .. "passwall_whitelist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--6") log(string.format(" - 域名白名单(whitelist)使用分组:%s", LOCAL_GROUP or "默认")) @@ -328,6 +373,7 @@ if CHN_LIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then if CHN_LIST == "direct" then local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_chnroute,#6:" .. setflag .. "passwall_chnroute6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--2") log(string.format(" - 中国域名表(chnroute)使用分组:%s", LOCAL_GROUP or "默认")) @@ -419,6 +465,7 @@ if uci:get(appname, TCP_NODE, "protocol") == "_shunt" then } local domain_rules_str = string.format('domain-rules /domain-set:%s/ %s', domain_set_name, LOCAL_GROUP and "-nameserver " .. LOCAL_GROUP or "") domain_rules_str = domain_rules_str .. " " .. set_type .. " #4:" .. setflag .. "passwall_whitelist,#6:" .. setflag .. "passwall_whitelist6" + domain_rules_str = domain_rules_str .. (LOCAL_EXTEND_ARG ~= "" and " " .. LOCAL_EXTEND_ARG or "") table.insert(tmp_lines, domain_rules_str) insert_array_after(config_lines, tmp_lines, "#--3") end diff --git a/small/mihomo/files/mihomo.conf b/small/mihomo/files/mihomo.conf index 318c38d150..4949dbc9c0 100644 --- a/small/mihomo/files/mihomo.conf +++ b/small/mihomo/files/mihomo.conf @@ -57,7 +57,7 @@ config mixin 'mixin' option 'tcp_keep_alive_idle' '600' option 'tcp_keep_alive_interval' '15' option 'ui_name' 'metacubexd' - option 'ui_url' 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip' + option 'ui_url' 'https://ghp.ci/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip' option 'api_port' '9090' option 'api_secret' '' option 'selection_cache' '1' @@ -90,10 +90,10 @@ config mixin 'mixin' option 'dns_nameserver_policy' '0' option 'geoip_format' 'dat' option 'geodata_loader' 'memconservative' - option 'geosite_url' 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat' - option 'geoip_mmdb_url' 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.metadb' - option 'geoip_dat_url' 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat' - option 'geoip_asn_url' 'https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb' + option 'geosite_url' 'https://ghp.ci/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat' + option 'geoip_mmdb_url' 'https://ghp.ci/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.metadb' + option 'geoip_dat_url' 'https://ghp.ci/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat' + option 'geoip_asn_url' 'https://ghp.ci/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb' option 'geox_auto_update' '0' option 'geox_update_interval' '24' option 'mixin_file_content' '0' diff --git a/small/mihomo/files/mihomo.init b/small/mihomo/files/mihomo.init index 260ec54488..2e620fda64 100644 --- a/small/mihomo/files/mihomo.init +++ b/small/mihomo/files/mihomo.init @@ -623,11 +623,23 @@ update_subscription() { if [ -z "$subscription_section" ]; then return fi + # load config config_load mihomo + # get subscription config local subscription_name subscription_url subscription_user_agent config_get subscription_name "$subscription_section" "name" config_get subscription_url "$subscription_section" "url" config_get subscription_user_agent "$subscription_section" "user_agent" + # reset subscription info + uci_remove "mihomo" "$subscription_section" "expire" + uci_remove "mihomo" "$subscription_section" "upload" + uci_remove "mihomo" "$subscription_section" "download" + uci_remove "mihomo" "$subscription_section" "total" + uci_remove "mihomo" "$subscription_section" "used" + uci_remove "mihomo" "$subscription_section" "avaliable" + uci_remove "mihomo" "$subscription_section" "update" + uci_remove "mihomo" "$subscription_section" "success" + # update subscription log "Update Subscription: $subscription_name." local subscription_header_tmpfile; subscription_header_tmpfile="/tmp/$subscription_section.header" local subscription_tmpfile; subscription_tmpfile="/tmp/$subscription_section.yaml" @@ -645,6 +657,7 @@ update_subscription() { subscription_avaliable=$((subscription_total - subscription_upload - subscription_download)) fi fi + # update subscription info if [ -n "$subscription_expire" ]; then uci_set "mihomo" "$subscription_section" "expire" "$(date "+%Y-%m-%d %H:%M:%S" -d @$subscription_expire)" fi @@ -664,12 +677,17 @@ update_subscription() { uci_set "mihomo" "$subscription_section" "avaliable" "$(format_filesize $subscription_avaliable)" fi uci_set "mihomo" "$subscription_section" "update" "$(date "+%Y-%m-%d %H:%M:%S")" - uci_commit "mihomo" + uci_set "mihomo" "$subscription_section" "success" "1" + # update subscription file rm -f "$subscription_header_tmpfile" mv -f "$subscription_tmpfile" "$subscription_file" else log "Subscription update failed." + # update subscription info + uci_set "mihomo" "$subscription_section" "success" "0" + # remove tmpfile rm -f "$subscription_header_tmpfile" rm -f "$subscription_tmpfile" fi + uci_commit "mihomo" } diff --git a/v2raya/.github/workflows/beta_release_main.yml b/v2raya/.github/workflows/beta_release_main.yml index 11da4f44d0..c045bad0c6 100644 --- a/v2raya/.github/workflows/beta_release_main.yml +++ b/v2raya/.github/workflows/beta_release_main.yml @@ -15,11 +15,12 @@ jobs: with: fetch-depth: 0 - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'yarn' - cache-dependency-path: gui/yarn.lock + shell: bash + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew install node@20 + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> $GITHUB_ENV + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> ~/.bash_profile - name: Install Dependencies run: | sudo apt-get update -y && sudo apt-get install -y gzip diff --git a/v2raya/.github/workflows/pull_request.yml b/v2raya/.github/workflows/pull_request.yml index 15f174f2fb..dbdd58ab15 100644 --- a/v2raya/.github/workflows/pull_request.yml +++ b/v2raya/.github/workflows/pull_request.yml @@ -15,11 +15,12 @@ jobs: with: fetch-depth: 0 - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'yarn' - cache-dependency-path: gui/yarn.lock + shell: bash + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew install node@20 + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> $GITHUB_ENV + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> ~/.bash_profile - name: Install Dependencies run: | sudo apt-get update -y && sudo apt-get install -y gzip diff --git a/v2raya/.github/workflows/release_main.yml b/v2raya/.github/workflows/release_main.yml index 09cb05fbe8..60a994b6ff 100644 --- a/v2raya/.github/workflows/release_main.yml +++ b/v2raya/.github/workflows/release_main.yml @@ -1,12 +1,10 @@ name: Build & Release v2rayA - on: workflow_dispatch: inputs: tag: type: string required: true - jobs: Build_v2rayA_Web: runs-on: ubuntu-22.04 @@ -15,11 +13,12 @@ jobs: with: fetch-depth: 0 - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'yarn' - cache-dependency-path: gui/yarn.lock + shell: bash + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew install node@20 + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> $GITHUB_ENV + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> ~/.bash_profile - name: Install Dependencies run: | sudo apt-get update -y && sudo apt-get install -y gzip @@ -123,13 +122,11 @@ jobs: go build -tags "with_gvisor" -o ../v2raya_binaries/v2raya_${filename}_${env:VERSION} -ldflags="-X github.com/v2rayA/v2rayA/conf.Version=${env:VERSION} -s -w" -trimpath Set-Location -Path .. } - - name: Upload Artifact uses: nanoufo/action-upload-artifacts-and-release-assets@v2 with: path: | v2raya_binaries/* - Build_Windows_Installers: runs-on: windows-latest needs: [Build_v2rayA_Binaries] @@ -399,7 +396,6 @@ jobs: --data '{"purge_everything":true}' Build_v2ray_Debian_Packages: runs-on: ubuntu-22.04 - steps: - name: Install Tools run: | @@ -543,7 +539,6 @@ jobs: run: | echo "V2RAY_VERSION=$V2RAY_VERSION" >> ./v2ray_packages_version.txt echo "XRAY_VERSION=$XRAY_VERSION" >> ./xray_packages_version.txt - - name: Upload Artifact uses: nanoufo/action-upload-artifacts-and-release-assets@v2 with: @@ -555,7 +550,6 @@ jobs: Build_APT_Repository_and_AUR: runs-on: ubuntu-22.04 needs: [Build_v2rayA_Binaries, Build_Linux_Packages, Build_v2ray_Debian_Packages] - steps: - uses: actions/checkout@v4 with: @@ -638,7 +632,6 @@ jobs: Release_to_Homebrew: runs-on: ubuntu-22.04 needs: [Build_v2rayA_Binaries] - steps: - uses: actions/checkout@v4 with: @@ -693,7 +686,6 @@ jobs: Release_v2rayA_to_Docker: runs-on: ubuntu-22.04 needs: [GitHub_Release] - steps: - uses: actions/checkout@v4 with: @@ -733,7 +725,7 @@ jobs: context: . builder: ${{ steps.buildx.outputs.name }} file: install/docker/Dockerfile.Action - platforms: linux/arm,linux/arm64,linux/amd64 + platforms: linux/arm,linux/arm64,linux/amd64,linux/riscv64 push: true tags: | ${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.tag }} @@ -745,7 +737,6 @@ jobs: Release_v2rayA_GUI_to_Docker: runs-on: ubuntu-22.04 needs: [Build_v2rayA_Web] - steps: - uses: actions/checkout@v4 with: @@ -788,7 +779,7 @@ jobs: context: . builder: ${{ steps.buildx.outputs.name }} file: install/docker/Dockerfile.GUI.Action - platforms: linux/arm,linux/arm64,linux/amd64 + platforms: linux/arm,linux/arm64,linux/amd64,linux/riscv64 push: true tags: | mzz2017/v2raya-gui:latest @@ -798,7 +789,6 @@ jobs: Submit_to_Microsoft_winget: runs-on: windows-latest needs: [GitHub_Release] - steps: - uses: actions/checkout@v4 with: diff --git a/v2raya/.github/workflows/test_build_main.yml b/v2raya/.github/workflows/test_build_main.yml index 8119e37309..d40b7b0f62 100644 --- a/v2raya/.github/workflows/test_build_main.yml +++ b/v2raya/.github/workflows/test_build_main.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - dependabot/* paths: - "**/*.go" - "go.mod" @@ -19,11 +20,12 @@ jobs: with: fetch-depth: 0 - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'yarn' - cache-dependency-path: gui/yarn.lock + shell: bash + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew install node@20 + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> $GITHUB_ENV + echo "PATH=\"$(brew --prefix)/opt/node@20/bin:$PATH\"" >> ~/.bash_profile - name: Install Dependencies run: | sudo apt-get update -y && sudo apt-get install -y gzip diff --git a/v2raya/install/docker/Dockerfile.GUI.Action b/v2raya/install/docker/Dockerfile.GUI.Action index e2729ecf62..928a155285 100644 --- a/v2raya/install/docker/Dockerfile.GUI.Action +++ b/v2raya/install/docker/Dockerfile.GUI.Action @@ -1,4 +1,5 @@ -FROM nginx:stable-alpine -WORKDIR /build -COPY ./web /usr/share/nginx/html +FROM busybox:latest AS builder +WORKDIR / +COPY ./web /usr/share/v2raya-web +ENTRYPOINT ["/bin/httpd", "-f", "-h", "/usr/share/v2raya-web", "-p", "80"] EXPOSE 80 \ No newline at end of file diff --git a/v2raya/install/docker/docker_helper.sh b/v2raya/install/docker/docker_helper.sh index ff51dcfef8..9ce4c60edf 100644 --- a/v2raya/install/docker/docker_helper.sh +++ b/v2raya/install/docker/docker_helper.sh @@ -14,6 +14,10 @@ case "$(arch)" in v2ray_arch="arm64-v8a" v2raya_arch="arm64" ;; + riscv64) + v2ray_arch="riscv64" + v2raya_arch="riscv64" + ;; *) ;; esac diff --git a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj index d1ee0aa29b..f62be6a54a 100644 --- a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj +++ b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 7.2.0 + 7.2.1 diff --git a/v2rayng/V2rayNG/app/build.gradle.kts b/v2rayng/V2rayNG/app/build.gradle.kts index 971de3b66c..f276325e3a 100644 --- a/v2rayng/V2rayNG/app/build.gradle.kts +++ b/v2rayng/V2rayNG/app/build.gradle.kts @@ -12,8 +12,8 @@ android { applicationId = "com.v2ray.ang" minSdk = 21 targetSdk = 35 - versionCode = 615 - versionName = "1.9.19" + versionCode = 616 + versionName = "1.9.20" multiDexEnabled = true splits { diff --git a/yt-dlp/Changelog.md b/yt-dlp/Changelog.md index 41a2da744d..4dc0323683 100644 --- a/yt-dlp/Changelog.md +++ b/yt-dlp/Changelog.md @@ -8,7 +8,7 @@ #### Important changes - **Login with OAuth is no longer supported for YouTube** -Due to a change made by the site, yt-dlp is longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090) +Due to a change made by the site, yt-dlp is no longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090) #### Core changes - [Catch broken Cryptodome installations](https://github.com/yt-dlp/yt-dlp/commit/b83ca24eb72e1e558b0185bd73975586c0bc0546) ([#11486](https://github.com/yt-dlp/yt-dlp/issues/11486)) by [seproDev](https://github.com/seproDev) diff --git a/yt-dlp/README.md b/yt-dlp/README.md index dd3a3189ba..0a62d8e74c 100644 --- a/yt-dlp/README.md +++ b/yt-dlp/README.md @@ -1294,6 +1294,7 @@ The available fields are: - `playlist_uploader_id` (string): Nickname or id of the playlist uploader - `playlist_channel` (string): Display name of the channel that uploaded the playlist - `playlist_channel_id` (string): Identifier of the channel that uploaded the playlist + - `playlist_webpage_url` (string): URL of the playlist webpage - `webpage_url` (string): A URL to the video webpage which, if given to yt-dlp, should yield the same result again - `webpage_url_basename` (string): The basename of the webpage URL - `webpage_url_domain` (string): The domain of the webpage URL diff --git a/yt-dlp/devscripts/changelog_override.json b/yt-dlp/devscripts/changelog_override.json index 906e5cf728..079e2f7296 100644 --- a/yt-dlp/devscripts/changelog_override.json +++ b/yt-dlp/devscripts/changelog_override.json @@ -238,6 +238,6 @@ { "action": "add", "when": "52c0ffe40ad6e8404d93296f575007b05b04c686", - "short": "[priority] **Login with OAuth is no longer supported for YouTube**\nDue to a change made by the site, yt-dlp is longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090)" + "short": "[priority] **Login with OAuth is no longer supported for YouTube**\nDue to a change made by the site, yt-dlp is no longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090)" } ] diff --git a/yt-dlp/pyproject.toml b/yt-dlp/pyproject.toml index 92d399e319..97ea4375fc 100644 --- a/yt-dlp/pyproject.toml +++ b/yt-dlp/pyproject.toml @@ -52,7 +52,7 @@ default = [ "pycryptodomex", "requests>=2.32.2,<3", "urllib3>=1.26.17,<3", - "websockets>=13.0,<14", + "websockets>=13.0", ] curl-cffi = [ "curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'", diff --git a/yt-dlp/test/test_socks.py b/yt-dlp/test/test_socks.py index 68af19d0ca..f601fc8a5e 100644 --- a/yt-dlp/test/test_socks.py +++ b/yt-dlp/test/test_socks.py @@ -216,7 +216,9 @@ class SocksWebSocketTestRequestHandler(SocksTestRequestHandler): protocol = websockets.ServerProtocol() connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0) connection.handshake() - connection.send(json.dumps(self.socks_info)) + for message in connection: + if message == 'socks_info': + connection.send(json.dumps(self.socks_info)) connection.close() diff --git a/yt-dlp/yt_dlp/YoutubeDL.py b/yt-dlp/yt_dlp/YoutubeDL.py index 749de5d4e3..a9a8e4133e 100644 --- a/yt-dlp/yt_dlp/YoutubeDL.py +++ b/yt-dlp/yt_dlp/YoutubeDL.py @@ -1947,6 +1947,7 @@ class YoutubeDL: 'playlist_uploader_id': ie_result.get('uploader_id'), 'playlist_channel': ie_result.get('channel'), 'playlist_channel_id': ie_result.get('channel_id'), + 'playlist_webpage_url': ie_result.get('webpage_url'), **kwargs, } if strict: diff --git a/yt-dlp/yt_dlp/extractor/dailymotion.py b/yt-dlp/yt_dlp/extractor/dailymotion.py index cb1453d3f5..423c11c573 100644 --- a/yt-dlp/yt_dlp/extractor/dailymotion.py +++ b/yt-dlp/yt_dlp/extractor/dailymotion.py @@ -261,6 +261,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor): 'tags': [], 'view_count': int, 'like_count': int, + 'thumbnail': r're:https://\w+.dmcdn.net/v/WnEY61cmvMxt2Fi6d/x1080', }, }, { # https://geo.dailymotion.com/player/xf7zn.html?playlist=x7wdsj @@ -288,6 +289,25 @@ class DailymotionIE(DailymotionBaseInfoExtractor): 'description': 'À bord du « véloto », l’alternative à la voiture pour la campagne', 'tags': ['biclou', 'vélo', 'véloto', 'campagne', 'voiture', 'environnement', 'véhicules intermédiaires'], }, + }, { + # https://geo.dailymotion.com/player/xry80.html?video=x8vu47w + 'url': 'https://www.metatube.com/en/videos/546765/This-frogs-decorates-Christmas-tree/', + 'info_dict': { + 'id': 'x8vu47w', + 'ext': 'mp4', + 'like_count': int, + 'uploader': 'Metatube', + 'thumbnail': r're:https://\w+.dmcdn.net/v/W1G_S1coGSFTfkTeR/x1080', + 'upload_date': '20240326', + 'view_count': int, + 'timestamp': 1711496732, + 'age_limit': 0, + 'uploader_id': 'x2xpy74', + 'title': 'Está lindas ranitas ponen su arbolito', + 'duration': 28, + 'description': 'Que lindura', + 'tags': [], + }, }] _GEO_BYPASS = False _COMMON_MEDIA_FIELDS = '''description @@ -302,7 +322,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor): yield from super()._extract_embed_urls(url, webpage) for mobj in re.finditer( r'(?s)DM\.player\([^,]+,\s*{.*?video[\'"]?\s*:\s*["\']?(?P[0-9a-zA-Z]+).+?}\s*\);', webpage): - yield from 'https://www.dailymotion.com/embed/video/' + mobj.group('id') + yield 'https://www.dailymotion.com/embed/video/' + mobj.group('id') for mobj in re.finditer( r'(?s)