diff --git a/.github/update.log b/.github/update.log index 01a6521729..4c08662984 100644 --- a/.github/update.log +++ b/.github/update.log @@ -612,3 +612,4 @@ Update On Sat Apr 6 20:26:05 CEST 2024 Update On Sun Apr 7 20:25:26 CEST 2024 Update On Mon Apr 8 20:30:51 CEST 2024 Update On Tue Apr 9 20:25:08 CEST 2024 +Update On Wed Apr 10 20:31:24 CEST 2024 diff --git a/clash-meta/component/dhcp/conn.go b/clash-meta/component/dhcp/conn.go index ff26275b18..61c801bd3e 100644 --- a/clash-meta/component/dhcp/conn.go +++ b/clash-meta/component/dhcp/conn.go @@ -3,6 +3,7 @@ package dhcp import ( "context" "net" + "net/netip" "runtime" "github.com/metacubex/mihomo/component/dialer" @@ -24,5 +25,5 @@ func ListenDHCPClient(ctx context.Context, ifaceName string) (net.PacketConn, er options = append(options, dialer.WithFallbackBind(true)) } - return dialer.ListenPacket(ctx, "udp4", listenAddr, options...) + return dialer.ListenPacket(ctx, "udp4", listenAddr, netip.AddrPortFrom(netip.AddrFrom4([4]byte{255, 255, 255, 255}), 67), options...) } diff --git a/clash-meta/component/dialer/bind.go b/clash-meta/component/dialer/bind.go index 9b6471a323..de6aacd3bd 100644 --- a/clash-meta/component/dialer/bind.go +++ b/clash-meta/component/dialer/bind.go @@ -75,7 +75,7 @@ func fallbackBindIfaceToDialer(ifaceName string, dialer *net.Dialer, network str return nil } -func fallbackBindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, address string) (string, error) { +func fallbackBindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, address string, rAddrPort netip.AddrPort) (string, error) { _, port, err := net.SplitHostPort(address) if err != nil { port = "0" diff --git a/clash-meta/component/dialer/bind_darwin.go b/clash-meta/component/dialer/bind_darwin.go index f83b86f825..fdea24bfdc 100644 --- a/clash-meta/component/dialer/bind_darwin.go +++ b/clash-meta/component/dialer/bind_darwin.go @@ -46,7 +46,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.A return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return "", err diff --git a/clash-meta/component/dialer/bind_linux.go b/clash-meta/component/dialer/bind_linux.go index 1ec98f3d2b..79cf735b73 100644 --- a/clash-meta/component/dialer/bind_linux.go +++ b/clash-meta/component/dialer/bind_linux.go @@ -35,7 +35,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.A return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { addControlToListenConfig(lc, bindControl(ifaceName)) return address, nil diff --git a/clash-meta/component/dialer/bind_others.go b/clash-meta/component/dialer/bind_others.go index 44181610f0..b7db962a6c 100644 --- a/clash-meta/component/dialer/bind_others.go +++ b/clash-meta/component/dialer/bind_others.go @@ -11,8 +11,8 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des return fallbackBindIfaceToDialer(ifaceName, dialer, network, destination) } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, network, address string) (string, error) { - return fallbackBindIfaceToListenConfig(ifaceName, lc, network, address) +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, network, address string, rAddrPort netip.AddrPort) (string, error) { + return fallbackBindIfaceToListenConfig(ifaceName, lc, network, address, rAddrPort) } func ParseNetwork(network string, addr netip.Addr) string { diff --git a/clash-meta/component/dialer/bind_windows.go b/clash-meta/component/dialer/bind_windows.go index 120f165713..98a076d049 100644 --- a/clash-meta/component/dialer/bind_windows.go +++ b/clash-meta/component/dialer/bind_windows.go @@ -36,7 +36,7 @@ func bind6(handle syscall.Handle, ifaceIdx int) error { return err } -func bindControl(ifaceIdx int) controlFn { +func bindControl(ifaceIdx int, rAddrPort netip.AddrPort) controlFn { return func(ctx context.Context, network, address string, c syscall.RawConn) (err error) { addrPort, err := netip.ParseAddrPort(address) if err == nil && !addrPort.Addr().IsGlobalUnicast() { @@ -55,7 +55,7 @@ func bindControl(ifaceIdx int) controlFn { innerErr = bind4err case "udp6": // golang will set network to udp6 when listenUDP on wildcard ip (eg: ":0", "") - if (!addrPort.Addr().IsValid() || addrPort.Addr().IsUnspecified()) && bind6err != nil { + if (!addrPort.Addr().IsValid() || addrPort.Addr().IsUnspecified()) && bind6err != nil && rAddrPort.Addr().Unmap().Is4() { // try bind ipv6, if failed, ignore. it's a workaround for windows disable interface ipv6 if bind4err != nil { innerErr = fmt.Errorf("%w (%s)", bind6err, bind4err) @@ -76,23 +76,23 @@ func bindControl(ifaceIdx int) controlFn { } } -func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.Addr) error { +func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, destination netip.Addr) error { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return err } - addControlToDialer(dialer, bindControl(ifaceObj.Index)) + addControlToDialer(dialer, bindControl(ifaceObj.Index, netip.AddrPortFrom(destination, 0))) return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return "", err } - addControlToListenConfig(lc, bindControl(ifaceObj.Index)) + addControlToListenConfig(lc, bindControl(ifaceObj.Index, rAddrPort)) return address, nil } diff --git a/clash-meta/component/dialer/dialer.go b/clash-meta/component/dialer/dialer.go index 12e7c960c5..8fb5a0a649 100644 --- a/clash-meta/component/dialer/dialer.go +++ b/clash-meta/component/dialer/dialer.go @@ -78,7 +78,7 @@ func DialContext(ctx context.Context, network, address string, options ...Option } } -func ListenPacket(ctx context.Context, network, address string, options ...Option) (net.PacketConn, error) { +func ListenPacket(ctx context.Context, network, address string, rAddrPort netip.AddrPort, options ...Option) (net.PacketConn, error) { if features.CMFA && DefaultSocketHook != nil { return listenPacketHooked(ctx, network, address) } @@ -91,7 +91,7 @@ func ListenPacket(ctx context.Context, network, address string, options ...Optio if cfg.fallbackBind { bind = fallbackBindIfaceToListenConfig } - addr, err := bind(cfg.interfaceName, lc, network, address) + addr, err := bind(cfg.interfaceName, lc, network, address, rAddrPort) if err != nil { return nil, err } @@ -133,11 +133,9 @@ func dialContext(ctx context.Context, network string, destination netip.Addr, po var address string if IP4PEnable { - NewDestination, NewPort := lookupIP4P(destination.String(), port) - address = net.JoinHostPort(NewDestination, NewPort) - } else { - address = net.JoinHostPort(destination.String(), port) + destination, port = lookupIP4P(destination, port) } + address = net.JoinHostPort(destination.String(), port) netDialer := opt.netDialer switch netDialer.(type) { @@ -385,7 +383,7 @@ func (d Dialer) ListenPacket(ctx context.Context, network, address string, rAddr // avoid "The requested address is not valid in its context." opt = WithInterface("") } - return ListenPacket(ctx, ParseNetwork(network, rAddrPort.Addr()), address, opt) + return ListenPacket(ctx, ParseNetwork(network, rAddrPort.Addr()), address, rAddrPort, opt) } func NewDialer(options ...Option) Dialer { @@ -399,13 +397,13 @@ func GetIP4PEnable(enableIP4PConvert bool) { // kanged from https://github.com/heiher/frp/blob/ip4p/client/ip4p.go -func lookupIP4P(addr string, port string) (string, string) { - ip := net.ParseIP(addr) +func lookupIP4P(addr netip.Addr, port string) (netip.Addr, string) { + ip := addr.AsSlice() if ip[0] == 0x20 && ip[1] == 0x01 && ip[2] == 0x00 && ip[3] == 0x00 { - addr = net.IPv4(ip[12], ip[13], ip[14], ip[15]).String() + addr = netip.AddrFrom4([4]byte{ip[12], ip[13], ip[14], ip[15]}) port = strconv.Itoa(int(ip[10])<<8 + int(ip[11])) - log.Debugln("Convert IP4P address %s to %s", ip, net.JoinHostPort(addr, port)) + log.Debugln("Convert IP4P address %s to %s", ip, net.JoinHostPort(addr.String(), port)) return addr, port } return addr, port diff --git a/clash-nyanpasu/.github/workflows/dev.yaml b/clash-nyanpasu/.github/workflows/dev.yaml index 6979648b2a..4c935a835c 100644 --- a/clash-nyanpasu/.github/workflows/dev.yaml +++ b/clash-nyanpasu/.github/workflows/dev.yaml @@ -200,33 +200,3 @@ jobs: run: pnpm updater:nightly env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - channel: - name: Send release to channel - runs-on: ubuntu-latest - needs: [release] - if: startsWith(github.repository, 'LibNyanpasu') - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set Env - run: | - echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV - shell: bash - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Pnpm install - run: pnpm i - - - name: Update Updater - run: pnpm send-release:nightly - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: "@ClashNyanpasu" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index 20a9887579..97bf27cafd 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -34,7 +34,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "once_cell", "version_check", ] @@ -46,7 +46,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.14", "once_cell", "version_check", "zerocopy", @@ -153,9 +153,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "arbitrary" @@ -177,7 +177,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -188,12 +188,14 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" dependencies = [ - "event-listener 2.5.3", + "event-listener 5.3.0", + "event-listener-strategy 0.5.1", "futures-core", + "pin-project-lite", ] [[package]] @@ -214,7 +216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", + "event-listener 5.3.0", "event-listener-strategy 0.5.1", "futures-core", "pin-project-lite", @@ -222,9 +224,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +checksum = "5f98c37cf288e302c16ef6c8472aad1e034c6c84ce5ea7b8101c98eb4a802fee" dependencies = [ "async-lock 3.3.0", "async-task", @@ -246,6 +248,17 @@ dependencies = [ "futures-lite 1.13.0", ] +[[package]] +name = "async-fs" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc19683171f287921f2405677dd2ed2549c3b3bda697a563ebc3a121ace2aba1" +dependencies = [ + "async-lock 3.3.0", + "blocking", + "futures-lite 2.3.0", +] + [[package]] name = "async-io" version = "1.13.0" @@ -333,6 +346,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "async-process" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d999d925640d51b662b7b4e404224dd81de70f4aa4a199383c2c5e5b86885fa3" +dependencies = [ + "async-channel 2.2.0", + "async-io 2.3.2", + "async-lock 3.3.0", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.3.0", + "futures-lite 2.3.0", + "rustix 0.38.32", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-recursion" version = "1.1.0" @@ -341,7 +374,7 @@ checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -376,7 +409,7 @@ checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -517,7 +550,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -617,15 +650,15 @@ dependencies = [ [[package]] name = "built" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d17f4d6e4dc36d1a02fbedc2753a096848e7c1b0772f7654eab8e2c927dd53" +checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16" [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -705,9 +738,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" dependencies = [ "jobserver", "libc", @@ -825,7 +858,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", ] [[package]] @@ -837,7 +870,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -947,7 +980,7 @@ dependencies = [ "block", "cocoa-foundation", "core-foundation", - "core-graphics 0.23.1", + "core-graphics 0.23.2", "foreign-types 0.5.0", "libc", "objc", @@ -981,9 +1014,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -996,7 +1029,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1051,9 +1084,9 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -1176,7 +1209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1186,7 +1219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1226,7 +1259,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1237,7 +1270,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1437,11 +1470,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bee74d0c22736b17e37c4706cc759cb0384f58df1f09dbc8491e48b90ad473ae" dependencies = [ "anyhow", - "core-graphics 0.23.1", + "core-graphics 0.23.2", "fxhash", "log", "smithay-client-toolkit", - "widestring 1.0.2", + "widestring 1.1.0", "windows 0.54.0", "xcb", ] @@ -1457,9 +1490,9 @@ dependencies = [ [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dtoa" @@ -1516,13 +1549,19 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enumflags2" version = "0.7.9" @@ -1541,7 +1580,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1590,9 +1629,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" dependencies = [ "concurrent-queue", "parking", @@ -1615,7 +1654,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.0", "pin-project-lite", ] @@ -1770,7 +1809,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1894,7 +1933,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -2058,9 +2097,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -2143,7 +2182,7 @@ checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2249,7 +2288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2266,9 +2305,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -2285,9 +2324,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -2493,7 +2532,7 @@ dependencies = [ "httpdate", "itoa 1.0.11", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -2538,7 +2577,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.51.1", + "windows-core 0.52.0", ] [[package]] @@ -2725,7 +2764,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3041,7 +3080,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] @@ -3443,6 +3482,7 @@ dependencies = [ "cfg-if", "cfg_aliases", "libc", + "memoffset 0.9.1", ] [[package]] @@ -3488,9 +3528,9 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.10.0" +version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" +checksum = "5312f837191c317644f313f7b2b39f9cb1496570c74f7c17152dd3961219551f" dependencies = [ "log", "mac-notification-sys", @@ -3554,7 +3594,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3612,7 +3652,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3744,7 +3784,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3966,7 +4006,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4104,7 +4144,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4151,7 +4191,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4275,6 +4315,15 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4330,7 +4379,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4368,9 +4417,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -4435,7 +4484,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -4553,7 +4602,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "libredox", "thiserror", ] @@ -4575,7 +4624,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4709,7 +4758,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.14", "libc", "spin", "untrusted", @@ -4799,7 +4848,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4912,9 +4961,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -5064,7 +5113,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -5081,13 +5130,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -5138,7 +5187,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -5299,7 +5348,7 @@ version = "0.13.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0b84c23a1066e1d650ebc99aa8fb9f8ed0ab96fd36e2e836173c92fc9fb29bc" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "halfbrown", "lexical-core", "ref-cast", @@ -5389,11 +5438,11 @@ checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" dependencies = [ "async-channel 1.9.0", "async-executor", - "async-fs", + "async-fs 1.6.0", "async-io 1.13.0", "async-lock 2.8.0", "async-net", - "async-process", + "async-process 1.8.1", "blocking", "futures-lite 1.13.0", ] @@ -5510,9 +5559,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -5533,9 +5582,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.57" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -5931,12 +5980,13 @@ dependencies = [ [[package]] name = "tauri-winrt-notification" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" +checksum = "2d59cba96cdbf291d74490ac477c66885ebdc87e28faca532ec1e00f4f3bd578" dependencies = [ "quick-xml 0.30.0", - "windows 0.51.1", + "windows 0.54.0", + "windows-version", ] [[package]] @@ -6039,7 +6089,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -6075,9 +6125,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "ef89ece63debf11bc32d1ed8d078ac870cbeb44da02afb02a9ff135ae7ca0582" dependencies = [ "deranged", "itoa 1.0.11", @@ -6096,9 +6146,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -6152,7 +6202,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -6256,6 +6306,17 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.9" @@ -6308,7 +6369,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -6530,7 +6591,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -6702,7 +6763,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -6736,7 +6797,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6994,9 +7055,9 @@ checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -7090,16 +7151,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" -dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.52.0" @@ -7130,15 +7181,6 @@ dependencies = [ "windows-tokens", ] -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-core" version = "0.52.0" @@ -7638,30 +7680,28 @@ dependencies = [ [[package]] name = "zbus" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9" dependencies = [ "async-broadcast", "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", + "async-fs 2.1.1", + "async-io 2.3.2", + "async-lock 3.3.0", + "async-process 2.2.0", "async-recursion", "async-task", "async-trait", "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener 5.3.0", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix 0.28.0", "ordered-stream", "rand 0.8.5", "serde", @@ -7670,7 +7710,7 @@ dependencies = [ "static_assertions", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -7679,11 +7719,11 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "4e0e3852c93dcdb49c9462afe67a2a468f7bd464150d866e861eaf06208633e0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "regex", @@ -7693,9 +7733,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -7719,7 +7759,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -7806,13 +7846,12 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "2c1b3ca6db667bfada0f1ebfc94b2b1759ba25472ee5373d4551bb892616389a" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", "zvariant_derive", @@ -7820,11 +7859,11 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "b7a4b236063316163b69039f77ce3117accb41a09567fd24c168e43491e521bc" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -7833,9 +7872,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/clash-nyanpasu/manifest/version.json b/clash-nyanpasu/manifest/version.json index 4e44ff1ec1..aff20d56e1 100644 --- a/clash-nyanpasu/manifest/version.json +++ b/clash-nyanpasu/manifest/version.json @@ -2,7 +2,7 @@ "manifest_version": 1, "latest": { "mihomo": "v1.18.3", - "mihomo_alpha": "alpha-72df27b", + "mihomo_alpha": "alpha-cff7df1", "clash_rs": "v0.1.15", "clash_premium": "2023-09-05-gdcc8d87" }, @@ -36,5 +36,5 @@ "darwin-x64": "clash-darwin-amd64-n{}.gz" } }, - "updated_at": "2024-04-08T22:20:44.727Z" + "updated_at": "2024-04-09T22:19:07.478Z" } diff --git a/clash-nyanpasu/package.json b/clash-nyanpasu/package.json index 5cd741a158..afd4b72553 100644 --- a/clash-nyanpasu/package.json +++ b/clash-nyanpasu/package.json @@ -28,7 +28,6 @@ "updater": "tsx scripts/updater.ts", "updater:nightly": "tsx scripts/updater-nightly.ts", "send-notify": "tsx scripts/telegram-notify.ts", - "send-release:nightly": "tsx scripts/telegram-upload-nightly.ts", "publish": "tsx scripts/publish.ts", "portable": "tsx scripts/portable.ts", "upload:osx-aarch64": "tsx scripts/osx-aarch64-upload.ts", @@ -80,7 +79,7 @@ "axios": "1.6.8", "dayjs": "1.11.10", "framer-motion": "11.0.25", - "i18next": "23.11.0", + "i18next": "23.11.1", "lodash-es": "4.17.21", "monaco-editor": "0.47.0", "mui-color-input": "2.0.3", @@ -104,7 +103,7 @@ "@types/fs-extra": "11.0.4", "@types/js-cookie": "3.0.6", "@types/lodash-es": "4.17.12", - "@types/node": "20.12.6", + "@types/node": "20.12.7", "@types/react": "18.2.75", "@types/react-dom": "18.2.24", "@types/react-transition-group": "4.4.10", @@ -122,7 +121,7 @@ "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-import-resolver-alias": "1.1.2", - "eslint-plugin-html": "8.0.0", + "eslint-plugin-html": "8.1.0", "eslint-plugin-import": "2.29.1", "eslint-plugin-n": "16.6.2", "eslint-plugin-prettier": "5.1.3", @@ -142,7 +141,7 @@ "prettier": "3.2.5", "prettier-plugin-toml": "2.0.1", "sass": "1.74.1", - "shiki": "1.2.4", + "shiki": "1.3.0", "stylelint": "16.3.1", "stylelint-config-html": "1.1.0", "stylelint-config-recess-order": "5.0.0", diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index 9319d5f211..22f5933d65 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -57,8 +57,8 @@ dependencies: specifier: 11.0.25 version: 11.0.25(react-dom@18.2.0)(react@18.2.0) i18next: - specifier: 23.11.0 - version: 23.11.0 + specifier: 23.11.1 + version: 23.11.1 lodash-es: specifier: 4.17.21 version: 4.17.21 @@ -82,7 +82,7 @@ dependencies: version: 7.51.2(react@18.2.0) react-i18next: specifier: 14.1.0 - version: 14.1.0(i18next@23.11.0)(react-dom@18.2.0)(react@18.2.0) + version: 14.1.0(i18next@23.11.1)(react-dom@18.2.0)(react@18.2.0) react-markdown: specifier: 9.0.1 version: 9.0.1(@types/react@18.2.75)(react@18.2.0) @@ -108,7 +108,7 @@ devDependencies: version: 6.0.0 '@commitlint/cli': specifier: 19.2.1 - version: 19.2.1(@types/node@20.12.6)(typescript@5.4.4) + version: 19.2.1(@types/node@20.12.7)(typescript@5.4.4) '@commitlint/config-conventional': specifier: 19.1.0 version: 19.1.0 @@ -125,8 +125,8 @@ devDependencies: specifier: 4.17.12 version: 4.17.12 '@types/node': - specifier: 20.12.6 - version: 20.12.6 + specifier: 20.12.7 + version: 20.12.7 '@types/react': specifier: 18.2.75 version: 18.2.75 @@ -179,8 +179,8 @@ devDependencies: specifier: 1.1.2 version: 1.1.2(eslint-plugin-import@2.29.1) eslint-plugin-html: - specifier: 8.0.0 - version: 8.0.0 + specifier: 8.1.0 + version: 8.1.0 eslint-plugin-import: specifier: 2.29.1 version: 2.29.1(@typescript-eslint/parser@7.6.0)(eslint@8.57.0) @@ -239,8 +239,8 @@ devDependencies: specifier: 1.74.1 version: 1.74.1 shiki: - specifier: 1.2.4 - version: 1.2.4 + specifier: 1.3.0 + version: 1.3.0 stylelint: specifier: 16.3.1 version: 16.3.1(typescript@5.4.4) @@ -273,7 +273,7 @@ devDependencies: version: 5.4.4 vite: specifier: 5.2.8 - version: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + version: 5.2.8(@types/node@20.12.7)(sass@1.74.1) vite-plugin-monaco-editor: specifier: npm:vite-plugin-monaco-editor-new@1.1.3 version: /vite-plugin-monaco-editor-new@1.1.3(monaco-editor@0.47.0) @@ -549,14 +549,14 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - /@commitlint/cli@19.2.1(@types/node@20.12.6)(typescript@5.4.4): + /@commitlint/cli@19.2.1(@types/node@20.12.7)(typescript@5.4.4): resolution: {integrity: sha512-cbkYUJsLqRomccNxvoJTyv5yn0bSy05BBizVyIcLACkRbVUqYorC351Diw/XFSWC/GtpwiwT2eOvQgFZa374bg==} engines: {node: '>=v18'} hasBin: true dependencies: '@commitlint/format': 19.0.3 '@commitlint/lint': 19.1.0 - '@commitlint/load': 19.2.0(@types/node@20.12.6)(typescript@5.4.4) + '@commitlint/load': 19.2.0(@types/node@20.12.7)(typescript@5.4.4) '@commitlint/read': 19.2.1 '@commitlint/types': 19.0.3 execa: 8.0.1 @@ -625,7 +625,7 @@ packages: '@commitlint/types': 19.0.3 dev: true - /@commitlint/load@19.2.0(@types/node@20.12.6)(typescript@5.4.4): + /@commitlint/load@19.2.0(@types/node@20.12.7)(typescript@5.4.4): resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} engines: {node: '>=v18'} dependencies: @@ -635,7 +635,7 @@ packages: '@commitlint/types': 19.0.3 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.4.4) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.12.6)(cosmiconfig@9.0.0)(typescript@5.4.4) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.12.7)(cosmiconfig@9.0.0)(typescript@5.4.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -1396,7 +1396,7 @@ packages: generouted: 1.18.8(vite@5.2.8) react: 18.2.0 react-router-dom: 6.22.3(react-dom@18.2.0)(react@18.2.0) - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) dev: false /@humanwhocodes/config-array@0.11.14: @@ -1934,8 +1934,8 @@ packages: requiresBuild: true optional: true - /@shikijs/core@1.2.4: - resolution: {integrity: sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw==} + /@shikijs/core@1.3.0: + resolution: {integrity: sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==} dev: true /@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.23.6): @@ -2226,7 +2226,7 @@ packages: /@types/conventional-commits-parser@5.0.0: resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} dependencies: - '@types/node': 20.12.6 + '@types/node': 20.12.7 dev: true /@types/debug@4.1.12: @@ -2248,7 +2248,7 @@ packages: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.12.6 + '@types/node': 20.12.7 dev: true /@types/hast@3.0.4: @@ -2272,7 +2272,7 @@ packages: /@types/jsonfile@6.1.4: resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} dependencies: - '@types/node': 20.12.6 + '@types/node': 20.12.7 dev: true /@types/lodash-es@4.17.12: @@ -2295,8 +2295,8 @@ packages: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} dev: false - /@types/node@20.12.6: - resolution: {integrity: sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} dependencies: undici-types: 5.26.5 @@ -2482,7 +2482,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.6) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) transitivePeerDependencies: - supports-color dev: true @@ -3115,7 +3115,7 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /cosmiconfig-typescript-loader@5.0.0(@types/node@20.12.6)(cosmiconfig@9.0.0)(typescript@5.4.4): + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.12.7)(cosmiconfig@9.0.0)(typescript@5.4.4): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} engines: {node: '>=v16'} peerDependencies: @@ -3123,7 +3123,7 @@ packages: cosmiconfig: '>=8.2' typescript: '>=4' dependencies: - '@types/node': 20.12.6 + '@types/node': 20.12.7 cosmiconfig: 9.0.0(typescript@5.4.4) jiti: 1.21.0 typescript: 5.4.4 @@ -3756,8 +3756,8 @@ packages: eslint-compat-utils: 0.1.2(eslint@8.57.0) dev: true - /eslint-plugin-html@8.0.0: - resolution: {integrity: sha512-NINLBAXM3mLa3k5Ezr/kNLHAJJwbot6lS7Ro+SUftDw4cA51KMmcDuCf98GP6Q6kTVPY1hIggzskxAdxfUPXSA==} + /eslint-plugin-html@8.1.0: + resolution: {integrity: sha512-5bRZQwxZew2Yo9Fa8diz2C9RmzIw9Gs4yzmmjUcpuzhdLW8aVcDtYzEHhNNdt01Z0m4AzSJNuY63RXvzStvDgA==} engines: {node: '>=16.0.0'} dependencies: htmlparser2: 9.1.0 @@ -4246,7 +4246,7 @@ packages: peerDependencies: vite: '>=3' dependencies: - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) dev: false /gensync@1.0.0-beta.2: @@ -4601,8 +4601,8 @@ packages: hasBin: true dev: true - /i18next@23.11.0: - resolution: {integrity: sha512-VwFtlgy2LDbY0Qs6VfekIm6mv5/JmSJrtBf4aszl7Vby8+GcBlri0/7dkMZXmzTfiBMPUPBOmYCdQK7K4emkGQ==} + /i18next@23.11.1: + resolution: {integrity: sha512-mXw4A24BiPZKRsbb9ewgSvjYd6fxFCNwJyfK6nYfSTIAX2GkCWcb598m3DFkDZmqADatvuASrKo6qwORz3VwTQ==} dependencies: '@babel/runtime': 7.24.1 dev: false @@ -6167,7 +6167,7 @@ packages: react: 18.2.0 dev: false - /react-i18next@14.1.0(i18next@23.11.0)(react-dom@18.2.0)(react@18.2.0): + /react-i18next@14.1.0(i18next@23.11.1)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-3KwX6LHpbvGQ+sBEntjV4sYW3Zovjjl3fpoHbUwSgFHf0uRBcbeCBLR5al6ikncI5+W0EFb71QXZmfop+J6NrQ==} peerDependencies: i18next: '>= 23.2.3' @@ -6182,7 +6182,7 @@ packages: dependencies: '@babel/runtime': 7.23.9 html-parse-stringify: 3.0.1 - i18next: 23.11.0 + i18next: 23.11.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -6622,10 +6622,10 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /shiki@1.2.4: - resolution: {integrity: sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg==} + /shiki@1.3.0: + resolution: {integrity: sha512-9aNdQy/etMXctnPzsje1h1XIGm9YfRcSksKOGqZWXA/qP9G18/8fpz5Bjpma8bOgz3tqIpjERAd6/lLjFyzoww==} dependencies: - '@shikijs/core': 1.2.4 + '@shikijs/core': 1.3.0 dev: true /side-channel@1.0.4: @@ -7374,7 +7374,7 @@ packages: postcss-js: 4.0.1(postcss@8.4.38) prettier: 3.2.5 sass: 1.74.1 - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) dev: true /vite-plugin-svgr@4.2.0(typescript@5.4.4)(vite@5.2.8): @@ -7385,7 +7385,7 @@ packages: '@rollup/pluginutils': 5.0.5 '@svgr/core': 8.1.0(typescript@5.4.4) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) transitivePeerDependencies: - rollup - supports-color @@ -7403,13 +7403,13 @@ packages: debug: 4.3.4 globrex: 0.1.2 tsconfck: 3.0.3(typescript@5.4.4) - vite: 5.2.8(@types/node@20.12.6)(sass@1.74.1) + vite: 5.2.8(@types/node@20.12.7)(sass@1.74.1) transitivePeerDependencies: - supports-color - typescript dev: true - /vite@5.2.8(@types/node@20.12.6)(sass@1.74.1): + /vite@5.2.8(@types/node@20.12.7)(sass@1.74.1): resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7437,7 +7437,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.12.6 + '@types/node': 20.12.7 esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.13.0 diff --git a/clash-nyanpasu/scripts/telegram-upload-nightly.ts b/clash-nyanpasu/scripts/telegram-upload-nightly.ts deleted file mode 100644 index 540222136d..0000000000 --- a/clash-nyanpasu/scripts/telegram-upload-nightly.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Telegraf } from "telegraf"; -import { downloadFileToBuffer } from "./utils/fetch"; -import { consola } from "./utils/logger"; -import { execSync } from "child_process"; -import { array2text } from "./utils"; -import { context, getOctokit } from "@actions/github"; - -export const sendReleaseNotify = async () => { - if (!process.env.TELEGRAM_TOKEN) { - throw new Error("TELEGRAM_TOKEN is required"); - } - - if (!process.env.TELEGRAM_TO) { - throw new Error("TELEGRAM_TO is required"); - } - - if (!process.env.GITHUB_TOKEN) { - throw new Error("GITHUB_TOKEN is required"); - } - - const github = getOctokit(process.env.GITHUB_TOKEN); - - const release = await github.rest.repos.getLatestRelease(context.repo); - - const fileList: { - name: string; - url: string; - buffer: Buffer; - }[] = []; - - for (const item of release.data.assets) { - const supportedExtensions = [ - "x64-setup.exe", - "x64_portable.zip", - "amd64.AppImage", - "amd64.deb", - "x64.dmg", - "aarch64.dmg", - ]; - - if (supportedExtensions.some((ext) => item.name.endsWith(ext))) { - consola.log("Download file: " + item.name); - - const buffer = await downloadFileToBuffer(item.browser_download_url); - - fileList.push({ - name: item.name, - url: item.browser_download_url, - buffer: buffer, - }); - } - } - - const bot = new Telegraf(process.env.TELEGRAM_TOKEN); - - consola.log("Send media to Nyanpasu channel"); - - const GIT_SHORT_HASH = execSync("git rev-parse --short HEAD") - .toString() - .trim(); - - const caption = array2text([ - "Clash Nyanpasu Nightly Build", - "", - `Current git short hash: ${GIT_SHORT_HASH}`, - ]); - - bot.telegram.sendMediaGroup( - process.env.TELEGRAM_TO, - fileList.map((file, index) => { - return { - type: "document", - caption: index == fileList.length ? caption : undefined, - media: { - source: file.buffer, - filename: file.name, - }, - }; - }), - ); -}; - -sendReleaseNotify(); diff --git a/clash-nyanpasu/scripts/utils/fetch.ts b/clash-nyanpasu/scripts/utils/fetch.ts deleted file mode 100644 index 77bc6cdf49..0000000000 --- a/clash-nyanpasu/scripts/utils/fetch.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const downloadFileToBuffer = async (url: string): Promise => { - try { - const response = await fetch(url); - - const buffer = Buffer.from(await response.arrayBuffer()); - - return buffer; - } catch (error) { - throw error; - } -}; diff --git a/hysteria/scripts/install_server.sh b/hysteria/scripts/install_server.sh index 8e9b2aff2e..b71f07559b 100644 --- a/hysteria/scripts/install_server.sh +++ b/hysteria/scripts/install_server.sh @@ -60,6 +60,9 @@ HYSTERIA_USER="${HYSTERIA_USER:-}" # Directory for ACME certificates storage HYSTERIA_HOME_DIR="${HYSTERIA_HOME_DIR:-}" +# SELinux context of systemd unit files +SECONTEXT_SYSTEMD_UNIT="${SECONTEXT_SYSTEMD_UNIT:-}" + ### # ARGUMENTS @@ -176,6 +179,14 @@ systemctl() { command systemctl "$@" } +chcon() { + if ! has_command chcon || [[ "x$FORCE_NO_SELINUX" == "x1" ]]; then + return + fi + + command chcon "$@" +} + show_argument_error_and_exit() { local _error_msg="$1" @@ -221,6 +232,7 @@ exec_sudo() { $(env | grep "^OPERATING_SYSTEM=" || true) $(env | grep "^ARCHITECTURE=" || true) $(env | grep "^HYSTERIA_\w*=" || true) + $(env | grep "^SECONTEXT_SYSTEMD_UNIT=" || true) $(env | grep "^FORCE_\w*=" || true) ) IFS="$_saved_ifs" @@ -407,6 +419,30 @@ check_environment_systemd() { esac } +check_environment_selinux() { + if ! has_command chcon; then + return + fi + + note "SELinux is detected" + + if [[ "x$FORCE_NO_SELINUX" == "x1" ]]; then + warning "FORCE_NO_SELINUX=1, we will skip all SELinux related commands." + return + fi + + if [[ -z "$SECONTEXT_SYSTEMD_UNIT" ]]; then + if [[ -z "$FORCE_NO_SYSTEMD" ]] && [[ -e "$SYSTEMD_SERVICES_DIR" ]]; then + local _sectx="$(ls -ldZ "$SYSTEMD_SERVICES_DIR" | cut -d ' ' -f 5)" + if [[ "x$_sectx" == "x?" ]]; then + warning "Failed to obtain SEContext of $SYSTEMD_SERVICES_DIR" + else + SECONTEXT_SYSTEMD_UNIT="$_sectx" + fi + fi + fi +} + check_environment_curl() { if has_command curl; then return @@ -427,6 +463,7 @@ check_environment() { check_environment_operating_system check_environment_architecture check_environment_systemd + check_environment_selinux check_environment_curl check_environment_grep } @@ -918,6 +955,10 @@ perform_install_hysteria_systemd() { install_content -Dm644 "$(tpl_hysteria_server_service)" "$SYSTEMD_SERVICES_DIR/hysteria-server.service" "1" install_content -Dm644 "$(tpl_hysteria_server_x_service)" "$SYSTEMD_SERVICES_DIR/hysteria-server@.service" "1" + if [[ -n "$SECONTEXT_SYSTEMD_UNIT" ]]; then + chcon "$SECONTEXT_SYSTEMD_UNIT" "$SYSTEMD_SERVICES_DIR/hysteria-server.service" + chcon "$SECONTEXT_SYSTEMD_UNIT" "$SYSTEMD_SERVICES_DIR/hysteria-server@.service" + fi systemctl daemon-reload } diff --git a/lede/package/boot/uboot-rockchip/Makefile b/lede/package/boot/uboot-rockchip/Makefile index 94d8a280fb..7dcf31915c 100644 --- a/lede/package/boot/uboot-rockchip/Makefile +++ b/lede/package/boot/uboot-rockchip/Makefile @@ -188,7 +188,7 @@ define U-Boot/panther-x2-rk3566 panther_x2 DEPENDS:=+PACKAGE_u-boot-panther-x2-rk3566:arm-trusted-firmware-rk3566 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf + ATF:=rk3568_bl31_v1.44.elf DDR:=rk3566_ddr_1056MHz_v1.18.bin endef @@ -201,8 +201,8 @@ define U-Boot/lyt-t68m-rk3568 lyt_t68m DEPENDS:=+PACKAGE_u-boot-lyt-t68m-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/mrkaio-m68s-rk3568 @@ -213,8 +213,8 @@ define U-Boot/mrkaio-m68s-rk3568 ezpro_mrkaio-m68s-plus DEPENDS:=+PACKAGE_u-boot-mrkaio-m68s-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/nanopi-r5s-rk3568 @@ -225,8 +225,8 @@ define U-Boot/nanopi-r5s-rk3568 friendlyarm_nanopi-r5s DEPENDS:=+PACKAGE_u-boot-nanopi-r5s-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/opc-h68k-rk3568 @@ -238,8 +238,8 @@ define U-Boot/opc-h68k-rk3568 hinlink_opc-h69k DEPENDS:=+PACKAGE_u-boot-opc-h68k-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/photonicat-rk3568 @@ -249,8 +249,8 @@ define U-Boot/photonicat-rk3568 ariaboard_photonicat DEPENDS:=+PACKAGE_u-boot-photonicat-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/radxa-e25-rk3568 @@ -260,8 +260,8 @@ define U-Boot/radxa-e25-rk3568 radxa_e25 DEPENDS:=+PACKAGE_u-boot-radxa-e25-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/rock-3a-rk3568 @@ -271,8 +271,8 @@ define U-Boot/rock-3a-rk3568 radxa_rock-3a DEPENDS:=+PACKAGE_u-boot-rock-3a-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/r66s-rk3568 @@ -283,8 +283,8 @@ define U-Boot/r66s-rk3568 fastrhino_r68s DEPENDS:=+PACKAGE_u-boot-r66s-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/seewo-sv21-rk3568 @@ -294,8 +294,8 @@ define U-Boot/seewo-sv21-rk3568 seewo_sv21-rk3568 DEPENDS:=+PACKAGE_u-boot-seewo-sv21-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/station-p2-rk3568 @@ -305,8 +305,8 @@ define U-Boot/station-p2-rk3568 firefly_station-p2 DEPENDS:=+PACKAGE_u-boot-station-p2-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/advantech-rsb4810-rk3568 @@ -316,8 +316,8 @@ define U-Boot/advantech-rsb4810-rk3568 advantech_rsb4810 DEPENDS:=+PACKAGE_u-boot-advantech-rsb4810-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor - ATF:=rk3568_bl31_v1.43.elf - DDR:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + DDR:=rk3568_ddr_1560MHz_v1.21.bin endef UBOOT_TARGETS := \ diff --git a/lede/package/boot/uboot-sunxi/Makefile b/lede/package/boot/uboot-sunxi/Makefile index 4d5d28571f..a927481588 100644 --- a/lede/package/boot/uboot-sunxi/Makefile +++ b/lede/package/boot/uboot-sunxi/Makefile @@ -132,6 +132,12 @@ define U-Boot/OLIMEX_A13_SOM BUILD_DEVICES:=olimex_a13-olimex-som endef +define U-Boot/licheepi_nano + BUILD_SUBTARGET:=arm926ejs + NAME:=LicheePi Nano + BUILD_DEVICES:=licheepi-nano +endef + define U-Boot/Linksprite_pcDuino BUILD_SUBTARGET:=cortexa8 NAME:=Linksprite pcDuino @@ -243,6 +249,12 @@ define U-Boot/pangolin UENV:=pangolin endef +define U-Boot/popstick + BUILD_SUBTARGET:=arm926ejs + NAME:=PopStick + BUILD_DEVICES:=popstick-v1.1 +endef + define U-Boot/libretech_all_h3_cc_h5 BUILD_SUBTARGET:=cortexa53 NAME:=Libre Computer ALL-H3-CC H5 @@ -397,6 +409,7 @@ UBOOT_TARGETS := \ Marsboard_A10 \ Mele_M9 \ OLIMEX_A13_SOM \ + licheepi_nano \ Linksprite_pcDuino \ Linksprite_pcDuino3 \ Linksprite_pcDuino3_Nano \ @@ -421,6 +434,7 @@ UBOOT_TARGETS := \ orangepi_zero2 \ orangepi_zero3 \ pangolin \ + popstick \ pine64_plus \ Sinovoip_BPI_M3 \ sopine_baseboard \ diff --git a/lede/package/boot/uboot-sunxi/patches/260-sunxi-add-USB-support-and-PopStick-support.patch b/lede/package/boot/uboot-sunxi/patches/260-sunxi-add-USB-support-and-PopStick-support.patch new file mode 100644 index 0000000000..ecc2eb2d25 --- /dev/null +++ b/lede/package/boot/uboot-sunxi/patches/260-sunxi-add-USB-support-and-PopStick-support.patch @@ -0,0 +1,120 @@ +From 08d194d881e10e09cba7551da8079734d89ed16d Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Thu, 16 Jun 2022 00:28:41 +0800 +Subject: [PATCH 1/2] add USB support and PopStick support + +Signed-off-by: Icenowy Zheng +--- + arch/arm/dts/Makefile | 3 +- + arch/arm/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++++ + arch/arm/dts/suniv-f1c100s.dtsi | 26 ++++++ + arch/arm/dts/suniv-f1c200s-popstick.dts | 89 ++++++++++++++++++++ + drivers/phy/allwinner/phy-sun4i-usb.c | 14 +++ + drivers/usb/musb-new/sunxi.c | 6 ++ + 6 files changed, 153 insertions(+), 1 deletion(-) + create mode 100644 arch/arm/dts/suniv-f1c200s-popstick.dts + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -647,7 +647,8 @@ dtb-$(CONFIG_STM32H7) += stm32h743i-disc + stm32h750i-art-pi.dtb + + dtb-$(CONFIG_MACH_SUNIV) += \ +- suniv-f1c100s-licheepi-nano.dtb ++ suniv-f1c100s-licheepi-nano.dtb \ ++ suniv-f1c200s-popstick.dtb + dtb-$(CONFIG_MACH_SUN4I) += \ + sun4i-a10-a1000.dtb \ + sun4i-a10-ba10-tvbox.dtb \ +--- /dev/null ++++ b/arch/arm/dts/suniv-f1c200s-popstick.dts +@@ -0,0 +1,89 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Icenowy Zheng ++ */ ++ ++/dts-v1/; ++#include "suniv-f1c100s.dtsi" ++ ++#include ++ ++/ { ++ model = "Popcorn Computer PopStick"; ++ compatible = "sourceparts,popstick", "allwinner,suniv-f1c200s", ++ "allwinner,suniv-f1c100s"; ++ ++ aliases { ++ mmc0 = &mmc0; ++ serial0 = &uart0; ++ spi0 = &spi0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ reg_vcc3v3: vcc3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++}; ++ ++&mmc0 { ++ broken-cd; ++ bus-width = <4>; ++ disable-wp; ++ status = "okay"; ++ vmmc-supply = <®_vcc3v3>; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_pc_pins>; ++ status = "okay"; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <1000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot-with-spl"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ ubi@100000 { ++ label = "ubi"; ++ reg = <0x100000 0x7f00000>; ++ }; ++ }; ++ }; ++}; ++ ++&otg_sram { ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pe_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "peripheral"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ status = "okay"; ++}; diff --git a/lede/package/boot/uboot-sunxi/patches/261-sunxi-add-popstick-defconfig.patch b/lede/package/boot/uboot-sunxi/patches/261-sunxi-add-popstick-defconfig.patch new file mode 100644 index 0000000000..7fa9264b97 --- /dev/null +++ b/lede/package/boot/uboot-sunxi/patches/261-sunxi-add-popstick-defconfig.patch @@ -0,0 +1,61 @@ +From 0d263e1071ee3f63d2047a8bb9af4434f1cd4bb1 Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Thu, 16 Jun 2022 09:46:42 +0800 +Subject: [PATCH 2/2] HACK for UBI env and add defconfig + +--- + board/sunxi/board.c | 1 + + configs/popstick_defconfig | 37 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 38 insertions(+) + create mode 100644 configs/popstick_defconfig + +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -135,6 +135,7 @@ void i2c_init_board(void) + */ + enum env_location env_get_location(enum env_operation op, int prio) + { ++ return prio ? ENVL_UNKNOWN : ENVL_UBI; + if (prio > 1) + return ENVL_UNKNOWN; + +--- /dev/null ++++ b/configs/popstick_defconfig +@@ -0,0 +1,37 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT_ONLY=y ++CONFIG_SPL_SKIP_LOWLEVEL_INIT_ONLY=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_ENV_SIZE=0x1f000 ++CONFIG_DEFAULT_DEVICE_TREE="suniv-f1c200s-popstick" ++CONFIG_SPL=y ++CONFIG_MACH_SUNIV=y ++CONFIG_DRAM_CLK=156 ++CONFIG_DRAM_ZQ=0 ++# CONFIG_VIDEO_SUNXI is not set ++CONFIG_SPL_SPI_SUNXI=y ++CONFIG_SPL_SPI_SUNXI_NAND=y ++CONFIG_SPL_SPI_SUNXI_NAND_ASSUMED_PAGESIZE=0x800 ++# CONFIG_ANDROID_BOOT_IMAGE is not set ++CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 ++CONFIG_CMD_MTD=y ++# CONFIG_CMD_SF is not set ++CONFIG_CMD_MTDPARTS=y ++CONFIG_CMD_UBI=y ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_UBI_VOLUME="env" ++# CONFIG_NET is not set ++CONFIG_MTD=y ++CONFIG_DM_MTD=y ++CONFIG_MTD_SPI_NAND=y ++# CONFIG_SPI_FLASH is not set ++CONFIG_SF_DEFAULT_SPEED=25000000 ++# CONFIG_UBI_SILENCE_MSG is not set ++CONFIG_PHY_SUN4I_USB=y ++CONFIG_SPI=y ++CONFIG_USB_MUSB_GADGET=y ++CONFIG_USB_FUNCTION_SDP=y ++# CONFIG_UBIFS_SILENCE_MSG is not set diff --git a/lede/package/lean/r8125/Makefile b/lede/package/lean/r8125/Makefile index 16062ab377..3ad615cd32 100644 --- a/lede/package/lean/r8125/Makefile +++ b/lede/package/lean/r8125/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8125 -PKG_VERSION:=9.012.03-1 -PKG_RELEASE:=$(AUTORELEASE) +PKG_VERSION:=9.012.04-1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)? -PKG_HASH:=7964aacf4a2873cbe4133aeca830bd0725f819ea286bab162026ff283510144f +PKG_HASH:=470f02f1f3e9a12a0443128f5efd5e254e5e8e94487a5ab949724100fdca6ab4 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0-only diff --git a/lede/package/lean/r8125/patches/050-remove-rxnfc-print-message-info.patch b/lede/package/lean/r8125/patches/050-remove-rxnfc-print-message-info.patch new file mode 100644 index 0000000000..2d289cce19 --- /dev/null +++ b/lede/package/lean/r8125/patches/050-remove-rxnfc-print-message-info.patch @@ -0,0 +1,25 @@ +From 8210ec212fb21dfd85af109af7d5ab39065fb16a Mon Sep 17 00:00:00 2001 +From: W_Y_CPP <383152993@qq.com> +Date: Mon, 8 Apr 2024 00:02:11 -0400 +Subject: [PATCH] remove print message info + +--- + src/r8125_rss.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/r8125_rss.c b/src/r8125_rss.c +index 8980ba7..a27eee2 100755 +--- a/src/r8125_rss.c ++++ b/src/r8125_rss.c +@@ -91,7 +91,7 @@ int rtl8125_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, + struct rtl8125_private *tp = netdev_priv(dev); + int ret = -EOPNOTSUPP; + +- netif_info(tp, drv, tp->dev, "rss get rxnfc\n"); ++ // netif_info(tp, drv, tp->dev, "rss get rxnfc\n"); + + if (!(dev->features & NETIF_F_RXHASH)) + return ret; +-- +2.17.1 + diff --git a/lede/target/linux/sunxi/Makefile b/lede/target/linux/sunxi/Makefile index 74caebd7b1..024fa1901b 100644 --- a/lede/target/linux/sunxi/Makefile +++ b/lede/target/linux/sunxi/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=sunxi BOARDNAME:=Allwinner ARM SoCs -FEATURES:=fpu usb ext4 display rootfs-part rtc squashfs -SUBTARGETS:=cortexa8 cortexa7 cortexa53 +FEATURES:=usb ext4 display rootfs-part rtc squashfs +SUBTARGETS:=cortexa8 cortexa7 cortexa53 arm926ejs KERNEL_PATCHVER:=6.1 diff --git a/lede/target/linux/sunxi/arm926ejs/config-6.1 b/lede/target/linux/sunxi/arm926ejs/config-6.1 new file mode 100644 index 0000000000..b1320ee2ea --- /dev/null +++ b/lede/target/linux/sunxi/arm926ejs/config-6.1 @@ -0,0 +1,54 @@ +# CONFIG_ARCH_MULTI_V4 is not set +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_MULTI_V4_V5=y +CONFIG_ARCH_MULTI_V5=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_CPU_AUTO=y +CONFIG_ARCH_NR_GPIO=416 +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUNXI=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HAS_BINFMT_FLAT=y +CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_COMPAT_32BIT_TIME=y +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set +CONFIG_MACH_SUNIV=y +# CONFIG_MACH_SUN4I is not set +# CONFIG_MACH_SUN5I is not set +# CONFIG_MACH_SUN6I is not set +# CONFIG_MACH_SUN7I is not set +# CONFIG_MACH_SUN8I is not set +# CONFIG_MACH_SUN9I is not set +CONFIG_MDIO_BUS_MUX=y +CONFIG_MUSB_PIO_ONLY=y +# CONFIG_PHY_SUN9I_USB is not set +# CONFIG_PINCTRL_SUN4I_A10 is not set +# CONFIG_PINCTRL_SUN50I_A64 is not set +# CONFIG_PINCTRL_SUN50I_A64_R is not set +# CONFIG_PINCTRL_SUN50I_H5 is not set +# CONFIG_PINCTRL_SUN50I_H6 is not set +# CONFIG_PINCTRL_SUN50I_H6_R is not set +# CONFIG_PINCTRL_SUN5I is not set +# CONFIG_PINCTRL_SUN6I_A31 is not set +# CONFIG_PINCTRL_SUN6I_A31_R is not set +# CONFIG_PINCTRL_SUN8I_A23 is not set +# CONFIG_PINCTRL_SUN8I_A23_R is not set +# CONFIG_PINCTRL_SUN8I_A33 is not set +# CONFIG_PINCTRL_SUN8I_A83T is not set +# CONFIG_PINCTRL_SUN8I_A83T_R is not set +# CONFIG_PINCTRL_SUN8I_H3 is not set +# CONFIG_PINCTRL_SUN8I_H3_R is not set +# CONFIG_PINCTRL_SUN8I_V3S is not set +# CONFIG_PINCTRL_SUN9I_A80 is not set +# CONFIG_PINCTRL_SUN9I_A80_R is not set +CONFIG_PINCTRL_SUNIV_F1C100S=y +CONFIG_PINCTRL_SUNXI=y +CONFIG_SUNIV_F1C100S_CCU=y +CONFIG_UNWINDER_ARM=y +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_DUAL_ROLE=y +CONFIG_USB_MUSB_SUNXI=y diff --git a/lede/target/linux/sunxi/arm926ejs/target.mk b/lede/target/linux/sunxi/arm926ejs/target.mk new file mode 100644 index 0000000000..f37aa30d70 --- /dev/null +++ b/lede/target/linux/sunxi/arm926ejs/target.mk @@ -0,0 +1,11 @@ +# +# Copyright (C) 2024 Zoltan HERPAI +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +BOARDNAME:=Allwinner F1C100/200s +CPU_TYPE:=arm926ej-s diff --git a/lede/target/linux/sunxi/config-6.1 b/lede/target/linux/sunxi/config-6.1 index a76834c13a..661c511ee5 100644 --- a/lede/target/linux/sunxi/config-6.1 +++ b/lede/target/linux/sunxi/config-6.1 @@ -7,8 +7,6 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MULTIPLATFORM=y -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_NR_GPIO=416 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y diff --git a/lede/target/linux/sunxi/cortexa53/target.mk b/lede/target/linux/sunxi/cortexa53/target.mk index 771e07d29f..02b31702ba 100644 --- a/lede/target/linux/sunxi/cortexa53/target.mk +++ b/lede/target/linux/sunxi/cortexa53/target.mk @@ -8,3 +8,4 @@ ARCH:=aarch64 BOARDNAME:=Allwinner A64/H5/H6/H616 CPU_TYPE:=cortex-a53 KERNELNAME:=Image dtbs +FEATURES+=fpu \ No newline at end of file diff --git a/lede/target/linux/sunxi/cortexa7/config-6.1 b/lede/target/linux/sunxi/cortexa7/config-6.1 index e911da4c3d..76fdc0dff3 100644 --- a/lede/target/linux/sunxi/cortexa7/config-6.1 +++ b/lede/target/linux/sunxi/cortexa7/config-6.1 @@ -1,3 +1,5 @@ +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y CONFIG_B53=y CONFIG_B53_MDIO_DRIVER=y CONFIG_CRYPTO_BLAKE2S_ARM=y diff --git a/lede/target/linux/sunxi/cortexa7/target.mk b/lede/target/linux/sunxi/cortexa7/target.mk index 95315fd4a4..52a89e9105 100644 --- a/lede/target/linux/sunxi/cortexa7/target.mk +++ b/lede/target/linux/sunxi/cortexa7/target.mk @@ -7,3 +7,4 @@ include $(TOPDIR)/rules.mk BOARDNAME:=Allwinner A20/A3x/H3/R40 CPU_TYPE:=cortex-a7 CPU_SUBTYPE:=neon-vfpv4 +FEATURES+=fpu diff --git a/lede/target/linux/sunxi/cortexa8/config-6.1 b/lede/target/linux/sunxi/cortexa8/config-6.1 index b893b3142e..274778dd09 100644 --- a/lede/target/linux/sunxi/cortexa8/config-6.1 +++ b/lede/target/linux/sunxi/cortexa8/config-6.1 @@ -1,3 +1,5 @@ +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y # CONFIG_ARM_LPAE is not set CONFIG_CRYPTO_BLAKE2S_ARM=y CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y diff --git a/lede/target/linux/sunxi/cortexa8/target.mk b/lede/target/linux/sunxi/cortexa8/target.mk index cf30ca7877..7f34cc8ea5 100644 --- a/lede/target/linux/sunxi/cortexa8/target.mk +++ b/lede/target/linux/sunxi/cortexa8/target.mk @@ -7,3 +7,4 @@ include $(TOPDIR)/rules.mk BOARDNAME:=Allwinner A1x CPU_TYPE:=cortex-a8 CPU_SUBTYPE:=vfpv3 +FEATURES+=fpu diff --git a/lede/target/linux/sunxi/image/Makefile b/lede/target/linux/sunxi/image/Makefile index 738585accc..cc1c1ba42d 100644 --- a/lede/target/linux/sunxi/image/Makefile +++ b/lede/target/linux/sunxi/image/Makefile @@ -10,7 +10,6 @@ FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) DEVICE_VARS := SUNXI_DTS SUNXI_DTS_DIR -KERNEL_LOADADDR:=0x40008000 define Build/sunxi-sdcard rm -f $@.boot diff --git a/lede/target/linux/sunxi/image/arm926ejs.mk b/lede/target/linux/sunxi/image/arm926ejs.mk new file mode 100644 index 0000000000..1ce230febb --- /dev/null +++ b/lede/target/linux/sunxi/image/arm926ejs.mk @@ -0,0 +1,24 @@ +# +# Copyright (C) 2013-2024 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +KERNEL_LOADADDR=0x81000000 + +define Device/licheepi-nano + DEVICE_VENDOR := LicheePi + DEVICE_MODEL := Nano + DEVICE_PACKAGES := kmod-rtc-sunxi + SOC := suniv-f1c100s +endef +TARGET_DEVICES += licheepi-nano + +define Device/popstick-v1.1 + DEVICE_VENDOR := PopStick + DEVICE_MODEL := v1.1 + DEVICE_PACKAGES := kmod-rtc-sunxi + SOC := suniv-f1c200s +endef +TARGET_DEVICES += popstick-v1.1 diff --git a/lede/target/linux/sunxi/image/cortexa53.mk b/lede/target/linux/sunxi/image/cortexa53.mk index 63ada59f85..06b409deb7 100644 --- a/lede/target/linux/sunxi/image/cortexa53.mk +++ b/lede/target/linux/sunxi/image/cortexa53.mk @@ -3,6 +3,8 @@ # Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2016 Yousong Zhou +KERNEL_LOADADDR:=0x40008000 + define Device/sun50i SUNXI_DTS_DIR := allwinner/ KERNEL_NAME := Image diff --git a/lede/target/linux/sunxi/image/cortexa7.mk b/lede/target/linux/sunxi/image/cortexa7.mk index 3191cec4fd..a85b20531d 100644 --- a/lede/target/linux/sunxi/image/cortexa7.mk +++ b/lede/target/linux/sunxi/image/cortexa7.mk @@ -3,6 +3,8 @@ # Copyright (C) 2013-2019 OpenWrt.org # Copyright (C) 2016 Yousong Zhou +KERNEL_LOADADDR:=0x40008000 + define Device/cubietech_cubieboard2 DEVICE_VENDOR := Cubietech DEVICE_MODEL := Cubieboard2 diff --git a/lede/target/linux/sunxi/image/cortexa8.mk b/lede/target/linux/sunxi/image/cortexa8.mk index eafc2187e8..ac8c272882 100644 --- a/lede/target/linux/sunxi/image/cortexa8.mk +++ b/lede/target/linux/sunxi/image/cortexa8.mk @@ -3,6 +3,8 @@ # Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2016 Yousong Zhou +KERNEL_LOADADDR:=0x40008000 + define Device/cubietech_a10-cubieboard DEVICE_VENDOR := Cubietech DEVICE_MODEL := Cubieboard diff --git a/lede/target/linux/sunxi/patches-6.1/460-ARM-dts-suniv-add-USB-related-device-nodes.patch b/lede/target/linux/sunxi/patches-6.1/460-ARM-dts-suniv-add-USB-related-device-nodes.patch new file mode 100644 index 0000000000..86bc2e25f5 --- /dev/null +++ b/lede/target/linux/sunxi/patches-6.1/460-ARM-dts-suniv-add-USB-related-device-nodes.patch @@ -0,0 +1,35 @@ +--- a/arch/arm/boot/dts/suniv-f1c100s.dtsi ++++ b/arch/arm/boot/dts/suniv-f1c100s.dtsi +@@ -133,6 +133,32 @@ + #size-cells = <0>; + }; + ++ usb_otg: usb@1c13000 { ++ compatible = "allwinner,suniv-f1c100s-musb"; ++ reg = <0x01c13000 0x0400>; ++ clocks = <&ccu CLK_BUS_OTG>; ++ resets = <&ccu RST_BUS_OTG>; ++ interrupts = <26>; ++ interrupt-names = "mc"; ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ extcon = <&usbphy 0>; ++ allwinner,sram = <&otg_sram 1>; ++ status = "disabled"; ++ }; ++ ++ usbphy: phy@1c13400 { ++ compatible = "allwinner,suniv-f1c100s-usb-phy"; ++ reg = <0x01c13400 0x10>; ++ reg-names = "phy_ctrl"; ++ clocks = <&ccu CLK_USB_PHY0>; ++ clock-names = "usb0_phy"; ++ resets = <&ccu RST_USB_PHY0>; ++ reset-names = "usb0_reset"; ++ #phy-cells = <1>; ++ status = "disabled"; ++ }; ++ + ccu: clock@1c20000 { + compatible = "allwinner,suniv-f1c100s-ccu"; + reg = <0x01c20000 0x400>; diff --git a/lede/target/linux/sunxi/patches-6.1/461-ARM-dts-suniv-add-device-tree-for-PopStick-v1_1.patch b/lede/target/linux/sunxi/patches-6.1/461-ARM-dts-suniv-add-device-tree-for-PopStick-v1_1.patch new file mode 100644 index 0000000000..1030494cee --- /dev/null +++ b/lede/target/linux/sunxi/patches-6.1/461-ARM-dts-suniv-add-device-tree-for-PopStick-v1_1.patch @@ -0,0 +1,123 @@ +From 7452d4799c5b352d6987cff3db8b1e415466586e Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Sun, 19 Mar 2023 21:29:35 +0000 +Subject: ARM: dts: suniv: add device tree for PopStick v1.1 + +PopStick is a minimal Allwinner F1C200s dongle, with its USB controller +wired to a USB Type-A plug, a SD slot and a SPI NAND flash on board, and +an on-board CH340 USB-UART converted connected to F1C200s's UART0. + +Add a device tree for it. As F1C200s is just F1C100s with a different +DRAM chip co-packaged, directly use F1C100s DTSI here. + +This commit covers the v1.1 version of this board, which is now shipped. +v1.0 is some internal sample that have not been shipped at all. + +Signed-off-by: Icenowy Zheng +Signed-off-by: Andre Przywara +Acked-by: Jernej Skrabec +Link: https://lore.kernel.org/r/20230319212936.26649-6-andre.przywara@arm.com +Signed-off-by: Jernej Skrabec +--- + arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts | 81 +++++++++++++++++++++++ + 1 file changed, 81 insertions(+) + create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts + +(limited to 'arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts') + +--- /dev/null ++++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts +@@ -0,0 +1,81 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Icenowy Zheng ++ */ ++ ++/dts-v1/; ++#include "suniv-f1c100s.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Popcorn Computer PopStick v1.1"; ++ compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", ++ "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led { ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++ reg_vcc3v3: regulator-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++}; ++ ++&mmc0 { ++ cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ ++ bus-width = <4>; ++ disable-wp; ++ vmmc-supply = <®_vcc3v3>; ++ status = "okay"; ++}; ++ ++&otg_sram { ++ status = "okay"; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_pc_pins>; ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ }; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pe_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "peripheral"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ status = "okay"; ++}; +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -1396,7 +1396,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ + sun9i-a80-optimus.dtb \ + sun9i-a80-cubieboard4.dtb + dtb-$(CONFIG_MACH_SUNIV) += \ +- suniv-f1c100s-licheepi-nano.dtb ++ suniv-f1c100s-licheepi-nano.dtb \ ++ suniv-f1c200s-popstick-v1.1.dtb + dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ + tegra20-acer-a500-picasso.dtb \ + tegra20-asus-tf101.dtb \ diff --git a/lede/target/linux/sunxi/patches-6.1/462-ARM-dts-suniv-licheepi-nano-enable-USB.patch b/lede/target/linux/sunxi/patches-6.1/462-ARM-dts-suniv-licheepi-nano-enable-USB.patch new file mode 100644 index 0000000000..f925d6de38 --- /dev/null +++ b/lede/target/linux/sunxi/patches-6.1/462-ARM-dts-suniv-licheepi-nano-enable-USB.patch @@ -0,0 +1,55 @@ +From bedc7c5490fce4e57b55e025b4adfbd31f25623d Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Sun, 19 Mar 2023 21:29:32 +0000 +Subject: ARM: dts: suniv: licheepi-nano: enable USB + +Lichee Pi Nano has a Micro-USB connector, with its D+, D- pins connected +to the USB pins of the SoC and ID pin connected to PE2 GPIO. + +Enable the USB functionality. + +Signed-off-by: Icenowy Zheng +Acked-by: Jernej Skrabec +Signed-off-by: Andre Przywara +Link: https://lore.kernel.org/r/20230319212936.26649-3-andre.przywara@arm.com +Signed-off-by: Jernej Skrabec +--- + arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +(limited to 'arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts') + +--- a/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts ++++ b/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts +@@ -6,6 +6,8 @@ + /dts-v1/; + #include "suniv-f1c100s.dtsi" + ++#include ++ + / { + model = "Lichee Pi Nano"; + compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; +@@ -50,8 +52,22 @@ + }; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pe_pins>; + status = "okay"; + }; ++ ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb0_id_det-gpios = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */ ++ status = "okay"; ++}; diff --git a/lede/target/linux/sunxi/patches-6.1/463-f1c100s-sram-driver.patch b/lede/target/linux/sunxi/patches-6.1/463-f1c100s-sram-driver.patch new file mode 100644 index 0000000000..5a6750cd00 --- /dev/null +++ b/lede/target/linux/sunxi/patches-6.1/463-f1c100s-sram-driver.patch @@ -0,0 +1,33 @@ +Allwinner ARMv5 F1C100s has similar sram controller to sun4i A10 +Add compatible strings for it. + +Signed-off-by: Mesih Kilinc +Acked-by: Maxime Ripard +--- + drivers/soc/sunxi/sunxi_sram.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/soc/sunxi/sunxi_sram.c ++++ b/drivers/soc/sunxi/sunxi_sram.c +@@ -99,6 +99,10 @@ static const struct of_device_id sunxi_s + .compatible = "allwinner,sun50i-a64-sram-c", + .data = &sun50i_a64_sram_c.data, + }, ++ { ++ .compatible = "allwinner,suniv-f1c100s-sram-d", ++ .data = &sun4i_a10_sram_d.data, ++ }, + {} + }; + +@@ -429,6 +433,10 @@ static const struct of_device_id sunxi_s + .compatible = "allwinner,sun50i-h616-system-control", + .data = &sun50i_h616_sramc_variant, + }, ++ { ++ .compatible = "allwinner,suniv-f1c100s-system-control", ++ .data = &sun4i_a10_sramc_variant, ++ }, + { }, + }; + MODULE_DEVICE_TABLE(of, sunxi_sram_dt_match); diff --git a/lede/target/linux/sunxi/patches-6.1/464-f1c100s-watchdog-compat.patch b/lede/target/linux/sunxi/patches-6.1/464-f1c100s-watchdog-compat.patch new file mode 100644 index 0000000000..0bd090636c --- /dev/null +++ b/lede/target/linux/sunxi/patches-6.1/464-f1c100s-watchdog-compat.patch @@ -0,0 +1,18 @@ +Allwinner ARMv5 F1C100s has similar watchdog timer to sun6i A31. +Add compatible string for it. + +Signed-off-by: Mesih Kilinc +--- + drivers/watchdog/sunxi_wdt.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/watchdog/sunxi_wdt.c ++++ b/drivers/watchdog/sunxi_wdt.c +@@ -241,6 +241,7 @@ static const struct of_device_id sunxi_w + { .compatible = "allwinner,sun4i-a10-wdt", .data = &sun4i_wdt_reg }, + { .compatible = "allwinner,sun6i-a31-wdt", .data = &sun6i_wdt_reg }, + { .compatible = "allwinner,sun20i-d1-wdt", .data = &sun20i_wdt_reg }, ++ { .compatible = "allwinner,suniv-f1c100s-wdt", .data = &sun6i_wdt_reg }, + { /* sentinel */ } + }; + MODULE_DEVICE_TABLE(of, sunxi_wdt_dt_ids); diff --git a/mihomo/component/dhcp/conn.go b/mihomo/component/dhcp/conn.go index ff26275b18..61c801bd3e 100644 --- a/mihomo/component/dhcp/conn.go +++ b/mihomo/component/dhcp/conn.go @@ -3,6 +3,7 @@ package dhcp import ( "context" "net" + "net/netip" "runtime" "github.com/metacubex/mihomo/component/dialer" @@ -24,5 +25,5 @@ func ListenDHCPClient(ctx context.Context, ifaceName string) (net.PacketConn, er options = append(options, dialer.WithFallbackBind(true)) } - return dialer.ListenPacket(ctx, "udp4", listenAddr, options...) + return dialer.ListenPacket(ctx, "udp4", listenAddr, netip.AddrPortFrom(netip.AddrFrom4([4]byte{255, 255, 255, 255}), 67), options...) } diff --git a/mihomo/component/dialer/bind.go b/mihomo/component/dialer/bind.go index 9b6471a323..de6aacd3bd 100644 --- a/mihomo/component/dialer/bind.go +++ b/mihomo/component/dialer/bind.go @@ -75,7 +75,7 @@ func fallbackBindIfaceToDialer(ifaceName string, dialer *net.Dialer, network str return nil } -func fallbackBindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, address string) (string, error) { +func fallbackBindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, address string, rAddrPort netip.AddrPort) (string, error) { _, port, err := net.SplitHostPort(address) if err != nil { port = "0" diff --git a/mihomo/component/dialer/bind_darwin.go b/mihomo/component/dialer/bind_darwin.go index f83b86f825..fdea24bfdc 100644 --- a/mihomo/component/dialer/bind_darwin.go +++ b/mihomo/component/dialer/bind_darwin.go @@ -46,7 +46,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.A return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return "", err diff --git a/mihomo/component/dialer/bind_linux.go b/mihomo/component/dialer/bind_linux.go index 1ec98f3d2b..79cf735b73 100644 --- a/mihomo/component/dialer/bind_linux.go +++ b/mihomo/component/dialer/bind_linux.go @@ -35,7 +35,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.A return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { addControlToListenConfig(lc, bindControl(ifaceName)) return address, nil diff --git a/mihomo/component/dialer/bind_others.go b/mihomo/component/dialer/bind_others.go index 44181610f0..b7db962a6c 100644 --- a/mihomo/component/dialer/bind_others.go +++ b/mihomo/component/dialer/bind_others.go @@ -11,8 +11,8 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des return fallbackBindIfaceToDialer(ifaceName, dialer, network, destination) } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, network, address string) (string, error) { - return fallbackBindIfaceToListenConfig(ifaceName, lc, network, address) +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, network, address string, rAddrPort netip.AddrPort) (string, error) { + return fallbackBindIfaceToListenConfig(ifaceName, lc, network, address, rAddrPort) } func ParseNetwork(network string, addr netip.Addr) string { diff --git a/mihomo/component/dialer/bind_windows.go b/mihomo/component/dialer/bind_windows.go index 120f165713..98a076d049 100644 --- a/mihomo/component/dialer/bind_windows.go +++ b/mihomo/component/dialer/bind_windows.go @@ -36,7 +36,7 @@ func bind6(handle syscall.Handle, ifaceIdx int) error { return err } -func bindControl(ifaceIdx int) controlFn { +func bindControl(ifaceIdx int, rAddrPort netip.AddrPort) controlFn { return func(ctx context.Context, network, address string, c syscall.RawConn) (err error) { addrPort, err := netip.ParseAddrPort(address) if err == nil && !addrPort.Addr().IsGlobalUnicast() { @@ -55,7 +55,7 @@ func bindControl(ifaceIdx int) controlFn { innerErr = bind4err case "udp6": // golang will set network to udp6 when listenUDP on wildcard ip (eg: ":0", "") - if (!addrPort.Addr().IsValid() || addrPort.Addr().IsUnspecified()) && bind6err != nil { + if (!addrPort.Addr().IsValid() || addrPort.Addr().IsUnspecified()) && bind6err != nil && rAddrPort.Addr().Unmap().Is4() { // try bind ipv6, if failed, ignore. it's a workaround for windows disable interface ipv6 if bind4err != nil { innerErr = fmt.Errorf("%w (%s)", bind6err, bind4err) @@ -76,23 +76,23 @@ func bindControl(ifaceIdx int) controlFn { } } -func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, _ netip.Addr) error { +func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, _ string, destination netip.Addr) error { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return err } - addControlToDialer(dialer, bindControl(ifaceObj.Index)) + addControlToDialer(dialer, bindControl(ifaceObj.Index, netip.AddrPortFrom(destination, 0))) return nil } -func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string) (string, error) { +func bindIfaceToListenConfig(ifaceName string, lc *net.ListenConfig, _, address string, rAddrPort netip.AddrPort) (string, error) { ifaceObj, err := iface.ResolveInterface(ifaceName) if err != nil { return "", err } - addControlToListenConfig(lc, bindControl(ifaceObj.Index)) + addControlToListenConfig(lc, bindControl(ifaceObj.Index, rAddrPort)) return address, nil } diff --git a/mihomo/component/dialer/dialer.go b/mihomo/component/dialer/dialer.go index 12e7c960c5..8fb5a0a649 100644 --- a/mihomo/component/dialer/dialer.go +++ b/mihomo/component/dialer/dialer.go @@ -78,7 +78,7 @@ func DialContext(ctx context.Context, network, address string, options ...Option } } -func ListenPacket(ctx context.Context, network, address string, options ...Option) (net.PacketConn, error) { +func ListenPacket(ctx context.Context, network, address string, rAddrPort netip.AddrPort, options ...Option) (net.PacketConn, error) { if features.CMFA && DefaultSocketHook != nil { return listenPacketHooked(ctx, network, address) } @@ -91,7 +91,7 @@ func ListenPacket(ctx context.Context, network, address string, options ...Optio if cfg.fallbackBind { bind = fallbackBindIfaceToListenConfig } - addr, err := bind(cfg.interfaceName, lc, network, address) + addr, err := bind(cfg.interfaceName, lc, network, address, rAddrPort) if err != nil { return nil, err } @@ -133,11 +133,9 @@ func dialContext(ctx context.Context, network string, destination netip.Addr, po var address string if IP4PEnable { - NewDestination, NewPort := lookupIP4P(destination.String(), port) - address = net.JoinHostPort(NewDestination, NewPort) - } else { - address = net.JoinHostPort(destination.String(), port) + destination, port = lookupIP4P(destination, port) } + address = net.JoinHostPort(destination.String(), port) netDialer := opt.netDialer switch netDialer.(type) { @@ -385,7 +383,7 @@ func (d Dialer) ListenPacket(ctx context.Context, network, address string, rAddr // avoid "The requested address is not valid in its context." opt = WithInterface("") } - return ListenPacket(ctx, ParseNetwork(network, rAddrPort.Addr()), address, opt) + return ListenPacket(ctx, ParseNetwork(network, rAddrPort.Addr()), address, rAddrPort, opt) } func NewDialer(options ...Option) Dialer { @@ -399,13 +397,13 @@ func GetIP4PEnable(enableIP4PConvert bool) { // kanged from https://github.com/heiher/frp/blob/ip4p/client/ip4p.go -func lookupIP4P(addr string, port string) (string, string) { - ip := net.ParseIP(addr) +func lookupIP4P(addr netip.Addr, port string) (netip.Addr, string) { + ip := addr.AsSlice() if ip[0] == 0x20 && ip[1] == 0x01 && ip[2] == 0x00 && ip[3] == 0x00 { - addr = net.IPv4(ip[12], ip[13], ip[14], ip[15]).String() + addr = netip.AddrFrom4([4]byte{ip[12], ip[13], ip[14], ip[15]}) port = strconv.Itoa(int(ip[10])<<8 + int(ip[11])) - log.Debugln("Convert IP4P address %s to %s", ip, net.JoinHostPort(addr, port)) + log.Debugln("Convert IP4P address %s to %s", ip, net.JoinHostPort(addr.String(), port)) return addr, port } return addr, port diff --git a/openwrt-packages/luci-app-lucky/lucky/Makefile b/openwrt-packages/luci-app-lucky/lucky/Makefile index a54eabea83..367d66f93d 100644 --- a/openwrt-packages/luci-app-lucky/lucky/Makefile +++ b/openwrt-packages/luci-app-lucky/lucky/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lucky -PKG_VERSION:=2.7.2 +PKG_VERSION:=2.8.3 PKG_RELEASE:=1 ifeq ($(ARCH),mipsel) @@ -26,8 +26,12 @@ endif ifeq ($(ARCH),arm) LUCKY_ARCH:=armv7 endif + +ifeq ($(ARCH),arm64) + LUCKY_ARCH:=arm64 +endif ifeq ($(BOARD),bcm53xx) - LUCKY_ARCH:=armv6 + LUCKY_ARCH:=armv7 ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),) LUCKY_ARCH:=armv5 endif diff --git a/openwrt-passwall/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall b/openwrt-passwall/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall index e34868b4a0..87638f540d 100644 --- a/openwrt-passwall/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall +++ b/openwrt-passwall/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall @@ -16,7 +16,7 @@ echo $$ > ${LOCK_FILE} /etc/init.d/passwall restart >/dev/null 2>&1 & - echo "passwall: restart when $INTERFACE ifup" > /dev/kmsg + logger -p notice -t network -s "passwall: restart when $INTERFACE ifup" rm -rf ${LOCK_FILE} } diff --git a/ryujinx/src/Ryujinx.Audio/Renderer/Server/Splitter/SplitterState.cs b/ryujinx/src/Ryujinx.Audio/Renderer/Server/Splitter/SplitterState.cs index 109c81b23a..944f092d2c 100644 --- a/ryujinx/src/Ryujinx.Audio/Renderer/Server/Splitter/SplitterState.cs +++ b/ryujinx/src/Ryujinx.Audio/Renderer/Server/Splitter/SplitterState.cs @@ -159,6 +159,11 @@ namespace Ryujinx.Audio.Renderer.Server.Splitter } } + if (destinationCount < parameter.DestinationCount) + { + input.Advance((parameter.DestinationCount - destinationCount) * sizeof(int)); + } + Debug.Assert(parameter.Id == Id); if (parameter.Id == Id) diff --git a/sing-box/.github/workflows/linux.yml b/sing-box/.github/workflows/linux.yml index 9bc25020ee..28ac185de3 100644 --- a/sing-box/.github/workflows/linux.yml +++ b/sing-box/.github/workflows/linux.yml @@ -17,6 +17,11 @@ jobs: uses: actions/setup-go@v5 with: go-version: ^1.22 + - name: Extract signing key + run: |- + cat > $HOME/.gnupg/sagernet.key < /dev/null @@ -21,7 +21,7 @@ icon: material/package ```bash sudo dnf -y install dnf-plugins-core - sudo dnf config-manager --add-repo https://sing-box.app/rpm.repo + sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo sudo dnf install sing-box # or sing-box-beta ``` @@ -29,7 +29,7 @@ icon: material/package ```bash sudo yum install -y yum-utils - sudo yum-config-manager --add-repo https://sing-box.app/rpm.repo + sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo sudo yum install sing-box # or sing-box-beta ``` diff --git a/sing-box/docs/installation/package-manager.zh.md b/sing-box/docs/installation/package-manager.zh.md index 4eb522a123..3c2a909425 100644 --- a/sing-box/docs/installation/package-manager.zh.md +++ b/sing-box/docs/installation/package-manager.zh.md @@ -9,7 +9,7 @@ icon: material/package === ":material-debian: Debian / APT" ```bash - sudo curl -fsSL https://deb.sagernet.org/gpg.key -o /etc/apt/keyrings/sagernet.asc + sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc sudo chmod a+r /etc/apt/keyrings/sagernet.asc echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \ sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null @@ -21,7 +21,7 @@ icon: material/package ```bash sudo dnf -y install dnf-plugins-core - sudo dnf config-manager --add-repo https://sing-box.app/rpm.repo + sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo sudo dnf install sing-box # or sing-box-beta ``` @@ -29,7 +29,7 @@ icon: material/package ```bash sudo yum install -y yum-utils - sudo yum-config-manager --add-repo https://sing-box.app/rpm.repo + sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo sudo yum install sing-box # or sing-box-beta ``` diff --git a/sing-box/docs/installation/tools/rpm.repo b/sing-box/docs/installation/tools/rpm.repo deleted file mode 100644 index a2d0c86c07..0000000000 --- a/sing-box/docs/installation/tools/rpm.repo +++ /dev/null @@ -1,6 +0,0 @@ -[sing-box] -name=sing-box -baseurl=https://rpm.sagernet.org/ -enabled=1 -gpgcheck=1 -gpgkey=https://deb.sagernet.org/gpg.key diff --git a/sing-box/docs/installation/tools/sing-box.repo b/sing-box/docs/installation/tools/sing-box.repo new file mode 100644 index 0000000000..b94c1ac149 --- /dev/null +++ b/sing-box/docs/installation/tools/sing-box.repo @@ -0,0 +1,8 @@ +[sing-box] +name=sing-box +baseurl=https://rpm.sagernet.org/ +metalink=https://sing-box.app/sing-box.repo +enabled=1 +repo_gpgcheck=1 +gpgcheck=1 +gpgkey=https://sing-box.app/gpg.key diff --git a/sing-box/go.mod b/sing-box/go.mod index 7b72f1184d..0208867a11 100644 --- a/sing-box/go.mod +++ b/sing-box/go.mod @@ -26,7 +26,7 @@ require ( github.com/sagernet/gvisor v0.0.0-20240315080113-799fb6b6d311 github.com/sagernet/quic-go v0.42.0-beta.2 github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 - github.com/sagernet/sing v0.4.0-beta.12 + github.com/sagernet/sing v0.4.0-beta.14 github.com/sagernet/sing-dns v0.2.0-beta.16 github.com/sagernet/sing-mux v0.2.0 github.com/sagernet/sing-quic v0.1.12-beta.1 diff --git a/sing-box/go.sum b/sing-box/go.sum index b8242dff88..a699b8b36b 100644 --- a/sing-box/go.sum +++ b/sing-box/go.sum @@ -106,8 +106,8 @@ github.com/sagernet/quic-go v0.42.0-beta.2/go.mod h1:lf8OYop+fMxIlrfM/ZHpENt/7ZD 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.4.0-beta.12 h1:f0f8DBPNf91NoAnJWm25LjPy/rC6u0R/nWIsGysl1cc= -github.com/sagernet/sing v0.4.0-beta.12/go.mod h1:+60H3Cm91RnL9dpVGWDPHt0zTQImO9Vfqt9a4rSambI= +github.com/sagernet/sing v0.4.0-beta.14 h1:9I1gWUUOguwfjv1KVdSNZFXARMSk5RsUHH49C2E9GIc= +github.com/sagernet/sing v0.4.0-beta.14/go.mod h1:+60H3Cm91RnL9dpVGWDPHt0zTQImO9Vfqt9a4rSambI= github.com/sagernet/sing-dns v0.2.0-beta.16 h1:bzd4B8eHD7/WO3HrYknvgE8A56/R3n5oXBjNF97iPzQ= github.com/sagernet/sing-dns v0.2.0-beta.16/go.mod h1:XU6Vqr6aHcMz/34Fcv8jmXpRCEuShzW+B7Qg1Xe1nxY= github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo= diff --git a/sing-box/transport/fakeip/packet.go b/sing-box/transport/fakeip/packet.go deleted file mode 100644 index 620acb929d..0000000000 --- a/sing-box/transport/fakeip/packet.go +++ /dev/null @@ -1,55 +0,0 @@ -package fakeip - -import ( - "github.com/sagernet/sing/common/buf" - M "github.com/sagernet/sing/common/metadata" - N "github.com/sagernet/sing/common/network" -) - -var _ N.PacketConn = (*NATPacketConn)(nil) - -type NATPacketConn struct { - N.PacketConn - origin M.Socksaddr - destination M.Socksaddr -} - -func NewNATPacketConn(conn N.PacketConn, origin M.Socksaddr, destination M.Socksaddr) *NATPacketConn { - return &NATPacketConn{ - PacketConn: conn, - origin: socksaddrWithoutPort(origin), - destination: socksaddrWithoutPort(destination), - } -} - -func (c *NATPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error) { - destination, err = c.PacketConn.ReadPacket(buffer) - if socksaddrWithoutPort(destination) == c.origin { - destination = M.Socksaddr{ - Addr: c.destination.Addr, - Fqdn: c.destination.Fqdn, - Port: destination.Port, - } - } - return -} - -func (c *NATPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error { - if socksaddrWithoutPort(destination) == c.destination { - destination = M.Socksaddr{ - Addr: c.origin.Addr, - Fqdn: c.origin.Fqdn, - Port: destination.Port, - } - } - return c.PacketConn.WritePacket(buffer, destination) -} - -func (c *NATPacketConn) Upstream() any { - return c.PacketConn -} - -func socksaddrWithoutPort(destination M.Socksaddr) M.Socksaddr { - destination.Port = 0 - return destination -} diff --git a/sing-box/transport/fakeip/packet_wait.go b/sing-box/transport/fakeip/packet_wait.go deleted file mode 100644 index 9fa4a5bd78..0000000000 --- a/sing-box/transport/fakeip/packet_wait.go +++ /dev/null @@ -1,37 +0,0 @@ -package fakeip - -import ( - "github.com/sagernet/sing/common/buf" - "github.com/sagernet/sing/common/bufio" - M "github.com/sagernet/sing/common/metadata" - N "github.com/sagernet/sing/common/network" -) - -func (c *NATPacketConn) CreatePacketReadWaiter() (N.PacketReadWaiter, bool) { - waiter, created := bufio.CreatePacketReadWaiter(c.PacketConn) - if !created { - return nil, false - } - return &waitNATPacketConn{c, waiter}, true -} - -type waitNATPacketConn struct { - *NATPacketConn - readWaiter N.PacketReadWaiter -} - -func (c *waitNATPacketConn) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool) { - return c.readWaiter.InitializeReadWaiter(options) -} - -func (c *waitNATPacketConn) WaitReadPacket() (buffer *buf.Buffer, destination M.Socksaddr, err error) { - buffer, destination, err = c.readWaiter.WaitReadPacket() - if err == nil && socksaddrWithoutPort(destination) == c.origin { - destination = M.Socksaddr{ - Addr: c.destination.Addr, - Fqdn: c.destination.Fqdn, - Port: destination.Port, - } - } - return -} diff --git a/small/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall b/small/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall index e34868b4a0..87638f540d 100644 --- a/small/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall +++ b/small/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall @@ -16,7 +16,7 @@ echo $$ > ${LOCK_FILE} /etc/init.d/passwall restart >/dev/null 2>&1 & - echo "passwall: restart when $INTERFACE ifup" > /dev/kmsg + logger -p notice -t network -s "passwall: restart when $INTERFACE ifup" rm -rf ${LOCK_FILE} } diff --git a/small/v2ray-geodata/Makefile b/small/v2ray-geodata/Makefile index d0f005a9a5..bdb2bf76e6 100644 --- a/small/v2ray-geodata/Makefile +++ b/small/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=492a0af649accb4e9ae91f80a272e295ce6444489f6d85b389cdc635234c6ddf endef -GEOSITE_VER:=20240404120755 +GEOSITE_VER:=20240410101316 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=a78540f352e21d9ffe070f60b7a0e1ae9d7696f4986e0dab2b53bbfc6e24a75b + HASH:=e74d3da9d4db57fba399f9093ffabbc6630a7cf10965ebcde07725a0f00e24d7 endef GEOSITE_IRAN_VER:=202404080026 diff --git a/suyu/src/common/settings.h b/suyu/src/common/settings.h index 829759c94b..98c3958c00 100644 --- a/suyu/src/common/settings.h +++ b/suyu/src/common/settings.h @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by palfaiate on <2024/03/07> - #pragma once #include diff --git a/suyu/src/suyu/game_list.cpp b/suyu/src/suyu/game_list.cpp index bda0d489bf..132ff30b0c 100644 --- a/suyu/src/suyu/game_list.cpp +++ b/suyu/src/suyu/game_list.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later // Modified by palfaiate on <2024/03/07> +// Reverted palfaiate's changes on <2024/03/25> -Nine-Ball #include #include @@ -580,6 +581,9 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri remove_menu->addSeparator(); QAction* remove_shader_cache = remove_menu->addAction(tr("Remove All Pipeline Caches")); QAction* remove_all_content = remove_menu->addAction(tr("Remove All Installed Contents")); + QMenu* dump_romfs_menu = context_menu.addMenu(tr("Dump RomFS")); + QAction* dump_romfs = dump_romfs_menu->addAction(tr("Dump RomFS")); + QAction* dump_romfs_sdmc = dump_romfs_menu->addAction(tr("Dump RomFS to SDMC")); QAction* verify_integrity = context_menu.addAction(tr("Verify Integrity")); QAction* copy_tid = context_menu.addAction(tr("Copy Title ID to Clipboard")); QAction* navigate_to_gamedb_entry = context_menu.addAction(tr("Navigate to GameDB entry")); @@ -647,6 +651,12 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri connect(remove_cache_storage, &QAction::triggered, [this, program_id, path] { emit RemoveFileRequested(program_id, GameListRemoveTarget::CacheStorage, path); }); + connect(dump_romfs, &QAction::triggered, [this, program_id, path]() { + emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::Normal); + }); + connect(dump_romfs_sdmc, &QAction::triggered, [this, program_id, path]() { + emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::SDMC); + }); connect(verify_integrity, &QAction::triggered, [this, path]() { emit VerifyIntegrityRequested(path); }); connect(copy_tid, &QAction::triggered, diff --git a/suyu/src/suyu/game_list.h b/suyu/src/suyu/game_list.h index 7568e1b6e0..4adb6403ef 100644 --- a/suyu/src/suyu/game_list.h +++ b/suyu/src/suyu/game_list.h @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later // Modified by palfaiate on <2024/03/07> +// Reverted palfaiate's changes on <2024/03/25> -Nine-Ball #pragma once @@ -52,6 +53,11 @@ enum class GameListRemoveTarget { CacheStorage, }; +enum class DumpRomFSTarget { + Normal, + SDMC, +}; + enum class GameListShortcutTarget { Desktop, Applications, @@ -113,6 +119,7 @@ signals: void RemoveFileRequested(u64 program_id, GameListRemoveTarget target, const std::string& game_path); void RemovePlayTimeRequested(u64 program_id); + void DumpRomFSRequested(u64 program_id, const std::string& game_path, DumpRomFSTarget target); void VerifyIntegrityRequested(const std::string& game_path); void CopyTIDRequested(u64 program_id); void CreateShortcut(u64 program_id, const std::string& game_path, diff --git a/suyu/src/suyu/main.cpp b/suyu/src/suyu/main.cpp index a7a61f5cb3..baa98f2849 100644 --- a/suyu/src/suyu/main.cpp +++ b/suyu/src/suyu/main.cpp @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: 2014 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by palfaiate on <2024/03/07> - #include #include #include @@ -55,6 +53,18 @@ #include "suyu/multiplayer/state.h" #include "suyu/util/controller_navigation.h" +// These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows +static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper( + const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::OpenMode mode) { + return vfs->CreateDirectory(path, mode); +} + +// Overloaded function, also removed by palafiate +static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::VirtualDir& dir, + const std::string& path) { + return dir->CreateFile(path); +} + #include #include @@ -1465,6 +1475,7 @@ void GMainWindow::ConnectWidgetEvents() { connect(game_list, &GameList::RemoveFileRequested, this, &GMainWindow::OnGameListRemoveFile); connect(game_list, &GameList::RemovePlayTimeRequested, this, &GMainWindow::OnGameListRemovePlayTimeData); + connect(game_list, &GameList::DumpRomFSRequested, this, &GMainWindow::OnGameListDumpRomFS); connect(game_list, &GameList::VerifyIntegrityRequested, this, &GMainWindow::OnGameListVerifyIntegrity); connect(game_list, &GameList::CopyTIDRequested, this, &GMainWindow::OnGameListCopyTID); @@ -2369,6 +2380,68 @@ void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) { QDesktopServices::openUrl(QUrl::fromLocalFile(qt_shader_cache_path)); } +static bool RomFSRawCopy(size_t total_size, size_t& read_size, QProgressDialog& dialog, + const FileSys::VirtualDir& src, const FileSys::VirtualDir& dest, + bool full) { + if (src == nullptr || dest == nullptr || !src->IsReadable() || !dest->IsWritable()) + return false; + if (dialog.wasCanceled()) + return false; + + std::vector buffer(CopyBufferSize); + auto last_timestamp = std::chrono::steady_clock::now(); + + const auto QtRawCopy = [&](const FileSys::VirtualFile& src_file, + const FileSys::VirtualFile& dest_file) { + if (src_file == nullptr || dest_file == nullptr) { + return false; + } + if (!dest_file->Resize(src_file->GetSize())) { + return false; + } + + for (std::size_t i = 0; i < src_file->GetSize(); i += buffer.size()) { + if (dialog.wasCanceled()) { + dest_file->Resize(0); + return false; + } + + using namespace std::literals::chrono_literals; + const auto new_timestamp = std::chrono::steady_clock::now(); + + if ((new_timestamp - last_timestamp) > 33ms) { + last_timestamp = new_timestamp; + dialog.setValue( + static_cast(std::min(read_size, total_size) * 100 / total_size)); + QCoreApplication::processEvents(); + } + + const auto read = src_file->Read(buffer.data(), buffer.size(), i); + dest_file->Write(buffer.data(), read, i); + + read_size += read; + } + + return true; + }; + + if (full) { + for (const auto& file : src->GetFiles()) { + const auto out = VfsDirectoryCreateFileWrapper(dest, file->GetName()); + if (!QtRawCopy(file, out)) + return false; + } + } + + for (const auto& dir : src->GetSubdirectories()) { + const auto out = dest->CreateSubdirectory(dir->GetName()); + if (!RomFSRawCopy(total_size, read_size, dialog, dir, out, full)) + return false; + } + + return true; +} + QString GMainWindow::GetGameListErrorRemoving(InstalledEntryType type) const { switch (type) { case InstalledEntryType::Game: @@ -2610,6 +2683,121 @@ void GMainWindow::RemoveCacheStorage(u64 program_id) { Common::FS::RemoveDirRecursively(path); } +void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path, + DumpRomFSTarget target) { + const auto failed = [this] { + QMessageBox::warning(this, tr("RomFS Extraction Failed!"), + tr("There was an error copying the RomFS files or the user " + "cancelled the operation.")); + }; + + const auto loader = + Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::OpenMode::Read)); + if (loader == nullptr) { + failed(); + return; + } + + FileSys::VirtualFile packed_update_raw{}; + loader->ReadUpdateRaw(packed_update_raw); + + const auto& installed = system->GetContentProvider(); + + u64 title_id{}; + u8 raw_type{}; + if (!SelectRomFSDumpTarget(installed, program_id, &title_id, &raw_type)) { + failed(); + return; + } + + const auto type = static_cast(raw_type); + const auto base_nca = installed.GetEntry(title_id, type); + if (!base_nca) { + failed(); + return; + } + + const FileSys::NCA update_nca{packed_update_raw, nullptr}; + if (type != FileSys::ContentRecordType::Program || + update_nca.GetStatus() != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS || + update_nca.GetTitleId() != FileSys::GetUpdateTitleID(title_id)) { + packed_update_raw = {}; + } + + const auto base_romfs = base_nca->GetRomFS(); + const auto dump_dir = + target == DumpRomFSTarget::Normal + ? Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir) + : Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "atmosphere" / "contents"; + const auto romfs_dir = fmt::format("{:016X}/romfs", title_id); + + const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir); + + const FileSys::PatchManager pm{title_id, system->GetFileSystemController(), installed}; + auto romfs = pm.PatchRomFS(base_nca.get(), base_romfs, type, packed_update_raw, false); + + const auto out = VfsFilesystemCreateDirectoryWrapper(vfs, path, FileSys::OpenMode::ReadWrite); + + if (out == nullptr) { + failed(); + vfs->DeleteDirectory(path); + return; + } + + bool ok = false; + const QStringList selections{tr("Full"), tr("Skeleton")}; + const auto res = QInputDialog::getItem( + this, tr("Select RomFS Dump Mode"), + tr("Please select the how you would like the RomFS dumped.
Full will copy all of the " + "files into the new directory while
skeleton will only create the directory " + "structure."), + selections, 0, false, &ok); + if (!ok) { + failed(); + vfs->DeleteDirectory(path); + return; + } + + const auto extracted = FileSys::ExtractRomFS(romfs); + if (extracted == nullptr) { + failed(); + return; + } + + const auto full = res == selections.constFirst(); + + // The expected required space is the size of the RomFS + 1 GiB + const auto minimum_free_space = romfs->GetSize() + 0x40000000; + + if (full && Common::FS::GetFreeSpaceSize(path) < minimum_free_space) { + QMessageBox::warning(this, tr("RomFS Extraction Failed!"), + tr("There is not enough free space at %1 to extract the RomFS. Please " + "free up space or select a different dump directory at " + "Emulation > Configure > System > Filesystem > Dump Root") + .arg(QString::fromStdString(path))); + return; + } + + QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0, 100, this); + progress.setWindowModality(Qt::WindowModal); + progress.setMinimumDuration(100); + progress.setAutoClose(false); + progress.setAutoReset(false); + + size_t read_size = 0; + + if (RomFSRawCopy(romfs->GetSize(), read_size, progress, extracted, out, full)) { + progress.close(); + QMessageBox::information(this, tr("RomFS Extraction Succeeded!"), + tr("The operation completed successfully.")); + QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(path))); + } else { + progress.close(); + failed(); + vfs->DeleteDirectory(path); + } +} + void GMainWindow::OnGameListVerifyIntegrity(const std::string& game_path) { const auto NotImplemented = [this] { QMessageBox::warning(this, tr("Integrity verification couldn't be performed!"), @@ -4680,6 +4868,66 @@ void GMainWindow::SetFirmwareVersion() { firmware_label->setToolTip(QString::fromStdString(display_title)); } +bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id, + u64* selected_title_id, u8* selected_content_record_type) { + using ContentInfo = std::tuple; + boost::container::flat_set available_title_ids; + + const auto RetrieveEntries = [&](FileSys::TitleType title_type, + FileSys::ContentRecordType record_type) { + const auto entries = installed.ListEntriesFilter(title_type, record_type); + for (const auto& entry : entries) { + if (FileSys::GetBaseTitleID(entry.title_id) == program_id && + installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::Success) { + available_title_ids.insert({entry.title_id, title_type, record_type}); + } + } + }; + + RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::Program); + RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::HtmlDocument); + RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::LegalInformation); + RetrieveEntries(FileSys::TitleType::AOC, FileSys::ContentRecordType::Data); + + if (available_title_ids.empty()) { + return false; + } + + size_t title_index = 0; + + if (available_title_ids.size() > 1) { + QStringList list; + for (auto& [title_id, title_type, record_type] : available_title_ids) { + const auto hex_title_id = QString::fromStdString(fmt::format("{:X}", title_id)); + if (record_type == FileSys::ContentRecordType::Program) { + list.push_back(QStringLiteral("Program [%1]").arg(hex_title_id)); + } else if (record_type == FileSys::ContentRecordType::HtmlDocument) { + list.push_back(QStringLiteral("HTML document [%1]").arg(hex_title_id)); + } else if (record_type == FileSys::ContentRecordType::LegalInformation) { + list.push_back(QStringLiteral("Legal information [%1]").arg(hex_title_id)); + } else { + list.push_back( + QStringLiteral("DLC %1 [%2]").arg(title_id & 0x7FF).arg(hex_title_id)); + } + } + + bool ok; + const auto res = QInputDialog::getItem( + this, tr("Select RomFS Dump Target"), + tr("Please select which RomFS you would like to dump."), list, 0, false, &ok); + if (!ok) { + return false; + } + + title_index = list.indexOf(res); + } + + const auto& [title_id, title_type, record_type] = *available_title_ids.nth(title_index); + *selected_title_id = title_id; + *selected_content_record_type = static_cast(record_type); + return true; +} + bool GMainWindow::ConfirmClose() { if (emu_thread == nullptr || UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Never) { diff --git a/suyu/src/suyu/main.h b/suyu/src/suyu/main.h index e20950e238..b2b0f9afc4 100644 --- a/suyu/src/suyu/main.h +++ b/suyu/src/suyu/main.h @@ -51,6 +51,7 @@ class WaitTreeWidget; enum class GameListOpenTarget; enum class GameListRemoveTarget; enum class GameListShortcutTarget; +enum class DumpRomFSTarget; enum class InstalledEntryType; class GameListPlaceholder; @@ -347,6 +348,7 @@ private slots: void OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target, const std::string& game_path); void OnGameListRemovePlayTimeData(u64 program_id); + void OnGameListDumpRomFS(u64 program_id, const std::string& game_path, DumpRomFSTarget target); void OnGameListVerifyIntegrity(const std::string& game_path); void OnGameListCopyTID(u64 program_id); void OnGameListNavigateToGamedbEntry(u64 program_id, diff --git a/v2rayn/v2rayN/v2rayN/Common/Utils.cs b/v2rayn/v2rayN/v2rayN/Common/Utils.cs index 64df907e74..0fe1a66623 100644 --- a/v2rayn/v2rayN/v2rayN/Common/Utils.cs +++ b/v2rayn/v2rayN/v2rayN/Common/Utils.cs @@ -1186,4 +1186,4 @@ namespace v2rayN #endregion Windows API } -} +} \ No newline at end of file diff --git a/v2rayn/v2rayN/v2rayN/Global.cs b/v2rayn/v2rayN/v2rayN/Global.cs index 19b3cf35d4..d5033de2d3 100644 --- a/v2rayn/v2rayN/v2rayN/Global.cs +++ b/v2rayn/v2rayN/v2rayN/Global.cs @@ -23,6 +23,7 @@ namespace v2rayN public const string SpeedPingTestUrl = @"https://www.google.com/generate_204"; public const string JuicityCoreUrl = "https://github.com/juicity/juicity/releases"; public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/"; + public const string SingboxRulesetUrl = @"https://raw.githubusercontent.com/SagerNet/sing-{0}/rule-set/{1}.srs"; public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw="; public const string ConfigFileName = "guiNConfig.json"; @@ -142,7 +143,7 @@ namespace v2rayN { {EConfigType.VMess,"vmess"}, {EConfigType.Shadowsocks,"shadowsocks"}, - {EConfigType.Socks,"socks"}, + {EConfigType.Socks,"socks"}, {EConfigType.Http,"http"}, {EConfigType.VLESS,"vless"}, {EConfigType.Trojan,"trojan"}, diff --git a/v2rayn/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayn/v2rayN/v2rayN/Handler/ConfigHandler.cs index bf99b053cf..cec06f2ec9 100644 --- a/v2rayn/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayn/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -1674,14 +1674,15 @@ namespace v2rayN.Handler public static int InitBuiltinRouting(Config config, bool blImportAdvancedRules = false) { + var ver = "V2-"; var items = LazyConfig.Instance.RoutingItems(); - if (blImportAdvancedRules || items.Count <= 0) + if (blImportAdvancedRules || items.Where(t => t.remarks.StartsWith(ver)).ToList().Count <= 0) { var maxSort = items.Count; //Bypass the mainland var item2 = new RoutingItem() { - remarks = "绕过大陆(Whitelist)", + remarks = $"{ver}绕过大陆(Whitelist)", url = string.Empty, sort = maxSort + 1, }; @@ -1690,7 +1691,7 @@ namespace v2rayN.Handler //Blacklist var item3 = new RoutingItem() { - remarks = "黑名单(Blacklist)", + remarks = $"{ver}黑名单(Blacklist)", url = string.Empty, sort = maxSort + 2, }; @@ -1699,7 +1700,7 @@ namespace v2rayN.Handler //Global var item1 = new RoutingItem() { - remarks = "全局(Global)", + remarks = $"{ver}全局(Global)", url = string.Empty, sort = maxSort + 3, }; diff --git a/v2rayn/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayn/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs index 635967c707..37b0a235ee 100644 --- a/v2rayn/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs +++ b/v2rayn/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs @@ -56,6 +56,8 @@ namespace v2rayN.Handler GenStatistic(singboxConfig); + ConvertGeo2Ruleset(singboxConfig); + msg = string.Format(ResUI.SuccessfulConfiguration, ""); } catch (Exception ex) @@ -653,6 +655,7 @@ namespace v2rayN.Handler { rule.inbound = item.inboundTag; } + var rule1 = JsonUtils.DeepCopy(rule); var rule2 = JsonUtils.DeepCopy(rule); var rule3 = JsonUtils.DeepCopy(rule); @@ -662,11 +665,11 @@ namespace v2rayN.Handler var countDomain = 0; foreach (var it in item.domain) { - if (ParseV2Domain(it, rule)) countDomain++; + if (ParseV2Domain(it, rule1)) countDomain++; } if (countDomain > 0) { - rules.Add(rule); + rules.Add(rule1); hasDomainIp = true; } } @@ -756,6 +759,10 @@ namespace v2rayN.Handler { return false; } + else if (address.Equals("geoip:private")) + { + rule.ip_is_private = true; + } else if (address.StartsWith("geoip:")) { if (rule.geoip is null) { rule.geoip = new(); } @@ -773,28 +780,18 @@ namespace v2rayN.Handler { try { - Dns4Sbox? dns4Sbox; + var item = LazyConfig.Instance.GetDNSItem(ECoreType.sing_box); + var strDNS = string.Empty; if (_config.tunModeItem.enableTun) { - var item = LazyConfig.Instance.GetDNSItem(ECoreType.sing_box); - var tunDNS = item?.tunDNS; - if (Utils.IsNullOrEmpty(tunDNS)) - { - tunDNS = Utils.GetEmbedText(Global.TunSingboxDNSFileName); - } - dns4Sbox = JsonUtils.Deserialize(tunDNS); + strDNS = Utils.IsNullOrEmpty(item?.tunDNS) ? Utils.GetEmbedText(Global.TunSingboxDNSFileName) : item?.tunDNS; } else { - var item = LazyConfig.Instance.GetDNSItem(ECoreType.sing_box); - var normalDNS = item?.normalDNS; - if (Utils.IsNullOrEmpty(normalDNS)) - { - normalDNS = "{\"servers\":[{\"address\":\"tcp://8.8.8.8\"}]}"; - } - - dns4Sbox = JsonUtils.Deserialize(normalDNS); + strDNS = Utils.IsNullOrEmpty(item?.normalDNS) ? Utils.GetEmbedText(Global.DNSSingboxNormalFileName) : item?.normalDNS; } + + var dns4Sbox = JsonUtils.Deserialize(strDNS); if (dns4Sbox is null) { return 0; @@ -831,10 +828,10 @@ namespace v2rayN.Handler { singboxConfig.experimental = new Experimental4Sbox() { - //cache_file = new CacheFile4Sbox() - //{ - // enabled = true - //}, + cache_file = new CacheFile4Sbox() + { + enabled = true + }, //v2ray_api = new V2ray_Api4Sbox() //{ // listen = $"{Global.Loopback}:{Global.StatePort}", @@ -852,6 +849,59 @@ namespace v2rayN.Handler return 0; } + private int ConvertGeo2Ruleset(SingboxConfig singboxConfig) + { + var geosite = "geosite"; + var geoip = "geoip"; + var ruleSets = new List(); + + //convert route geosite & geoip to ruleset + foreach (var rule in singboxConfig.route.rules.Where(t => t.geosite?.Count > 0).ToList() ?? []) + { + rule.rule_set = rule?.geosite?.Select(t => $"{geosite}-{t}").ToList(); + rule.geosite = null; + ruleSets.AddRange(rule.rule_set); + } + foreach (var rule in singboxConfig.route.rules.Where(t => t.geoip?.Count > 0).ToList() ?? []) + { + rule.rule_set = rule?.geoip?.Select(t => $"{geoip}-{t}").ToList(); + rule.geoip = null; + ruleSets.AddRange(rule.rule_set); + } + + //convert dns geosite & geoip to ruleset + foreach (var rule in singboxConfig.dns?.rules.Where(t => t.geosite?.Count > 0).ToList() ?? []) + { + rule.rule_set = rule?.geosite?.Select(t => $"{geosite}-{t}").ToList(); + rule.geosite = null; + } + foreach (var rule in singboxConfig.dns?.rules.Where(t => t.geoip?.Count > 0).ToList() ?? []) + { + rule.rule_set = rule?.geoip?.Select(t => $"{geoip}-{t}").ToList(); + rule.geoip = null; + } + foreach (var dnsRule in singboxConfig.dns?.rules.Where(t => t.rule_set?.Count > 0).ToList() ?? []) + { + ruleSets.AddRange(dnsRule.rule_set); + } + + //Add ruleset srs + singboxConfig.route.rule_set = []; + foreach (var item in new HashSet(ruleSets)) + { + singboxConfig.route.rule_set.Add(new() + { + type = "remote", + format = "binary", + tag = item, + url = string.Format(Global.SingboxRulesetUrl, item.StartsWith(geosite) ? geosite : geoip, item), + download_detour = Global.ProxyTag + }); + } + + return 0; + } + #endregion private gen function #region Gen speedtest config diff --git a/v2rayn/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs b/v2rayn/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs index 92252850f5..64e8e4da73 100644 --- a/v2rayn/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs +++ b/v2rayn/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs @@ -730,7 +730,7 @@ namespace v2rayN.Handler var domainStrategy4Freedom = item?.domainStrategy4Freedom; if (Utils.IsNullOrEmpty(normalDNS)) { - normalDNS = "1.1.1.1,8.8.8.8"; + normalDNS = Utils.GetEmbedText(Global.DNSV2rayNormalFileName); } //Outbound Freedom domainStrategy diff --git a/v2rayn/v2rayN/v2rayN/Handler/ShareHandler.cs b/v2rayn/v2rayN/v2rayN/Handler/ShareHandler.cs index 90490578fc..a647b5bb21 100644 --- a/v2rayn/v2rayN/v2rayN/Handler/ShareHandler.cs +++ b/v2rayn/v2rayN/v2rayN/Handler/ShareHandler.cs @@ -982,7 +982,7 @@ namespace v2rayN.Handler break; case nameof(ETransport.grpc): - item.requestHost = Utils.UrlDecode(query["authority"] ?? ""); + item.requestHost = Utils.UrlDecode(query["authority"] ?? ""); item.path = Utils.UrlDecode(query["serviceName"] ?? ""); item.headerType = Utils.UrlDecode(query["mode"] ?? Global.GrpcGunMode); break; diff --git a/v2rayn/v2rayN/v2rayN/Models/SingboxConfig.cs b/v2rayn/v2rayN/v2rayN/Models/SingboxConfig.cs index 476dcaef1c..44b0d7d6a1 100644 --- a/v2rayn/v2rayN/v2rayN/Models/SingboxConfig.cs +++ b/v2rayn/v2rayN/v2rayN/Models/SingboxConfig.cs @@ -35,6 +35,7 @@ { public bool? auto_detect_interface { get; set; } public List rules { get; set; } + public List? rule_set { get; set; } } [Serializable] @@ -48,6 +49,7 @@ public string type { get; set; } public string mode { get; set; } public string network { get; set; } + public bool? ip_is_private { get; set; } public List? port { get; set; } public List? port_range { get; set; } public List? geosite { get; set; } @@ -58,8 +60,8 @@ public List? geoip { get; set; } public List? ip_cidr { get; set; } public List? source_ip_cidr { get; set; } - public List? process_name { get; set; } + public List? rule_set { get; set; } } [Serializable] @@ -230,4 +232,13 @@ public string? cache_id { get; set; } public bool? store_fakeip { get; set; } } + + public class Ruleset4Sbox + { + public string? tag { get; set; } + public string? type { get; set; } + public string? format { get; set; } + public string? url { get; set; } + public string? download_detour { get; set; } + } } \ No newline at end of file diff --git a/v2rayn/v2rayN/v2rayN/Sample/custom_routing_black b/v2rayn/v2rayN/v2rayN/Sample/custom_routing_black index 3fbd928acd..37913f702b 100644 --- a/v2rayn/v2rayN/v2rayN/Sample/custom_routing_black +++ b/v2rayn/v2rayN/v2rayN/Sample/custom_routing_black @@ -13,20 +13,10 @@ }, { "outboundTag": "proxy", - "ip": [ - "geoip:cloudflare", - "geoip:cloudfront", - "geoip:facebook", - "geoip:fastly", - "geoip:google", - "geoip:netflix", - "geoip:telegram", - "geoip:twitter" - ], + "domain": [ - "geosite:gfw", - "geosite:greatfire", - "geosite:tld-!cn" + "geosite:geolocation-!cn", + "geosite:greatfire" ] }, { diff --git a/v2rayn/v2rayN/v2rayN/Sample/custom_routing_white b/v2rayn/v2rayN/v2rayN/Sample/custom_routing_white index a708ae0d59..37ed49dada 100644 --- a/v2rayn/v2rayN/v2rayN/Sample/custom_routing_white +++ b/v2rayn/v2rayN/v2rayN/Sample/custom_routing_white @@ -15,7 +15,8 @@ { "outboundTag": "direct", "domain": [ - "geosite:cn" + "geosite:cn", + "geosite:geolocation-cn" ] }, { diff --git a/v2rayn/v2rayN/v2rayN/Sample/dns_singbox_normal b/v2rayn/v2rayN/v2rayN/Sample/dns_singbox_normal index 0aa14b1f53..d8c5c74e7f 100644 --- a/v2rayn/v2rayN/v2rayN/Sample/dns_singbox_normal +++ b/v2rayn/v2rayN/v2rayN/Sample/dns_singbox_normal @@ -19,14 +19,14 @@ ], "rules": [ { - "geosite": [ - "geolocation-!cn" + "rule_set": [ + "geosite-geolocation-!cn" ], "server": "remote" }, { - "geosite": [ - "category-ads-all" + "rule_set": [ + "geosite-category-ads-all" ], "server": "block" } diff --git a/v2rayn/v2rayN/v2rayN/Sample/dns_v2ray_normal b/v2rayn/v2rayN/v2rayN/Sample/dns_v2ray_normal index add15f19cb..c4b9ba02a4 100644 --- a/v2rayn/v2rayN/v2rayN/Sample/dns_v2ray_normal +++ b/v2rayn/v2rayN/v2rayN/Sample/dns_v2ray_normal @@ -7,7 +7,8 @@ { "address": "223.5.5.5", "domains": [ - "geosite:cn" + "geosite:cn", + "geosite:geolocation-cn" ], "expectIPs": [ "geoip:cn" diff --git a/v2rayn/v2rayN/v2rayN/Sample/tun_singbox_dns b/v2rayn/v2rayN/v2rayN/Sample/tun_singbox_dns index 0aa14b1f53..d8c5c74e7f 100644 --- a/v2rayn/v2rayN/v2rayN/Sample/tun_singbox_dns +++ b/v2rayn/v2rayN/v2rayN/Sample/tun_singbox_dns @@ -19,14 +19,14 @@ ], "rules": [ { - "geosite": [ - "geolocation-!cn" + "rule_set": [ + "geosite-geolocation-!cn" ], "server": "remote" }, { - "geosite": [ - "category-ads-all" + "rule_set": [ + "geosite-category-ads-all" ], "server": "block" } diff --git a/v2rayn/v2rayN/v2rayN/ViewModels/AddServerViewModel.cs b/v2rayn/v2rayN/v2rayN/ViewModels/AddServerViewModel.cs index b3e54bd455..a014d9a2a6 100644 --- a/v2rayn/v2rayN/v2rayN/ViewModels/AddServerViewModel.cs +++ b/v2rayn/v2rayN/v2rayN/ViewModels/AddServerViewModel.cs @@ -80,7 +80,7 @@ namespace v2rayN.ViewModels return; } } - if (SelectedSource.configType != EConfigType.Socks + if (SelectedSource.configType != EConfigType.Socks && SelectedSource.configType != EConfigType.Http) { if (Utils.IsNullOrEmpty(SelectedSource.id)) diff --git a/v2rayn/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs b/v2rayn/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs index b39f0ebdd1..f4ae6d85cc 100644 --- a/v2rayn/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs +++ b/v2rayn/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs @@ -86,7 +86,7 @@ namespace v2rayN.ViewModels public ReactiveCommand AddVlessServerCmd { get; } public ReactiveCommand AddShadowsocksServerCmd { get; } public ReactiveCommand AddSocksServerCmd { get; } - public ReactiveCommand AddHttpServerCmd { get; } + public ReactiveCommand AddHttpServerCmd { get; } public ReactiveCommand AddTrojanServerCmd { get; } public ReactiveCommand AddHysteria2ServerCmd { get; } public ReactiveCommand AddTuicServerCmd { get; } diff --git a/v2rayn/v2rayN/v2rayN/v2rayN.csproj b/v2rayn/v2rayN/v2rayN/v2rayN.csproj index 2610148f42..2be02951d7 100644 --- a/v2rayn/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayn/v2rayN/v2rayN/v2rayN.csproj @@ -10,7 +10,7 @@ enable v2rayN.ico Copyright © 2017-2024 (GPLv3) - 6.42 + 6.43 7.0