mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
Update On Wed Oct 9 20:34:41 CEST 2024
This commit is contained in:
@@ -788,3 +788,4 @@ Update On Sat Oct 5 20:31:49 CEST 2024
|
||||
Update On Sun Oct 6 20:31:42 CEST 2024
|
||||
Update On Mon Oct 7 20:33:33 CEST 2024
|
||||
Update On Tue Oct 8 20:36:30 CEST 2024
|
||||
Update On Wed Oct 9 20:34:31 CEST 2024
|
||||
|
||||
@@ -131,11 +131,7 @@ func (c *HysteriaOption) Speed() (uint64, uint64, error) {
|
||||
}
|
||||
|
||||
func NewHysteria(option HysteriaOption) (*Hysteria, error) {
|
||||
clientTransport := &transport.ClientTransport{
|
||||
Dialer: &net.Dialer{
|
||||
Timeout: 8 * time.Second,
|
||||
},
|
||||
}
|
||||
clientTransport := &transport.ClientTransport{}
|
||||
addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port))
|
||||
ports := option.Ports
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/metacubex/mihomo/component/ca"
|
||||
"github.com/metacubex/mihomo/component/dialer"
|
||||
"github.com/metacubex/mihomo/listener/inner"
|
||||
)
|
||||
|
||||
@@ -71,8 +72,7 @@ func HttpRequestWithProxy(ctx context.Context, url, method string, header map[st
|
||||
if conn, err := inner.HandleTcp(address, specialProxy); err == nil {
|
||||
return conn, nil
|
||||
} else {
|
||||
d := net.Dialer{}
|
||||
return d.DialContext(ctx, network, address)
|
||||
return dialer.DialContext(ctx, network, address)
|
||||
}
|
||||
},
|
||||
TLSClientConfig: ca.GetGlobalTLSConfig(&tls.Config{}),
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/metacubex/quic-go"
|
||||
@@ -16,9 +15,7 @@ import (
|
||||
"github.com/metacubex/mihomo/transport/hysteria/utils"
|
||||
)
|
||||
|
||||
type ClientTransport struct {
|
||||
Dialer *net.Dialer
|
||||
}
|
||||
type ClientTransport struct{}
|
||||
|
||||
func (ct *ClientTransport) quicPacketConn(proto string, rAddr net.Addr, serverPorts string, obfs obfsPkg.Obfuscator, hopInterval time.Duration, dialer utils.PacketDialer) (net.PacketConn, error) {
|
||||
server := rAddr.String()
|
||||
@@ -86,23 +83,3 @@ func (ct *ClientTransport) QUICDial(proto string, server string, serverPorts str
|
||||
}
|
||||
return qs, nil
|
||||
}
|
||||
|
||||
func (ct *ClientTransport) DialTCP(raddr *net.TCPAddr) (*net.TCPConn, error) {
|
||||
conn, err := ct.Dialer.Dial("tcp", raddr.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return conn.(*net.TCPConn), nil
|
||||
}
|
||||
|
||||
func (ct *ClientTransport) ListenUDP() (*net.UDPConn, error) {
|
||||
return net.ListenUDP("udp", nil)
|
||||
}
|
||||
|
||||
func isMultiPortAddr(addr string) bool {
|
||||
_, portStr, err := net.SplitHostPort(addr)
|
||||
if err == nil && (strings.Contains(portStr, ",") || strings.Contains(portStr, "-")) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Generated
+92
-244
@@ -315,77 +315,36 @@ dependencies = [
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-fs"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06"
|
||||
dependencies = [
|
||||
"async-lock 2.8.0",
|
||||
"autocfg",
|
||||
"blocking",
|
||||
"futures-lite 1.13.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-fs"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a"
|
||||
dependencies = [
|
||||
"async-lock 3.4.0",
|
||||
"async-lock",
|
||||
"blocking",
|
||||
"futures-lite 2.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
|
||||
dependencies = [
|
||||
"async-lock 2.8.0",
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"futures-lite 1.13.0",
|
||||
"log",
|
||||
"parking",
|
||||
"polling 2.8.0",
|
||||
"rustix 0.37.27",
|
||||
"slab",
|
||||
"socket2 0.4.10",
|
||||
"waker-fn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "2.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8"
|
||||
dependencies = [
|
||||
"async-lock 3.4.0",
|
||||
"async-lock",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"futures-io",
|
||||
"futures-lite 2.3.0",
|
||||
"parking",
|
||||
"polling 3.7.3",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"slab",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b"
|
||||
dependencies = [
|
||||
"event-listener 2.5.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "3.4.0"
|
||||
@@ -397,45 +356,17 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-net"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f"
|
||||
dependencies = [
|
||||
"async-io 1.13.0",
|
||||
"blocking",
|
||||
"futures-lite 1.13.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-net"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
|
||||
dependencies = [
|
||||
"async-io 2.3.4",
|
||||
"async-io",
|
||||
"blocking",
|
||||
"futures-lite 2.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-process"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88"
|
||||
dependencies = [
|
||||
"async-io 1.13.0",
|
||||
"async-lock 2.8.0",
|
||||
"async-signal",
|
||||
"blocking",
|
||||
"cfg-if",
|
||||
"event-listener 3.1.0",
|
||||
"futures-lite 1.13.0",
|
||||
"rustix 0.38.37",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-process"
|
||||
version = "2.3.0"
|
||||
@@ -443,15 +374,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
|
||||
dependencies = [
|
||||
"async-channel 2.3.1",
|
||||
"async-io 2.3.4",
|
||||
"async-lock 3.4.0",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"async-signal",
|
||||
"async-task",
|
||||
"blocking",
|
||||
"cfg-if",
|
||||
"event-listener 5.3.0",
|
||||
"futures-lite 2.3.0",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@@ -472,13 +403,13 @@ version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
|
||||
dependencies = [
|
||||
"async-io 2.3.4",
|
||||
"async-lock 3.4.0",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"atomic-waker",
|
||||
"cfg-if",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"signal-hook-registry",
|
||||
"slab",
|
||||
"windows-sys 0.59.0",
|
||||
@@ -712,7 +643,7 @@ dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.11.0",
|
||||
"itertools 0.12.1",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"log",
|
||||
@@ -948,7 +879,7 @@ dependencies = [
|
||||
"indoc",
|
||||
"isahc",
|
||||
"rustc-hash 2.0.0",
|
||||
"smol 2.0.2",
|
||||
"smol",
|
||||
"textwrap",
|
||||
"tracing",
|
||||
]
|
||||
@@ -1240,9 +1171,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.19"
|
||||
version = "4.5.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615"
|
||||
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@@ -1250,9 +1181,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.19"
|
||||
version = "4.5.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b"
|
||||
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -1357,7 +1288,7 @@ dependencies = [
|
||||
"rs-snowflake",
|
||||
"runas",
|
||||
"rust-i18n",
|
||||
"rustc_version 0.4.1",
|
||||
"rustc_version",
|
||||
"semver 1.0.23",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -1769,7 +1700,7 @@ dependencies = [
|
||||
"openssl-probe",
|
||||
"openssl-sys",
|
||||
"schannel",
|
||||
"socket2 0.5.7",
|
||||
"socket2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
@@ -1886,23 +1817,22 @@ checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
|
||||
[[package]]
|
||||
name = "delay_timer"
|
||||
version = "0.11.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20eba879b7ee5f1d255d5666e16646fe384f899f71a4c0b4b0644e2e074964fe"
|
||||
source = "git+https://github.com/libnyanpasu/delay-timer.git#76615d9b0c1bb830212fe84b5d18ee5444831625"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"autocfg",
|
||||
"concat-idents",
|
||||
"cron_clock",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap 6.1.0",
|
||||
"event-listener 5.3.0",
|
||||
"futures",
|
||||
"log",
|
||||
"lru",
|
||||
"once_cell",
|
||||
"rs-snowflake",
|
||||
"rustc_version 0.2.3",
|
||||
"smol 1.3.0",
|
||||
"rustc_version",
|
||||
"smol",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
@@ -1942,18 +1872,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "derive_builder"
|
||||
version = "0.20.1"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b"
|
||||
checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"
|
||||
dependencies = [
|
||||
"derive_builder_macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_builder_core"
|
||||
version = "0.20.1"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38"
|
||||
checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
@@ -1963,9 +1893,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "derive_builder_macro"
|
||||
version = "0.20.1"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc"
|
||||
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
|
||||
dependencies = [
|
||||
"derive_builder_core",
|
||||
"syn 2.0.79",
|
||||
@@ -1980,7 +1910,7 @@ dependencies = [
|
||||
"convert_case 0.4.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustc_version 0.4.1",
|
||||
"rustc_version",
|
||||
"syn 2.0.79",
|
||||
]
|
||||
|
||||
@@ -2219,7 +2149,7 @@ checksum = "f4e24052d7be71f0efb50c201557f6fe7d237cfd5a64fd5bcd7fd8fe32dbbffa"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"memchr",
|
||||
"rustc_version 0.4.1",
|
||||
"rustc_version",
|
||||
"toml 0.8.2",
|
||||
"vswhom",
|
||||
"winreg",
|
||||
@@ -2326,17 +2256,6 @@ version = "2.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "3.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"parking",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "5.3.0"
|
||||
@@ -2423,7 +2342,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
|
||||
dependencies = [
|
||||
"memoffset 0.9.1",
|
||||
"rustc_version 0.4.1",
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2816,7 +2735,7 @@ version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30"
|
||||
dependencies = [
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
@@ -3332,7 +3251,7 @@ dependencies = [
|
||||
"http-body",
|
||||
"hyper",
|
||||
"pin-project-lite",
|
||||
"socket2 0.5.7",
|
||||
"socket2",
|
||||
"tokio",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
@@ -3666,17 +3585,6 @@ dependencies = [
|
||||
"memoffset 0.9.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
|
||||
dependencies = [
|
||||
"hermit-abi 0.3.9",
|
||||
"libc",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.10.1"
|
||||
@@ -4008,7 +3916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4056,12 +3964,6 @@ dependencies = [
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.4.14"
|
||||
@@ -5055,9 +4957,9 @@ checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_allocator"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ff0bca77a2d50ab7ad00c2e6041fa497e61b74bd8933bfedf1adb7fa23b6d69"
|
||||
checksum = "9186b2689dd687b435b54ff13a5f8673f8d7d6cd51211f514f9a9fc7f4ca64b6"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"bumpalo",
|
||||
@@ -5065,9 +4967,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8682a40306a94ed0c05165fdfa0ffd0bca275dd368b401765b26eb9d5c2d2ddc"
|
||||
checksum = "d90e2d0a935fa2a9271a37e180e0725a902450474a0f2e8d104fb643f29cce67"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"num-bigint",
|
||||
@@ -5080,9 +4982,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast_macros"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b09d1bd60764db308e540d7e0b2855e63f37ba03074b7baca303a219c4b15147"
|
||||
checksum = "a2b1072cb32335b47745c9ea9d614a6d5d36ba9f528fce1da428d5f7e20c3ed1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -5091,9 +4993,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_diagnostics"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d13d2cfe0599ab204044a6a3b7e051f43ada33805ca962241cd093c6dbac6bcb"
|
||||
checksum = "da1421cd82c209a7dfc830fdd09b5c6372e28dfc419e9e67868c6159ab5c127b"
|
||||
dependencies = [
|
||||
"miette",
|
||||
"owo-colors",
|
||||
@@ -5104,15 +5006,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_index"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f8f41bef7cee40604b4e15f4439ae79cbb02ad0a3e357c3ecee64f1a2a4135f"
|
||||
checksum = "cb46cc4ce3d5820ad5e5737f84f5206307b293f9984f9da219ac51ccdc0ea4c8"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_parser"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d9d3ad9f100094890cf87bd2f4c1197f8f2b56115c91e0eaa8da5b5b0aa2f7b"
|
||||
checksum = "8afe7b80a710daa7a07eec92bc46ed5a2d08581f15e833ee1eded5d929283893"
|
||||
dependencies = [
|
||||
"assert-unchecked",
|
||||
"bitflags 2.6.0",
|
||||
@@ -5126,15 +5028,16 @@ dependencies = [
|
||||
"oxc_regular_expression",
|
||||
"oxc_span",
|
||||
"oxc_syntax",
|
||||
"oxc_syntax_operations",
|
||||
"rustc-hash 2.0.0",
|
||||
"seq-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_regular_expression"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f021c18692754a2647d862b2ff5bc2a33a3e74f25b4006a83a218ca971012ea"
|
||||
checksum = "3bc9d3d0ca89ebc9860b6d458f671d06c887bf1fa08accf504c65b5824ea5d87"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast_macros",
|
||||
@@ -5147,9 +5050,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_span"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "872f1d0c9422b43c07ab03de817b0c8cfde70e0b9b31bd9279cf87bfaba78694"
|
||||
checksum = "5c6a6c56f8482e48b6b7a953e55efe59ea55a0f00451a3f3aaf3c09c955c11c0"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"miette",
|
||||
@@ -5159,9 +5062,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_syntax"
|
||||
version = "0.30.5"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a4cb91daf6f98a036b245d24efc93bda2990c6aab1066d943d5ec6547e0070d"
|
||||
checksum = "2e1b7860133b880b357bb400e12a791e86dd8165ebcbfda1f3b7f31dd2f645ab"
|
||||
dependencies = [
|
||||
"assert-unchecked",
|
||||
"bitflags 2.6.0",
|
||||
@@ -5176,6 +5079,16 @@ dependencies = [
|
||||
"unicode-id-start",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_syntax_operations"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "509fc5ab630ee66ce1d6fcb41d07a646cc14d91014bf31b0c731d219d31018cf"
|
||||
dependencies = [
|
||||
"oxc_ast",
|
||||
"oxc_span",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.18.3"
|
||||
@@ -5571,7 +5484,7 @@ dependencies = [
|
||||
"concurrent-queue",
|
||||
"hermit-abi 0.4.0",
|
||||
"pin-project-lite",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
@@ -5687,9 +5600,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.86"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
||||
checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -5776,7 +5689,7 @@ dependencies = [
|
||||
"quinn-udp",
|
||||
"rustc-hash 2.0.0",
|
||||
"rustls",
|
||||
"socket2 0.5.7",
|
||||
"socket2",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
@@ -5807,7 +5720,7 @@ checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"once_cell",
|
||||
"socket2 0.5.7",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
@@ -6278,15 +6191,6 @@ version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
dependencies = [
|
||||
"semver 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
@@ -6296,20 +6200,6 @@ dependencies = [
|
||||
"semver 1.0.23",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.37.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys 0.3.8",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.37"
|
||||
@@ -6319,7 +6209,7 @@ dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.4.14",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
@@ -6481,22 +6371,13 @@ dependencies = [
|
||||
"thin-slice",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
"semver-parser 0.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
|
||||
dependencies = [
|
||||
"semver-parser 0.10.2",
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6508,12 +6389,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.10.2"
|
||||
@@ -6823,9 +6698,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
||||
|
||||
[[package]]
|
||||
name = "simd-json"
|
||||
version = "0.14.0"
|
||||
version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f0b376aada35f30a0012f5790e50aed62f91804a0682669aefdbe81c7fcb91"
|
||||
checksum = "bfa5500f67df6466a45c6f83d1aada89fe0f7e9b17afec424ea06feee0906549"
|
||||
dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
"halfbrown",
|
||||
@@ -6919,7 +6794,7 @@ dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
"memmap2",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"thiserror",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
@@ -6931,23 +6806,6 @@ dependencies = [
|
||||
"xkeysym",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smol"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1"
|
||||
dependencies = [
|
||||
"async-channel 1.9.0",
|
||||
"async-executor",
|
||||
"async-fs 1.6.0",
|
||||
"async-io 1.13.0",
|
||||
"async-lock 2.8.0",
|
||||
"async-net 1.8.0",
|
||||
"async-process 1.8.1",
|
||||
"blocking",
|
||||
"futures-lite 1.13.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smol"
|
||||
version = "2.0.2"
|
||||
@@ -6956,25 +6814,15 @@ checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f"
|
||||
dependencies = [
|
||||
"async-channel 2.3.1",
|
||||
"async-executor",
|
||||
"async-fs 2.1.2",
|
||||
"async-io 2.3.4",
|
||||
"async-lock 3.4.0",
|
||||
"async-net 2.0.0",
|
||||
"async-process 2.3.0",
|
||||
"async-fs",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"async-net",
|
||||
"async-process",
|
||||
"blocking",
|
||||
"futures-lite 2.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.5.7"
|
||||
@@ -7748,7 +7596,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"fastrand 2.1.1",
|
||||
"once_cell",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
@@ -7995,7 +7843,7 @@ dependencies = [
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2 0.5.7",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
"tracing",
|
||||
"windows-sys 0.52.0",
|
||||
@@ -8723,7 +8571,7 @@ checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"downcast-rs",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"scoped-tls",
|
||||
"smallvec",
|
||||
"wayland-sys",
|
||||
@@ -8736,7 +8584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"wayland-backend",
|
||||
"wayland-scanner",
|
||||
]
|
||||
@@ -8758,7 +8606,7 @@ version = "0.31.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb"
|
||||
dependencies = [
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"wayland-client",
|
||||
"xcursor",
|
||||
]
|
||||
@@ -8936,7 +8784,7 @@ dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"once_cell",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -8947,7 +8795,7 @@ checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f"
|
||||
dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"winsafe",
|
||||
]
|
||||
|
||||
@@ -9558,7 +9406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12"
|
||||
dependencies = [
|
||||
"gethostname 0.4.3",
|
||||
"rustix 0.38.37",
|
||||
"rustix",
|
||||
"x11rb-protocol",
|
||||
]
|
||||
|
||||
@@ -9575,8 +9423,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"linux-raw-sys 0.4.14",
|
||||
"rustix 0.38.37",
|
||||
"linux-raw-sys",
|
||||
"rustix",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -9656,10 +9504,10 @@ checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030"
|
||||
dependencies = [
|
||||
"async-broadcast",
|
||||
"async-executor",
|
||||
"async-fs 2.1.2",
|
||||
"async-io 2.3.4",
|
||||
"async-lock 3.4.0",
|
||||
"async-process 2.3.0",
|
||||
"async-fs",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"async-process",
|
||||
"async-recursion",
|
||||
"async-task",
|
||||
"async-trait",
|
||||
|
||||
@@ -46,7 +46,7 @@ serde_yaml = { version = "0.10", package = "serde_yaml_ng", git = "https://githu
|
||||
auto-launch = { git = "https://github.com/zzzgydi/auto-launch.git", version = "0.5" }
|
||||
once_cell = "1.19.0"
|
||||
port_scanner = "0.1.5"
|
||||
delay_timer = "0.11.5"
|
||||
delay_timer = { version = "0.11", git = "https://github.com/libnyanpasu/delay-timer.git" }
|
||||
parking_lot = { version = "0.12.1" }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
@@ -117,11 +117,11 @@ os_pipe = "1.2.0"
|
||||
whoami = "1.5.1"
|
||||
atomic_enum = "0.3.0"
|
||||
boa_engine.workspace = true
|
||||
oxc_parser = "0.30"
|
||||
oxc_allocator = "0.30"
|
||||
oxc_span = "0.30"
|
||||
oxc_ast = "0.30"
|
||||
oxc_syntax = "0.30"
|
||||
oxc_parser = "0.31"
|
||||
oxc_allocator = "0.31"
|
||||
oxc_span = "0.31"
|
||||
oxc_ast = "0.31"
|
||||
oxc_syntax = "0.31"
|
||||
mlua = { version = "0.9", features = [
|
||||
"lua54",
|
||||
"async",
|
||||
|
||||
@@ -55,6 +55,7 @@ pub struct RemoteProfile {
|
||||
))]
|
||||
#[builder_update(nested)]
|
||||
#[builder_field_attr(serde(default))]
|
||||
#[serde(default)]
|
||||
pub option: RemoteProfileOptions,
|
||||
/// process chains
|
||||
#[builder(default)]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.2",
|
||||
"ahooks": "3.8.1",
|
||||
"ofetch": "1.4.0",
|
||||
"ofetch": "1.4.1",
|
||||
"react": "rc",
|
||||
"swr": "2.2.5"
|
||||
},
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
"@emotion/styled": "11.13.0",
|
||||
"@juggle/resize-observer": "3.4.0",
|
||||
"@material/material-color-utilities": "0.3.0",
|
||||
"@mui/icons-material": "6.1.2",
|
||||
"@mui/lab": "6.0.0-beta.10",
|
||||
"@mui/material": "6.1.2",
|
||||
"@mui/icons-material": "6.1.3",
|
||||
"@mui/lab": "6.0.0-beta.11",
|
||||
"@mui/material": "6.1.3",
|
||||
"@nyanpasu/interface": "workspace:^",
|
||||
"@nyanpasu/ui": "workspace:^",
|
||||
"@tanstack/router-zod-adapter": "1.63.2",
|
||||
"@tanstack/router-zod-adapter": "1.63.5",
|
||||
"@tauri-apps/api": "2.0.2",
|
||||
"@types/json-schema": "7.0.15",
|
||||
"ahooks": "3.8.1",
|
||||
@@ -46,18 +46,18 @@
|
||||
"react-split-grid": "1.0.4",
|
||||
"react-use": "17.5.1",
|
||||
"swr": "2.2.5",
|
||||
"virtua": "0.34.2",
|
||||
"virtua": "0.35.0",
|
||||
"vite-bundle-visualizer": "1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@csstools/normalize.css": "12.1.1",
|
||||
"@emotion/babel-plugin": "11.12.0",
|
||||
"@emotion/react": "11.13.3",
|
||||
"@iconify/json": "2.2.257",
|
||||
"@iconify/json": "2.2.258",
|
||||
"@monaco-editor/react": "4.6.0",
|
||||
"@tanstack/react-router": "1.63.2",
|
||||
"@tanstack/router-devtools": "1.63.2",
|
||||
"@tanstack/router-plugin": "1.62.0",
|
||||
"@tanstack/react-router": "1.63.5",
|
||||
"@tanstack/router-devtools": "1.63.5",
|
||||
"@tanstack/router-plugin": "1.63.5",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0",
|
||||
"@tauri-apps/plugin-fs": "2.0.0",
|
||||
|
||||
@@ -108,14 +108,14 @@ export const ConnectionsTable = ({ searchTerm }: { searchTerm?: string }) => {
|
||||
accessorFn: ({ metadata }) => metadata.process,
|
||||
},
|
||||
{
|
||||
header: t("Download"),
|
||||
header: t("Downloaded"),
|
||||
size: 88,
|
||||
accessorFn: ({ download }) => parseTraffic(download).join(" "),
|
||||
sortingFn: (rowA, rowB) =>
|
||||
rowB.original.download - rowA.original.download,
|
||||
},
|
||||
{
|
||||
header: t("Upload"),
|
||||
header: t("Uploaded"),
|
||||
size: 88,
|
||||
accessorFn: ({ upload }) => parseTraffic(upload).join(" "),
|
||||
sortingFn: (rowA, rowB) => rowB.original.upload - rowA.original.upload,
|
||||
@@ -142,7 +142,7 @@ export const ConnectionsTable = ({ searchTerm }: { searchTerm?: string }) => {
|
||||
accessorFn: ({ chains }) => [...chains].reverse().join(" / "),
|
||||
},
|
||||
{
|
||||
header: "Rule",
|
||||
header: t("Rule"),
|
||||
size: 200,
|
||||
accessorFn: ({ rule, rulePayload }) =>
|
||||
rulePayload ? `${rule} (${rulePayload})` : rule,
|
||||
@@ -155,7 +155,7 @@ export const ConnectionsTable = ({ searchTerm }: { searchTerm?: string }) => {
|
||||
dayjs(rowB.original.start).diff(rowA.original.start),
|
||||
},
|
||||
{
|
||||
header: "Source",
|
||||
header: t("Source"),
|
||||
size: 200,
|
||||
accessorFn: ({ metadata: { sourceIP, sourcePort } }) =>
|
||||
`${sourceIP}:${sourcePort}`,
|
||||
@@ -204,7 +204,7 @@ export const ConnectionsTable = ({ searchTerm }: { searchTerm?: string }) => {
|
||||
) : (
|
||||
<ContentDisplay
|
||||
className="!absolute !h-full !w-full"
|
||||
message="No Connection"
|
||||
message={t("No Connection")}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ export const HeaderSearch = (props: TextFieldProps) => {
|
||||
autoComplete="off"
|
||||
spellCheck="false"
|
||||
hiddenLabel
|
||||
placeholder={t("Type to Filter")}
|
||||
placeholder={t("Filter conditions")}
|
||||
variant="filled"
|
||||
className="!pb-0"
|
||||
sx={{ input: { py: 1, fontSize: 14 } }}
|
||||
|
||||
@@ -30,18 +30,18 @@ const TitleComp = () => {
|
||||
|
||||
if (port == clashConfigs?.["mixed-port"]) {
|
||||
return {
|
||||
label: "Success",
|
||||
label: t("Success"),
|
||||
color: "success",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
label: "Occupied",
|
||||
label: t("Occupied"),
|
||||
color: "warning",
|
||||
};
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
label: "Disabled",
|
||||
label: t("Disabled"),
|
||||
color: "error",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@ export const ServiceShortcuts = () => {
|
||||
switch (serviceStatus) {
|
||||
case "running": {
|
||||
return {
|
||||
label: "running",
|
||||
label: t("running"),
|
||||
color: alpha(palette.success[palette.mode], 0.3),
|
||||
};
|
||||
}
|
||||
|
||||
case "stopped": {
|
||||
return {
|
||||
label: "stopped",
|
||||
label: t("stopped"),
|
||||
color: alpha(palette.error[palette.mode], 0.3),
|
||||
};
|
||||
}
|
||||
@@ -50,7 +50,7 @@ export const ServiceShortcuts = () => {
|
||||
default:
|
||||
case "not_installed": {
|
||||
return {
|
||||
label: "not_installed",
|
||||
label: t("not_installed"),
|
||||
color:
|
||||
palette.mode == "light"
|
||||
? palette.grey[100]
|
||||
|
||||
@@ -218,7 +218,7 @@ export const ProfileDialog = ({
|
||||
/>
|
||||
|
||||
<TextFieldElement
|
||||
label="User Agent"
|
||||
label={t("User Agent")}
|
||||
name="option.user_agent"
|
||||
control={control}
|
||||
{...commonProps}
|
||||
|
||||
@@ -236,7 +236,7 @@ export const ProfileItem = memo(function ProfileItem({
|
||||
<Chip
|
||||
className="!pl-2 !pr-2 font-bold"
|
||||
avatar={<IconComponent className="!size-5" color="primary" />}
|
||||
label={isRemote ? "Remote" : "Local"}
|
||||
label={isRemote ? t("Remote") : t("Local")}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ export default function HotkeyDialog({
|
||||
|
||||
return (
|
||||
<BaseDialog
|
||||
title={t("Hotkeys Setting")}
|
||||
title={t("Hotkey Setting")}
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
{...rest}
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@ function TrayIconItem({ mode }: { mode: "system_proxy" | "tun" | "normal" }) {
|
||||
disabled={loading || isLoading}
|
||||
onClick={() => setTrayIcon()}
|
||||
>
|
||||
修改
|
||||
{t("Edit")}
|
||||
</LoadingButton>
|
||||
<LoadingButton
|
||||
variant="contained"
|
||||
@@ -86,7 +86,7 @@ function TrayIconItem({ mode }: { mode: "system_proxy" | "tun" | "normal" }) {
|
||||
disabled={loading || isLoading}
|
||||
onClick={() => setTrayIcon(true)}
|
||||
>
|
||||
重置
|
||||
{t("Reset")}
|
||||
</LoadingButton>
|
||||
</div>
|
||||
) : (
|
||||
@@ -96,7 +96,7 @@ function TrayIconItem({ mode }: { mode: "system_proxy" | "tun" | "normal" }) {
|
||||
disabled={loading || isLoading}
|
||||
onClick={() => setTrayIcon()}
|
||||
>
|
||||
设置
|
||||
{t("Set")}
|
||||
</LoadingButton>
|
||||
)}
|
||||
</span>
|
||||
|
||||
@@ -98,7 +98,7 @@ export const SettingClashBase = () => {
|
||||
<ListItemText primary={t("Open UWP tool")} />
|
||||
|
||||
<Button variant="contained" onClick={clickUWP}>
|
||||
Open
|
||||
{t("Open")}
|
||||
</Button>
|
||||
</ListItem>
|
||||
)}
|
||||
|
||||
@@ -34,7 +34,7 @@ export const SettingNyanpasuUI = () => {
|
||||
const [onlyIcon, setOnlyIcon] = useAtom(atomIsDrawerOnlyIcon);
|
||||
|
||||
return (
|
||||
<BaseCard label="User Interface">
|
||||
<BaseCard label={t("User Interface")}>
|
||||
<List disablePadding>
|
||||
<MenuItem
|
||||
label={t("Language")}
|
||||
|
||||
@@ -10,7 +10,7 @@ export const SettingSystemBehavior = () => {
|
||||
const { nyanpasuConfig, setNyanpasuConfig } = useNyanpasu();
|
||||
|
||||
return (
|
||||
<BaseCard label="Initiating Behavior">
|
||||
<BaseCard label={t("Initiating Behavior")}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
<PaperSwitchButton
|
||||
|
||||
@@ -129,7 +129,7 @@ export const SettingSystemService = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<BaseCard label="System Service">
|
||||
<BaseCard label={t("System Service")}>
|
||||
<ServerManualPromptDialogWrapper />
|
||||
<List disablePadding>
|
||||
<SwitchItem
|
||||
|
||||
@@ -24,16 +24,20 @@
|
||||
"Dashboard": "Dashboard",
|
||||
"Profiles": "Profiles",
|
||||
"Profile URL": "Profile URL",
|
||||
"Download": "Download",
|
||||
"Paste": "Paste",
|
||||
"Import": "Import",
|
||||
"New": "New",
|
||||
"Create Profile": "Create Profile",
|
||||
"Choose File": "Choose File",
|
||||
"Close All": "Close All",
|
||||
"Menu": "Menu",
|
||||
"Select": "Select",
|
||||
"Edit Info": "Edit Info",
|
||||
"Edit File": "Edit File",
|
||||
"Proxy Chains": "Chains",
|
||||
"Global Proxy Chains": "Global Chains",
|
||||
"Open": "Open",
|
||||
"Open File": "Open File",
|
||||
"Update": "Update",
|
||||
"Update(Proxy)": "Update(Proxy)",
|
||||
@@ -56,27 +60,54 @@
|
||||
"Filter": "Filter",
|
||||
"Filter conditions": "Filter conditions",
|
||||
"Refresh profiles": "Refresh profiles",
|
||||
"Actions": "Actions",
|
||||
"Host": "Host",
|
||||
"Process": "Process",
|
||||
"Downloaded": "Downloaded",
|
||||
"Uploaded": "Uploaded",
|
||||
"DL Speed": "DL Speed",
|
||||
"UL Speed": "UL Speed",
|
||||
"Chains": "Chains",
|
||||
"Time": "Time",
|
||||
"Source": "Source",
|
||||
"Destination": "Destination",
|
||||
"Type": "Type",
|
||||
"Remote": "Remote",
|
||||
"Local": "Local",
|
||||
"Remote Profile": "Remote Profile",
|
||||
"Local Profile": "Local Profile",
|
||||
"Name": "Name",
|
||||
"Descriptions": "Descriptions",
|
||||
"Subscription URL": "Subscription URL",
|
||||
"User Agent": "User Agent",
|
||||
"Update Interval": "Update Interval",
|
||||
"Use System Proxy": "Use System Proxy",
|
||||
"Use Clash Proxy": "Use Clash Proxy",
|
||||
"No Connection": "No Connection",
|
||||
"Tray Icons": "Tray Icons",
|
||||
"Set": "Set",
|
||||
"Edit": "Edit",
|
||||
"Reset": "Reset",
|
||||
"Hotkeys": "Hotkeys",
|
||||
"Feedback": "Feedback",
|
||||
"Settings": "Settings",
|
||||
"Clash Setting": "Clash Setting",
|
||||
"System Setting": "System Setting",
|
||||
"Nyanpasu Setting": "Nyanpasu Setting",
|
||||
"Allow Lan": "Allow Lan",
|
||||
"IPv6": "IPv6",
|
||||
"Tun Stack": "Tun Stack",
|
||||
"Log Level": "Log Level",
|
||||
"Clash Port": "Clash Port",
|
||||
"Mixed Port": "Mixed Port",
|
||||
"Random Port": "Random Port",
|
||||
"After restart to take effect": "After restart to take effect",
|
||||
"External": "External",
|
||||
"Clash Core": "Clash Core",
|
||||
"Tun Mode": "Tun Mode",
|
||||
"System Service": "System Service",
|
||||
"Service Mode": "Service Mode",
|
||||
"Initiating Behavior": "Initiating Behavior",
|
||||
"Auto Launch": "Auto Launch",
|
||||
"Silent Start": "Silent Start",
|
||||
"System Proxy": "System Proxy",
|
||||
@@ -86,6 +117,7 @@
|
||||
"Guard Duration": "Guard Duration",
|
||||
"Proxy Bypass": "Proxy Bypass",
|
||||
"Current System Proxy": "Current System Proxy",
|
||||
"User Interface": "User Interface",
|
||||
"Theme Mode": "Theme Mode",
|
||||
"Theme Blur": "Theme Blur",
|
||||
"Theme Setting": "Theme Setting",
|
||||
@@ -101,6 +133,8 @@
|
||||
"Page Transition Animation Transparent": "Transparent",
|
||||
"Page Transition Animation None": "None",
|
||||
"Language": "Language",
|
||||
"Path Config": "Path Config",
|
||||
"Migrate App Path": "Migrate App Path",
|
||||
"Open Config Dir": "Open Config Dir",
|
||||
"Open Data Dir": "Open Data Dir",
|
||||
"Open Core Dir": "Open Core Dir",
|
||||
@@ -150,7 +184,10 @@
|
||||
"Default Latency Test": "Default Latency Test",
|
||||
"Error": "Error",
|
||||
"Success": "Success",
|
||||
"Occupied": "Occupied",
|
||||
"Disabled": "Disabled",
|
||||
"Providers": "Providers",
|
||||
"Proxies Providers": "Proxies Providers",
|
||||
"Rules Providers": "Rules Providers",
|
||||
"Update Rules Providers All": "Update Rules Providers All",
|
||||
"Rule Set rules": "{{rule}} rules",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Select": "Выбрать",
|
||||
"Edit Info": "Изменить информацию",
|
||||
"Edit File": "Изменить файл",
|
||||
"Open": "Открыть",
|
||||
"Open File": "Открыть файл",
|
||||
"Update": "Обновить",
|
||||
"Update(Proxy)": "Обновить (прокси)",
|
||||
@@ -57,19 +58,26 @@
|
||||
"Subscription URL": "URL подписки",
|
||||
"Update Interval": "Интервал обновления",
|
||||
|
||||
"Tray Icons": "Значки в трее",
|
||||
"Hotkeys": "Горячие клавиши",
|
||||
"Feedback": "Обратная связь",
|
||||
"Settings": "Настройки",
|
||||
"Clash Setting": "Настройки Clash",
|
||||
"System Setting": "Настройки системы",
|
||||
"Nyanpasu Setting": "Настройки Nyanpasu",
|
||||
"Allow Lan": "Разрешить локальную сеть",
|
||||
"IPv6": "IPv6",
|
||||
"Tun Stack": "Tun куча",
|
||||
"Log Level": "Уровень логов",
|
||||
"Clash Port": "Clash порт",
|
||||
"Mixed Port": "Смешанный порт",
|
||||
"Random Port": "Случайный порт",
|
||||
"After restart to take effect": "Чтобы изменения вступили в силу, необходимо перезапустить приложение",
|
||||
"Clash Core": "Ядро Clash",
|
||||
"Tun Mode": "Режим туннеля",
|
||||
"System Service": "Системная сервиса",
|
||||
"Service Mode": "Режим сервиса",
|
||||
"Initiating Behavior": "Инициирующее поведение",
|
||||
"Auto Launch": "Автозапуск",
|
||||
"Silent Start": "Тихий запуск",
|
||||
"System Proxy": "Системный прокси",
|
||||
@@ -78,6 +86,7 @@
|
||||
"Guard Duration": "Период защиты",
|
||||
"Proxy Bypass": "Игнорирование прокси",
|
||||
"Current System Proxy": "Текущий системный прокси",
|
||||
"User Interface": "Пользовательский интерфейс",
|
||||
"Theme Mode": "Режим темы",
|
||||
"Open UWP tool": "Открыть UWP инструмент",
|
||||
"Theme Blur": "Размытие темы",
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
"label_settings": "设 置",
|
||||
"label_providers": "资 源",
|
||||
"Connections": "连接",
|
||||
"Upload Total": "上传总量",
|
||||
"Download Total": "下载总量",
|
||||
"Upload Traffic": "上传流量",
|
||||
"Download Traffic": "下载流量",
|
||||
"Total": "总量",
|
||||
@@ -19,23 +17,27 @@
|
||||
"Clear": "清除",
|
||||
"Proxies": "代理",
|
||||
"Proxy Groups": "代理组",
|
||||
"rule": "规则",
|
||||
"rules": "规则",
|
||||
"global": "全局",
|
||||
"direct": "直连",
|
||||
"script": "脚本",
|
||||
"Dashboard": "概览",
|
||||
"Profiles": "配置",
|
||||
"Profile URL": "配置文件链接",
|
||||
"Download": "下载",
|
||||
"Paste": "粘贴",
|
||||
"Import": "导入",
|
||||
"New": "新建",
|
||||
"Create Profile": "新建配置",
|
||||
"Choose File": "选择文件",
|
||||
"Close All": "关闭全部",
|
||||
"Menu": "菜单",
|
||||
"Select": "使用",
|
||||
"Edit Info": "编辑信息",
|
||||
"Edit File": "编辑文件",
|
||||
"Proxy Chains": "代理链",
|
||||
"Global Proxy Chains": "全局链",
|
||||
"Open": "打开",
|
||||
"Open File": "打开文件",
|
||||
"Update": "更新",
|
||||
"Update(Proxy)": "更新(代理)",
|
||||
@@ -58,36 +60,64 @@
|
||||
"Filter": "过滤节点",
|
||||
"Filter conditions": "过滤条件",
|
||||
"Refresh profiles": "刷新配置",
|
||||
"Actions": "操作",
|
||||
"Host": "主机",
|
||||
"Process": "进程",
|
||||
"Downloaded": "下载量",
|
||||
"Uploaded": "上传量",
|
||||
"DL Speed": "下载速度",
|
||||
"UL Speed": "上传速度",
|
||||
"Chains": "链路",
|
||||
"Time": "连接时间",
|
||||
"Source": "源地址",
|
||||
"Destination": "目标地址",
|
||||
"Type": "类型",
|
||||
"Remote": "远程",
|
||||
"Local": "本地",
|
||||
"Remote Profile": "远程配置",
|
||||
"Local Profile": "本地配置",
|
||||
"Name": "名称",
|
||||
"Descriptions": "描述",
|
||||
"Subscription URL": "订阅链接",
|
||||
"User Agent": "用户代理",
|
||||
"Update Interval": "更新间隔",
|
||||
"Use System Proxy": "使用系统代理更新",
|
||||
"Use Clash Proxy": "使用Clash代理更新",
|
||||
"Use Clash Proxy": "使用 Clash 代理更新",
|
||||
"No Connection": "无连接",
|
||||
"Tray Icons": "托盘图标",
|
||||
"Set": "设置",
|
||||
"Edit": "编辑",
|
||||
"Reset": "重置",
|
||||
"Hotkeys": "快捷键",
|
||||
"Feedback": "反馈",
|
||||
"Settings": "设置",
|
||||
"Clash Setting": "Clash 设置",
|
||||
"System Setting": "系统设置",
|
||||
"Nyanpasu Setting": "Nyanpasu 设置",
|
||||
"Allow Lan": "局域网连接",
|
||||
"IPv6": "IPv6",
|
||||
"Tun Stack": "Tun 堆栈",
|
||||
"Log Level": "日志等级",
|
||||
"Clash Port": "Clash 端口",
|
||||
"Mixed Port": "端口设置",
|
||||
"Random Port": "随机端口",
|
||||
"After restart to take effect": "重启后生效",
|
||||
"External": "外部控制",
|
||||
"Clash Core": "Clash 内核",
|
||||
"Tun Mode": "Tun 模式",
|
||||
"System Service": "系统服务",
|
||||
"Service Mode": "服务模式",
|
||||
"Initiating Behavior": "启动行为",
|
||||
"Auto Launch": "开机自启",
|
||||
"Silent Start": "静默启动",
|
||||
"System Proxy": "系统代理",
|
||||
"Open UWP tool": "UWP工具",
|
||||
"Open UWP tool": "UWP 工具",
|
||||
"System Proxy Setting": "系统代理设置",
|
||||
"Proxy Guard": "系统代理守卫",
|
||||
"Guard Duration": "代理守卫间隔",
|
||||
"Proxy Bypass": "Proxy Bypass",
|
||||
"Current System Proxy": "当前系统代理",
|
||||
"User Interface": "用户界面",
|
||||
"Theme Mode": "主题模式",
|
||||
"Theme Blur": "背景模糊",
|
||||
"Theme Setting": "主题设置",
|
||||
@@ -103,6 +133,8 @@
|
||||
"Page Transition Animation Transparent": "透明",
|
||||
"Page Transition Animation None": "无",
|
||||
"Language": "语言设置",
|
||||
"Path Config": "目录配置",
|
||||
"Migrate App Path": "迁移 App 路径",
|
||||
"Open Config Dir": "配置目录",
|
||||
"Open Data Dir": "数据目录",
|
||||
"Open Core Dir": "内核目录",
|
||||
@@ -121,10 +153,10 @@
|
||||
"Tasks": "定期任务",
|
||||
"Auto Log Clean": "自动清理日志",
|
||||
"Never Clean": "不清理",
|
||||
"Retain 3 Days": "保留3天",
|
||||
"Retain 7 Days": "保留7天",
|
||||
"Retain 30 Days": "保留30天",
|
||||
"Retain 90 Days": "保留90天",
|
||||
"Retain 3 Days": "保留 3 天",
|
||||
"Retain 7 Days": "保留 7 天",
|
||||
"Retain 30 Days": "保留 30 天",
|
||||
"Retain 90 Days": "保留 90 天",
|
||||
"Max Log Files": "最大日志文件数",
|
||||
"Collect Logs": "收集日志",
|
||||
"Back": "返回",
|
||||
@@ -141,24 +173,27 @@
|
||||
"toggle_system_proxy": "切换系统代理",
|
||||
"enable_system_proxy": "开启系统代理",
|
||||
"disable_system_proxy": "关闭系统代理",
|
||||
"toggle_tun_mode": "切换Tun模式",
|
||||
"enable_tun_mode": "开启Tun模式",
|
||||
"disable_tun_mode": "关闭Tun模式",
|
||||
"App Log Level": "App日志等级",
|
||||
"toggle_tun_mode": "切换 Tun 模式",
|
||||
"enable_tun_mode": "开启 Tun 模式",
|
||||
"disable_tun_mode": "关闭 Tun 模式",
|
||||
"App Log Level": "App 日志等级",
|
||||
"Auto Close Connections": "自动关闭连接",
|
||||
"Enable Clash Fields Filter": "开启Clash字段过滤",
|
||||
"Enable Clash Fields Filter": "开启 Clash 字段过滤",
|
||||
"Enable Builtin Enhanced": "开启内建增强功能",
|
||||
"Proxy Layout Column": "代理页布局列数",
|
||||
"Default Latency Test": "默认测试链接",
|
||||
"Error": "错误",
|
||||
"Success": "成功",
|
||||
"Occupied": "被占用",
|
||||
"Disabled": "已禁用",
|
||||
"Providers": "资源",
|
||||
"Proxies Providers": "代理集",
|
||||
"Rules Providers": "规则集",
|
||||
"Update Rules Providers All": "全部更新",
|
||||
"Rule Set rules": "{{rule}} 条规则",
|
||||
"Last Update": "{{fromNow}}更新",
|
||||
"Update Rules Providers Success": "更新规则集成功",
|
||||
"Portable Update Error": "便携版无法自动更新,请到 Github 下载最新版本",
|
||||
"Portable Update Error": "便携版无法自动更新,请到 GitHub 下载最新版本",
|
||||
"Tray Proxies Selector": "托盘代理选择",
|
||||
"Hidden": "隐藏",
|
||||
"Normal": "开启",
|
||||
|
||||
@@ -161,7 +161,7 @@ function ProfilePage() {
|
||||
<IconButton
|
||||
className="h-10 w-10"
|
||||
color="inherit"
|
||||
title="Runtime Config"
|
||||
title={t("Runtime Config")}
|
||||
onClick={() => {
|
||||
setRuntimeConfigViewerOpen(true);
|
||||
}}
|
||||
|
||||
@@ -15,78 +15,82 @@ export const Route = createFileRoute("/settings")({
|
||||
component: SettingPage,
|
||||
});
|
||||
|
||||
const GithubIcon = () => {
|
||||
const toGithubRepo = useLockFn(() => {
|
||||
return openThat("https://github.com/LibNyanpasu/clash-nyanpasu");
|
||||
});
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
color="inherit"
|
||||
title="@keiko233/clash-nyanpasu"
|
||||
onClick={toGithubRepo}
|
||||
>
|
||||
<GitHub fontSize="inherit" />
|
||||
</IconButton>
|
||||
);
|
||||
};
|
||||
|
||||
const FeedbackIcon = () => {
|
||||
const toFeedback = useLockFn(async () => {
|
||||
const envs = await collect_envs();
|
||||
const formattedEnv = encodeURIComponent(
|
||||
formatEnvInfos(envs)
|
||||
.split("\n")
|
||||
.map((v) => `> ${v}`)
|
||||
.join("\n"),
|
||||
);
|
||||
return openThat(
|
||||
"https://github.com/LibNyanpasu/clash-nyanpasu/issues/new?assignees=&labels=T%3A+Bug%2CS%3A+Untriaged&projects=&template=bug_report.yaml&env_infos=" +
|
||||
formattedEnv,
|
||||
);
|
||||
});
|
||||
return (
|
||||
<IconButton color="inherit" title="Feedback" onClick={toFeedback}>
|
||||
<Feedback fontSize="inherit" />
|
||||
</IconButton>
|
||||
);
|
||||
};
|
||||
|
||||
// FIXME: it should move to a proper place
|
||||
const HotkeyButton = () => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
return (
|
||||
<>
|
||||
<HotkeyDialog open={open} onClose={() => setOpen(false)} />
|
||||
<IconButton color="inherit" title="Hotkeys" onClick={() => setOpen(true)}>
|
||||
<Keyboard fontSize="inherit" />
|
||||
</IconButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
// FIXME: it should move to a proper place
|
||||
const TrayIconButton = () => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
return (
|
||||
<>
|
||||
<TrayIconDialog open={open} onClose={() => setOpen(false)} />
|
||||
<IconButton
|
||||
color="inherit"
|
||||
title="Tray Icons"
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<MdiTrayFull fontSize="inherit" />
|
||||
</IconButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
function SettingPage() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const Component = lazy(() => import("@/components/setting/setting-page"));
|
||||
|
||||
const GithubIcon = () => {
|
||||
const toGithubRepo = useLockFn(() => {
|
||||
return openThat("https://github.com/libnyanpasu/clash-nyanpasu");
|
||||
});
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
color="inherit"
|
||||
title="@libnyanpasu/clash-nyanpasu"
|
||||
onClick={toGithubRepo}
|
||||
>
|
||||
<GitHub fontSize="inherit" />
|
||||
</IconButton>
|
||||
);
|
||||
};
|
||||
|
||||
const FeedbackIcon = () => {
|
||||
const toFeedback = useLockFn(async () => {
|
||||
const envs = await collect_envs();
|
||||
const formattedEnv = encodeURIComponent(
|
||||
formatEnvInfos(envs)
|
||||
.split("\n")
|
||||
.map((v) => `> ${v}`)
|
||||
.join("\n"),
|
||||
);
|
||||
return openThat(
|
||||
"https://github.com/libnyanpasu/clash-nyanpasu/issues/new?assignees=&labels=T%3A+Bug%2CS%3A+Untriaged&projects=&template=bug_report.yaml&env_infos=" +
|
||||
formattedEnv,
|
||||
);
|
||||
});
|
||||
return (
|
||||
<IconButton color="inherit" title={t("Feedback")} onClick={toFeedback}>
|
||||
<Feedback fontSize="inherit" />
|
||||
</IconButton>
|
||||
);
|
||||
};
|
||||
|
||||
// FIXME: it should move to a proper place
|
||||
const HotkeyButton = () => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
return (
|
||||
<>
|
||||
<HotkeyDialog open={open} onClose={() => setOpen(false)} />
|
||||
<IconButton
|
||||
color="inherit"
|
||||
title={t("Hotkeys")}
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<Keyboard fontSize="inherit" />
|
||||
</IconButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
// FIXME: it should move to a proper place
|
||||
const TrayIconButton = () => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
return (
|
||||
<>
|
||||
<TrayIconDialog open={open} onClose={() => setOpen(false)} />
|
||||
<IconButton
|
||||
color="inherit"
|
||||
title={t("Tray Icons")}
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<MdiTrayFull fontSize="inherit" />
|
||||
</IconButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<BasePage
|
||||
title={t("Settings")}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const languageOptions = {
|
||||
zh: "中文",
|
||||
zh: "简体中文",
|
||||
en: "English",
|
||||
ru: "Русский",
|
||||
};
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@material/material-color-utilities": "0.3.0",
|
||||
"@mui/icons-material": "6.1.2",
|
||||
"@mui/lab": "6.0.0-beta.10",
|
||||
"@mui/material": "6.1.2",
|
||||
"@mui/icons-material": "6.1.3",
|
||||
"@mui/lab": "6.0.0-beta.11",
|
||||
"@mui/material": "6.1.3",
|
||||
"@radix-ui/react-portal": "1.1.2",
|
||||
"@radix-ui/react-scroll-area": "1.2.0",
|
||||
"@tauri-apps/api": "2.0.2",
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
"rule_mode": "规则模式",
|
||||
"script_mode": "脚本模式",
|
||||
"system_proxy": "系统代理",
|
||||
"tun_mode": "TUN 模式"
|
||||
"tun_mode": "Tun 模式"
|
||||
},
|
||||
"dialog": {
|
||||
"panic": "请将此问题汇报到 Github 问题追踪器",
|
||||
"migrate": "检测到旧版本配置文件\n是否迁移到新版本?\n警告: 此操作会覆盖掉现有配置文件",
|
||||
"panic": "请将此问题汇报到 GitHub 问题追踪器",
|
||||
"migrate": "检测到旧版本配置文件\n是否迁移到新版本?\n警告:此操作会覆盖掉现有配置文件",
|
||||
"custom_app_dir_migrate": "你将要更改应用目录至 %{path}。\n需要将现有数据迁移到新目录吗?",
|
||||
"warning": {
|
||||
"enable_tun_with_no_permission": "TUN 模式需要管理员权限,或服务模式,当前都未开启,因此 TUN 模式将无法正常工作"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
"eslint-plugin-react": "7.37.0",
|
||||
"eslint-plugin-react-compiler": "0.0.0-experimental-f444e11-20240926",
|
||||
"eslint-plugin-react-hooks": "4.6.2",
|
||||
"knip": "5.33.1",
|
||||
"knip": "5.33.2",
|
||||
"lint-staged": "15.2.10",
|
||||
"npm-run-all2": "6.2.3",
|
||||
"postcss": "8.4.47",
|
||||
@@ -102,7 +102,7 @@
|
||||
"stylelint-scss": "6.7.0",
|
||||
"tailwindcss": "3.4.13",
|
||||
"tsx": "4.19.1",
|
||||
"typescript": "5.6.2"
|
||||
"typescript": "5.6.3"
|
||||
},
|
||||
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4",
|
||||
"engines": {
|
||||
|
||||
Generated
+516
-595
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
"dependencies": {
|
||||
"@actions/github": "6.0.0",
|
||||
"@types/figlet": "1.7.0",
|
||||
"figlet": "1.7.0",
|
||||
"figlet": "1.8.0",
|
||||
"p-retry": "6.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -21,6 +21,6 @@
|
||||
"picocolors": "1.1.0",
|
||||
"tar": "7.4.3",
|
||||
"telegram": "2.25.15",
|
||||
"undici": "6.19.8"
|
||||
"undici": "6.20.0"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ ArmSoM-Sige 系列:软路由、单板计算机、小型服务器与智能家
|
||||
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
|
||||
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev \
|
||||
libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev \
|
||||
libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 \
|
||||
libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python3 \
|
||||
python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo \
|
||||
uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
||||
```
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ Buy Link :
|
||||
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
|
||||
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
|
||||
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
|
||||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
|
||||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pyelftools \
|
||||
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
|
||||
vim wget xmlto xxd zlib1g-dev python3-setuptools
|
||||
```
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_J
|
||||
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
|
||||
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
|
||||
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
|
||||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
|
||||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pyelftools \
|
||||
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
|
||||
vim wget xmlto xxd zlib1g-dev python3-setuptools
|
||||
```
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
From 6a804fb72de56d6a99b799f565ae45f2cec7cd55 Mon Sep 17 00:00:00 2001
|
||||
From: Sridharan S N <quic_sridsn@quicinc.com>
|
||||
Date: Thu, 12 Oct 2023 12:11:34 +0530
|
||||
Subject: mtd: spinand: winbond: add support for serial NAND flash
|
||||
|
||||
Add support for W25N01JW, W25N02JWZEIF, W25N512GW,
|
||||
W25N02KWZEIR and W25N01GWZEIG.
|
||||
|
||||
W25N02KWZEIR has 8b/512b on-die ECC capability and other
|
||||
four has 4b/512b on-die ECC capability.
|
||||
|
||||
Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
|
||||
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20231012064134.4068621-1-quic_sridsn@quicinc.com
|
||||
---
|
||||
drivers/mtd/nand/spi/winbond.c | 45 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
(limited to 'drivers/mtd/nand/spi/winbond.c')
|
||||
|
||||
--- a/drivers/mtd/nand/spi/winbond.c
|
||||
+++ b/drivers/mtd/nand/spi/winbond.c
|
||||
@@ -169,6 +169,51 @@ static const struct spinand_info winbond
|
||||
&update_cache_variants),
|
||||
0,
|
||||
SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N01JW",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbc, 0x21),
|
||||
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
|
||||
+ NAND_ECCREQ(4, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N02JWZEIF",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbf, 0x22),
|
||||
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 2, 1),
|
||||
+ NAND_ECCREQ(4, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N512GW",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x20),
|
||||
+ NAND_MEMORG(1, 2048, 64, 64, 512, 10, 1, 1, 1),
|
||||
+ NAND_ECCREQ(4, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N02KWZEIR",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x22),
|
||||
+ NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
|
||||
+ NAND_ECCREQ(8, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N01GWZEIG",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x21),
|
||||
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
|
||||
+ NAND_ECCREQ(4, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
};
|
||||
|
||||
static int winbond_spinand_init(struct spinand_device *spinand)
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
From e0ccf861b80698a5cc6f97c89bf8d5761f465fce Mon Sep 17 00:00:00 2001
|
||||
From: Zhi-Jun You <hujy652@gmail.com>
|
||||
Date: Sun, 7 Jan 2024 14:41:20 +0000
|
||||
Subject: mtd: spinand: winbond: add support for W25N04KV
|
||||
|
||||
Add support for W25N04KV.
|
||||
|
||||
W25N04KV has 8-bit on-die ECC.
|
||||
|
||||
Signed-off-by: Zhi-Jun You <hujy652@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20240107144120.532-1-hujy652@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/spi/winbond.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
(limited to 'drivers/mtd/nand/spi/winbond.c')
|
||||
|
||||
--- a/drivers/mtd/nand/spi/winbond.c
|
||||
+++ b/drivers/mtd/nand/spi/winbond.c
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
#define WINBOND_CFG_BUF_READ BIT(3)
|
||||
|
||||
+#define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4)
|
||||
+
|
||||
static SPINAND_OP_VARIANTS(read_cache_variants,
|
||||
SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
|
||||
SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
|
||||
@@ -118,6 +120,7 @@ static int w25n02kv_ecc_get_status(struc
|
||||
return -EBADMSG;
|
||||
|
||||
case STATUS_ECC_HAS_BITFLIPS:
|
||||
+ case W25N04KV_STATUS_ECC_5_8_BITFLIPS:
|
||||
/*
|
||||
* Let's try to retrieve the real maximum number of bitflips
|
||||
* in order to avoid forcing the wear-leveling layer to move
|
||||
@@ -214,6 +217,15 @@ static const struct spinand_info winbond
|
||||
&update_cache_variants),
|
||||
0,
|
||||
SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
+ SPINAND_INFO("W25N04KV",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x23),
|
||||
+ NAND_MEMORG(1, 2048, 128, 64, 4096, 40, 2, 1, 1),
|
||||
+ NAND_ECCREQ(8, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
|
||||
};
|
||||
|
||||
static int winbond_spinand_init(struct spinand_device *spinand)
|
||||
+3
-3
@@ -14,7 +14,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/nand/spi/winbond.c
|
||||
+++ b/drivers/mtd/nand/spi/winbond.c
|
||||
@@ -74,6 +74,18 @@ static int w25m02gv_select_target(struct
|
||||
@@ -76,6 +76,18 @@ static int w25m02gv_select_target(struct
|
||||
return spi_mem_exec_op(spinand->spimem, &op);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
static int w25n02kv_ooblayout_ecc(struct mtd_info *mtd, int section,
|
||||
struct mtd_oob_region *region)
|
||||
{
|
||||
@@ -98,6 +110,11 @@ static int w25n02kv_ooblayout_free(struc
|
||||
@@ -100,6 +112,11 @@ static int w25n02kv_ooblayout_free(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
|
||||
.ecc = w25n02kv_ooblayout_ecc,
|
||||
.free = w25n02kv_ooblayout_free,
|
||||
@@ -160,6 +177,15 @@ static const struct spinand_info winbond
|
||||
@@ -163,6 +180,15 @@ static const struct spinand_info winbond
|
||||
&update_cache_variants),
|
||||
0,
|
||||
SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)),
|
||||
|
||||
@@ -131,11 +131,7 @@ func (c *HysteriaOption) Speed() (uint64, uint64, error) {
|
||||
}
|
||||
|
||||
func NewHysteria(option HysteriaOption) (*Hysteria, error) {
|
||||
clientTransport := &transport.ClientTransport{
|
||||
Dialer: &net.Dialer{
|
||||
Timeout: 8 * time.Second,
|
||||
},
|
||||
}
|
||||
clientTransport := &transport.ClientTransport{}
|
||||
addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port))
|
||||
ports := option.Ports
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/metacubex/mihomo/component/ca"
|
||||
"github.com/metacubex/mihomo/component/dialer"
|
||||
"github.com/metacubex/mihomo/listener/inner"
|
||||
)
|
||||
|
||||
@@ -71,8 +72,7 @@ func HttpRequestWithProxy(ctx context.Context, url, method string, header map[st
|
||||
if conn, err := inner.HandleTcp(address, specialProxy); err == nil {
|
||||
return conn, nil
|
||||
} else {
|
||||
d := net.Dialer{}
|
||||
return d.DialContext(ctx, network, address)
|
||||
return dialer.DialContext(ctx, network, address)
|
||||
}
|
||||
},
|
||||
TLSClientConfig: ca.GetGlobalTLSConfig(&tls.Config{}),
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/metacubex/quic-go"
|
||||
@@ -16,9 +15,7 @@ import (
|
||||
"github.com/metacubex/mihomo/transport/hysteria/utils"
|
||||
)
|
||||
|
||||
type ClientTransport struct {
|
||||
Dialer *net.Dialer
|
||||
}
|
||||
type ClientTransport struct{}
|
||||
|
||||
func (ct *ClientTransport) quicPacketConn(proto string, rAddr net.Addr, serverPorts string, obfs obfsPkg.Obfuscator, hopInterval time.Duration, dialer utils.PacketDialer) (net.PacketConn, error) {
|
||||
server := rAddr.String()
|
||||
@@ -86,23 +83,3 @@ func (ct *ClientTransport) QUICDial(proto string, server string, serverPorts str
|
||||
}
|
||||
return qs, nil
|
||||
}
|
||||
|
||||
func (ct *ClientTransport) DialTCP(raddr *net.TCPAddr) (*net.TCPConn, error) {
|
||||
conn, err := ct.Dialer.Dial("tcp", raddr.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return conn.(*net.TCPConn), nil
|
||||
}
|
||||
|
||||
func (ct *ClientTransport) ListenUDP() (*net.UDPConn, error) {
|
||||
return net.ListenUDP("udp", nil)
|
||||
}
|
||||
|
||||
func isMultiPortAddr(addr string) bool {
|
||||
_, portStr, err := net.SplitHostPort(addr)
|
||||
if err == nil && (strings.Contains(portStr, ",") || strings.Contains(portStr, "-")) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
-33
@@ -5,9 +5,6 @@ on:
|
||||
tag:
|
||||
description: 'Release Tag'
|
||||
required: true
|
||||
upload:
|
||||
description: 'Upload: If want ignore'
|
||||
required: false
|
||||
publish:
|
||||
description: 'Publish: If want ignore'
|
||||
required: false
|
||||
@@ -100,36 +97,6 @@ jobs:
|
||||
mkdir apks
|
||||
find artifacts -name "*.apk" -exec cp {} apks \;
|
||||
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks
|
||||
upload:
|
||||
name: Upload Release
|
||||
if: github.event.inputs.upload != 'y'
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Donwload Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: APKs
|
||||
path: artifacts
|
||||
- name: Release
|
||||
run: |
|
||||
mkdir apks
|
||||
find artifacts -name "*.apk" -exec cp {} apks \;
|
||||
|
||||
function upload() {
|
||||
for apk in $@; do
|
||||
echo ">> Uploading $apk"
|
||||
curl https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument \
|
||||
-X POST \
|
||||
-F chat_id="${{ secrets.TELEGRAM_CHANNEL }}" \
|
||||
-F document="@$apk" \
|
||||
--silent --show-error --fail >/dev/null &
|
||||
done
|
||||
for job in $(jobs -p); do
|
||||
wait $job || exit 1
|
||||
done
|
||||
}
|
||||
upload apks/*
|
||||
play:
|
||||
name: Build Play Bundle
|
||||
if: github.event.inputs.play != 'y'
|
||||
|
||||
@@ -98,7 +98,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
|
||||
var showGroupInNotification by configurationStore.boolean("showGroupInNotification")
|
||||
|
||||
var remoteDns by configurationStore.string(Key.REMOTE_DNS) { "https://dns.google/dns-query" }
|
||||
var directDns by configurationStore.string(Key.DIRECT_DNS) { "local" }
|
||||
var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://120.53.53.53/dns-query" }
|
||||
var enableDnsRouting by configurationStore.boolean(Key.ENABLE_DNS_ROUTING) { true }
|
||||
var enableFakeDns by configurationStore.boolean(Key.ENABLE_FAKEDNS)
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ const val TAG_DNS_IN = "dns-in"
|
||||
const val TAG_DNS_OUT = "dns-out"
|
||||
|
||||
const val LOCALHOST = "127.0.0.1"
|
||||
const val LOCAL_DNS_SERVER = "local"
|
||||
|
||||
class ConfigBuildResult(
|
||||
var config: String,
|
||||
@@ -697,7 +696,7 @@ fun buildConfig(
|
||||
})
|
||||
}
|
||||
dns.servers.add(DNSServerOptions().apply {
|
||||
address = LOCAL_DNS_SERVER
|
||||
address = "local"
|
||||
tag = "dns-local"
|
||||
detour = TAG_DIRECT
|
||||
})
|
||||
@@ -714,14 +713,8 @@ fun buildConfig(
|
||||
}
|
||||
|
||||
if (forTest) {
|
||||
// Always use system DNS for urlTest
|
||||
dns.servers = listOf(
|
||||
DNSServerOptions().apply {
|
||||
address = LOCAL_DNS_SERVER
|
||||
tag = "dns-local"
|
||||
detour = TAG_DIRECT
|
||||
}
|
||||
)
|
||||
// Always use direct DNS for urlTest
|
||||
dns.servers.removeAt(0)
|
||||
dns.rules = listOf()
|
||||
} else {
|
||||
// built-in DNS rules
|
||||
@@ -732,7 +725,7 @@ fun buildConfig(
|
||||
route.rules.add(0, Rule_DefaultOptions().apply {
|
||||
port = listOf(53)
|
||||
outbound = TAG_DNS_OUT
|
||||
}) // TODO new mode use system dns?
|
||||
})
|
||||
if (DataStore.bypassLanInCore) {
|
||||
route.rules.add(Rule_DefaultOptions().apply {
|
||||
outbound = TAG_BYPASS
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ public abstract class StandardV2RayBean extends AbstractBean {
|
||||
|
||||
//////// End of VMess & VLESS ////////
|
||||
|
||||
// "V2Ray Transport" tcp/http/ws/quic/grpc/httpUpgrade
|
||||
// "V2Ray Transport" tcp/http/ws/quic/grpc/httpupgrade
|
||||
public String type;
|
||||
|
||||
public String host;
|
||||
|
||||
@@ -593,12 +593,6 @@ fun buildSingBoxOutboundStreamSettings(bean: StandardV2RayBean): V2RayTransportO
|
||||
}
|
||||
}
|
||||
|
||||
// if (needKeepAliveInterval) {
|
||||
// sockopt = StreamSettingsObject.SockoptObject().apply {
|
||||
// tcpKeepAliveInterval = keepAliveInterval
|
||||
// }
|
||||
// }
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,7 @@ object RawUpdater : GroupUpdater() {
|
||||
}
|
||||
|
||||
"vmess", "vless" -> {
|
||||
var isHttpUpgrade = false
|
||||
val isVLESS = proxy["type"].toString() == "vless"
|
||||
val bean = VMessBean().apply {
|
||||
if (isVLESS) {
|
||||
@@ -366,6 +367,10 @@ object RawUpdater : GroupUpdater() {
|
||||
"early-data-header-name" -> {
|
||||
bean.earlyDataHeaderName = wsOpt.value.toString()
|
||||
}
|
||||
|
||||
"v2ray-http-upgrade" -> {
|
||||
isHttpUpgrade = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,10 +416,14 @@ object RawUpdater : GroupUpdater() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isHttpUpgrade) {
|
||||
bean.type = "httpupgrade"
|
||||
}
|
||||
proxies.add(bean)
|
||||
}
|
||||
|
||||
"trojan" -> {
|
||||
var isHttpUpgrade = false
|
||||
val bean = TrojanBean()
|
||||
bean.security = "tls"
|
||||
for (opt in proxy) {
|
||||
@@ -451,6 +460,10 @@ object RawUpdater : GroupUpdater() {
|
||||
"path" -> {
|
||||
bean.path = wsOpt.value.toString()
|
||||
}
|
||||
|
||||
"v2ray-http-upgrade" -> {
|
||||
isHttpUpgrade = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,6 +475,9 @@ object RawUpdater : GroupUpdater() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isHttpUpgrade) {
|
||||
bean.type = "httpupgrade"
|
||||
}
|
||||
proxies.add(bean)
|
||||
}
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ class LogcatFragment : ToolbarFragment(R.layout.layout_logcat),
|
||||
private fun getColorForLine(line: String): ForegroundColorSpan {
|
||||
var color = ForegroundColorSpan(Color.GRAY)
|
||||
when {
|
||||
line.contains(" INFO[") || line.contains(" [Info]") -> {
|
||||
line.contains("INFO[") || line.contains(" [Info]") -> {
|
||||
color = ForegroundColorSpan((0xFF86C166).toInt())
|
||||
}
|
||||
line.contains(" ERROR[") || line.contains(" [Error]") -> {
|
||||
line.contains("ERROR[") || line.contains(" [Error]") -> {
|
||||
color = ForegroundColorSpan(Color.RED)
|
||||
}
|
||||
line.contains(" WARN[") || line.contains(" [Warning]") -> {
|
||||
line.contains("WARN[") || line.contains(" [Warning]") -> {
|
||||
color = ForegroundColorSpan(Color.RED)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ import moe.matsuri.nb4a.SingBoxOptions.RuleSet
|
||||
object SingBoxOptionsUtil {
|
||||
|
||||
fun domainStrategy(tag: String): String {
|
||||
fun auto2AsIs(key: String): String {
|
||||
return (DataStore.configurationStore.getString(key) ?: "").replace("auto", "")
|
||||
fun auto2(key: String, newS: String): String {
|
||||
return (DataStore.configurationStore.getString(key) ?: "").replace("auto", newS)
|
||||
}
|
||||
return when (tag) {
|
||||
"dns-remote" -> {
|
||||
auto2AsIs("domain_strategy_for_remote")
|
||||
auto2("domain_strategy_for_remote", "")
|
||||
}
|
||||
|
||||
"dns-direct" -> {
|
||||
auto2AsIs("domain_strategy_for_direct")
|
||||
auto2("domain_strategy_for_direct", "")
|
||||
}
|
||||
|
||||
// server
|
||||
else -> {
|
||||
auto2AsIs("domain_strategy_for_server")
|
||||
auto2("domain_strategy_for_server", "prefer_ipv4")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
<item>http</item>
|
||||
<item>quic</item>
|
||||
<item>grpc</item>
|
||||
<!-- <item>httpupgrade</item>-->
|
||||
<item>httpupgrade</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="trojan_go_networks_entry">
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
app:title="@string/domain_strategy_for_remote"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
<EditTextPreference
|
||||
app:defaultValue="local"
|
||||
app:defaultValue="https://120.53.53.53/dns-query"
|
||||
app:icon="@drawable/ic_action_dns"
|
||||
app:key="directDns"
|
||||
app:title="@string/direct_dns"
|
||||
|
||||
@@ -22,6 +22,16 @@ popd
|
||||
|
||||
####
|
||||
|
||||
if [ ! -d "sing-quic" ]; then
|
||||
git clone --no-checkout https://github.com/MatsuriDayo/sing-quic.git
|
||||
fi
|
||||
pushd sing-quic
|
||||
git checkout "$COMMIT_SING_QUIC"
|
||||
|
||||
popd
|
||||
|
||||
####
|
||||
|
||||
if [ ! -d "libneko" ]; then
|
||||
git clone --no-checkout https://github.com/MatsuriDayo/libneko.git
|
||||
fi
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export COMMIT_SING_BOX="cf36758f11b7c144e1211801753cc91f06ff2906"
|
||||
export COMMIT_SING_BOX="06557f6cef23160668122a17a818b378b5a216b5"
|
||||
export COMMIT_SING_QUIC="b49ce60d9b3622d5238fee96bfd3c5f6e3915b42"
|
||||
export COMMIT_LIBNEKO="1c47a3af71990a7b2192e03292b4d246c308ef0b"
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
"github.com/matsuridayo/libneko/neko_log"
|
||||
"github.com/matsuridayo/libneko/protect_server"
|
||||
"github.com/matsuridayo/libneko/speedtest"
|
||||
"github.com/sagernet/sing-box/boxapi"
|
||||
@@ -21,6 +20,8 @@ import (
|
||||
"github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing-box/outbound"
|
||||
"github.com/sagernet/sing/common"
|
||||
"github.com/sagernet/sing/service"
|
||||
"github.com/sagernet/sing/service/pause"
|
||||
)
|
||||
|
||||
@@ -79,15 +80,16 @@ func NewSingBoxInstance(config string) (b *BoxInstance, err error) {
|
||||
return nil, fmt.Errorf("decode config: %v", err)
|
||||
}
|
||||
|
||||
// create box
|
||||
// create box context
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
sleepManager := pause.ManagerFromContext(ctx)
|
||||
//sleepManager := pause.NewDefaultManager(ctx)
|
||||
ctx = pause.ContextWithManager(ctx, sleepManager)
|
||||
ctx = service.ContextWithDefaultRegistry(ctx)
|
||||
|
||||
// create box
|
||||
instance, err := box.New(box.Options{
|
||||
Options: options,
|
||||
Context: ctx,
|
||||
PlatformInterface: boxPlatformInterfaceInstance,
|
||||
PlatformLogWriter: boxPlatformLogWriter,
|
||||
})
|
||||
if err != nil {
|
||||
cancel()
|
||||
@@ -97,16 +99,9 @@ func NewSingBoxInstance(config string) (b *BoxInstance, err error) {
|
||||
b = &BoxInstance{
|
||||
Box: instance,
|
||||
cancel: cancel,
|
||||
pauseManager: sleepManager,
|
||||
pauseManager: service.FromContext[pause.Manager](ctx),
|
||||
}
|
||||
|
||||
b.SetLogWritter(neko_log.LogWriter)
|
||||
|
||||
// fuck your sing-box platformFormatter
|
||||
pf := instance.GetLogPlatformFormatter()
|
||||
pf.DisableColors = true
|
||||
pf.DisableLineBreak = false
|
||||
|
||||
// selector
|
||||
if proxy, ok := b.Router().Outbound("proxy"); ok {
|
||||
if selector, ok := proxy.(*outbound.Selector); ok {
|
||||
@@ -143,9 +138,7 @@ func (b *BoxInstance) Close() (err error) {
|
||||
}
|
||||
|
||||
// close box
|
||||
b.Close()
|
||||
// close box.Box
|
||||
b.Box.Close()
|
||||
common.Close(b.Box)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -164,10 +157,6 @@ func (b *BoxInstance) SetAsMain() {
|
||||
goServeProtect(true)
|
||||
}
|
||||
|
||||
func (b *BoxInstance) SetConnectionPoolEnabled(enable bool) {
|
||||
// TODO api
|
||||
}
|
||||
|
||||
func (b *BoxInstance) SetV2rayStats(outbounds string) {
|
||||
b.v2api = boxapi.NewSbV2rayServer(option.V2RayStatsServiceOptions{
|
||||
Enabled: true,
|
||||
|
||||
@@ -5,10 +5,10 @@ go 1.20
|
||||
require (
|
||||
github.com/matsuridayo/libneko v1.0.0 // replaced
|
||||
github.com/miekg/dns v1.1.59
|
||||
github.com/sagernet/sing v0.4.1
|
||||
github.com/sagernet/sing v0.4.3
|
||||
github.com/sagernet/sing-box v1.0.0 // replaced
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65
|
||||
github.com/sagernet/sing-tun v0.3.2
|
||||
github.com/sagernet/sing-dns v0.2.3
|
||||
github.com/sagernet/sing-tun v0.3.3
|
||||
github.com/ulikunitz/xz v0.5.11
|
||||
golang.org/x/mobile v0.0.0-20231108233038-35478a0c49da
|
||||
)
|
||||
@@ -44,6 +44,7 @@ require (
|
||||
github.com/libdns/cloudflare v0.1.1 // indirect
|
||||
github.com/libdns/libdns v0.2.2 // indirect
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d // indirect
|
||||
github.com/mholt/acmez v1.2.0 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
|
||||
github.com/ooni/go-libtor v1.1.8 // indirect
|
||||
@@ -54,16 +55,15 @@ require (
|
||||
github.com/sagernet/cloudflare-tls v0.0.0-20231208171750-a4483c1b7cd1 // indirect
|
||||
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f // indirect
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba // indirect
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2 // indirect
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2 // indirect
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect
|
||||
github.com/sagernet/sing-mux v0.2.0 // indirect
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6 // indirect
|
||||
github.com/sagernet/sing-quic v0.2.2 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 // indirect
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.1.4 // indirect
|
||||
github.com/sagernet/sing-vmess v0.1.8 // indirect
|
||||
github.com/sagernet/sing-vmess v0.1.12 // indirect
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 // indirect
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 // indirect
|
||||
github.com/sagernet/utls v1.5.4 // indirect
|
||||
github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8 // indirect
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 // indirect
|
||||
@@ -79,23 +79,23 @@ require (
|
||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
|
||||
golang.org/x/mod v0.18.0 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sync v0.7.0 // indirect
|
||||
golang.org/x/sys v0.21.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/grpc v1.63.2 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
lukechampine.com/blake3 v1.2.1 // indirect
|
||||
lukechampine.com/blake3 v1.3.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/matsuridayo/libneko => ../../libneko
|
||||
|
||||
replace github.com/sagernet/sing-box => ../../sing-box
|
||||
|
||||
// replace github.com/sagernet/sing-quic => ../../sing-quic
|
||||
replace github.com/sagernet/sing-quic => ../../sing-quic
|
||||
|
||||
// replace github.com/sagernet/sing => ../../sing
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
|
||||
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d h1:j9LtzkYstLFoNvXW824QQeN7Y26uPL5249kzWKbzO9U=
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d/go.mod h1:c7bVFM9f5+VzeZ/6Kg77T/jrg1Xp8QpqlSHvG/aXVts=
|
||||
github.com/mholt/acmez v1.2.0 h1:1hhLxSgY5FvH5HCnGUuwbKY2VQVo8IU7rxXKSnZ7F30=
|
||||
github.com/mholt/acmez v1.2.0/go.mod h1:VT9YwH1xgNX1kmYY89gY8xPJC84BFAisjo8Egigt4kE=
|
||||
github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs=
|
||||
@@ -93,33 +95,29 @@ github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f h1:NkhuupzH5ch7b/Y
|
||||
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f/go.mod h1:KXmw+ouSJNOsuRpg4wgwwCQuunrGz4yoAqQjsLjc6N0=
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba h1:EY5AS7CCtfmARNv2zXUOrsEMPFDGYxaw65JzA2p51Vk=
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2 h1:zkEeCbhdFFkrxKcuIRBtXNKci/1t2J/39QSG/sPvlmc=
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2/go.mod h1:+N3FqM9DAzOWfe64uxXuBejVJwX7DeW7BslzLO6N/xI=
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2 h1:1tCGWFOSaXIeuQaHrwOMJIYvlupjTcaVInGQw5ArULU=
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2/go.mod h1:bLVKvElSEMNv7pu7SZHscW02TYigzQ5lQu3Nh4wNh8Q=
|
||||
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.1 h1:zVlpE+7k7AFoC2pv6ReqLf0PIHjihL/jsBl5k05PQFk=
|
||||
github.com/sagernet/sing v0.4.1/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65 h1:lcCe7E1csuyUA3RCvpFcIYOy6FIifDthKaCrUjLG4xA=
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65/go.mod h1:dArgyPZmK8+zDBVRMjV3r12zHgnTara0ahrWwSe/eQE=
|
||||
github.com/sagernet/sing v0.4.3 h1:Ty/NAiNnVd6844k7ujlL5lkzydhcTH5Psc432jXA4Y8=
|
||||
github.com/sagernet/sing v0.4.3/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
|
||||
github.com/sagernet/sing-dns v0.2.3 h1:YzeBUn2tR38F7HtvGEQ0kLRLmZWMEgi/+7wqa4Twb1k=
|
||||
github.com/sagernet/sing-dns v0.2.3/go.mod h1:BJpJv6XLnrUbSyIntOT6DG9FW0f4fETmPAHvNjOprLg=
|
||||
github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo=
|
||||
github.com/sagernet/sing-mux v0.2.0/go.mod h1:khzr9AOPocLa+g53dBplwNDz4gdsyx/YM3swtAhlkHQ=
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12 h1:BhvA5mmrDFEyDUQB5eeu+9UhF+ieyuNJ5Rsb0dAG3QY=
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12/go.mod h1:YVpLfVi8BvYM7NMrjmnvcRm3E8iMETf1gFQmTQDN9jI=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.1.4 h1:aTgBSJEgnumzFenPvc+kbD9/W0PywzWevnVpEx6Tw3k=
|
||||
github.com/sagernet/sing-shadowtls v0.1.4/go.mod h1:F8NBgsY5YN2beQavdgdm1DPlhaKQlaL6lpDdcBglGK4=
|
||||
github.com/sagernet/sing-tun v0.3.2 h1:z0bLUT/YXH9RrJS9DsIpB0Bb9afl2hVJOmHd0zA3HJY=
|
||||
github.com/sagernet/sing-tun v0.3.2/go.mod h1:DxLIyhjWU/HwGYoX0vNGg2c5QgTQIakphU1MuERR5tQ=
|
||||
github.com/sagernet/sing-vmess v0.1.8 h1:XVWad1RpTy9b5tPxdm5MCU8cGfrTGdR8qCq6HV2aCNc=
|
||||
github.com/sagernet/sing-vmess v0.1.8/go.mod h1:vhx32UNzTDUkNwOyIjcZQohre1CaytquC5mPplId8uA=
|
||||
github.com/sagernet/sing-tun v0.3.3 h1:LZnQNmfGcNG2KPTPkLgc+Lo7k606QJVkPp2DnjriwUk=
|
||||
github.com/sagernet/sing-tun v0.3.3/go.mod h1:DxLIyhjWU/HwGYoX0vNGg2c5QgTQIakphU1MuERR5tQ=
|
||||
github.com/sagernet/sing-vmess v0.1.12 h1:2gFD8JJb+eTFMoa8FIVMnknEi+vCSfaiTXTfEYAYAPg=
|
||||
github.com/sagernet/sing-vmess v0.1.12/go.mod h1:luTSsfyBGAc9VhtCqwjR+dt1QgqBhuYBCONB/POhF8I=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 h1:z3SJQhVyU63FT26Wn/UByW6b7q8QKB0ZkPqsyqcz2PI=
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6/go.mod h1:73xRZuxwkFk4aiLw28hG8W6o9cr2UPrGL9pdY2UTbvY=
|
||||
github.com/sagernet/utls v1.5.4 h1:KmsEGbB2dKUtCNC+44NwAdNAqnqQ6GA4pTO0Yik56co=
|
||||
github.com/sagernet/utls v1.5.4/go.mod h1:CTGxPWExIloRipK3XFpYv0OVyhO8kk3XCGW/ieyTh1s=
|
||||
github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8 h1:R0OMYAScomNAVpTfbHFpxqJpvwuhxSRi+g6z7gZhABs=
|
||||
@@ -168,8 +166,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -179,14 +177,14 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -204,5 +202,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
|
||||
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
|
||||
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/matsuridayo/libneko/neko_common"
|
||||
"github.com/matsuridayo/libneko/neko_log"
|
||||
boxmain "github.com/sagernet/sing-box/cmd/sing-box"
|
||||
"github.com/sagernet/sing-box/nekoutils"
|
||||
)
|
||||
|
||||
//go:linkname resourcePaths github.com/sagernet/sing-box/constant.resourcePaths
|
||||
@@ -60,7 +61,7 @@ func InitCore(process, cachePath, internalAssets, externalAssets string,
|
||||
boxmain.SetDisableColor(true)
|
||||
|
||||
// nekoutils
|
||||
// nekoutils.Selector_OnProxySelected = intfNB4A.Selector_OnProxySelected
|
||||
nekoutils.Selector_OnProxySelected = intfNB4A.Selector_OnProxySelected
|
||||
|
||||
// Set up some component
|
||||
go func() {
|
||||
|
||||
@@ -11,9 +11,11 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/matsuridayo/libneko/neko_log"
|
||||
"github.com/sagernet/sing-box/adapter"
|
||||
"github.com/sagernet/sing-box/common/process"
|
||||
"github.com/sagernet/sing-box/experimental/libbox/platform"
|
||||
sblog "github.com/sagernet/sing-box/log"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
tun "github.com/sagernet/sing-tun"
|
||||
"github.com/sagernet/sing/common/control"
|
||||
@@ -147,3 +149,19 @@ func (w *boxPlatformInterfaceWrapper) Write(p []byte) (n int, err error) {
|
||||
}
|
||||
return len(p), nil
|
||||
}
|
||||
|
||||
// 日志
|
||||
|
||||
type boxPlatformLogWriterWrapper struct {
|
||||
}
|
||||
|
||||
var boxPlatformLogWriter sblog.PlatformWriter = &boxPlatformLogWriterWrapper{}
|
||||
|
||||
func (w *boxPlatformLogWriterWrapper) DisableColors() bool { return true }
|
||||
|
||||
func (w *boxPlatformLogWriterWrapper) WriteMessage(level uint8, message string) {
|
||||
if !strings.HasSuffix(message, "\n") {
|
||||
message += "\n"
|
||||
}
|
||||
neko_log.LogWriter.Write([]byte(message))
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
PACKAGE_NAME=moe.nb4a
|
||||
VERSION_NAME=1.3.1
|
||||
VERSION_CODE=35
|
||||
VERSION_NAME=1.3.2
|
||||
VERSION_CODE=36
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace NekoGui_fmt {
|
||||
return 1;
|
||||
};
|
||||
|
||||
if (!forceExternal && (proxy_type == proxy_TUIC || hopPort.trimmed().isEmpty())) {
|
||||
if (!forceExternal) {
|
||||
// sing-box support
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
@@ -40,6 +40,7 @@ require (
|
||||
github.com/libdns/cloudflare v0.1.1 // indirect
|
||||
github.com/libdns/libdns v0.2.2 // indirect
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d // indirect
|
||||
github.com/mholt/acmez v1.2.0 // indirect
|
||||
github.com/miekg/dns v1.1.59 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
|
||||
@@ -52,19 +53,18 @@ require (
|
||||
github.com/sagernet/cloudflare-tls v0.0.0-20231208171750-a4483c1b7cd1 // indirect
|
||||
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f // indirect
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba // indirect
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2 // indirect
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2 // indirect
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect
|
||||
github.com/sagernet/sing v0.4.1 // indirect
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65 // indirect
|
||||
github.com/sagernet/sing v0.4.3 // indirect
|
||||
github.com/sagernet/sing-dns v0.2.3 // indirect
|
||||
github.com/sagernet/sing-mux v0.2.0 // indirect
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6 // indirect
|
||||
github.com/sagernet/sing-quic v0.2.2 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 // indirect
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.1.4 // indirect
|
||||
github.com/sagernet/sing-tun v0.3.2 // indirect
|
||||
github.com/sagernet/sing-vmess v0.1.8 // indirect
|
||||
github.com/sagernet/sing-tun v0.3.3 // indirect
|
||||
github.com/sagernet/sing-vmess v0.1.12 // indirect
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 // indirect
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 // indirect
|
||||
github.com/sagernet/utls v1.5.4 // indirect
|
||||
github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8 // indirect
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 // indirect
|
||||
@@ -80,16 +80,16 @@ require (
|
||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
|
||||
golang.org/x/mod v0.18.0 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sync v0.7.0 // indirect
|
||||
golang.org/x/sys v0.21.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/grpc v1.63.2 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
lukechampine.com/blake3 v1.2.1 // indirect
|
||||
lukechampine.com/blake3 v1.3.0 // indirect
|
||||
)
|
||||
|
||||
replace grpc_server => ../../grpc_server
|
||||
@@ -98,7 +98,7 @@ replace github.com/matsuridayo/libneko => ../../../../libneko
|
||||
|
||||
replace github.com/sagernet/sing-box => ../../../../sing-box
|
||||
|
||||
// replace github.com/sagernet/sing-quic => ../../../../sing-quic
|
||||
replace github.com/sagernet/sing-quic => ../../../../sing-quic
|
||||
|
||||
// replace github.com/sagernet/sing => ../../../../sing
|
||||
|
||||
|
||||
@@ -94,6 +94,8 @@ github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
|
||||
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d h1:j9LtzkYstLFoNvXW824QQeN7Y26uPL5249kzWKbzO9U=
|
||||
github.com/metacubex/tfo-go v0.0.0-20240821025650-e9be0afd5e7d/go.mod h1:c7bVFM9f5+VzeZ/6Kg77T/jrg1Xp8QpqlSHvG/aXVts=
|
||||
github.com/mholt/acmez v1.2.0 h1:1hhLxSgY5FvH5HCnGUuwbKY2VQVo8IU7rxXKSnZ7F30=
|
||||
github.com/mholt/acmez v1.2.0/go.mod h1:VT9YwH1xgNX1kmYY89gY8xPJC84BFAisjo8Egigt4kE=
|
||||
github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs=
|
||||
@@ -125,33 +127,29 @@ github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f h1:NkhuupzH5ch7b/Y
|
||||
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f/go.mod h1:KXmw+ouSJNOsuRpg4wgwwCQuunrGz4yoAqQjsLjc6N0=
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba h1:EY5AS7CCtfmARNv2zXUOrsEMPFDGYxaw65JzA2p51Vk=
|
||||
github.com/sagernet/netlink v0.0.0-20240523065131-45e60152f9ba/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2 h1:zkEeCbhdFFkrxKcuIRBtXNKci/1t2J/39QSG/sPvlmc=
|
||||
github.com/sagernet/quic-go v0.45.1-beta.2/go.mod h1:+N3FqM9DAzOWfe64uxXuBejVJwX7DeW7BslzLO6N/xI=
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2 h1:1tCGWFOSaXIeuQaHrwOMJIYvlupjTcaVInGQw5ArULU=
|
||||
github.com/sagernet/quic-go v0.47.0-beta.2/go.mod h1:bLVKvElSEMNv7pu7SZHscW02TYigzQ5lQu3Nh4wNh8Q=
|
||||
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.1 h1:zVlpE+7k7AFoC2pv6ReqLf0PIHjihL/jsBl5k05PQFk=
|
||||
github.com/sagernet/sing v0.4.1/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65 h1:lcCe7E1csuyUA3RCvpFcIYOy6FIifDthKaCrUjLG4xA=
|
||||
github.com/sagernet/sing-dns v0.2.1-0.20240624030536-ca4a5f7afb65/go.mod h1:dArgyPZmK8+zDBVRMjV3r12zHgnTara0ahrWwSe/eQE=
|
||||
github.com/sagernet/sing v0.4.3 h1:Ty/NAiNnVd6844k7ujlL5lkzydhcTH5Psc432jXA4Y8=
|
||||
github.com/sagernet/sing v0.4.3/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
|
||||
github.com/sagernet/sing-dns v0.2.3 h1:YzeBUn2tR38F7HtvGEQ0kLRLmZWMEgi/+7wqa4Twb1k=
|
||||
github.com/sagernet/sing-dns v0.2.3/go.mod h1:BJpJv6XLnrUbSyIntOT6DG9FW0f4fETmPAHvNjOprLg=
|
||||
github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo=
|
||||
github.com/sagernet/sing-mux v0.2.0/go.mod h1:khzr9AOPocLa+g53dBplwNDz4gdsyx/YM3swtAhlkHQ=
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12 h1:BhvA5mmrDFEyDUQB5eeu+9UhF+ieyuNJ5Rsb0dAG3QY=
|
||||
github.com/sagernet/sing-quic v0.2.0-beta.12/go.mod h1:YVpLfVi8BvYM7NMrjmnvcRm3E8iMETf1gFQmTQDN9jI=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.1.4 h1:aTgBSJEgnumzFenPvc+kbD9/W0PywzWevnVpEx6Tw3k=
|
||||
github.com/sagernet/sing-shadowtls v0.1.4/go.mod h1:F8NBgsY5YN2beQavdgdm1DPlhaKQlaL6lpDdcBglGK4=
|
||||
github.com/sagernet/sing-tun v0.3.2 h1:z0bLUT/YXH9RrJS9DsIpB0Bb9afl2hVJOmHd0zA3HJY=
|
||||
github.com/sagernet/sing-tun v0.3.2/go.mod h1:DxLIyhjWU/HwGYoX0vNGg2c5QgTQIakphU1MuERR5tQ=
|
||||
github.com/sagernet/sing-vmess v0.1.8 h1:XVWad1RpTy9b5tPxdm5MCU8cGfrTGdR8qCq6HV2aCNc=
|
||||
github.com/sagernet/sing-vmess v0.1.8/go.mod h1:vhx32UNzTDUkNwOyIjcZQohre1CaytquC5mPplId8uA=
|
||||
github.com/sagernet/sing-tun v0.3.3 h1:LZnQNmfGcNG2KPTPkLgc+Lo7k606QJVkPp2DnjriwUk=
|
||||
github.com/sagernet/sing-tun v0.3.3/go.mod h1:DxLIyhjWU/HwGYoX0vNGg2c5QgTQIakphU1MuERR5tQ=
|
||||
github.com/sagernet/sing-vmess v0.1.12 h1:2gFD8JJb+eTFMoa8FIVMnknEi+vCSfaiTXTfEYAYAPg=
|
||||
github.com/sagernet/sing-vmess v0.1.12/go.mod h1:luTSsfyBGAc9VhtCqwjR+dt1QgqBhuYBCONB/POhF8I=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 h1:z3SJQhVyU63FT26Wn/UByW6b7q8QKB0ZkPqsyqcz2PI=
|
||||
github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6/go.mod h1:73xRZuxwkFk4aiLw28hG8W6o9cr2UPrGL9pdY2UTbvY=
|
||||
github.com/sagernet/utls v1.5.4 h1:KmsEGbB2dKUtCNC+44NwAdNAqnqQ6GA4pTO0Yik56co=
|
||||
github.com/sagernet/utls v1.5.4/go.mod h1:CTGxPWExIloRipK3XFpYv0OVyhO8kk3XCGW/ieyTh1s=
|
||||
github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8 h1:R0OMYAScomNAVpTfbHFpxqJpvwuhxSRi+g6z7gZhABs=
|
||||
@@ -229,8 +227,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -245,15 +243,15 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -296,5 +294,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
|
||||
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
|
||||
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
|
||||
@@ -18,6 +18,16 @@ popd
|
||||
|
||||
####
|
||||
|
||||
if [ ! -d "sing-quic" ]; then
|
||||
git clone --no-checkout https://github.com/MatsuriDayo/sing-quic.git
|
||||
fi
|
||||
pushd sing-quic
|
||||
git checkout "$COMMIT_SING_QUIC"
|
||||
|
||||
popd
|
||||
|
||||
####
|
||||
|
||||
if [ ! -d "libneko" ]; then
|
||||
git clone --no-checkout https://github.com/MatsuriDayo/libneko.git
|
||||
fi
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export COMMIT_SING_BOX="cf36758f11b7c144e1211801753cc91f06ff2906"
|
||||
export COMMIT_SING_BOX="06557f6cef23160668122a17a818b378b5a216b5"
|
||||
export COMMIT_SING_QUIC="b49ce60d9b3622d5238fee96bfd3c5f6e3915b42"
|
||||
export COMMIT_LIBNEKO="1c47a3af71990a7b2192e03292b4d246c308ef0b"
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0-beta3-2024-07-13
|
||||
4.0-beta4-2024-10-09
|
||||
|
||||
@@ -1492,6 +1492,10 @@ End: %2</source>
|
||||
<source>Stop Testing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>URL Test</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProxyItem</name>
|
||||
@@ -1632,6 +1636,10 @@ Direct: %2</source>
|
||||
<source>Default</source>
|
||||
<translation type="unfinished">پیش فرض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The last speed test did not exit completely, please wait. If it persists, please restart the program.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Qv2ray::ui::widgets::AutoCompleteTextEdit</name>
|
||||
|
||||
@@ -1498,6 +1498,10 @@ End: %2</source>
|
||||
<source>Stop Testing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>URL Test</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProxyItem</name>
|
||||
@@ -1645,6 +1649,10 @@ Release note:
|
||||
<source>Default</source>
|
||||
<translation>По умолчанию</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The last speed test did not exit completely, please wait. If it persists, please restart the program.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Qv2ray::ui::widgets::AutoCompleteTextEdit</name>
|
||||
|
||||
@@ -1488,7 +1488,7 @@ Split by line.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>In and Out IP</source>
|
||||
<translation>入口出口IP</translation>
|
||||
<translation>入口出口 IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Options</source>
|
||||
@@ -1498,6 +1498,10 @@ Split by line.</source>
|
||||
<source>Stop Testing</source>
|
||||
<translation>停止测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>URL Test</source>
|
||||
<translation>URL 测试</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProxyItem</name>
|
||||
@@ -1645,6 +1649,10 @@ Release note:
|
||||
<source>Default</source>
|
||||
<translation>默认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The last speed test did not exit completely, please wait. If it persists, please restart the program.</source>
|
||||
<translation>上次速度测试未完全退出,请等待。如果问题仍然存在,请重新启动程序。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Qv2ray::ui::widgets::AutoCompleteTextEdit</name>
|
||||
|
||||
@@ -103,6 +103,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
connect(ui->toolButton_document, &QToolButton::clicked, this, [=] { QDesktopServices::openUrl(QUrl("https://matsuridayo.github.io/")); });
|
||||
connect(ui->toolButton_ads, &QToolButton::clicked, this, [=] { QDesktopServices::openUrl(QUrl("https://matsuricom.pages.dev/")); });
|
||||
connect(ui->toolButton_update, &QToolButton::clicked, this, [=] { runOnNewThread([=] { CheckUpdate(); }); });
|
||||
connect(ui->toolButton_url_test, &QToolButton::clicked, this, [=] { speedtest_current_group(1, true); });
|
||||
|
||||
// Setup log UI
|
||||
ui->splitter->restoreState(DecodeB64IfValid(NekoGui::dataStore->splitter_state));
|
||||
@@ -333,10 +334,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
neko_set_spmode_vpn(false);
|
||||
});
|
||||
connect(ui->menu_qr, &QAction::triggered, this, [=]() { display_qr_link(false); });
|
||||
connect(ui->menu_tcp_ping, &QAction::triggered, this, [=]() { speedtest_current_group(0); });
|
||||
connect(ui->menu_url_test, &QAction::triggered, this, [=]() { speedtest_current_group(1); });
|
||||
connect(ui->menu_full_test, &QAction::triggered, this, [=]() { speedtest_current_group(2); });
|
||||
connect(ui->menu_stop_testing, &QAction::triggered, this, [=]() { speedtest_current_group(114514); });
|
||||
connect(ui->menu_tcp_ping, &QAction::triggered, this, [=]() { speedtest_current_group(0, false); });
|
||||
connect(ui->menu_url_test, &QAction::triggered, this, [=]() { speedtest_current_group(1, false); });
|
||||
connect(ui->menu_full_test, &QAction::triggered, this, [=]() { speedtest_current_group(2, false); });
|
||||
connect(ui->menu_stop_testing, &QAction::triggered, this, [=]() { speedtest_current_group(114514, false); });
|
||||
//
|
||||
auto set_selected_or_group = [=](int mode) {
|
||||
// 0=group 1=select 2=unknown(menu is hide)
|
||||
|
||||
@@ -185,7 +185,7 @@ private:
|
||||
|
||||
static void setup_grpc();
|
||||
|
||||
void speedtest_current_group(int mode);
|
||||
void speedtest_current_group(int mode, bool test_group);
|
||||
|
||||
void speedtest_current();
|
||||
|
||||
|
||||
@@ -205,6 +205,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_url_test">
|
||||
<property name="text">
|
||||
<string>URL Test</string>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@@ -665,7 +678,7 @@
|
||||
<string notr="true">Tcp Ping</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+T</string>
|
||||
<string notr="true">Ctrl+Alt+T</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_url_test">
|
||||
@@ -673,7 +686,7 @@
|
||||
<string notr="true">Url Test</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+U</string>
|
||||
<string notr="true">Ctrl+Alt+U</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_clear_test_result">
|
||||
@@ -681,7 +694,7 @@
|
||||
<string>Clear Test Result</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+C</string>
|
||||
<string notr="true">Ctrl+Alt+C</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_export_config">
|
||||
@@ -726,7 +739,7 @@
|
||||
<string>Remove Duplicates</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+D</string>
|
||||
<string notr="true">Ctrl+Alt+D</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionfake">
|
||||
@@ -774,7 +787,7 @@
|
||||
<string>Remove Unavailable</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+R</string>
|
||||
<string notr="true">Ctrl+Alt+R</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_full_test">
|
||||
@@ -782,7 +795,7 @@
|
||||
<string>Full Test</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+F</string>
|
||||
<string notr="true">Ctrl+Alt+F</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_hotkey_settings">
|
||||
@@ -803,7 +816,7 @@
|
||||
<string>Copy links of selected (Neko Links)</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Alt+C</string>
|
||||
<string notr="true">Ctrl+N</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionfake_2">
|
||||
@@ -859,7 +872,7 @@
|
||||
<string>Resolve domain</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+I</string>
|
||||
<string notr="true">Ctrl+Alt+I</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_vpn_settings">
|
||||
@@ -902,6 +915,9 @@
|
||||
<property name="text">
|
||||
<string>Stop Testing</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Alt+S</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
@@ -58,8 +58,14 @@ void MainWindow::setup_grpc() {
|
||||
inline bool speedtesting = false;
|
||||
inline QList<QThread *> speedtesting_threads = {};
|
||||
|
||||
void MainWindow::speedtest_current_group(int mode) {
|
||||
void MainWindow::speedtest_current_group(int mode, bool test_group) {
|
||||
if (speedtesting) {
|
||||
MessageBoxWarning(software_name, QObject::tr("The last speed test did not exit completely, please wait. If it persists, please restart the program."));
|
||||
return;
|
||||
}
|
||||
|
||||
auto profiles = get_selected_or_group();
|
||||
if (test_group) profiles = NekoGui::profileManager->CurrentGroup()->ProfilesWithOrder();
|
||||
if (profiles.isEmpty()) return;
|
||||
auto group = NekoGui::profileManager->CurrentGroup();
|
||||
if (group->archive) return;
|
||||
@@ -75,11 +81,6 @@ void MainWindow::speedtest_current_group(int mode) {
|
||||
}
|
||||
|
||||
#ifndef NKR_NO_GRPC
|
||||
if (speedtesting) {
|
||||
MessageBoxWarning(software_name, "The last speed test did not exit completely, please wait. If it persists, please restart the program.");
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList full_test_flags;
|
||||
if (mode == libcore::FullTest) {
|
||||
auto w = new QDialog(this);
|
||||
|
||||
@@ -12,8 +12,11 @@ function index()
|
||||
e.dependent=false
|
||||
e.acl_depends={ "luci-app-ddns-go" }
|
||||
entry({"admin", "services", "ddns-go", "setting"}, cbi("ddns-go"), _("Base Setting"), 20).leaf=true
|
||||
entry({"admin", "services", "ddns-go", "ddns-go"}, template("ddns-go"), _("DDNS-GO Control panel"), 30).leaf = true
|
||||
entry({"admin", "services", "ddns-go", "ddns-go"}, template("ddns-go/ddns-go"), _("DDNS-GO Control panel"), 30).leaf = true
|
||||
entry({"admin", "services", "ddnsgo_status"}, call("act_status"))
|
||||
entry({"admin", "services", "ddns-go", "log"}, template("ddns-go/ddns-go_log"), _("Log"), 40).leaf = true
|
||||
entry({"admin", "services", "ddns-go", "fetch_log"}, call("fetch_log"), nil).leaf = true
|
||||
entry({"admin", "services", "ddns-go", "clear_log"}, call("clear_log")).leaf = true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
@@ -23,3 +26,20 @@ function act_status()
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
function fetch_log()
|
||||
local fs = require "nixio.fs"
|
||||
local log_file = "/var/log/ddns-go.log"
|
||||
local log_content = fs.readfile(log_file) or "No Log."
|
||||
luci.http.write(log_content)
|
||||
end
|
||||
function clear_log()
|
||||
local fs = require "nixio.fs"
|
||||
local log_file = "/var/log/ddns-go.log"
|
||||
local f = io.open(log_file, "w")
|
||||
if f then
|
||||
f:close()
|
||||
luci.http.status(204, "No Content")
|
||||
else
|
||||
luci.http.status(500, "Internal Server Error")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ m = Map("ddns-go")
|
||||
m.title = translate("DDNS-GO")
|
||||
m.description = translate("DDNS-GO automatically obtains your public IPv4 or IPv6 address and resolves it to the corresponding domain name service.")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-ddns-go.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-ddns-go </a>")
|
||||
|
||||
m:section(SimpleSection).template = "ddns-go_status"
|
||||
m:section(SimpleSection).template = "ddns-go/ddns-go_status"
|
||||
|
||||
s = m:section(TypedSection, "basic", translate("Global Settings"))
|
||||
s.addremove = false
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<%+header%>
|
||||
<div>
|
||||
<input class="btn cbi-button-action" type="button" onclick="clearLog()" value="清空日志">
|
||||
<input class="btn cbi-button-action" type="button" onclick="toggleRefresh()" value="停止刷新">
|
||||
</div>
|
||||
<pre id="logContent">
|
||||
<%
|
||||
local fs = require "nixio.fs"
|
||||
local log_file_path = "/var/log/ddns-go.log"
|
||||
local raw_log_content = fs.readfile(log_file_path) or "No Log."
|
||||
local log_lines = {}
|
||||
for line in raw_log_content:gmatch("[^\r\n]+") do
|
||||
table.insert(log_lines, line)
|
||||
end
|
||||
for i=1, math.floor(#log_lines / 2) do
|
||||
log_lines[i], log_lines[#log_lines - i + 1] = log_lines[#log_lines - i + 1], log_lines[i]
|
||||
end
|
||||
local log_content = table.concat(log_lines, "\n")
|
||||
%>
|
||||
<%=log_content%>
|
||||
</pre>
|
||||
<%+footer%>
|
||||
<style>
|
||||
#logContent {
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ddd;
|
||||
padding: 15px;
|
||||
padding-top: 0px;
|
||||
margin-top: 5px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
white-space: pre-wrap;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var refreshInterval = null;
|
||||
|
||||
function fetchLog() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/cgi-bin/luci/admin/services/ddns-go/fetch_log', true);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
var logLines = xhr.responseText.split("\n").reverse().join("\n");
|
||||
document.getElementById('logContent').textContent = logLines;
|
||||
} else {
|
||||
document.getElementById('logContent').textContent = 'Failed to load log.';
|
||||
}
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
document.getElementById('logContent').textContent = 'Error loading log.';
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function clearLog() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/cgi-bin/luci/admin/services/ddns-go/clear_log', true);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
fetchLog(); // 刷新日志内容
|
||||
} else {
|
||||
alert('Failed to clear log.');
|
||||
}
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
alert('Error clearing log.');
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function toggleRefresh() {
|
||||
var refreshButton = document.querySelector("input[onclick='toggleRefresh()']");
|
||||
if (refreshInterval) {
|
||||
clearInterval(refreshInterval);
|
||||
refreshInterval = null;
|
||||
refreshButton.value = '开始刷新';
|
||||
} else {
|
||||
fetchLog(); // 立即获取一次日志
|
||||
refreshInterval = setInterval(fetchLog, 1000);
|
||||
refreshButton.value = '停止刷新';
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完成后开始刷新日志
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
toggleRefresh();
|
||||
});
|
||||
</script>
|
||||
@@ -16,6 +16,9 @@ msgstr "运行状态"
|
||||
msgid "DDNS-GO Control panel"
|
||||
msgstr "DDNS-GO操作台"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "日志"
|
||||
|
||||
msgid "The DDNS-GO service is running."
|
||||
msgstr "DDNS-GO服务已启动"
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ msgstr "运行状态"
|
||||
msgid "DDNS-GO Control panel"
|
||||
msgstr "DDNS-GO操作台"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "日志"
|
||||
|
||||
msgid "The DDNS-GO service is running."
|
||||
msgstr "DDNS-GO服务已启动"
|
||||
|
||||
|
||||
@@ -885,7 +885,11 @@ function gen_config(var)
|
||||
local outbound_tag
|
||||
if outbound then
|
||||
set_outbound_detour(_node, outbound, outbounds, rule_name)
|
||||
table.insert(outbounds, outbound)
|
||||
if rule_name == "default" then
|
||||
table.insert(outbounds, 1, outbound)
|
||||
else
|
||||
table.insert(outbounds, outbound)
|
||||
end
|
||||
outbound_tag = outbound.tag
|
||||
end
|
||||
return outbound_tag, nil
|
||||
@@ -1022,6 +1026,7 @@ function gen_config(var)
|
||||
end
|
||||
end)
|
||||
|
||||
--[[
|
||||
if default_outbound_tag or default_balancer_tag then
|
||||
table.insert(rules, {
|
||||
type = "field",
|
||||
@@ -1030,6 +1035,7 @@ function gen_config(var)
|
||||
network = "tcp,udp"
|
||||
})
|
||||
end
|
||||
]]--
|
||||
|
||||
routing = {
|
||||
domainStrategy = node.domainStrategy or "AsIs",
|
||||
|
||||
@@ -885,7 +885,11 @@ function gen_config(var)
|
||||
local outbound_tag
|
||||
if outbound then
|
||||
set_outbound_detour(_node, outbound, outbounds, rule_name)
|
||||
table.insert(outbounds, outbound)
|
||||
if rule_name == "default" then
|
||||
table.insert(outbounds, 1, outbound)
|
||||
else
|
||||
table.insert(outbounds, outbound)
|
||||
end
|
||||
outbound_tag = outbound.tag
|
||||
end
|
||||
return outbound_tag, nil
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_DATE:=2024-10-07
|
||||
PKG_SOURCE_VERSION:=9fd63fe93803c89243452f9b033625bd22f75282
|
||||
PKG_MIRROR_HASH:=a13d8359ed364cd00337c631d3f6a10910a251c2d63990d43c01476c4f938c8d
|
||||
PKG_SOURCE_DATE:=2024-10-08
|
||||
PKG_SOURCE_VERSION:=08dcef80bf9a528d36cf8d516cc251f6449f9336
|
||||
PKG_MIRROR_HASH:=803fd00529f3bb01617cc6349343858f73b2c6b4d533e8d76434941af7908395
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
|
||||
@@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=alpha-9fd63fe
|
||||
PKG_BUILD_VERSION:=alpha-08dcef8
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
|
||||
@@ -12,13 +12,13 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202410030052
|
||||
GEOIP_VER:=202410090012
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=061c2116e650932c8058b663c14cd03be2241c6048bba6a2765ee1ea38481bff
|
||||
HASH:=384c0143e551dae3022b78d9e42e7d3c9c9df428710467598c258312333c88ff
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20241007202930
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace v2rayUpgrade
|
||||
namespace AmazTool
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
|
||||
var fileName = Uri.UnescapeDataString(string.Join(" ", args));
|
||||
Upgrade.UpgradeApp(fileName);
|
||||
UpgradeApp.Upgrade(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,11 @@ using System.IO.Compression;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
namespace AmazTool
|
||||
{
|
||||
internal class Upgrade
|
||||
internal class UpgradeApp
|
||||
{
|
||||
public static void UpgradeApp(string fileName)
|
||||
public static void Upgrade(string fileName)
|
||||
{
|
||||
Console.WriteLine(fileName);
|
||||
Console.WriteLine("In progress, please wait...(正在进行中,请等待)");
|
||||
@@ -105,7 +105,7 @@ namespace v2rayUpgrade
|
||||
|
||||
private static string GetExePath()
|
||||
{
|
||||
return Environment.ProcessPath ?? string.Empty;
|
||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
}
|
||||
|
||||
private static string StartupPath()
|
||||
@@ -750,7 +750,7 @@ namespace ServiceLib.Common
|
||||
/// <returns></returns>
|
||||
public static string GetExePath()
|
||||
{
|
||||
return Environment.ProcessPath ?? string.Empty;
|
||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
}
|
||||
|
||||
public static string StartupPath()
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace ServiceLib.ViewModels
|
||||
var result = await CreateZipFileFromDirectory(fileBackup);
|
||||
if (result)
|
||||
{
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace ServiceLib.ViewModels
|
||||
{
|
||||
return;
|
||||
}
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -437,13 +437,13 @@ namespace ServiceLib.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public async Task V2rayUpgrade(string fileName)
|
||||
public async Task UpgradeApp(string fileName)
|
||||
{
|
||||
Process process = new()
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "v2rayUpgrade",
|
||||
FileName = "AmazTool",
|
||||
Arguments = fileName.AppendQuotes(),
|
||||
WorkingDirectory = Utils.StartupPath()
|
||||
}
|
||||
|
||||
@@ -11,15 +11,15 @@ dotnet publish `
|
||||
.\v2rayN\v2rayN.csproj `
|
||||
-c Release `
|
||||
--self-contained false `
|
||||
-p:PublishReadyToRun=true `
|
||||
-p:PublishReadyToRun=false `
|
||||
-p:PublishSingleFile=true `
|
||||
-o $OutputPath
|
||||
|
||||
dotnet publish `
|
||||
.\v2rayUpgrade\v2rayUpgrade.csproj `
|
||||
.\AmazTool\AmazTool.csproj `
|
||||
-c Release `
|
||||
--self-contained false `
|
||||
-p:PublishReadyToRun=true `
|
||||
-p:PublishReadyToRun=false `
|
||||
-p:PublishSingleFile=true `
|
||||
-o $OutputPath
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceLib", "ServiceLib\Se
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayN.Desktop", "v2rayN.Desktop\v2rayN.Desktop.csproj", "{5D16541A-F971-4C17-9315-BB8955E3F984}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayUpgrade", "v2rayUpgrade\v2rayUpgrade.csproj", "{47D68B1C-601C-4C69-873B-FFF0DC13EC97}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AmazTool", "AmazTool\AmazTool.csproj", "{47D68B1C-601C-4C69-873B-FFF0DC13EC97}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -11,8 +11,8 @@ android {
|
||||
applicationId = "com.v2ray.ang"
|
||||
minSdk = 21
|
||||
targetSdk = 34
|
||||
versionCode = 600
|
||||
versionName = "1.9.6"
|
||||
versionCode = 601
|
||||
versionName = "1.9.7"
|
||||
multiDexEnabled = true
|
||||
splits {
|
||||
abi {
|
||||
|
||||
+6
-6
@@ -11,7 +11,7 @@ require (
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/miekg/dns v1.1.62
|
||||
github.com/pelletier/go-toml v1.9.5
|
||||
github.com/pires/go-proxyproto v0.7.0
|
||||
github.com/pires/go-proxyproto v0.8.0
|
||||
github.com/quic-go/quic-go v0.46.0
|
||||
github.com/refraction-networking/utls v1.6.7
|
||||
github.com/sagernet/sing v0.4.3
|
||||
@@ -22,13 +22,13 @@ require (
|
||||
github.com/vishvananda/netlink v1.3.0
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
|
||||
golang.org/x/crypto v0.27.0
|
||||
golang.org/x/net v0.29.0
|
||||
golang.org/x/crypto v0.28.0
|
||||
golang.org/x/net v0.30.0
|
||||
golang.org/x/sync v0.8.0
|
||||
golang.org/x/sys v0.25.0
|
||||
golang.org/x/sys v0.26.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
|
||||
google.golang.org/grpc v1.67.1
|
||||
google.golang.org/protobuf v1.34.2
|
||||
google.golang.org/protobuf v1.35.1
|
||||
gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
|
||||
h12.io/socks v1.0.3
|
||||
lukechampine.com/blake3 v1.3.0
|
||||
@@ -51,7 +51,7 @@ require (
|
||||
go.uber.org/mock v0.4.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
|
||||
golang.org/x/mod v0.18.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
golang.org/x/text v0.19.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.22.0 // indirect
|
||||
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
||||
|
||||
+12
-12
@@ -42,8 +42,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
|
||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
|
||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
|
||||
github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=
|
||||
github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=
|
||||
github.com/pires/go-proxyproto v0.8.0 h1:5unRmEAPbHXHuLjDg01CxJWf91cw3lKHc/0xzKpXEe0=
|
||||
github.com/pires/go-proxyproto v0.8.0/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
|
||||
@@ -79,8 +79,8 @@ go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBs
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
|
||||
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
|
||||
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
|
||||
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
@@ -89,8 +89,8 @@ golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
|
||||
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
|
||||
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
@@ -103,14 +103,14 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
|
||||
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -129,8 +129,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
|
||||
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
|
||||
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
||||
+40
-2
@@ -48,9 +48,13 @@ jobs:
|
||||
- 'fedora39'
|
||||
- 'alpine320'
|
||||
- 'i386-alpine320'
|
||||
- 'armhf-alpine320'
|
||||
- 'aarch64-alpine320'
|
||||
- 'opensuse15'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache docker files (dummy)
|
||||
id: docker-cache
|
||||
@@ -190,6 +194,10 @@ jobs:
|
||||
arch: amd64
|
||||
- container: 'i386-alpine320'
|
||||
arch: i386
|
||||
- container: 'aarch64-alpine320'
|
||||
arch: aarch64
|
||||
- container: 'armhf-alpine320'
|
||||
arch: armhf
|
||||
runs-on: ubuntu-20.04
|
||||
needs: docker_publish
|
||||
steps:
|
||||
@@ -217,11 +225,30 @@ jobs:
|
||||
cache-dependency-path: |
|
||||
tools/go.sum
|
||||
third_party/boringssl/src/go.sum
|
||||
- name: Cache qemu-user
|
||||
id: qemu-user-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
qemu-user*.deb
|
||||
key: ${{ runner.os }}-qemu-9.1.0-ds-8
|
||||
- name: "Install dependency: qemu user cache"
|
||||
if: ${{ steps.qemu-user-cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
wget http://ftp.us.debian.org/debian/pool/main/q/qemu/qemu-user_9.1.0+ds-8_amd64.deb
|
||||
- name: Populate depedencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y cmake ninja-build pkgconf gettext bubblewrap
|
||||
# libc6-i386 interferes with x86 build
|
||||
sudo apt remove libc6-i386
|
||||
|
||||
sudo dpkg -i qemu-user_*.deb
|
||||
- name: Populate sysroot from docker image
|
||||
run: |
|
||||
docker pull ghcr.io/chilledheart/${{ matrix.container }}
|
||||
mkdir -p "${{ env.SDK_ROOT }}"
|
||||
docker export $(docker create ghcr.io/chilledheart/${{ matrix.container }}) | tar -C "${{ env.SDK_ROOT }}" -xf -
|
||||
docker export $(docker create --platform ${{ matrix.arch }} ghcr.io/chilledheart/${{ matrix.container }}) | tar -C "${{ env.SDK_ROOT }}" -xf -
|
||||
- name: Build build tool
|
||||
run: |
|
||||
cd tools
|
||||
@@ -252,7 +279,8 @@ jobs:
|
||||
./tools/build --variant cli --arch ${{ matrix.arch }} --system linux --subsystem musl --sysroot "${{ env.SDK_ROOT }}" -build-test --cmake-build-type MinSizeRel -use-static-build -nc
|
||||
./tools/build --variant server --arch ${{ matrix.arch }} --system linux --subsystem musl --sysroot "${{ env.SDK_ROOT }}" -build-test --cmake-build-type MinSizeRel -use-static-build -nc
|
||||
./tools/build --variant gui --arch ${{ matrix.arch }} --system linux --subsystem musl --sysroot "${{ env.SDK_ROOT }}" -build-test --cmake-build-type MinSizeRel -nc
|
||||
- name: Run tests
|
||||
- name: Run tests (i386 and amd64)
|
||||
if: ${{ matrix.arch == 'i386' || matrix.arch == 'amd64' }}
|
||||
run: |
|
||||
bwrap --die-with-parent --bind "$SDK_ROOT" / \
|
||||
--ro-bind /sys /sys \
|
||||
@@ -261,6 +289,16 @@ jobs:
|
||||
--unshare-all --share-net \
|
||||
--bind $PWD/build-linux-musl-${{ matrix.arch }} /tmp \
|
||||
/tmp/yass_test
|
||||
- name: Run tests (non x86, under qemu emulation)
|
||||
if: ${{ matrix.arch != 'i386' && matrix.arch != 'amd64' }}
|
||||
run: |
|
||||
# copy required resolv.conf from host
|
||||
cp -fv /etc/resolv.conf "$SDK_ROOT/etc/resolv.conf"
|
||||
# TMPDIR is required by leveldb unittests
|
||||
qemu-${{ matrix.arch }} -L $SDK_ROOT \
|
||||
-E TMPDIR=$PWD/build-linux-musl-${{ matrix.arch }} \
|
||||
$PWD/build-linux-musl-${{ matrix.arch }}/yass_test \
|
||||
--no_exec_proc_tests
|
||||
- name: Upload dist tarball (including debuginfo)
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
env:
|
||||
|
||||
+1
-2
@@ -83,6 +83,5 @@ local.properties
|
||||
*.ipa
|
||||
/rustc-*-src
|
||||
/third_party/rust-ohos
|
||||
/i386-alpine320-sysroot
|
||||
/amd64-alpine320-sysroot
|
||||
/*-alpine320-sysroot
|
||||
*.flatpak
|
||||
|
||||
+28
-28
@@ -13,7 +13,7 @@ yass is an efficient forward proxy client supporting http/socks4/socks4a/socks5/
|
||||
Because we are reusing chromium's network stack directly,
|
||||
we are following [chromium's release schedule](https://chromiumdash.appspot.com/schedule) and delivering new versions based on its beta branch.
|
||||
|
||||
- [Latest M130's Release (1.14.x)](https://github.com/Chilledheart/yass/releases/tag/1.14.2) will become Stable Release since _Oct 15, 2024_ (Extended Support).
|
||||
- [Latest M130's Release (1.14.x)](https://github.com/Chilledheart/yass/releases/tag/1.14.3) will become Stable Release since _Oct 15, 2024_ (Extended Support).
|
||||
- [Latest M129's Release (1.13.x)](https://github.com/Chilledheart/yass/releases/tag/1.13.3) has become Stable Release since _Sep 17, 2024_.
|
||||
- [Latest M128's Release (1.12.x)](https://github.com/Chilledheart/yass/releases/tag/1.12.5) has become Stable Release since _Aug 20, 2024_ (Extended Support).
|
||||
- [Latest M127's Release (1.11.x)](https://github.com/Chilledheart/yass/releases/tag/1.11.5) has become Stable Release since _Jul 23, 2024_
|
||||
@@ -165,37 +165,37 @@ See [ChatGPT capable caddy Server](https://github.com/Chilledheart/yass/wiki/Usa
|
||||
[bugs]: https://github.com/Chilledheart/yass/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=
|
||||
[frs]: https://github.com/Chilledheart/yass/issues/new?assignees=&labels=feature&projects=&template=feature_request.md&title=
|
||||
|
||||
[gtk3_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-gtk3.el8.x86_64.1.14.2.rpm
|
||||
[gtk3_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-gtk3-ubuntu-16.04-xenial_amd64.1.14.2.deb
|
||||
[qt5_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-qt5.el8.x86_64.1.14.2.rpm
|
||||
[qt5_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-qt5-ubuntu-16.04-xenial_amd64.1.14.2.deb
|
||||
[gtk4_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-gtk4.lp155.x86_64.1.14.2.rpm
|
||||
[gtk4_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-gtk4-ubuntu-22.04-jammy_amd64.1.14.2.deb
|
||||
[qt6_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-qt6.lp155.x86_64.1.14.2.rpm
|
||||
[qt6_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-qt6-ubuntu-22.04-jammy_amd64.1.14.2.deb
|
||||
[gtk3_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-gtk3.el8.x86_64.1.14.3.rpm
|
||||
[gtk3_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-gtk3-ubuntu-16.04-xenial_amd64.1.14.3.deb
|
||||
[qt5_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-qt5.el8.x86_64.1.14.3.rpm
|
||||
[qt5_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-qt5-ubuntu-16.04-xenial_amd64.1.14.3.deb
|
||||
[gtk4_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-gtk4.lp155.x86_64.1.14.3.rpm
|
||||
[gtk4_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-gtk4-ubuntu-22.04-jammy_amd64.1.14.3.deb
|
||||
[qt6_rpm_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-qt6.lp155.x86_64.1.14.3.rpm
|
||||
[qt6_deb_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-qt6-ubuntu-22.04-jammy_amd64.1.14.3.deb
|
||||
|
||||
[qt6_flatpak_x86_64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-x86_64-1.14.2.flatpak
|
||||
[qt6_flatpak_x86_64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-x86_64-1.14.3.flatpak
|
||||
|
||||
[cli_tgz_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-amd64-1.14.2.tgz
|
||||
[cli_tgz_i386_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-amd64-1.14.2.tgz
|
||||
[cli_tgz_arm64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-arm64-1.14.2.tgz
|
||||
[cli_tgz_loongarch64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-loongarch64-1.14.2.tgz
|
||||
[cli_tgz_riscv64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-riscv64-1.14.2.tgz
|
||||
[cli_tgz_riscv32_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-release-riscv32-1.14.2.tgz
|
||||
[cli_tgz_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-amd64-1.14.3.tgz
|
||||
[cli_tgz_i386_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-amd64-1.14.3.tgz
|
||||
[cli_tgz_arm64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-arm64-1.14.3.tgz
|
||||
[cli_tgz_loongarch64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-loongarch64-1.14.3.tgz
|
||||
[cli_tgz_riscv64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-riscv64-1.14.3.tgz
|
||||
[cli_tgz_riscv32_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-release-riscv32-1.14.3.tgz
|
||||
|
||||
[cli_openwrt_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-openwrt-release-x86_64-1.14.2.tgz
|
||||
[cli_openwrt_i486_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-openwrt-release-i486-1.14.2.tgz
|
||||
[cli_openwrt_aarch64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-openwrt-release-aarch64-1.14.2.tgz
|
||||
[cli_openwrt_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-openwrt-release-x86_64-1.14.3.tgz
|
||||
[cli_openwrt_i486_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-openwrt-release-i486-1.14.3.tgz
|
||||
[cli_openwrt_aarch64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-openwrt-release-aarch64-1.14.3.tgz
|
||||
|
||||
[cli_musl_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-musl-release-amd64-1.14.2.tgz
|
||||
[cli_musl_i386_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass_cli-linux-musl-release-i386-1.14.2.tgz
|
||||
[cli_musl_amd64_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-musl-release-amd64-1.14.3.tgz
|
||||
[cli_musl_i386_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass_cli-linux-musl-release-i386-1.14.3.tgz
|
||||
|
||||
[android_64_apk_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-android-release-arm64-1.14.2.apk
|
||||
[android_32_apk_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-android-release-arm-1.14.2.apk
|
||||
[android_64_apk_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-android-release-arm64-1.14.3.apk
|
||||
[android_32_apk_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-android-release-arm-1.14.3.apk
|
||||
|
||||
[windows_64_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-mingw-win7-release-x86_64-1.14.2-system-installer.exe
|
||||
[windows_32_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-mingw-winxp-release-i686-1.14.2-system-installer.exe
|
||||
[windows_64_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-mingw-win7-release-x86_64-1.14.3-system-installer.exe
|
||||
[windows_32_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-mingw-winxp-release-i686-1.14.3-system-installer.exe
|
||||
|
||||
[windows_arm64_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-mingw-release-aarch64-1.14.2-system-installer.exe
|
||||
[macos_intel_dmg_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-macos-release-x64-1.14.2.dmg
|
||||
[macos_arm_dmg_url]: https://github.com/Chilledheart/yass/releases/download/1.14.2/yass-macos-release-arm64-1.14.2.dmg
|
||||
[windows_arm64_installer_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-mingw-release-aarch64-1.14.3-system-installer.exe
|
||||
[macos_intel_dmg_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-macos-release-x64-1.14.3.dmg
|
||||
[macos_arm_dmg_url]: https://github.com/Chilledheart/yass/releases/download/1.14.3/yass-macos-release-arm64-1.14.3.dmg
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
FROM arm64v8/alpine:3.20
|
||||
RUN apk add --no-cache bash tar build-base linux-headers curl-dev gtk+3.0-dev
|
||||
@@ -0,0 +1,2 @@
|
||||
FROM arm32v7/alpine:3.20
|
||||
RUN apk add --no-cache bash tar build-base linux-headers curl-dev gtk+3.0-dev
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user