diff --git a/.github/update.log b/.github/update.log index 68e48acf86..9ca4c3658c 100644 --- a/.github/update.log +++ b/.github/update.log @@ -868,3 +868,4 @@ Update On Fri Dec 27 19:34:25 CET 2024 Update On Sat Dec 28 19:30:54 CET 2024 Update On Sun Dec 29 19:30:34 CET 2024 Update On Mon Dec 30 19:34:06 CET 2024 +Update On Tue Dec 31 19:31:50 CET 2024 diff --git a/clash-meta-android/build.gradle.kts b/clash-meta-android/build.gradle.kts index d30bf6f342..5400ca9212 100644 --- a/clash-meta-android/build.gradle.kts +++ b/clash-meta-android/build.gradle.kts @@ -40,8 +40,8 @@ subprojects { minSdk = 21 targetSdk = 31 - versionName = "2.11.4" - versionCode = 211004 + versionName = "2.11.5" + versionCode = 211005 resValue("string", "release_name", "v$versionName") resValue("integer", "release_code", "$versionCode") diff --git a/clash-meta-android/core/src/foss/golang/clash/go.mod b/clash-meta-android/core/src/foss/golang/clash/go.mod index dbc8aceaf3..39b39152d2 100644 --- a/clash-meta-android/core/src/foss/golang/clash/go.mod +++ b/clash-meta-android/core/src/foss/golang/clash/go.mod @@ -7,12 +7,12 @@ require ( github.com/bahlo/generic-list-go v0.2.0 github.com/coreos/go-iptables v0.8.0 github.com/dlclark/regexp2 v1.11.4 - github.com/enfein/mieru/v3 v3.8.4 - github.com/go-chi/chi/v5 v5.1.0 + github.com/enfein/mieru/v3 v3.9.0 + github.com/go-chi/chi/v5 v5.2.0 github.com/go-chi/render v1.0.3 github.com/gobwas/ws v1.4.0 github.com/gofrs/uuid/v5 v5.3.0 - github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef + github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d github.com/klauspost/compress v1.17.9 // lastest version compatible with golang1.20 github.com/klauspost/cpuid/v2 v2.2.9 github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 @@ -26,10 +26,10 @@ require ( github.com/metacubex/sing-quic v0.0.0-20240827003841-cd97758ed8b4 github.com/metacubex/sing-shadowsocks v0.2.8 github.com/metacubex/sing-shadowsocks2 v0.2.2 - github.com/metacubex/sing-tun v0.4.2 + github.com/metacubex/sing-tun v0.4.5 github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 - github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa + github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 github.com/metacubex/utls v1.6.6 github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 github.com/miekg/dns v1.1.62 @@ -54,7 +54,7 @@ require ( go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/crypto v0.31.0 golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // lastest version compatible with golang1.20 - golang.org/x/net v0.32.0 + golang.org/x/net v0.33.0 golang.org/x/sys v0.28.0 google.golang.org/protobuf v1.34.2 // lastest version compatible with golang1.20 gopkg.in/yaml.v3 v3.0.1 diff --git a/clash-meta-android/core/src/foss/golang/clash/go.sum b/clash-meta-android/core/src/foss/golang/clash/go.sum index 63e7a6ad57..2d7cbd53e1 100644 --- a/clash-meta-android/core/src/foss/golang/clash/go.sum +++ b/clash-meta-android/core/src/foss/golang/clash/go.sum @@ -29,8 +29,8 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/enfein/mieru/v3 v3.8.4 h1:PmBQykuEcl8yKcQ647pg8Qbjl433CRYgUbW6VLBgGn4= -github.com/enfein/mieru/v3 v3.8.4/go.mod h1:YtU00qjAEt54mCBQu4WZPCey6cBdB1BUtXjvrHLEUNQ= +github.com/enfein/mieru/v3 v3.9.0 h1:h8KIXKxwPg8jT0uFdABIi0864O10UMAAOkkWo4zKl04= +github.com/enfein/mieru/v3 v3.9.0/go.mod h1:jH2nXzJSNUn6UWuzD8E8AsRVa9Ca0CqcTcr9Z+CJO1o= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I= github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g= @@ -44,8 +44,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -75,8 +75,8 @@ github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef h1:NzQKDfd5ZOPnuZYf9MnRee8x2qecsVqzsnaLjEZiBko= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d h1:VkCNWh6tuQLgDBc6KrUOz/L1mCUQGnR1Ujj8uTgpwwk= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -120,14 +120,14 @@ github.com/metacubex/sing-shadowsocks v0.2.8 h1:wIhlaigswzjPw4hej75sEvWte3QR0+AJ github.com/metacubex/sing-shadowsocks v0.2.8/go.mod h1:X3x88XtJpBxG0W0/ECOJL6Ib0SJ3xdniAkU/6/RMWU0= github.com/metacubex/sing-shadowsocks2 v0.2.2 h1:eaf42uVx4Lr21S6MDYs0ZdTvGA0GEhDpb9no4+gdXPo= github.com/metacubex/sing-shadowsocks2 v0.2.2/go.mod h1:BhOug03a/RbI7y6hp6q+6ITM1dXjnLTmeWBHSTwvv2Q= -github.com/metacubex/sing-tun v0.4.2 h1:fwrQp3P536Pswu6gR1FJ+8GH55e+t2+B8LHIjwRtWbc= -github.com/metacubex/sing-tun v0.4.2/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= +github.com/metacubex/sing-tun v0.4.5 h1:kWSyQzuzHI40r50OFBczfWIDvMBMy1RIk+JsXeBPRB0= +github.com/metacubex/sing-tun v0.4.5/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 h1:OAXiCosqY8xKDp3pqTW3qbrCprZ1l6WkrXSFSCwyY4I= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9/go.mod h1:olVkD4FChQ5gKMHG4ZzuD7+fMkJY1G8vwOKpRehjrmY= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 h1:Z6bNy0HLTjx6BKIkV48sV/yia/GP8Bnyb5JQuGgSGzg= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589/go.mod h1:4NclTLIZuk+QkHVCGrP87rHi/y8YjgPytxTgApJNMhc= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa h1:9mcjV+RGZVC3reJBNDjjNPyS8PmFG97zq56X7WNaFO4= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa/go.mod h1:4tLB5c8U0CxpkFM+AJJB77jEaVDbLH5XQvy42vAGsWw= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw= github.com/metacubex/utls v1.6.6 h1:3D12YKHTf2Z41UPhQU2dWerNWJ5TVQD9gKoQ+H+iLC8= github.com/metacubex/utls v1.6.6/go.mod h1:+WLFUnXjcpdxXCnyX25nggw8C6YonZ8zOK2Zm/oRvdo= github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ= @@ -242,8 +242,8 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.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.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/clash-meta-android/core/src/foss/golang/clash/listener/inbound/tun.go b/clash-meta-android/core/src/foss/golang/clash/listener/inbound/tun.go index 77ad6bd61c..1b0a6a809c 100644 --- a/clash-meta-android/core/src/foss/golang/clash/listener/inbound/tun.go +++ b/clash-meta-android/core/src/foss/golang/clash/listener/inbound/tun.go @@ -23,18 +23,18 @@ type TunOption struct { GSOMaxSize uint32 `inbound:"gso-max-size,omitempty"` Inet4Address []string `inbound:"inet4-address,omitempty"` Inet6Address []string `inbound:"inet6-address,omitempty"` - IPRoute2TableIndex int `inbound:"iproute2-table-index"` - IPRoute2RuleIndex int `inbound:"iproute2-rule-index"` - AutoRedirect bool `inbound:"auto-redirect"` - AutoRedirectInputMark uint32 `inbound:"auto-redirect-input-mark"` - AutoRedirectOutputMark uint32 `inbound:"auto-redirect-output-mark"` + IPRoute2TableIndex int `inbound:"iproute2-table-index,omitempty"` + IPRoute2RuleIndex int `inbound:"iproute2-rule-index,omitempty"` + AutoRedirect bool `inbound:"auto-redirect,omitempty"` + AutoRedirectInputMark uint32 `inbound:"auto-redirect-input-mark,omitempty"` + AutoRedirectOutputMark uint32 `inbound:"auto-redirect-output-mark,omitempty"` StrictRoute bool `inbound:"strict-route,omitempty"` - RouteAddress []string `inbound:"route-address"` - RouteAddressSet []string `inbound:"route-address-set"` - RouteExcludeAddress []string `inbound:"route-exclude-address"` - RouteExcludeAddressSet []string `inbound:"route-exclude-address-set"` + RouteAddress []string `inbound:"route-address,omitempty"` + RouteAddressSet []string `inbound:"route-address-set,omitempty"` + RouteExcludeAddress []string `inbound:"route-exclude-address,omitempty"` + RouteExcludeAddressSet []string `inbound:"route-exclude-address-set,omitempty"` IncludeInterface []string `inbound:"include-interface,omitempty"` - ExcludeInterface []string `inbound:"exclude-interface"` + ExcludeInterface []string `inbound:"exclude-interface,omitempty"` IncludeUID []uint32 `inbound:"include-uid,omitempty"` IncludeUIDRange []string `inbound:"include-uid-range,omitempty"` ExcludeUID []uint32 `inbound:"exclude-uid,omitempty"` diff --git a/clash-meta-android/core/src/foss/golang/go.mod b/clash-meta-android/core/src/foss/golang/go.mod index a8fd344be1..6294c40878 100644 --- a/clash-meta-android/core/src/foss/golang/go.mod +++ b/clash-meta-android/core/src/foss/golang/go.mod @@ -16,14 +16,14 @@ require ( github.com/coreos/go-iptables v0.8.0 // indirect github.com/dlclark/regexp2 v1.11.4 // indirect github.com/ebitengine/purego v0.8.1 // indirect - github.com/enfein/mieru/v3 v3.8.4 // indirect + github.com/enfein/mieru/v3 v3.9.0 // indirect github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 // indirect github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gaukas/godicttls v0.0.4 // indirect - github.com/go-chi/chi/v5 v5.1.0 // indirect + github.com/go-chi/chi/v5 v5.2.0 // indirect github.com/go-chi/render v1.0.3 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect @@ -35,7 +35,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/hashicorp/yamux v0.1.2 // indirect - github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef // indirect + github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d // indirect github.com/josharian/native v1.1.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.9 // indirect @@ -55,10 +55,10 @@ require ( github.com/metacubex/sing-quic v0.0.0-20240827003841-cd97758ed8b4 // indirect github.com/metacubex/sing-shadowsocks v0.2.8 // indirect github.com/metacubex/sing-shadowsocks2 v0.2.2 // indirect - github.com/metacubex/sing-tun v0.4.2 // indirect + github.com/metacubex/sing-tun v0.4.5 // indirect github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 // indirect github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 // indirect - github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa // indirect + github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 // indirect github.com/metacubex/utls v1.6.6 // indirect github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 // indirect github.com/miekg/dns v1.1.62 // indirect @@ -101,7 +101,7 @@ require ( golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect diff --git a/clash-meta-android/core/src/foss/golang/go.sum b/clash-meta-android/core/src/foss/golang/go.sum index a95cef4df2..0f8f254799 100644 --- a/clash-meta-android/core/src/foss/golang/go.sum +++ b/clash-meta-android/core/src/foss/golang/go.sum @@ -28,8 +28,8 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/enfein/mieru/v3 v3.8.4 h1:PmBQykuEcl8yKcQ647pg8Qbjl433CRYgUbW6VLBgGn4= -github.com/enfein/mieru/v3 v3.8.4/go.mod h1:YtU00qjAEt54mCBQu4WZPCey6cBdB1BUtXjvrHLEUNQ= +github.com/enfein/mieru/v3 v3.9.0 h1:h8KIXKxwPg8jT0uFdABIi0864O10UMAAOkkWo4zKl04= +github.com/enfein/mieru/v3 v3.9.0/go.mod h1:jH2nXzJSNUn6UWuzD8E8AsRVa9Ca0CqcTcr9Z+CJO1o= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I= github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g= @@ -43,8 +43,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -74,8 +74,8 @@ github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef h1:NzQKDfd5ZOPnuZYf9MnRee8x2qecsVqzsnaLjEZiBko= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d h1:VkCNWh6tuQLgDBc6KrUOz/L1mCUQGnR1Ujj8uTgpwwk= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -116,14 +116,14 @@ github.com/metacubex/sing-shadowsocks v0.2.8 h1:wIhlaigswzjPw4hej75sEvWte3QR0+AJ github.com/metacubex/sing-shadowsocks v0.2.8/go.mod h1:X3x88XtJpBxG0W0/ECOJL6Ib0SJ3xdniAkU/6/RMWU0= github.com/metacubex/sing-shadowsocks2 v0.2.2 h1:eaf42uVx4Lr21S6MDYs0ZdTvGA0GEhDpb9no4+gdXPo= github.com/metacubex/sing-shadowsocks2 v0.2.2/go.mod h1:BhOug03a/RbI7y6hp6q+6ITM1dXjnLTmeWBHSTwvv2Q= -github.com/metacubex/sing-tun v0.4.2 h1:fwrQp3P536Pswu6gR1FJ+8GH55e+t2+B8LHIjwRtWbc= -github.com/metacubex/sing-tun v0.4.2/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= +github.com/metacubex/sing-tun v0.4.5 h1:kWSyQzuzHI40r50OFBczfWIDvMBMy1RIk+JsXeBPRB0= +github.com/metacubex/sing-tun v0.4.5/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 h1:OAXiCosqY8xKDp3pqTW3qbrCprZ1l6WkrXSFSCwyY4I= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9/go.mod h1:olVkD4FChQ5gKMHG4ZzuD7+fMkJY1G8vwOKpRehjrmY= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 h1:Z6bNy0HLTjx6BKIkV48sV/yia/GP8Bnyb5JQuGgSGzg= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589/go.mod h1:4NclTLIZuk+QkHVCGrP87rHi/y8YjgPytxTgApJNMhc= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa h1:9mcjV+RGZVC3reJBNDjjNPyS8PmFG97zq56X7WNaFO4= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa/go.mod h1:4tLB5c8U0CxpkFM+AJJB77jEaVDbLH5XQvy42vAGsWw= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw= github.com/metacubex/utls v1.6.6 h1:3D12YKHTf2Z41UPhQU2dWerNWJ5TVQD9gKoQ+H+iLC8= github.com/metacubex/utls v1.6.6/go.mod h1:+WLFUnXjcpdxXCnyX25nggw8C6YonZ8zOK2Zm/oRvdo= github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ= @@ -234,8 +234,8 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.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.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/clash-meta-android/core/src/main/golang/go.mod b/clash-meta-android/core/src/main/golang/go.mod index f796192adb..6dc6d2ed3a 100644 --- a/clash-meta-android/core/src/main/golang/go.mod +++ b/clash-meta-android/core/src/main/golang/go.mod @@ -24,14 +24,14 @@ require ( github.com/cloudflare/circl v1.3.7 // indirect github.com/coreos/go-iptables v0.8.0 // indirect github.com/ebitengine/purego v0.8.1 // indirect - github.com/enfein/mieru/v3 v3.8.4 // indirect + github.com/enfein/mieru/v3 v3.9.0 // indirect github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 // indirect github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gaukas/godicttls v0.0.4 // indirect - github.com/go-chi/chi/v5 v5.1.0 // indirect + github.com/go-chi/chi/v5 v5.2.0 // indirect github.com/go-chi/render v1.0.3 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect @@ -44,7 +44,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/hashicorp/yamux v0.1.2 // indirect - github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef // indirect + github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d // indirect github.com/josharian/native v1.1.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.9 // indirect @@ -63,10 +63,10 @@ require ( github.com/metacubex/sing-quic v0.0.0-20240827003841-cd97758ed8b4 // indirect github.com/metacubex/sing-shadowsocks v0.2.8 // indirect github.com/metacubex/sing-shadowsocks2 v0.2.2 // indirect - github.com/metacubex/sing-tun v0.4.2 // indirect + github.com/metacubex/sing-tun v0.4.5 // indirect github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 // indirect github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 // indirect - github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa // indirect + github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 // indirect github.com/metacubex/utls v1.6.6 // indirect github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 // indirect github.com/miekg/dns v1.1.62 // indirect @@ -109,7 +109,7 @@ require ( golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.7.0 // indirect diff --git a/clash-meta-android/core/src/main/golang/go.sum b/clash-meta-android/core/src/main/golang/go.sum index bfc7516b20..009b52f26a 100644 --- a/clash-meta-android/core/src/main/golang/go.sum +++ b/clash-meta-android/core/src/main/golang/go.sum @@ -28,8 +28,8 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/enfein/mieru/v3 v3.8.4 h1:PmBQykuEcl8yKcQ647pg8Qbjl433CRYgUbW6VLBgGn4= -github.com/enfein/mieru/v3 v3.8.4/go.mod h1:YtU00qjAEt54mCBQu4WZPCey6cBdB1BUtXjvrHLEUNQ= +github.com/enfein/mieru/v3 v3.9.0 h1:h8KIXKxwPg8jT0uFdABIi0864O10UMAAOkkWo4zKl04= +github.com/enfein/mieru/v3 v3.9.0/go.mod h1:jH2nXzJSNUn6UWuzD8E8AsRVa9Ca0CqcTcr9Z+CJO1o= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I= github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g= @@ -43,8 +43,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -75,8 +75,8 @@ github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef h1:NzQKDfd5ZOPnuZYf9MnRee8x2qecsVqzsnaLjEZiBko= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d h1:VkCNWh6tuQLgDBc6KrUOz/L1mCUQGnR1Ujj8uTgpwwk= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -117,14 +117,14 @@ github.com/metacubex/sing-shadowsocks v0.2.8 h1:wIhlaigswzjPw4hej75sEvWte3QR0+AJ github.com/metacubex/sing-shadowsocks v0.2.8/go.mod h1:X3x88XtJpBxG0W0/ECOJL6Ib0SJ3xdniAkU/6/RMWU0= github.com/metacubex/sing-shadowsocks2 v0.2.2 h1:eaf42uVx4Lr21S6MDYs0ZdTvGA0GEhDpb9no4+gdXPo= github.com/metacubex/sing-shadowsocks2 v0.2.2/go.mod h1:BhOug03a/RbI7y6hp6q+6ITM1dXjnLTmeWBHSTwvv2Q= -github.com/metacubex/sing-tun v0.4.2 h1:fwrQp3P536Pswu6gR1FJ+8GH55e+t2+B8LHIjwRtWbc= -github.com/metacubex/sing-tun v0.4.2/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= +github.com/metacubex/sing-tun v0.4.5 h1:kWSyQzuzHI40r50OFBczfWIDvMBMy1RIk+JsXeBPRB0= +github.com/metacubex/sing-tun v0.4.5/go.mod h1:V0N4rr0dWPBEE20ESkTXdbtx2riQYcb6YtwC5w/9wl0= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 h1:OAXiCosqY8xKDp3pqTW3qbrCprZ1l6WkrXSFSCwyY4I= github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9/go.mod h1:olVkD4FChQ5gKMHG4ZzuD7+fMkJY1G8vwOKpRehjrmY= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 h1:Z6bNy0HLTjx6BKIkV48sV/yia/GP8Bnyb5JQuGgSGzg= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589/go.mod h1:4NclTLIZuk+QkHVCGrP87rHi/y8YjgPytxTgApJNMhc= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa h1:9mcjV+RGZVC3reJBNDjjNPyS8PmFG97zq56X7WNaFO4= -github.com/metacubex/tfo-go v0.0.0-20241006021335-daedaf0ca7aa/go.mod h1:4tLB5c8U0CxpkFM+AJJB77jEaVDbLH5XQvy42vAGsWw= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw= github.com/metacubex/utls v1.6.6 h1:3D12YKHTf2Z41UPhQU2dWerNWJ5TVQD9gKoQ+H+iLC8= github.com/metacubex/utls v1.6.6/go.mod h1:+WLFUnXjcpdxXCnyX25nggw8C6YonZ8zOK2Zm/oRvdo= github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ= @@ -235,8 +235,8 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.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.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/clash-meta/go.mod b/clash-meta/go.mod index 76b9b754a9..39b39152d2 100644 --- a/clash-meta/go.mod +++ b/clash-meta/go.mod @@ -7,12 +7,12 @@ require ( github.com/bahlo/generic-list-go v0.2.0 github.com/coreos/go-iptables v0.8.0 github.com/dlclark/regexp2 v1.11.4 - github.com/enfein/mieru/v3 v3.8.4 - github.com/go-chi/chi/v5 v5.1.0 + github.com/enfein/mieru/v3 v3.9.0 + github.com/go-chi/chi/v5 v5.2.0 github.com/go-chi/render v1.0.3 github.com/gobwas/ws v1.4.0 github.com/gofrs/uuid/v5 v5.3.0 - github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef + github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d github.com/klauspost/compress v1.17.9 // lastest version compatible with golang1.20 github.com/klauspost/cpuid/v2 v2.2.9 github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 @@ -29,7 +29,7 @@ require ( github.com/metacubex/sing-tun v0.4.5 github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 - github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785 + github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 github.com/metacubex/utls v1.6.6 github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 github.com/miekg/dns v1.1.62 @@ -54,7 +54,7 @@ require ( go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/crypto v0.31.0 golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // lastest version compatible with golang1.20 - golang.org/x/net v0.32.0 + golang.org/x/net v0.33.0 golang.org/x/sys v0.28.0 google.golang.org/protobuf v1.34.2 // lastest version compatible with golang1.20 gopkg.in/yaml.v3 v3.0.1 diff --git a/clash-meta/go.sum b/clash-meta/go.sum index 35a809209f..2d7cbd53e1 100644 --- a/clash-meta/go.sum +++ b/clash-meta/go.sum @@ -29,8 +29,8 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/enfein/mieru/v3 v3.8.4 h1:PmBQykuEcl8yKcQ647pg8Qbjl433CRYgUbW6VLBgGn4= -github.com/enfein/mieru/v3 v3.8.4/go.mod h1:YtU00qjAEt54mCBQu4WZPCey6cBdB1BUtXjvrHLEUNQ= +github.com/enfein/mieru/v3 v3.9.0 h1:h8KIXKxwPg8jT0uFdABIi0864O10UMAAOkkWo4zKl04= +github.com/enfein/mieru/v3 v3.9.0/go.mod h1:jH2nXzJSNUn6UWuzD8E8AsRVa9Ca0CqcTcr9Z+CJO1o= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I= github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g= @@ -44,8 +44,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -75,8 +75,8 @@ github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef h1:NzQKDfd5ZOPnuZYf9MnRee8x2qecsVqzsnaLjEZiBko= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d h1:VkCNWh6tuQLgDBc6KrUOz/L1mCUQGnR1Ujj8uTgpwwk= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -126,8 +126,8 @@ github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 h1:OAXiCosq github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9/go.mod h1:olVkD4FChQ5gKMHG4ZzuD7+fMkJY1G8vwOKpRehjrmY= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 h1:Z6bNy0HLTjx6BKIkV48sV/yia/GP8Bnyb5JQuGgSGzg= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589/go.mod h1:4NclTLIZuk+QkHVCGrP87rHi/y8YjgPytxTgApJNMhc= -github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785 h1:NNmI+ZV0DzNuqaAInRQuZFLHlWVuyHeow8jYpdKjHjo= -github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785/go.mod h1:c7bVFM9f5+VzeZ/6Kg77T/jrg1Xp8QpqlSHvG/aXVts= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw= github.com/metacubex/utls v1.6.6 h1:3D12YKHTf2Z41UPhQU2dWerNWJ5TVQD9gKoQ+H+iLC8= github.com/metacubex/utls v1.6.6/go.mod h1:+WLFUnXjcpdxXCnyX25nggw8C6YonZ8zOK2Zm/oRvdo= github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ= @@ -242,8 +242,8 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.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.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index 0c09e91330..c5c04f07b8 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -6922,9 +6922,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redb" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c2a94325f9c5826b17c42af11067230f503747f870117a28180e85696e21ba" +checksum = "ea0a72cd7140de9fc3e318823b883abf819c20d478ec89ce880466dc2ef263c6" dependencies = [ "libc", ] diff --git a/clash-nyanpasu/manifest/version.json b/clash-nyanpasu/manifest/version.json index 246e8f0725..491083b943 100644 --- a/clash-nyanpasu/manifest/version.json +++ b/clash-nyanpasu/manifest/version.json @@ -2,7 +2,7 @@ "manifest_version": 1, "latest": { "mihomo": "v1.19.0", - "mihomo_alpha": "alpha-a9ce5da", + "mihomo_alpha": "alpha-368b1e1", "clash_rs": "v0.7.3", "clash_premium": "2023-09-05-gdcc8d87", "clash_rs_alpha": "0.7.3-alpha+sha.b526c04" @@ -69,5 +69,5 @@ "linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf" } }, - "updated_at": "2024-12-28T22:20:26.917Z" + "updated_at": "2024-12-30T22:20:36.259Z" } diff --git a/clash-nyanpasu/package.json b/clash-nyanpasu/package.json index 9a07f05f55..b9cb7b1f13 100644 --- a/clash-nyanpasu/package.json +++ b/clash-nyanpasu/package.json @@ -65,8 +65,8 @@ "@types/fs-extra": "11.0.4", "@types/lodash-es": "4.17.12", "@types/node": "22.10.2", - "@typescript-eslint/eslint-plugin": "8.18.2", - "@typescript-eslint/parser": "8.18.2", + "@typescript-eslint/eslint-plugin": "8.19.0", + "@typescript-eslint/parser": "8.19.0", "autoprefixer": "10.4.20", "conventional-changelog-conventionalcommits": "8.0.0", "cross-env": "7.0.3", @@ -106,7 +106,7 @@ "tailwindcss": "3.4.17", "tsx": "4.19.2", "typescript": "5.7.2", - "typescript-eslint": "8.18.2" + "typescript-eslint": "8.19.0" }, "packageManager": "pnpm@9.15.2+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321", "engines": { diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index 605667d914..684ededab8 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -43,11 +43,11 @@ importers: specifier: 22.10.2 version: 22.10.2 '@typescript-eslint/eslint-plugin': - specifier: 8.18.2 - version: 8.18.2(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 8.19.0 + version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) '@typescript-eslint/parser': - specifier: 8.18.2 - version: 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 8.19.0 + version: 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) autoprefixer: specifier: 10.4.20 version: 10.4.20(postcss@8.4.49) @@ -68,16 +68,16 @@ importers: version: 9.1.0(eslint@9.17.0(jiti@2.4.1)) eslint-config-standard: specifier: 17.1.0 - version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)) + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)) eslint-import-resolver-alias: specifier: 1.1.2 - version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))) + version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))) eslint-plugin-html: specifier: 8.1.2 version: 8.1.2 eslint-plugin-import: specifier: 2.31.0 - version: 2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) + version: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-n: specifier: 17.15.1 version: 17.15.1(eslint@9.17.0(jiti@2.4.1)) @@ -107,7 +107,7 @@ importers: version: 15.3.0 neostandard: specifier: 0.12.0 - version: 0.12.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + version: 0.12.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) npm-run-all2: specifier: 7.0.2 version: 7.0.2 @@ -166,8 +166,8 @@ importers: specifier: 5.7.2 version: 5.7.2 typescript-eslint: - specifier: 8.18.2 - version: 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 8.19.0 + version: 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) frontend/interface: dependencies: @@ -3133,16 +3133,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.18.2': - resolution: {integrity: sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==} + '@typescript-eslint/eslint-plugin@8.19.0': + resolution: {integrity: sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/parser@8.18.2': - resolution: {integrity: sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==} + '@typescript-eslint/parser@8.19.0': + resolution: {integrity: sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3152,12 +3152,12 @@ packages: resolution: {integrity: sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.18.2': - resolution: {integrity: sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==} + '@typescript-eslint/scope-manager@8.19.0': + resolution: {integrity: sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.18.2': - resolution: {integrity: sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==} + '@typescript-eslint/type-utils@8.19.0': + resolution: {integrity: sha512-TZs0I0OSbd5Aza4qAMpp1cdCYVnER94IziudE3JU328YUHgWu9gwiwhag+fuLeJ2LkWLXI+F/182TbG+JaBdTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3167,8 +3167,8 @@ packages: resolution: {integrity: sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.18.2': - resolution: {integrity: sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==} + '@typescript-eslint/types@8.19.0': + resolution: {integrity: sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.18.1': @@ -3177,8 +3177,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/typescript-estree@8.18.2': - resolution: {integrity: sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==} + '@typescript-eslint/typescript-estree@8.19.0': + resolution: {integrity: sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' @@ -3190,8 +3190,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.18.2': - resolution: {integrity: sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==} + '@typescript-eslint/utils@8.19.0': + resolution: {integrity: sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3201,8 +3201,8 @@ packages: resolution: {integrity: sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.18.2': - resolution: {integrity: sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==} + '@typescript-eslint/visitor-keys@8.19.0': + resolution: {integrity: sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -7691,8 +7691,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript-eslint@8.18.2: - resolution: {integrity: sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==} + typescript-eslint@8.19.0: + resolution: {integrity: sha512-Ni8sUkVWYK4KAcTtPjQ/UTiRk6jcsuDhPpxULapUDi8A/l8TSBk+t1GtJA1RsCzIJg0q6+J7bf35AwQigENWRQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -10897,14 +10897,14 @@ snapshots: '@types/node': 22.10.2 optional: true - '@typescript-eslint/eslint-plugin@8.18.2(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.18.2 - '@typescript-eslint/type-utils': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.18.2 + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/type-utils': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.19.0 eslint: 9.17.0(jiti@2.4.1) graphemer: 1.4.0 ignore: 5.3.2 @@ -10914,12 +10914,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.18.2 - '@typescript-eslint/types': 8.18.2 - '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.18.2 + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.19.0 debug: 4.4.0 eslint: 9.17.0(jiti@2.4.1) typescript: 5.7.2 @@ -10931,15 +10931,15 @@ snapshots: '@typescript-eslint/types': 8.18.1 '@typescript-eslint/visitor-keys': 8.18.1 - '@typescript-eslint/scope-manager@8.18.2': + '@typescript-eslint/scope-manager@8.19.0': dependencies: - '@typescript-eslint/types': 8.18.2 - '@typescript-eslint/visitor-keys': 8.18.2 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/visitor-keys': 8.19.0 - '@typescript-eslint/type-utils@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) debug: 4.4.0 eslint: 9.17.0(jiti@2.4.1) ts-api-utils: 1.3.0(typescript@5.7.2) @@ -10949,7 +10949,7 @@ snapshots: '@typescript-eslint/types@8.18.1': {} - '@typescript-eslint/types@8.18.2': {} + '@typescript-eslint/types@8.19.0': {} '@typescript-eslint/typescript-estree@8.18.1(typescript@5.7.2)': dependencies: @@ -10965,10 +10965,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.18.2(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.19.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 8.18.2 - '@typescript-eslint/visitor-keys': 8.18.2 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/visitor-keys': 8.19.0 debug: 4.4.0 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -10990,12 +10990,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.1)) - '@typescript-eslint/scope-manager': 8.18.2 - '@typescript-eslint/types': 8.18.2 - '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) eslint: 9.17.0(jiti@2.4.1) typescript: 5.7.2 transitivePeerDependencies: @@ -11006,9 +11006,9 @@ snapshots: '@typescript-eslint/types': 8.18.1 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.18.2': + '@typescript-eslint/visitor-keys@8.19.0': dependencies: - '@typescript-eslint/types': 8.18.2 + '@typescript-eslint/types': 8.19.0 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.2.0': {} @@ -12506,16 +12506,16 @@ snapshots: dependencies: eslint: 9.17.0(jiti@2.4.1) - eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)): + eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)): dependencies: eslint: 9.17.0(jiti@2.4.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-n: 17.15.1(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-promise: 7.2.1(eslint@9.17.0(jiti@2.4.1)) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))): dependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) eslint-import-resolver-node@0.3.9: dependencies: @@ -12525,7 +12525,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.7.0(eslint-plugin-import-x@4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)): + eslint-import-resolver-typescript@3.7.0(eslint-plugin-import-x@4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.0 @@ -12537,16 +12537,16 @@ snapshots: is-glob: 4.0.3 stable-hash: 0.0.4 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-import-x: 4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0(jiti@2.4.1)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0(jiti@2.4.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) eslint: 9.17.0(jiti@2.4.1) eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -12581,7 +12581,7 @@ snapshots: - supports-color - typescript - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -12592,7 +12592,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.4.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0(jiti@2.4.1)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0(jiti@2.4.1)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -12604,7 +12604,7 @@ snapshots: string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -14326,12 +14326,12 @@ snapshots: sax: 1.3.0 optional: true - neostandard@0.12.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2): + neostandard@0.12.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2): dependencies: '@humanwhocodes/gitignore-to-minimatch': 1.0.2 '@stylistic/eslint-plugin': 2.11.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) eslint: 9.17.0(jiti@2.4.1) - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import-x@4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)) + eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import-x@4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-import-x: 4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) eslint-plugin-n: 17.15.1(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-promise: 7.2.1(eslint@9.17.0(jiti@2.4.1)) @@ -14339,7 +14339,7 @@ snapshots: find-up: 5.0.0 globals: 15.14.0 peowly: 1.3.2 - typescript-eslint: 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + typescript-eslint: 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) transitivePeerDependencies: - eslint-plugin-import - supports-color @@ -16127,11 +16127,11 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript-eslint@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2): + typescript-eslint@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.18.2(@typescript-eslint/parser@8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/parser': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.2(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) eslint: 9.17.0(jiti@2.4.1) typescript: 5.7.2 transitivePeerDependencies: diff --git a/gost/README.md b/gost/README.md index f41aa36ae3..ad184d229d 100644 --- a/gost/README.md +++ b/gost/README.md @@ -12,8 +12,6 @@ GO Simple Tunnel [English README](README_en.md) -### !!![V3版本已经可用,欢迎抢先体验](https://latest.gost.run)!!! - 特性 ------ @@ -40,6 +38,8 @@ Telegram讨论群: Google讨论组: +GOST v3 + 安装 ------ diff --git a/gost/README_en.md b/gost/README_en.md index fbeb7bf328..3519047b9e 100644 --- a/gost/README_en.md +++ b/gost/README_en.md @@ -35,6 +35,8 @@ Telegram group: Google group: +GOST v3: + Installation ------ diff --git a/lede/package/kernel/linux/modules/netdevices.mk b/lede/package/kernel/linux/modules/netdevices.mk index 1140a331d1..880816a086 100644 --- a/lede/package/kernel/linux/modules/netdevices.mk +++ b/lede/package/kernel/linux/modules/netdevices.mk @@ -1506,20 +1506,22 @@ $(eval $(call KernelPackage,bnx2x)) define KernelPackage/bnxt-en SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=BCM 574xx/575xx 10/25/50-Gigabit ethernet adapter driver - DEPENDS:=@PCI_SUPPORT +kmod-lib-crc32c +kmod-mdio +kmod-ptp +kmod-lib-zlib-inflate +kmod-hwmon-core + TITLE:=Broadcom NetXtreme-C/E network driver + DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core +kmod-lib-crc32c +kmod-mdio +kmod-ptp FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko KCONFIG:= \ - CONFIG_BNXT \ - CONFIG_BNXT_SRIOV=y \ - CONFIG_BNXT_FLOWER_OFFLOAD=y \ - CONFIG_BNXT_DCB=n \ - CONFIG_BNXT_HWMON=y + CONFIG_BNXT \ + CONFIG_BNXT_SRIOV=y \ + CONFIG_BNXT_FLOWER_OFFLOAD=y \ + CONFIG_BNXT_DCB=n \ + CONFIG_BNXT_HWMON=y AUTOLOAD:=$(call AutoProbe,bnxt_en) endef define KernelPackage/bnxt-en/description - Broadcom 573xx/574xx/575xx 10/25/40/50-Gigabit ethernet adapter Driver + Supports Broadcom NetXtreme-C/E based Ethernet NICs including: + * BCM573xx + * BCM574xx endef $(eval $(call KernelPackage,bnxt-en)) diff --git a/mihomo/go.mod b/mihomo/go.mod index 76b9b754a9..39b39152d2 100644 --- a/mihomo/go.mod +++ b/mihomo/go.mod @@ -7,12 +7,12 @@ require ( github.com/bahlo/generic-list-go v0.2.0 github.com/coreos/go-iptables v0.8.0 github.com/dlclark/regexp2 v1.11.4 - github.com/enfein/mieru/v3 v3.8.4 - github.com/go-chi/chi/v5 v5.1.0 + github.com/enfein/mieru/v3 v3.9.0 + github.com/go-chi/chi/v5 v5.2.0 github.com/go-chi/render v1.0.3 github.com/gobwas/ws v1.4.0 github.com/gofrs/uuid/v5 v5.3.0 - github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef + github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d github.com/klauspost/compress v1.17.9 // lastest version compatible with golang1.20 github.com/klauspost/cpuid/v2 v2.2.9 github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 @@ -29,7 +29,7 @@ require ( github.com/metacubex/sing-tun v0.4.5 github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 - github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785 + github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 github.com/metacubex/utls v1.6.6 github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 github.com/miekg/dns v1.1.62 @@ -54,7 +54,7 @@ require ( go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/crypto v0.31.0 golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // lastest version compatible with golang1.20 - golang.org/x/net v0.32.0 + golang.org/x/net v0.33.0 golang.org/x/sys v0.28.0 google.golang.org/protobuf v1.34.2 // lastest version compatible with golang1.20 gopkg.in/yaml.v3 v3.0.1 diff --git a/mihomo/go.sum b/mihomo/go.sum index 35a809209f..2d7cbd53e1 100644 --- a/mihomo/go.sum +++ b/mihomo/go.sum @@ -29,8 +29,8 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/enfein/mieru/v3 v3.8.4 h1:PmBQykuEcl8yKcQ647pg8Qbjl433CRYgUbW6VLBgGn4= -github.com/enfein/mieru/v3 v3.8.4/go.mod h1:YtU00qjAEt54mCBQu4WZPCey6cBdB1BUtXjvrHLEUNQ= +github.com/enfein/mieru/v3 v3.9.0 h1:h8KIXKxwPg8jT0uFdABIi0864O10UMAAOkkWo4zKl04= +github.com/enfein/mieru/v3 v3.9.0/go.mod h1:jH2nXzJSNUn6UWuzD8E8AsRVa9Ca0CqcTcr9Z+CJO1o= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8= github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I= github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g= @@ -44,8 +44,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -75,8 +75,8 @@ github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef h1:NzQKDfd5ZOPnuZYf9MnRee8x2qecsVqzsnaLjEZiBko= -github.com/insomniacslk/dhcp v0.0.0-20241203100832-a481575ed0ef/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d h1:VkCNWh6tuQLgDBc6KrUOz/L1mCUQGnR1Ujj8uTgpwwk= +github.com/insomniacslk/dhcp v0.0.0-20241224095048-b56fa0d5f25d/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -126,8 +126,8 @@ github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9 h1:OAXiCosq github.com/metacubex/sing-vmess v0.1.9-0.20240719134745-1df6fb20bbf9/go.mod h1:olVkD4FChQ5gKMHG4ZzuD7+fMkJY1G8vwOKpRehjrmY= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589 h1:Z6bNy0HLTjx6BKIkV48sV/yia/GP8Bnyb5JQuGgSGzg= github.com/metacubex/sing-wireguard v0.0.0-20241126021510-0827d417b589/go.mod h1:4NclTLIZuk+QkHVCGrP87rHi/y8YjgPytxTgApJNMhc= -github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785 h1:NNmI+ZV0DzNuqaAInRQuZFLHlWVuyHeow8jYpdKjHjo= -github.com/metacubex/tfo-go v0.0.0-20240830120620-c5e019b67785/go.mod h1:c7bVFM9f5+VzeZ/6Kg77T/jrg1Xp8QpqlSHvG/aXVts= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY= +github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw= github.com/metacubex/utls v1.6.6 h1:3D12YKHTf2Z41UPhQU2dWerNWJ5TVQD9gKoQ+H+iLC8= github.com/metacubex/utls v1.6.6/go.mod h1:+WLFUnXjcpdxXCnyX25nggw8C6YonZ8zOK2Zm/oRvdo= github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ= @@ -242,8 +242,8 @@ golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.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.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/openclash/.github/workflows/compile_new_ipk.yml b/openclash/.github/workflows/compile_new_ipk.yml index e2842bad6f..d75b9cef3e 100644 --- a/openclash/.github/workflows/compile_new_ipk.yml +++ b/openclash/.github/workflows/compile_new_ipk.yml @@ -35,8 +35,8 @@ jobs: - name: Current Version id: current_version run: | - echo "version=$(sed -n 1p ./${{ github.ref_name }}/version |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}')" >> $GITHUB_OUTPUT - echo "Current Version: $(sed -n 1p ./${{ github.ref_name }}/version |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}')" + echo "version=$(sed -n 1p ./${{ github.ref_name }}/version |awk -F 'v' '{print $2}')" >> $GITHUB_OUTPUT + echo "Current Version: $(sed -n 1p ./${{ github.ref_name }}/version |awk -F 'v' '{print $2}')" Compile: runs-on: ubuntu-latest @@ -53,7 +53,7 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | sudo apt-get update - sudo apt-get -y install curl git tar + sudo apt-get -y install curl git tar zstd - name: Install OpenWrt SDK run: | @@ -63,12 +63,23 @@ jobs: cd \tmp tar xjf SDK.tar.bz2 mv "OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64" "SDK" + + - name: Install OpenWrt SNAPSHPT SDK + run: | + cd .. + curl -SLk --connect-timeout 30 --retry 2 "https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst" -o "./tmp/SNAPSDK.tar.zst" + cd \tmp + zstd -d SNAPSDK.tar.zst + tar xf SNAPSDK.tar + mv "openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64" "SNAPSDK" - name: Copy OpenClash Source Codes run: | cd .. - mkdir tmp/SDK/package/luci-app-openclash + mkdir -p tmp/SDK/package/luci-app-openclash + mkdir -p tmp/SNAPSDK/package/luci-app-openclash cp -rf "./OpenClash/luci-app-openclash/." "./tmp/SDK/package/luci-app-openclash/" + cp -rf "./OpenClash/luci-app-openclash/." "./tmp/SNAPSDK/package/luci-app-openclash/" - name: Compile po2lmo run: | @@ -77,12 +88,24 @@ jobs: pushd luci-app-openclash/tools/po2lmo make && sudo make install popd + cd ../../.. + cd tmp/SNAPSDK/package/ + pushd luci-app-openclash/tools/po2lmo + make && sudo make install + popd - name: Compile OpenClash IPK run: | cd .. cd tmp/SDK make package/luci-app-openclash/compile V=99 + + - name: Compile OpenClash APK + run: | + cd .. + cd tmp/SNAPSDK + make defconfig + make package/luci-app-openclash/compile V=99 - name: Switch OpenClash Repository to Package uses: actions/checkout@v4 @@ -91,18 +114,19 @@ jobs: - name: Commit and Push New Version run: | - rm -rf ./${{ github.ref_name }}/luci-app-openclash_* - echo "v${{ needs.Get-Version.outputs.version }}-beta" > ./${{ github.ref_name }}/version - echo "https://img.shields.io/badge/New Release-v${{ needs.Get-Version.outputs.version }}--beta-orange.svg" >> ./${{ github.ref_name }}/version + rm -rf ./${{ github.ref_name }}/luci-app-openclash* + echo "v${{ needs.Get-Version.outputs.version }}" > ./${{ github.ref_name }}/version + echo "https://img.shields.io/badge/New Release-v${{ needs.Get-Version.outputs.version }}-orange.svg" >> ./${{ github.ref_name }}/version cd .. - cp "./tmp/SDK/bin/ar71xx/packages/base/luci-app-openclash_${{ needs.Get-Version.outputs.version }}-beta_all.ipk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash_${{ needs.Get-Version.outputs.version }}-beta_all.ipk" - sed -i -E "s/OpenClash\/tree\/v(.*)-beta/OpenClash\/tree\/v${{ needs.Get-Version.outputs.version }}-beta/g" ./OpenClash/${{ github.ref_name }}/README.md - sed -i -E "s/OpenClash\/releases\/tag\/v(.*)-beta/OpenClash\/releases\/tag\/v${{ needs.Get-Version.outputs.version }}-beta/g" ./OpenClash/${{ github.ref_name }}/README.md - sed -i -E "s/source code-v(.*)--beta-green/source code-v${{ needs.Get-Version.outputs.version }}--beta-green/g" ./OpenClash/${{ github.ref_name }}/README.md - sed -i -E "s/New Release-v(.*)--beta-orange/New Release-v${{ needs.Get-Version.outputs.version }}--beta-orange/g" ./OpenClash/${{ github.ref_name }}/README.md + cp "./tmp/SDK/bin/ar71xx/packages/base/luci-app-openclash_${{ needs.Get-Version.outputs.version }}_all.ipk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash_${{ needs.Get-Version.outputs.version }}_all.ipk" + cp "./tmp/SNAPSDK/bin/packages/x86_64/base/luci-app-openclash-${{ needs.Get-Version.outputs.version }}.apk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash-${{ needs.Get-Version.outputs.version }}.apk" + sed -i -E "s/OpenClash\/tree\/v(.*)/OpenClash\/tree\/v${{ needs.Get-Version.outputs.version }}/g" ./OpenClash/${{ github.ref_name }}/README.md + sed -i -E "s/OpenClash\/releases\/tag\/v(.*)/OpenClash\/releases\/tag\/v${{ needs.Get-Version.outputs.version }}/g" ./OpenClash/${{ github.ref_name }}/README.md + sed -i -E "s/source code-v(.*)-green/source code-v${{ needs.Get-Version.outputs.version }}-green/g" ./OpenClash/${{ github.ref_name }}/README.md + sed -i -E "s/New Release-v(.*)-orange/New Release-v${{ needs.Get-Version.outputs.version }}-orange/g" ./OpenClash/${{ github.ref_name }}/README.md cd \OpenClash git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' git add . - git commit -m "Auto Release: v${{ needs.Get-Version.outputs.version }}-beta" + git commit -m "Auto Release: v${{ needs.Get-Version.outputs.version }}" git push diff --git a/openclash/.github/workflows/master_release_sync.yml b/openclash/.github/workflows/master_release_sync.yml index 115bd8ac74..1d4f7dc1d6 100644 --- a/openclash/.github/workflows/master_release_sync.yml +++ b/openclash/.github/workflows/master_release_sync.yml @@ -47,7 +47,7 @@ jobs: run: | if [ -n "$(diff -r ./master/ ./dev/)" ]; then rm -rf ./master/README.md - rm -rf ./master/luci-app-openclash_* + rm -rf ./master/luci-app-openclash* rm -rf ./master/version cp -rf "./dev/." "./master/" git config user.name 'github-actions[bot]' diff --git a/openclash/luci-app-openclash/Makefile b/openclash/luci-app-openclash/Makefile index 1eb71bcd1d..b8e42e2f73 100644 --- a/openclash/luci-app-openclash/Makefile +++ b/openclash/luci-app-openclash/Makefile @@ -1,8 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclash -PKG_VERSION:=0.46.050 -PKG_RELEASE:=beta +PKG_VERSION:=0.46.064 PKG_MAINTAINER:=vernesong PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -57,7 +56,7 @@ define Build/Prepare $(CP) $(CURDIR)/luasrc $(PKG_BUILD_DIR) $(foreach po,$(wildcard ${CURDIR}/po/zh-cn/*.po), \ po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));) - sed -i "s/v0.00.00-beta/v$(PKG_VERSION)-beta/g" $(PKG_BUILD_DIR)/root/www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1 + sed -i "s/v0.00.00/v$(PKG_VERSION)/g" $(PKG_BUILD_DIR)/root/www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1 chmod 0755 $(PKG_BUILD_DIR)/root/etc/init.d/openclash chmod -R 0755 $(PKG_BUILD_DIR)/root/usr/share/openclash/ mkdir -p $(PKG_BUILD_DIR)/root/etc/openclash/config @@ -105,7 +104,7 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh - sed -i "s/v0.00.00-beta/v$(PKG_VERSION)-beta/g" /www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1 + sed -i "s/v0.00.00/v$(PKG_VERSION)/g" /www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1 exit 0 endef @@ -113,6 +112,7 @@ define Package/$(PKG_NAME)/prerm #!/bin/sh uci -q set openclash.config.enable=0 uci -q commit openclash + [ -n "$(pidof clash)" ] && /etc/init.d/openclash stop 2>/dev/null cp -f "/etc/config/openclash" "/tmp/openclash.bak" >/dev/null 2>&1 cp -rf "/etc/openclash" "/tmp/openclash" >/dev/null 2>&1 cp -rf "/usr/share/openclash/ui/yacd" "/tmp/openclash_yacd" >/dev/null 2>&1 @@ -122,9 +122,15 @@ endef define Package/$(PKG_NAME)/postrm #!/bin/sh - dnsmasqconfdir="$(uci -q get dhcp.@dnsmasq[0].confdir || echo '/tmp/dnsmasq.d')" - dnsmasqconfdir="${dnsmasqconfdir%*/}" + DEFAULT_DNSMASQ_CFGID="$$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')" + if [ -f "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID" ]; then + DNSMASQ_CONF_DIR="$$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID")" + else + DNSMASQ_CONF_DIR="/tmp/dnsmasq.d" + fi + DNSMASQ_CONF_DIR=$${DNSMASQ_CONF_DIR%*/} rm -rf /etc/openclash >/dev/null 2>&1 + rm -rf /etc/config/openclash >/dev/null 2>&1 rm -rf /tmp/openclash.log >/dev/null 2>&1 rm -rf /tmp/openclash_start.log >/dev/null 2>&1 rm -rf /tmp/openclash_last_version >/dev/null 2>&1 @@ -135,9 +141,9 @@ define Package/$(PKG_NAME)/postrm rm -rf /tmp/rule_providers_name >/dev/null 2>&1 rm -rf /tmp/clash_last_version >/dev/null 2>&1 rm -rf /usr/share/openclash/backup >/dev/null 2>&1 - rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_custom_domain.conf >/dev/null 2>&1 - rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_chnroute_pass.conf >/dev/null 2>&1 - rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_chnroute6_pass.conf >/dev/null 2>&1 + rm -rf ${DNSMASQ_CONF_DIR}/dnsmasq_openclash_custom_domain.conf >/dev/null 2>&1 + rm -rf ${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute_pass.conf >/dev/null 2>&1 + rm -rf ${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute6_pass.conf >/dev/null 2>&1 rm -rf /tmp/dler* >/dev/null 2>&1 rm -rf /tmp/etc/openclash >/dev/null 2>&1 rm -rf /tmp/openclash_edit_file_name >/dev/null 2>&1 @@ -146,8 +152,10 @@ define Package/$(PKG_NAME)/postrm sed -i '/.*kB maximum content size*/c\export let HTTP_MAX_CONTENT = 1024*100; // 100 kB maximum content size' /usr/share/ucode/luci/http.uc >/dev/null 2>&1 uci -q delete firewall.openclash uci -q commit firewall + [ -f "/etc/config/ucitrack" ] && { uci -q delete ucitrack.@openclash[-1] uci -q commit ucitrack + } rm -rf /tmp/luci-* exit 0 endef diff --git a/openclash/luci-app-openclash/luasrc/controller/openclash.lua b/openclash/luci-app-openclash/luasrc/controller/openclash.lua index d65ad4a439..533ce17217 100644 --- a/openclash/luci-app-openclash/luasrc/controller/openclash.lua +++ b/openclash/luci-app-openclash/luasrc/controller/openclash.lua @@ -104,6 +104,8 @@ local device_arh = luci.sys.exec("uname -m |tr -d '\n'") if pcall(require, "luci.model.ipkg") then opkg = require "luci.model.ipkg" +else + opkg = nil end local core_path_mode = uci:get("openclash", "config", "small_flash_memory") @@ -158,19 +160,8 @@ local function chnroutev6() end local function daip() - local daip, lan_int_name - lan_int_name = uci:get("openclash", "config", "lan_interface_name") or "0" - if lan_int_name == "0" then - daip = luci.sys.exec("uci -q get network.lan.ipaddr |awk -F '/' '{print $1}' 2>/dev/null |tr -d '\n'") - else - daip = luci.sys.exec(string.format("ip address show %s | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'", lan_int_name)) - end - if not daip or daip == "" then - daip = luci.sys.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'") - end - if not daip or daip == "" then - daip = luci.sys.exec("ip addr show 2>/dev/null | grep -w 'inet' | grep 'global' | grep 'brd' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") - end + local daip + daip = fs.lanip() return daip end @@ -212,11 +203,23 @@ local function startlog() return line_trans end +local function pkg_type() + if fs.access("/usr/bin/apk") then + return "apk" + else + return "opkg" + end +end + local function coremodel() if opkg and opkg.info("libc") and opkg.info("libc")["libc"] then return opkg.info("libc")["libc"]["Architecture"] else - return luci.sys.exec("rm -f /var/lock/opkg.lock && opkg status libc 2>/dev/null |grep 'Architecture' |awk -F ': ' '{print $2}' 2>/dev/null") + if fs.access("/bin/opkg") then + return luci.sys.exec("rm -f /var/lock/opkg.lock && opkg status libc 2>/dev/null |grep 'Architecture' |awk -F ': ' '{print $2}' 2>/dev/null") + elseif fs.access("/usr/bin/apk") then + return luci.sys.exec("apk list libc 2>/dev/null |awk '{print $2}'") + end end end @@ -246,7 +249,11 @@ local function opcv() if opkg and opkg.info("luci-app-openclash") and opkg.info("luci-app-openclash")["luci-app-openclash"] then return "v" .. opkg.info("luci-app-openclash")["luci-app-openclash"]["Version"] else - return luci.sys.exec("rm -f /var/lock/opkg.lock && opkg status luci-app-openclash 2>/dev/null |grep 'Version' |awk -F 'Version: ' '{print \"v\"$2}'") + if fs.access("/bin/opkg") then + return luci.sys.exec("rm -f /var/lock/opkg.lock && opkg status luci-app-openclash 2>/dev/null |grep 'Version' |awk -F 'Version: ' '{print \"v\"$2}'") + elseif fs.access("/usr/bin/apk") then + return "v" .. luci.sys.exec("apk list luci-app-openclash 2>/dev/null |grep 'installed' | grep -oE '\\d+(\\.\\d+)*' | head -1") + end end end @@ -614,10 +621,18 @@ function set_subinfo_url() end function sub_info_get() - local filepath, filename, sub_url, sub_info, info, upload, download, total, expire, http_code, len, percent, day_left, day_expire, surplus, used + local sub_ua, filepath, filename, sub_url, sub_info, info, upload, download, total, expire, http_code, len, percent, day_left, day_expire, surplus, used local info_tb = {} filename = luci.http.formvalue("filename") sub_info = "" + sub_ua = "Clash" + uci:foreach("openclash", "config_subscribe", + function(s) + if s.name == filename and s.sub_ua then + sub_ua = s.sub_ua + end + end + ) if filename and not is_start() then uci:foreach("openclash", "subscribe_info", function(s) @@ -640,7 +655,7 @@ function sub_info_get() if not sub_url then sub_info = "No Sub Info Found" else - info = luci.sys.exec(string.format("curl -sLI -X GET -m 10 -w 'http_code='%%{http_code} -H 'User-Agent: Clash' '%s'", sub_url)) + info = luci.sys.exec(string.format("curl -sLI -X GET -m 10 -w 'http_code='%%{http_code} -H 'User-Agent: %s' '%s'", sub_ua, sub_url)) if not info or tonumber(string.sub(string.match(info, "http_code=%d+"), 11, -1)) ~= 200 then info = luci.sys.exec(string.format("curl -sLI -X GET -m 10 -w 'http_code='%%{http_code} -H 'User-Agent: Quantumultx' '%s'", sub_url)) end @@ -660,20 +675,34 @@ function sub_info_get() expire = os.date("%Y-%m-%d", day_expire) or "null" if day_expire and os.time() <= day_expire then day_left = math.ceil((day_expire - os.time()) / (3600*24)) + if math.ceil(day_left / 365) > 50 then + day_left = "∞" + end elseif day_expire == nil then day_left = "null" else day_left = 0 end - if used and total and used < total then + if used and total and used <= total then percent = string.format("%.1f",((total-used)/total)*100) or nil - elseif used == nil or total == nil or total == 0 then + surplus = fs.filesize(total - used) or "null" + elseif used == nil and total and total > 0.0 then percent = 100 + surplus = total + elseif total and total == 0.0 then + percent = 100 + surplus = "∞" else percent = 0 + surplus = "null" + end + if total and total > 0.0 then + total = fs.filesize(total) or "null" + elseif total and total == 0.0 then + total = "∞" + else + total = "null" end - surplus = fs.filesize(total - used) or "null" - total = fs.filesize(total) or "null" used = fs.filesize(used) or "null" sub_info = "Successful" else @@ -816,7 +845,7 @@ end local function s(e) local t=0 -local a={' B/S',' KB/S',' MB/S',' GB/S',' TB/S'} +local a={' B/S',' KB/S',' MB/S',' GB/S',' TB/S',' PB/S'} if (e<=1024) then return e..a[1] else @@ -1080,6 +1109,7 @@ function action_update_ma() luci.http.prepare_content("application/json") luci.http.write_json({ oplv = oplv(), + pkg_type = pkg_type(), corelv = corelv(), corever = corever(); }) diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/client.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/client.lua index 1893ddf44b..76ff70a3cc 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/client.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/client.lua @@ -75,7 +75,7 @@ if a then ck.template="openclash/cfg_check" sb.template="openclash/sub_info_show" - btnis=tb:option(Button,"switch",translate("Switch")) + btnis=tb:option(Button,"switch",translate("SwiTch")) btnis.template="openclash/other_button" btnis.render=function(o,t,a) if not e[t] then return false end diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua index 72b13a9156..4bbf0a71e2 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua @@ -17,20 +17,7 @@ bold_off = [[]] local op_mode = string.sub(luci.sys.exec('uci get openclash.config.operation_mode 2>/dev/null'),0,-2) if not op_mode then op_mode = "redir-host" end -local lan_int_name = uci:get("openclash", "config", "lan_interface_name") or "0" - -local lan_ip -if lan_int_name == "0" then - lan_ip = SYS.exec("uci -q get network.lan.ipaddr |awk -F '/' '{print $1}' 2>/dev/null |tr -d '\n'") -else - lan_ip = SYS.exec(string.format("ip address show %s | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'", lan_int_name)) -end -if not lan_ip or lan_ip == "" then - lan_ip = luci.sys.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'") -end -if not lan_ip or lan_ip == "" then - lan_ip = luci.sys.exec("ip addr show 2>/dev/null | grep -w 'inet' | grep 'global' | grep 'brd' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") -end +local lan_ip = fs.lanip() m = Map("openclash", translate("Overwrite Settings")) m.pageaction = false m.description = translate("Note: To restore the default configuration, try accessing:").." http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore".. @@ -82,11 +69,10 @@ o:value("http://captive.apple.com/generate_204") o.default = "0" o = s:taboption("settings", Value, "github_address_mod", translate("Github Address Modify")) -o.description = translate("Modify The Github Address In The Config And OpenClash With Proxy(CDN) To Prevent File Download Faild. Format Reference:").." ".."https://mirror.ghproxy.com/" +o.description = translate("Modify The Github Address In The Config And OpenClash With Proxy(CDN) To Prevent File Download Faild. Format Reference:").." ".."https://ghp.ci/" o:value("0", translate("Disable")) o:value("https://fastly.jsdelivr.net/") o:value("https://testingcf.jsdelivr.net/") -o:value("https://raw.fastgit.org/") o:value("https://cdn.jsdelivr.net/") o.default = "0" diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua index fb834b8417..8f2488e025 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua @@ -86,9 +86,10 @@ end ---- UA o = s:option(Value, "sub_ua", "User-Agent") o.description = font_red..bold_on..translate("Used for Downloading Subscriptions, Defaults to Clash")..bold_off..font_off -o:value("Clash") o:value("clash.meta") -o.default = "Clash" +o:value("clash-verge/v1.5.1") +o:value("Clash") +o.default = "clash.meta" o.rmempty = true ---- subconverter diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config.lua index 0a682018a1..7bd29227a0 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/config.lua @@ -201,7 +201,7 @@ st.template="openclash/cfg_check" ck.template="openclash/cfg_check" sb.template="openclash/sub_info_show" -btnis=tb:option(Button,"switch",translate("Switch")) +btnis=tb:option(Button,"switch",translate("SwiTch")) btnis.template="openclash/other_button" btnis.render=function(o,t,a) if not e[t] then return false end diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua index 0de1378e1d..fde0859ccb 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua @@ -95,6 +95,17 @@ end o:value("DIRECT") o:value("REJECT") +o = s:option(ListValue, "MainlandTV", translate("CN Mainland TV")) +o:depends("rule_name", "lhie1") +o.rmempty = true +for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do + if groupname ~= nil and groupname ~= "" then + o:value(groupname) + end +end +o:value("DIRECT") +o:value("REJECT") + o = s:option(ListValue, "Proxy", translate("Proxy")) o:depends("rule_name", "lhie1") o.rmempty = true @@ -150,17 +161,6 @@ end o:value("DIRECT") o:value("REJECT") -o = s:option(ListValue, "HBOGo", translate("HBO Go")) -o:depends("rule_name", "lhie1") -o.rmempty = true -for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do - if groupname ~= nil and groupname ~= "" then - o:value(groupname) - end -end -o:value("DIRECT") -o:value("REJECT") - o = s:option(ListValue, "Pornhub", translate("Pornhub")) o:depends("rule_name", "lhie1") o.rmempty = true @@ -381,6 +381,17 @@ end o:value("DIRECT") o:value("REJECT") +o = s:option(ListValue, "HTTPDNS", translate("HTTPDNS")) +o:depends("rule_name", "lhie1") +o.rmempty = true +for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do + if groupname ~= nil and groupname ~= "" then + o:value(groupname) + end +end +o:value("DIRECT") +o:value("REJECT") + o = s:option(ListValue, "Domestic", translate("Domestic")) o:depends("rule_name", "lhie1") o.rmempty = true diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua index 3e28e08f6a..1962f602c1 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/servers.lua @@ -29,8 +29,6 @@ o = s:option(ListValue, "rule_sources", translate("Choose Template For Create Co o.description = translate("Use Other Rules To Create Config") o:depends("create_config", 1) o:value("lhie1", translate("lhie1 Rules")) -o:value("ConnersHua", translate("ConnersHua(Provider-type) Rules")) -o:value("ConnersHua_return", translate("ConnersHua Return Rules")) o = s:option(Flag, "mix_proxies", translate("Mix Proxies")) o.description = font_red .. bold_on .. translate("Mix This Page's Proxies") .. bold_off .. font_off @@ -255,24 +253,27 @@ o = a:option(Button,"Load_Config", " ") o.inputtitle = translate("Read Config") o.inputstyle = "apply" o.write = function() - luci.sys.call("/usr/share/openclash/yml_groups_get.sh 2>/dev/null &") - luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) + m.uci:commit("openclash") + luci.sys.call("/usr/share/openclash/yml_groups_get.sh 2>/dev/null &") + luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end o = a:option(Button, "Commit", " ") o.inputtitle = translate("Commit Settings") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") + fs.unlink("/tmp/Proxy_Group") + m.uci:commit("openclash") end o = a:option(Button, "Apply", " ") o.inputtitle = translate("Apply Settings") o.inputstyle = "apply" o.write = function() - fs.unlink("/tmp/Proxy_Group") - luci.sys.call("/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 &") - luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) + m.uci:commit("openclash") + fs.unlink("/tmp/Proxy_Group") + luci.sys.call("/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 &") + luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end m:append(Template("openclash/toolbar_show")) diff --git a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua index 675d991479..52df2871a0 100644 --- a/openclash/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua +++ b/openclash/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua @@ -16,19 +16,7 @@ bold_off = [[]] local op_mode = string.sub(luci.sys.exec('uci get openclash.config.operation_mode 2>/dev/null'),0,-2) if not op_mode then op_mode = "redir-host" end -local lan_int_name = uci:get("openclash", "config", "lan_interface_name") or "0" -local lan_ip -if lan_int_name == "0" then - lan_ip = SYS.exec("uci -q get network.lan.ipaddr |awk -F '/' '{print $1}' 2>/dev/null |tr -d '\n'") -else - lan_ip = SYS.exec(string.format("ip address show %s | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'", lan_int_name)) -end -if not lan_ip or lan_ip == "" then - lan_ip = luci.sys.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | tr -d '\n'") -end -if not lan_ip or lan_ip == "" then - lan_ip = luci.sys.exec("ip addr show 2>/dev/null | grep -w 'inet' | grep 'global' | grep 'brd' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") -end +local lan_ip = fs.lanip() m = Map("openclash", translate("Plugin Settings")) m.pageaction = false m.description = translate("Note: To restore the default configuration, try accessing:").." http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore".. @@ -204,10 +192,63 @@ mac_w.datatype = "list(macaddr)" mac_w.rmempty = true mac_w:depends("lan_ac_mode", "1") +o = s:taboption("lan_ac", DynamicList, "wan_ac_black_ips", translate("WAN Bypassed Host List")) +o.datatype = "ipmask" +o.description = translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported") + +s2 = m:section(TypedSection, "lan_ac_traffic", translate("Lan Traffic Access List"), + "1."..translate("The Traffic From The Local Specified Port Will Not Pass The Core, Try To Set When The Bypass Gateway Forwarding Fails").."; ".."2."..translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported")) + +s2.template = "cbi/tblsection" +s2.sortable = true +s2.anonymous = true +s2.addremove = true +s2.rmempty = false + +o = s2:option(Value, "comment", translate("Comment")) +o.rmempty = true + +o = s2:option(Flag, "enabled", translate("Enable")) +o.rmempty = false +o.default = o.enabled +o.cfgvalue = function(...) + return Flag.cfgvalue(...) or "1" +end + +ip_ac = s2:option(Value, "src_ip", translate("Internal addresses")) +ip_ac.datatype = "ipmask" +ip_ac.placeholder = "0.0.0.0/0" +ip_ac.rmempty = false + +o = s2:option(Value, "src_port", translate("Internal ports")) +o.datatype = "or(port, portrange)" +o.placeholder = translate("5000 or 1234-2345") +o.rmempty = false + +o = s2:option(ListValue, "proto", translate("Proto")) +o:value("udp", translate("UDP")) +o:value("tcp", translate("TCP")) +o:value("both", translate("Both")) +o.default = "tcp" +o.rmempty = false + +o = s2:option(ListValue, "family", translate("Family")) +o:value("ipv4", translate("IPv4")) +o:value("ipv6", translate("IPv6")) +o:value("both", translate("Both")) +o.default = "tcp" +o.rmempty = false + +o = s2:option(ListValue, "target", translate("Target")) +o:value("return", translate("Return")) +o:value("accept", translate("Accept")) +o.rmempty = false + luci.ip.neighbors({ family = 4 }, function(n) if n.mac and n.dest then ip_b:value(n.dest:string()) ip_w:value(n.dest:string()) + ip_ac:value(n.dest:string()) mac_b:value(n.mac, "%s (%s)" %{ n.mac, n.dest:string() }) mac_w:value(n.mac, "%s (%s)" %{ n.mac, n.dest:string() }) end @@ -218,22 +259,13 @@ luci.ip.neighbors({ family = 6 }, function(n) if n.mac and n.dest then ip_b:value(n.dest:string()) ip_w:value(n.dest:string()) + ip_ac:value(n.dest:string()) mac_b:value(n.mac, "%s (%s)" %{ n.mac, n.dest:string() }) mac_w:value(n.mac, "%s (%s)" %{ n.mac, n.dest:string() }) end end) end -o = s:taboption("lan_ac", DynamicList, "wan_ac_black_ips", translate("WAN Bypassed Host List")) -o.datatype = "ipmask" -o.description = translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported") - -o = s:taboption("lan_ac", DynamicList, "lan_ac_black_ports", translate("Lan Bypassed Port List")) -o.datatype = "or(port, portrange)" -o.placeholder = translate("5000 or 1234-2345") -o:value("5000", translate("5000(NAS)")) -o.description = "1."..translate("The Traffic From The Local Specified Port Will Not Pass The Core, Try To Set When The Bypass Gateway Forwarding Fails").."
".."2."..translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported") - ---- Traffic Control o = s:taboption("traffic_control", Flag, "router_self_proxy", font_red..bold_on..translate("Router-Self Proxy")..bold_off..font_off) o.description = translate("Only Supported for Rule Mode")..", "..font_red..bold_on..translate("ALL Functions In Stream Enhance Tag Will Not Work After Disable")..bold_off..font_off @@ -496,28 +528,6 @@ o.template = "openclash/other_stream_option" o.value = "Amazon Prime Video" o:depends("stream_auto_select_prime_video", "1") ---HBO Now -o = s:taboption("stream_enhance", Flag, "stream_auto_select_hbo_now", font_red..translate("HBO Now")..font_off) -o.default = 0 -o:depends("stream_auto_select", "1") - -o = s:taboption("stream_enhance", Value, "stream_auto_select_group_key_hbo_now", translate("Group Filter")) -o.default = "HBO|HBONow|HBO Now" -o.placeholder = "HBO|HBONow|HBO Now" -o.description = translate("It Will Be Searched According To The Regex When Auto Search Group Fails") -o:depends("stream_auto_select_hbo_now", "1") - -o = s:taboption("stream_enhance", Value, "stream_auto_select_node_key_hbo_now", translate("Unlock Nodes Filter")) -o.default = "" -o.description = translate("It Will Be Selected Nodes According To The Regex") -o:depends("stream_auto_select_hbo_now", "1") - -o = s:taboption("stream_enhance", DummyValue, "HBO Now", translate("Manual Test")) -o.rawhtml = true -o.template = "openclash/other_stream_option" -o.value = "HBO Now" -o:depends("stream_auto_select_hbo_now", "1") - --HBO Max o = s:taboption("stream_enhance", Flag, "stream_auto_select_hbo_max", font_red..translate("HBO Max")..font_off) o.default = 0 @@ -552,40 +562,6 @@ o.template = "openclash/other_stream_option" o.value = "HBO Max" o:depends("stream_auto_select_hbo_max", "1") ---HBO GO Asia -o = s:taboption("stream_enhance", Flag, "stream_auto_select_hbo_go_asia", font_red..translate("HBO GO Asia")..font_off) -o.default = 0 -o:depends("stream_auto_select", "1") - -o = s:taboption("stream_enhance", Value, "stream_auto_select_group_key_hbo_go_asia", translate("Group Filter")) -o.default = "HBO|HBOGO|HBO GO" -o.placeholder = "HBO|HBOGO|HBO GO" -o.description = translate("It Will Be Searched According To The Regex When Auto Search Group Fails") -o:depends("stream_auto_select_hbo_go_asia", "1") - -o = s:taboption("stream_enhance", Value, "stream_auto_select_region_key_hbo_go_asia", translate("Unlock Region Filter")) -o.default = "" -o.placeholder = "HK|SG|TW" -o.description = translate("It Will Be Selected Region(Country Shortcode) According To The Regex") -o:depends("stream_auto_select_hbo_go_asia", "1") -function o.validate(self, value) - if value ~= m.uci:get("openclash", "config", "stream_auto_select_region_key_hbo_go_asia") then - fs.unlink("/tmp/openclash_HBO GO Asia_region") - end - return value -end - -o = s:taboption("stream_enhance", Value, "stream_auto_select_node_key_hbo_go_asia", translate("Unlock Nodes Filter")) -o.default = "" -o.description = translate("It Will Be Selected Nodes According To The Regex") -o:depends("stream_auto_select_hbo_go_asia", "1") - -o = s:taboption("stream_enhance", DummyValue, "HBO GO Asia", translate("Manual Test")) -o.rawhtml = true -o.template = "openclash/other_stream_option" -o.value = "HBO GO Asia" -o:depends("stream_auto_select_hbo_go_asia", "1") - --TVB Anywhere+ o = s:taboption("stream_enhance", Flag, "stream_auto_select_tvb_anywhere", font_red..translate("TVB Anywhere+")..font_off) o.default = 0 @@ -787,7 +763,7 @@ o:depends("stream_auto_select", "1") o = s:taboption("stream_enhance", Value, "stream_auto_select_group_key_openai", translate("Group Filter")) o.default = "OpenAI|ChatGPT" -o.placeholder = "OpenAI|ChatGPT" +o.placeholder = "OpenAI|ChatGPT|AI" o.description = translate("It Will Be Searched According To The Regex When Auto Search Group Fails") o:depends("stream_auto_select_openai", "1") diff --git a/openclash/luci-app-openclash/luasrc/openclash.lua b/openclash/luci-app-openclash/luasrc/openclash.lua index 5142a86e4c..dd86380432 100644 --- a/openclash/luci-app-openclash/luasrc/openclash.lua +++ b/openclash/luci-app-openclash/luasrc/openclash.lua @@ -29,6 +29,8 @@ local os = require "os" local ltn12 = require "luci.ltn12" local fs = require "nixio.fs" local nutil = require "nixio.util" +local uci = require "luci.model.uci".cursor() +local SYS = require "luci.sys" local type = type local string = string @@ -255,10 +257,27 @@ end function filesize(e) local t=0 - local a={' KB',' MB',' GB',' TB'} + local a={' KB',' MB',' GB',' TB',' PB'} repeat e=e/1024 t=t+1 until(e<=1024) return string.format("%.1f",e)..a[t] +end + +function lanip() + local lan_int_name = uci:get("openclash", "config", "lan_interface_name") or "0" + local lan_ip + if lan_int_name == "0" then + lan_ip = SYS.exec("uci -q get network.lan.ipaddr |awk -F '/' '{print $1}' 2>/dev/null |tr -d '\n'") + else + lan_ip = SYS.exec(string.format("ip address show %s | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' |head -1 | tr -d '\n'", lan_int_name)) + end + if not lan_ip or lan_ip == "" then + lan_ip = SYS.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' 2>/dev/null |grep -Eo 'inet [0-9\.]+' | awk '{print $2}' |head -1 | tr -d '\n'") + end + if not lan_ip or lan_ip == "" then + lan_ip = SYS.exec("ip addr show 2>/dev/null | grep -w 'inet' | grep 'global' | grep 'brd' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") + end + return lan_ip end \ No newline at end of file diff --git a/openclash/luci-app-openclash/luasrc/view/openclash/dlercloud.htm b/openclash/luci-app-openclash/luasrc/view/openclash/dlercloud.htm index f3af937ce0..830c404cf1 100644 --- a/openclash/luci-app-openclash/luasrc/view/openclash/dlercloud.htm +++ b/openclash/luci-app-openclash/luasrc/view/openclash/dlercloud.htm @@ -111,6 +111,7 @@ padding-top: 5px; margin: 0 0 0 -12%; line-height: 35px; + color: black; } .card .general .dler-info { @@ -177,8 +178,9 @@ .card .general .btn { color: #fff; - border-color: #337ab7; + border-color: #337ab7 !important; background: #1473e6; + background-color: #1473e6 !important; box-shadow: 0 8px 16px -8px rgba(0,0,0,0.4); border-radius: 6px; width: 90px; diff --git a/openclash/luci-app-openclash/luasrc/view/openclash/select_git_cdn.htm b/openclash/luci-app-openclash/luasrc/view/openclash/select_git_cdn.htm index 3acbaf9e34..d1432eaaba 100644 --- a/openclash/luci-app-openclash/luasrc/view/openclash/select_git_cdn.htm +++ b/openclash/luci-app-openclash/luasrc/view/openclash/select_git_cdn.htm @@ -82,10 +82,9 @@
https://fastly.jsdelivr.net/
https://testingcf.jsdelivr.net/
-
https://raw.fastgit.org/
https://cdn.jsdelivr.net/
<%:Custom Your CDN URL%>
- +
diff --git a/openclash/luci-app-openclash/luasrc/view/openclash/status.htm b/openclash/luci-app-openclash/luasrc/view/openclash/status.htm index 07fad12567..921be55642 100644 --- a/openclash/luci-app-openclash/luasrc/view/openclash/status.htm +++ b/openclash/luci-app-openclash/luasrc/view/openclash/status.htm @@ -176,7 +176,7 @@
- +

<%:Please ensure that all items are displayed normally before running. If you need to update, please go to the global settings page%> @@ -678,7 +678,7 @@ function ws_mmessage(event) { var data = JSON.parse(event.data) if (data.inuse) { - document.getElementById("mem_t").innerHTML = ""+bytesToSize(data.inuse)+"/S"; + document.getElementById("mem_t").innerHTML = ""+bytesToSize(data.inuse)+""; } else { document.getElementById("mem_t").innerHTML = "0 KB"; @@ -687,7 +687,7 @@ }; function bytesToSize(bytes) { - var sizes = ['B', 'KB', 'MB', 'GB', 'TB']; + var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; if (bytes == 0) return '0 B'; var i = Math.floor(Math.log(bytes) / Math.log(1024)); return i == 0 ? (bytes / Math.pow(1024, i)) + ' ' + sizes[i] : (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; diff --git a/openclash/luci-app-openclash/luasrc/view/openclash/sub_info_show.htm b/openclash/luci-app-openclash/luasrc/view/openclash/sub_info_show.htm index deab390112..8738f1703b 100644 --- a/openclash/luci-app-openclash/luasrc/view/openclash/sub_info_show.htm +++ b/openclash/luci-app-openclash/luasrc/view/openclash/sub_info_show.htm @@ -12,7 +12,6 @@ .sub_tab_show{ display: inline-block; white-space: nowrap; - color: var(--gray-dark); font-size: 12px; margin: 0 auto; -webkit-transition: all 1.5s; @@ -36,6 +35,18 @@ white-space: nowrap; } +:root[data-darkmode="true"] { + + #icon_wrench { + -webkit-filter: invert(1); + filter: invert(1); + } + #icon_arrow { + -webkit-filter: invert(1); + filter: invert(1); + } +} + <% @@ -44,7 +55,7 @@ local filename = fs.filename(val) local idname = math.random(1000)..(string.match(filename, "[%w_]+") or "") %> -

   <%:Refresh%> <%:Specify URL%>
+
   <%:Refresh%> <%:Specify URL%>
- + + + diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest b/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest index cef9c8adb1..8120df4ed5 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest +++ b/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest @@ -1 +1 @@ -{"name":"metacubexd","short_name":"metacubexd","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","icons":[{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]} +{"name":"MetaCubeXD","short_name":"MetaCubeXD","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","description":"Mihomo Dashboard, The Official One, XD","theme_color":"#000000","icons":[{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]} diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js b/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js index d4fc40e032..80c6406d88 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js +++ b/openclash/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(n,r)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(e[l])return;let o={};const t=s=>i(s,l),u={module:{uri:l},exports:o,require:t};e[l]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(r(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-CcYWVyqe.js",revision:null},{url:"assets/Connections-CVJiJJwm.js",revision:null},{url:"assets/global-Cq-x4U7Q.js",revision:null},{url:"assets/IconReload-C5Iuvpd-.js",revision:null},{url:"assets/index-D_QrDGkm.css",revision:null},{url:"assets/index-DACeLBg-.js",revision:null},{url:"assets/index-GtOz1sEE.js",revision:null},{url:"assets/Logs-LisT8FTz.js",revision:null},{url:"assets/Overview-DiEjGL5X.js",revision:null},{url:"assets/Proxies-A8q5R6Aj.js",revision:null},{url:"assets/Rules-BskxbInP.js",revision:null},{url:"assets/Setup-e28eI3Pt.js",revision:null},{url:"index.html",revision:"4b5142ca4adf9805cc0d4cecaf0ff1cc"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"4d78c8bc6207146065400ff644fe5a13"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const t=s=>i(s,r),u={module:{uri:r},exports:o,require:t};e[r]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(l(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-9NNS9COU.js",revision:null},{url:"assets/Connections-N_Z6THP_.js",revision:null},{url:"assets/DocumentTitle-DG90V81t.js",revision:null},{url:"assets/IconReload--QlVe2wP.js",revision:null},{url:"assets/index-CBBLUqwt.js",revision:null},{url:"assets/index-Csmv4Fkv.js",revision:null},{url:"assets/index-M06kPDrB.css",revision:null},{url:"assets/Logs-uIQcQmXC.js",revision:null},{url:"assets/Overview-B99qGorf.js",revision:null},{url:"assets/Proxies-Lk5uJ4LX.js",revision:null},{url:"assets/Rules-C4_l0aqo.js",revision:null},{url:"assets/Setup-CdphtcBj.js",revision:null},{url:"assets/time-CHbJgbks.js",revision:null},{url:"index.html",revision:"0ee677309471325e9389528536c80875"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"f0952d333375ba4273b4372ffa349b8b"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_change.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_change.sh index 4bca0bef28..233c4364e9 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_change.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_change.sh @@ -341,11 +341,12 @@ threads << Thread.new { Value['log-level']='$9'; end; Value['allow-lan']=true; - Value['disable-keep-alive']=true; Value['external-controller']='0.0.0.0:$3'; Value['secret']='$2'; Value['bind-address']='*'; Value['external-ui']='/usr/share/openclash/ui'; + Value['keep-alive-interval']=15; + Value['keep-alive-idle']=600; if $6 == 1 then Value['ipv6']=true; else @@ -421,10 +422,7 @@ threads << Thread.new { Value['tun']['device']='utun'; Value_2={'dns-hijack'=>['tcp://any:53']}; Value['tun'].merge!(Value_2); - if '$stack_type' != 'mixed' then - Value['tun']['gso']=true; - Value['tun']['gso-max-size']=65536; - end; + Value['tun']['endpoint-independent-nat']=true; Value['tun']['auto-route']=false; Value['tun']['auto-detect-interface']=false; Value['tun']['auto-redirect']=false; @@ -452,7 +450,7 @@ threads << Thread.new { Value.delete('ebpf'); end; - if '${37}' == '0' then + if '${35}' == '0' then Value['routing-mark']=6666; else if Value.key?('routing-mark') then @@ -789,6 +787,8 @@ begin YAML.LOG('Tip: Respect-rules Option Need Proxy-server-nameserver Option Must Be Setted, Auto Set to【114.114.114.114, 119.29.29.29, 8.8.8.8, 1.1.1.1】'); end; end; +rescue Exception => e + YAML.LOG('Error: Config File Overwrite Failed,【' + e.message + '】'); ensure File.open('$5','w') {|f| YAML.dump(Value, f)}; end" 2>/dev/null >> $LOG_FILE \ No newline at end of file diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh index 07cb743742..d19545f2e8 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh @@ -242,7 +242,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " x['proxies'].each{ |y| if Value_1.include?(y) then - uci_commands << uci_add + 'other_group=\"^' + y.to_s + '$\"' + commands = uci_add + 'other_group=\"^' + y.to_s + '$\"' + system(commands) end } end diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh index b12b54c907..33080ab8a1 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh @@ -47,7 +47,7 @@ cfg_groups_set() sed -i "s/new_servers_group \'${convert_old_name_cfg}\'/new_servers_group \'${convert_name}\'/g" $CFG_FILE 2>/dev/null sed -i "s/relay_groups \'${convert_old_name_cfg}\'/relay_groups \'${convert_name}\'/g" $CFG_FILE 2>/dev/null #第三方规则处理 - OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOGo" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI Suite" "AppleTV" "Crypto" "Discord") + OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "MainlandTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI_Suite" "AppleTV" "Crypto" "Discord" "HTTPDNS") for i in ${OTHER_RULE_NAMES[@]}; do sed -i "s/option ${i} \'${convert_old_name_cfg}\'/option ${i} \'${convert_name}\'/g" $CFG_FILE 2>/dev/null done 2>/dev/null diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh index aa9b44ca80..6fd9bbf9a2 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh @@ -171,8 +171,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin YAML.LOG('Start Getting【${CONFIG_NAME} - ' + y['type'].to_s + ' - ' + x.to_s + '】Proxy-provider Setting...'); #代理集存在时获取代理集编号 - cmd = 'grep -E \'\.' + x + '$\' ${match_provider} 2>/dev/null|awk -F \".\" \'{print \$1}\''; - provider_nums=%x(#{cmd}).chomp; + cmd = 'grep -F \'.' + x + '\' ${match_provider} 2>/dev/null |awk -F \".\" \'{print \$1}\''; + provider_nums = %x(#{cmd}).chomp; if not provider_nums.empty? then cmd = 'sed -i \"/^' + provider_nums + '\./c\\#match#\" $match_provider 2>/dev/null'; system(cmd); @@ -181,7 +181,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " uci_add='uci -q add_list openclash.@proxy-provider[' + provider_nums + '].'; uci_del='uci -q delete openclash.@proxy-provider[' + provider_nums + '].'; cmd = uci_get + 'manual'; - if not %x(#{cmd}).chomp then + if not provider_nums then uci_commands << uci_set + 'manual=0'; end; uci_commands << uci_set + 'type=\"' + y['type'].to_s + '\"'; @@ -269,7 +269,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " #新代理集且设置默认策略组时加入指定策略组 new_provider_groups = %x{uci get openclash.config.new_servers_group}.chomp.split(\"'\").map { |x| x.strip }.reject { |x| x.empty? }; new_provider_groups.each do |x| - uci_commands << uci_add + 'groups=\"' + x + '\"' + uci_commands << uci_add + 'groups=\"^' + x + '$\"' end elsif '$servers_if_update' != '1' then threads_agr = []; @@ -304,8 +304,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin YAML.LOG('Start Getting【${CONFIG_NAME} - ' + x['type'].to_s + ' - ' + x['name'].to_s + '】Proxy Setting...'); #节点存在时获取节点编号 - cmd = 'grep -E \'\.' + x['name'].to_s + '$\' ${match_servers} 2>/dev/null|awk -F \".\" \'{print \$1}\''; - server_num=%x(#{cmd}).chomp; + cmd = 'grep -F \'.' + x['name'].to_s + '\' ${match_servers} 2>/dev/null |awk -F \".\" \'{print \$1}\''; + server_num = %x(#{cmd}).chomp; if not server_num.empty? then #更新已有节点 cmd = 'sed -i \"/^' + server_num + '\./c\\#match#\" $match_servers 2>/dev/null'; @@ -315,7 +315,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " uci_add='uci -q add_list openclash.@servers[' + server_num + '].'; uci_del='uci -q delete openclash.@servers[' + server_num + '].'; cmd = uci_get + 'manual'; - if not %x(#{cmd}).chomp then + if not server_num then uci_commands << uci_set + 'manual=0'; end; else @@ -1329,10 +1329,10 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " threads << Thread.new{ #加入策略组 if '$servers_if_update' == '1' and '$config_group_exist' == '1' and '$servers_update' == '1' and server_num.empty? then - #新代理集且设置默认策略组时加入指定策略组 + #新代理且设置默认策略组时加入指定策略组 new_provider_groups = %x{uci get openclash.config.new_servers_group}.chomp.split(\"'\").map { |x| x.strip }.reject { |x| x.empty? }; new_provider_groups.each do |x| - uci_commands << uci_add + 'groups=\"' + x + '\"' + uci_commands << uci_add + 'groups=\"^' + x + '$\"' end elsif '$servers_if_update' != '1' then threads_gr = []; @@ -1345,7 +1345,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " z['proxies'].each{ |v| if v == x['name'] then - uci_commands << uci_add + 'groups=^\"' + z['name'] + '$\"' + uci_commands << uci_add + 'groups=\"^' + z['name'] + '$\"' break end } diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh index f39cd882ca..184ff62689 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh @@ -1577,7 +1577,7 @@ cat >> "$SERVER_FILE" <<-EOF - name: Bilibili type: select proxies: - - Asian TV + - CN Mainland TV - DIRECT EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null @@ -1615,20 +1615,6 @@ cat >> "$SERVER_FILE" <<-EOF EOF fi cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null -cat >> "$SERVER_FILE" <<-EOF - - name: HBO Go - type: select - proxies: - - Global TV - - DIRECT -EOF -cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null -if [ -f "/tmp/Proxy_Provider" ]; then -cat >> "$SERVER_FILE" <<-EOF - use: -EOF -fi -cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null cat >> "$SERVER_FILE" <<-EOF - name: Pornhub type: select @@ -1763,6 +1749,26 @@ cat >> "$SERVER_FILE" <<-EOF - REJECT - DIRECT - Proxy + - name: HTTPDNS + type: select + proxies: + - REJECT + - DIRECT + - Proxy +EOF +cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null +if [ -f "/tmp/Proxy_Provider" ]; then +cat >> "$SERVER_FILE" <<-EOF + use: +EOF +fi +cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null +cat >> "$SERVER_FILE" <<-EOF + - name: CN Mainland TV + type: select + proxies: + - DIRECT + - Proxy EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null if [ -f "/tmp/Proxy_Provider" ]; then @@ -1775,8 +1781,8 @@ cat >> "$SERVER_FILE" <<-EOF - name: Asian TV type: select proxies: - - DIRECT - Proxy + - DIRECT EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null if [ -f "/tmp/Proxy_Provider" ]; then @@ -1879,12 +1885,12 @@ ${uci_set}rule_name="lhie1" ${uci_set}config="$CONFIG_NAME" ${uci_set}GlobalTV="Global TV" ${uci_set}AsianTV="Asian TV" +${uci_set}MainlandTV="CN Mainland TV" ${uci_set}Proxy="Proxy" ${uci_set}Youtube="Youtube" ${uci_set}Bilibili="Bilibili" ${uci_set}Bahamut="Bahamut" ${uci_set}HBOMax="HBO Max" -${uci_set}HBOGo="HBO Go" ${uci_set}Pornhub="Pornhub" ${uci_set}Apple="Apple" ${uci_set}AppleTV="Apple TV" @@ -1900,6 +1906,7 @@ ${uci_set}Spotify="Spotify" ${uci_set}Steam="Steam" ${uci_set}miHoYo="miHoYo" ${uci_set}AdBlock="AdBlock" +${uci_set}HTTPDNS="HTTPDNS" ${uci_set}Speedtest="Speedtest" ${uci_set}Telegram="Telegram" ${uci_set}Crypto="Crypto" @@ -1917,9 +1924,9 @@ ${uci_set}Others="Others" ${UCI_DEL_LIST}="Bilibili" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bilibili" >/dev/null 2>&1 ${UCI_DEL_LIST}="Bahamut" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bahamut" >/dev/null 2>&1 ${UCI_DEL_LIST}="HBO Max" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Max" >/dev/null 2>&1 - ${UCI_DEL_LIST}="HBO Go" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Go" >/dev/null 2>&1 ${UCI_DEL_LIST}="Pornhub" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Pornhub" >/dev/null 2>&1 ${UCI_DEL_LIST}="Asian TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Asian TV" >/dev/null 2>&1 + ${UCI_DEL_LIST}="CN Mainland TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="CN Mainland TV" >/dev/null 2>&1 ${UCI_DEL_LIST}="Global TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Global TV" >/dev/null 2>&1 ${UCI_DEL_LIST}="Netflix" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Netflix" >/dev/null 2>&1 ${UCI_DEL_LIST}="Discovery Plus" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discovery Plus" >/dev/null 2>&1 diff --git a/openclash/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh b/openclash/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh index 45aafced87..e498e16088 100644 --- a/openclash/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh +++ b/openclash/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh @@ -133,8 +133,6 @@ yml_gen_rule_provider_file() else if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then RULE_PROVIDER_FILE_URL="${github_address_mod}gh/"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"@master"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F 'master' '{print $2}')"" - elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then - RULE_PROVIDER_FILE_URL="https://raw.fastgit.org/"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"/master"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F 'master' '{print $2}')"" else RULE_PROVIDER_FILE_URL="${github_address_mod}https://raw.githubusercontent.com/${RULE_PROVIDER_FILE_URL_PATH}" fi @@ -288,7 +286,6 @@ yml_other_set() config_foreach yml_rule_group_get "rule_provider_config" "$3" config_foreach yml_rule_group_get "rule_providers" "$3" config_foreach yml_rule_group_get "game_config" "$3" - local fake_ip="$(echo "${11}" |awk -F '/' '{print $1}')" ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin Value = YAML.load_file('$3'); @@ -312,73 +309,41 @@ yml_other_set() Value['rule-providers']=Value_1['rule-providers'] end end; - Value['script']=Value_1['script']; Value['rules']=Value_1['rules']; Value['rules'].to_a.collect!{|x| - x.to_s.gsub(/,[\s]?Bilibili,[\s]?Asian TV$/, ', Bilibili, $Bilibili#delete_') - .gsub(/,[\s]?Bahamut,[\s]?Global TV$/, ', Bahamut, $Bahamut#delete_') - .gsub(/,[\s]?HBO Max,[\s]?Global TV$/, ', HBO Max, $HBOMax#delete_') - .gsub(/,[\s]?HBO Go,[\s]?Global TV$/, ', HBO Go, $HBOGo#delete_') - .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ', Discovery Plus, $Discovery#delete_') - .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ', DAZN, $DAZN#delete_') - .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ', Pornhub, $Pornhub#delete_') - .gsub(/,[\s]?Global TV$/, ', $GlobalTV#delete_') - .gsub(/,[\s]?Asian TV$/, ', $AsianTV#delete_') - .gsub(/,[\s]?Proxy$/, ', $Proxy#delete_') - .gsub(/,[\s]?YouTube$/, ', $Youtube#delete_') - .gsub(/,[\s]?Apple$/, ', $Apple#delete_') - .gsub(/,[\s]?Apple TV$/, ', $AppleTV#delete_') - .gsub(/,[\s]?Scholar$/, ', $Scholar#delete_') - .gsub(/,[\s]?Netflix$/, ', $Netflix#delete_') - .gsub(/,[\s]?Disney$/, ', $Disney#delete_') - .gsub(/,[\s]?Spotify$/, ', $Spotify#delete_') - .gsub(/,[\s]?AI Suite$/, ', $AI_Suite#delete_') - .gsub(/,[\s]?Steam$/, ', $Steam#delete_') - .gsub(/,[\s]?miHoYo$/, ', $miHoYo#delete_') - .gsub(/,[\s]?AdBlock$/, ', $AdBlock#delete_') - .gsub(/,[\s]?Speedtest$/, ', $Speedtest#delete_') - .gsub(/,[\s]?Telegram$/, ', $Telegram#delete_') - .gsub(/,[\s]?Crypto$/, ', $Crypto#delete_') - .gsub(/,[\s]?Discord$/, ', $Discord#delete_') - .gsub(/,[\s]?Microsoft$/, ', $Microsoft#delete_') - .to_s.gsub(/,[\s]?PayPal$/, ', $PayPal#delete_') - .gsub(/,[\s]?Domestic$/, ', $Domestic#delete_') - .gsub(/,[\s]?Others$/, ', $Others#delete_') - .gsub(/,[\s]?Google FCM$/, ', $GoogleFCM#delete_') + x.to_s.gsub(/,[\s]?Bilibili,[\s]?CN Mainland TV$/, ',Bilibili,$Bilibili#delete_') + .gsub(/,[\s]?Bahamut,[\s]?Asian TV$/, ',Bahamut,$Bahamut#delete_') + .gsub(/,[\s]?Max,[\s]?Max$/, ',Max,$HBOMax#delete_') + .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ',Discovery Plus,$Discovery#delete_') + .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ',DAZN,$DAZN#delete_') + .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ',Pornhub,$Pornhub#delete_') + .gsub(/,[\s]?Global TV$/, ',$GlobalTV#delete_') + .gsub(/,[\s]?Asian TV$/, ',$AsianTV#delete_') + .gsub(/,[\s]?CN Mainland TV$/, ',$MainlandTV#delete_') + .gsub(/,[\s]?Proxy$/, ',$Proxy#delete_') + .gsub(/,[\s]?YouTube$/, ',$Youtube#delete_') + .gsub(/,[\s]?Apple$/, ',$Apple#delete_') + .gsub(/,[\s]?Apple TV$/, ',$AppleTV#delete_') + .gsub(/,[\s]?Scholar$/, ',$Scholar#delete_') + .gsub(/,[\s]?Netflix$/, ',$Netflix#delete_') + .gsub(/,[\s]?Disney$/, ',$Disney#delete_') + .gsub(/,[\s]?Spotify$/, ',$Spotify#delete_') + .gsub(/,[\s]?AI Suite$/, ',$AI_Suite#delete_') + .gsub(/,[\s]?Steam$/, ',$Steam#delete_') + .gsub(/,[\s]?miHoYo$/, ',$miHoYo#delete_') + .gsub(/,[\s]?AdBlock$/, ',$AdBlock#delete_') + .gsub(/,[\s]?HTTPDNS$/, ',$HTTPDNS#delete_') + .gsub(/,[\s]?Speedtest$/, ',$Speedtest#delete_') + .gsub(/,[\s]?Telegram$/, ',$Telegram#delete_') + .gsub(/,[\s]?Crypto$/, ',$Crypto#delete_') + .gsub(/,[\s]?Discord$/, ',$Discord#delete_') + .gsub(/,[\s]?Microsoft$/, ',$Microsoft#delete_') + .to_s.gsub(/,[\s]?PayPal$/, ',$PayPal#delete_') + .gsub(/,[\s]?Domestic$/, ',$Domestic#delete_') + .gsub(/,[\s]?Others$/, ',$Others#delete_') + .gsub(/,[\s]?Google FCM$/, ',$GoogleFCM#delete_') .gsub(/#delete_/, '') }; - Value['script']['code'].to_s.gsub!(/\'Bilibili\': \'Asian TV\'/,'\'Bilibili\': \'$Bilibili#delete_\'') - .gsub!(/\'Bahamut\': \'Global TV\'/,'\'Bahamut\': \'$Bahamut#delete_\'') - .gsub!(/\'HBO Max\': \'Global TV\'/,'\'HBO Max\': \'$HBOMax#delete_\'') - .gsub!(/\'HBO Go\': \'Global TV\'/,'\'HBO Go\': \'$HBOGo#delete_\'') - .gsub!(/\'Discovery Plus\': \'Global TV\'/,'\'Discovery Plus\': \'$Discovery#delete_\'') - .gsub!(/\'DAZN\': \'Global TV\'/,'\'DAZN\': \'$DAZN#delete_\'') - .gsub!(/\'Pornhub\': \'Global TV\'/,'\'Pornhub\': \'$Pornhub#delete_\'') - .gsub!(/: \'Global TV\'/,': \'$GlobalTV#delete_\'') - .gsub!(/: \'Asian TV\'/,': \'$AsianTV#delete_\'') - .gsub!(/: \'Proxy\'/,': \'$Proxy#delete_\'') - .gsub!(/: \'YouTube\'/,': \'$Youtube#delete_\'') - .gsub!(/: \'Apple\'/,': \'$Apple#delete_\'') - .gsub!(/: \'Apple TV\'/,': \'$AppleTV#delete_\'') - .gsub!(/: \'Scholar\'/,': \'$Scholar#delete_\'') - .gsub!(/: \'Netflix\'/,': \'$Netflix#delete_\'') - .gsub!(/: \'Disney\'/,': \'$Disney#delete_\'') - .gsub!(/: \'Spotify\'/,': \'$Spotify#delete_\'') - .gsub!(/: \'AI Suite\'/,': \'$AI_Suite#delete_\'') - .gsub!(/: \'Steam\'/,': \'$Steam#delete_\'') - .gsub!(/: \'miHoYo\'/,': \'$miHoYo#delete_\'') - .gsub!(/: \'AdBlock\'/,': \'$AdBlock#delete_\'') - .gsub!(/: \'Speedtest\'/,': \'$Speedtest#delete_\'') - .gsub!(/: \'Telegram\'/,': \'$Telegram#delete_\'') - .gsub!(/: \'Crypto\'/,': \'$Crypto#delete_\'') - .gsub!(/: \'Discord\'/,': \'$Discord#delete_\'') - .gsub!(/: \'Microsoft\'/,': \'$Microsoft#delete_\'') - .gsub!(/: \'PayPal\'/,': \'$PayPal#delete_\'') - .gsub!(/: \'Domestic\'/,': \'$Domestic#delete_\'') - .gsub!(/: \'Google FCM\'/,': \'$GoogleFCM#delete_\'') - .gsub!(/return \'Domestic\'$/, 'return \'$Domestic#delete_\'') - .gsub!(/return \'Others\'$/, 'return \'$Others#delete_\'') - .gsub!(/#delete_/, ''); end; rescue Exception => e YAML.LOG('Error: Set lhie1 Rules Failed,【' + e.message + '】'); @@ -436,19 +401,15 @@ yml_other_set() #Router Self Proxy Rule begin - if $6 == 0 and ${10} != 2 and '${12}' == 'fake-ip' then + if $6 == 0 and $8 != 2 and '$9' == 'fake-ip' then if Value.has_key?('rules') and not Value['rules'].to_a.empty? then - if Value['rules'].to_a.grep(/(?=.*SRC-IP-CIDR,'${fake_ip}')/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'SRC-IP-CIDR,${11},DIRECT'); - end if Value['rules'].to_a.grep(/(?=.*SRC-IP-CIDR,'$7')/).empty? and not '$7'.empty? then Value['rules']=Value['rules'].to_a.insert(0,'SRC-IP-CIDR,$7/32,DIRECT'); end; else - Value['rules']=['SRC-IP-CIDR,${11},DIRECT','SRC-IP-CIDR,$7/32,DIRECT']; + Value['rules']=['SRC-IP-CIDR,$7/32,DIRECT']; end; elsif Value.has_key?('rules') and not Value['rules'].to_a.empty? then - Value['rules'].delete('SRC-IP-CIDR,${11},DIRECT'); Value['rules'].delete('SRC-IP-CIDR,$7/32,DIRECT'); end; rescue Exception => e @@ -479,12 +440,7 @@ yml_other_set() end; if File::exist?('/tmp/yaml_rule_set_top_custom.yaml') then Value_1 = YAML.load_file('/tmp/yaml_rule_set_top_custom.yaml'); - if Value['rules'].to_a.grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).empty? then - Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(0,x)}; - else - ruby_add_index = Value['rules'].index(Value['rules'].grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).first); - Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(ruby_add_index + 1,x)}; - end; + Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(0,x)}; end; else if File::exist?('/tmp/yaml_rule_set_top_custom.yaml') then @@ -658,25 +614,6 @@ yml_other_set() rescue Exception => e YAML.LOG('Error: Set Custom Rules Failed,【' + e.message + '】'); end; - - #loop prevent - begin - if Value.has_key?('rules') and not Value['rules'].to_a.empty? then - if Value['rules'].to_a.grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'IP-CIDR,${11},REJECT,no-resolve'); - end; - if Value['rules'].to_a.grep(/(?=.*DST-PORT,'$8',REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'DST-PORT,$8,REJECT'); - end; - if Value['rules'].to_a.grep(/(?=.*DST-PORT,'$9',REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'DST-PORT,$9,REJECT'); - end; - else - Value['rules']=['IP-CIDR,${11},REJECT,no-resolve','DST-PORT,$8,REJECT','DST-PORT,$9,REJECT']; - end; - rescue Exception => e - YAML.LOG('Error: Set Loop Protect Rules Failed,【' + e.message + '】'); - end; }; t2=Thread.new{ @@ -750,10 +687,6 @@ yml_other_set() if x['url'] and x['url'] =~ /^https:\/\/raw.githubusercontent.com/ then x['url'] = '$github_address_mod' + 'gh/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '@' + x['url'].split(x['url'].split('/')[2] + '/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/')[1]; end; - elsif '$github_address_mod' == 'https://raw.fastgit.org/' then - if x['url'] and x['url'] =~ /^https:\/\/raw.githubusercontent.com/ then - x['url'] = 'https://raw.fastgit.org/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/' + x['url'].split(x['url'].split('/')[2] + '/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/')[1]; - end; else if x['url'] and x['url'] =~ /^https:\/\/(raw.|gist.)(githubusercontent.com|github.com)/ then x['url'] = '$github_address_mod' + x['url']; @@ -871,12 +804,12 @@ yml_other_rules_get() config_get "rule_name" "$section" "rule_name" "" config_get "GlobalTV" "$section" "GlobalTV" "" config_get "AsianTV" "$section" "AsianTV" "" + config_get "MainlandTV" "$section" "MainlandTV" "DIRECT" config_get "Proxy" "$section" "Proxy" "" config_get "Youtube" "$section" "Youtube" "" config_get "Bilibili" "$section" "Bilibili" "" config_get "Bahamut" "$section" "Bahamut" "" config_get "HBOMax" "$section" "HBOMax" "$GlobalTV" - config_get "HBOGo" "$section" "HBOGo" "$GlobalTV" config_get "Pornhub" "$section" "Pornhub" "" config_get "Apple" "$section" "Apple" "" config_get "Scholar" "$section" "Scholar" "" @@ -885,6 +818,7 @@ yml_other_rules_get() config_get "Spotify" "$section" "Spotify" "" config_get "Steam" "$section" "Steam" "" config_get "AdBlock" "$section" "AdBlock" "" + config_get "HTTPDNS" "$section" "HTTPDNS" "REJECT" config_get "Netease_Music" "$section" "Netease_Music" "" config_get "Speedtest" "$section" "Speedtest" "" config_get "Telegram" "$section" "Telegram" "" @@ -912,18 +846,18 @@ if [ "$1" != "0" ]; then config_foreach yml_other_rules_get "other_rules" "$5" if [ -z "$rule_name" ]; then SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 #判断策略组是否存在 elif [ "$rule_name" = "lhie1" ]; then if [ -z "$(grep -F "$GlobalTV" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AsianTV" /tmp/Proxy_Group)" ]\ + || [ -z "$(grep -F "$MainlandTV" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Proxy" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Youtube" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Bilibili" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Bahamut" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$HBOMax" /tmp/Proxy_Group)" ]\ - || [ -z "$(grep -F "$HBOGo" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Pornhub" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Apple" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AppleTV" /tmp/Proxy_Group)" ]\ @@ -937,6 +871,7 @@ if [ "$1" != "0" ]; then || [ -z "$(grep -F "$Steam" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$miHoYo" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AdBlock" /tmp/Proxy_Group)" ]\ + || [ -z "$(grep -F "$HTTPDNS" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Speedtest" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Telegram" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Crypto" /tmp/Proxy_Group)" ]\ @@ -948,16 +883,16 @@ if [ "$1" != "0" ]; then || [ -z "$(grep -F "$Domestic" /tmp/Proxy_Group)" ]; then LOG_OUT "Warning: Because of The Different Porxy-Group's Name, Stop Setting The Other Rules!" SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 fi fi if [ -z "$Proxy" ]; then LOG_OUT "Error: Missing Porxy-Group's Name, Stop Setting The Other Rules!" SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 fi fi -yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" +yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" diff --git a/openclash/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg b/openclash/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg index 4664f7519b..a245a36be4 100644 --- a/openclash/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg +++ b/openclash/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg @@ -1 +1 @@ -Current Version: v0.00.00-betaCurrent Versionv0.00.00-beta \ No newline at end of file +Current Version: v0.00.00Current Versionv0.00.00 \ No newline at end of file diff --git a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index b185a4dbd7..fee631579c 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -146,7 +146,7 @@ end sources.write = dynamicList_write ---- TCP No Redir Ports -local TCP_NO_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_no_redir_ports") +local TCP_NO_REDIR_PORTS = m:get("@global_forwarding[0]", "tcp_no_redir_ports") o = s:option(Value, "tcp_no_redir_ports", translate("TCP No Redir Ports")) o:value("", translate("Use global config") .. "(" .. TCP_NO_REDIR_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -154,7 +154,7 @@ o:value("1:65535", translate("All")) o.validate = port_validate ---- UDP No Redir Ports -local UDP_NO_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_no_redir_ports") +local UDP_NO_REDIR_PORTS = m:get("@global_forwarding[0]", "udp_no_redir_ports") o = s:option(Value, "udp_no_redir_ports", translate("UDP No Redir Ports"), "" .. translate("Fill in the ports you don't want to be forwarded by the agent, with the highest priority.") .. @@ -203,7 +203,7 @@ o.value = "1" o:depends({ udp_node = "", ['!reverse'] = true }) ---- TCP Proxy Drop Ports -local TCP_PROXY_DROP_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_proxy_drop_ports") +local TCP_PROXY_DROP_PORTS = m:get("@global_forwarding[0]", "tcp_proxy_drop_ports") o = s:option(Value, "tcp_proxy_drop_ports", translate("TCP Proxy Drop Ports")) o:value("", translate("Use global config") .. "(" .. TCP_PROXY_DROP_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -212,7 +212,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- UDP Proxy Drop Ports -local UDP_PROXY_DROP_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_proxy_drop_ports") +local UDP_PROXY_DROP_PORTS = m:get("@global_forwarding[0]", "udp_proxy_drop_ports") o = s:option(Value, "udp_proxy_drop_ports", translate("UDP Proxy Drop Ports")) o:value("", translate("Use global config") .. "(" .. UDP_PROXY_DROP_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -222,7 +222,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- TCP Redir Ports -local TCP_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_redir_ports") +local TCP_REDIR_PORTS = m:get("@global_forwarding[0]", "tcp_redir_ports") o = s:option(Value, "tcp_redir_ports", translate("TCP Redir Ports"), translatef("Only work with using the %s node.", "TCP")) o:value("", translate("Use global config") .. "(" .. TCP_REDIR_PORTS .. ")") o:value("1:65535", translate("All")) @@ -234,7 +234,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- UDP Redir Ports -local UDP_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_redir_ports") +local UDP_REDIR_PORTS = m:get("@global_forwarding[0]", "udp_redir_ports") o = s:option(Value, "udp_redir_ports", translate("UDP Redir Ports"), translatef("Only work with using the %s node.", "UDP")) o:value("", translate("Use global config") .. "(" .. UDP_REDIR_PORTS .. ")") o:value("1:65535", translate("All")) diff --git a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 4168039c24..620f3f5aa7 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -37,7 +37,7 @@ end local socks_list = {} -local tcp_socks_server = "127.0.0.1" .. ":" .. (m.uci:get(appname, "@global[0]", "tcp_node_socks_port") or "1070") +local tcp_socks_server = "127.0.0.1" .. ":" .. (m:get("@global[0]", "tcp_node_socks_port") or "1070") local socks_table = {} socks_table[#socks_table + 1] = { id = tcp_socks_server, @@ -594,7 +594,7 @@ o = s:taboption("DNS", Flag, "dns_redirect", translate("DNS Redirect"), translat o.default = "1" o.rmempty = false -if (m.uci:get(appname, "@global_forwarding[0]", "use_nft") or "0") == "1" then +if (m:get("@global_forwarding[0]", "use_nft") or "0") == "1" then o = s:taboption("DNS", Button, "clear_ipset", translate("Clear NFTSET"), translate("Try this feature if the rule modification does not take effect.")) else o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect.")) diff --git a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua index e3212bc792..e2fda69eaa 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua @@ -4,7 +4,7 @@ local appname = "passwall" m = Map(appname, translate("Node Config")) m.redirect = api.url() -if not arg[1] or not m.uci:get(appname, arg[1]) then +if not arg[1] or not m:get(arg[1]) then luci.http.redirect(api.url("node_list")) end diff --git a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua index 187beaaa3b..bc1ab22d87 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua @@ -22,7 +22,7 @@ o.rmempty = false local auto_switch_tip local current_node = api.get_cache_var("socks_" .. arg[1]) if current_node then - local n = m.uci:get_all(appname, current_node) + local n = m:get(current_node) if n then if tonumber(m:get(arg[1], "enable_autoswitch") or 0) == 1 then if n then diff --git a/openwrt-passwall/luci-app-passwall/luasrc/passwall/util_xray.lua b/openwrt-passwall/luci-app-passwall/luasrc/passwall/util_xray.lua index bd8ff36c42..c3ac56c205 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -655,11 +655,21 @@ function gen_config(var) } } if inbound.sniffing.enabled == true then - inbound.sniffing.destOverride = {"http", "tls", "quic", (remote_dns_fake) and "fakedns"} + inbound.sniffing.destOverride = {"http", "tls", "quic"} inbound.sniffing.metadataOnly = false inbound.sniffing.routeOnly = xray_settings.sniffing_override_dest ~= "1" or nil inbound.sniffing.domainsExcluded = xray_settings.sniffing_override_dest == "1" and get_domain_excluded() or nil end + if remote_dns_fake then + inbound.sniffing.enabled = true + if not inbound.sniffing.destOverride then + inbound.sniffing.destOverride = {"fakedns"} + inbound.sniffing.metadataOnly = true + else + table.insert(inbound.sniffing.destOverride, "fakedns") + inbound.sniffing.metadataOnly = false + end + end if tcp_redir_port then local tcp_inbound = api.clone(inbound) diff --git a/openwrt-passwall/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm b/openwrt-passwall/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm index 5177cf8f7a..1df050c006 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm +++ b/openwrt-passwall/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm @@ -2,12 +2,12 @@ <% local api = require "luci.passwall.api" local appname = 'passwall' -local uci = self.map.uci -local ss_type = uci:get(appname, "@global_subscribe[0]", "ss_type") or "xray" -local trojan_type = uci:get(appname, "@global_subscribe[0]", "trojan_type") or "xray" -local vmess_type = uci:get(appname, "@global_subscribe[0]", "vmess_type") or "xray" -local vless_type = uci:get(appname, "@global_subscribe[0]", "vless_type") or "xray" -local hysteria2_type = uci:get(appname, "@global_subscribe[0]", "hysteria2_type") or "sing-box" +local map = self.map +local ss_type = map:get("@global_subscribe[0]", "ss_type") or "xray" +local trojan_type = map:get("@global_subscribe[0]", "trojan_type") or "xray" +local vmess_type = map:get("@global_subscribe[0]", "vmess_type") or "xray" +local vless_type = map:get("@global_subscribe[0]", "vless_type") or "xray" +local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sing-box" -%> - + + + diff --git a/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest b/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest index cef9c8adb1..8120df4ed5 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest +++ b/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/manifest.webmanifest @@ -1 +1 @@ -{"name":"metacubexd","short_name":"metacubexd","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","icons":[{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]} +{"name":"MetaCubeXD","short_name":"MetaCubeXD","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","description":"Mihomo Dashboard, The Official One, XD","theme_color":"#000000","icons":[{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]} diff --git a/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js b/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js index d4fc40e032..80c6406d88 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js +++ b/small/luci-app-openclash/root/usr/share/openclash/ui/metacubexd/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(n,r)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(e[l])return;let o={};const t=s=>i(s,l),u={module:{uri:l},exports:o,require:t};e[l]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(r(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-CcYWVyqe.js",revision:null},{url:"assets/Connections-CVJiJJwm.js",revision:null},{url:"assets/global-Cq-x4U7Q.js",revision:null},{url:"assets/IconReload-C5Iuvpd-.js",revision:null},{url:"assets/index-D_QrDGkm.css",revision:null},{url:"assets/index-DACeLBg-.js",revision:null},{url:"assets/index-GtOz1sEE.js",revision:null},{url:"assets/Logs-LisT8FTz.js",revision:null},{url:"assets/Overview-DiEjGL5X.js",revision:null},{url:"assets/Proxies-A8q5R6Aj.js",revision:null},{url:"assets/Rules-BskxbInP.js",revision:null},{url:"assets/Setup-e28eI3Pt.js",revision:null},{url:"index.html",revision:"4b5142ca4adf9805cc0d4cecaf0ff1cc"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"4d78c8bc6207146065400ff644fe5a13"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const t=s=>i(s,r),u={module:{uri:r},exports:o,require:t};e[r]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(l(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-9NNS9COU.js",revision:null},{url:"assets/Connections-N_Z6THP_.js",revision:null},{url:"assets/DocumentTitle-DG90V81t.js",revision:null},{url:"assets/IconReload--QlVe2wP.js",revision:null},{url:"assets/index-CBBLUqwt.js",revision:null},{url:"assets/index-Csmv4Fkv.js",revision:null},{url:"assets/index-M06kPDrB.css",revision:null},{url:"assets/Logs-uIQcQmXC.js",revision:null},{url:"assets/Overview-B99qGorf.js",revision:null},{url:"assets/Proxies-Lk5uJ4LX.js",revision:null},{url:"assets/Rules-C4_l0aqo.js",revision:null},{url:"assets/Setup-CdphtcBj.js",revision:null},{url:"assets/time-CHbJgbks.js",revision:null},{url:"index.html",revision:"0ee677309471325e9389528536c80875"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"f0952d333375ba4273b4372ffa349b8b"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_change.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_change.sh index 4bca0bef28..233c4364e9 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_change.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_change.sh @@ -341,11 +341,12 @@ threads << Thread.new { Value['log-level']='$9'; end; Value['allow-lan']=true; - Value['disable-keep-alive']=true; Value['external-controller']='0.0.0.0:$3'; Value['secret']='$2'; Value['bind-address']='*'; Value['external-ui']='/usr/share/openclash/ui'; + Value['keep-alive-interval']=15; + Value['keep-alive-idle']=600; if $6 == 1 then Value['ipv6']=true; else @@ -421,10 +422,7 @@ threads << Thread.new { Value['tun']['device']='utun'; Value_2={'dns-hijack'=>['tcp://any:53']}; Value['tun'].merge!(Value_2); - if '$stack_type' != 'mixed' then - Value['tun']['gso']=true; - Value['tun']['gso-max-size']=65536; - end; + Value['tun']['endpoint-independent-nat']=true; Value['tun']['auto-route']=false; Value['tun']['auto-detect-interface']=false; Value['tun']['auto-redirect']=false; @@ -452,7 +450,7 @@ threads << Thread.new { Value.delete('ebpf'); end; - if '${37}' == '0' then + if '${35}' == '0' then Value['routing-mark']=6666; else if Value.key?('routing-mark') then @@ -789,6 +787,8 @@ begin YAML.LOG('Tip: Respect-rules Option Need Proxy-server-nameserver Option Must Be Setted, Auto Set to【114.114.114.114, 119.29.29.29, 8.8.8.8, 1.1.1.1】'); end; end; +rescue Exception => e + YAML.LOG('Error: Config File Overwrite Failed,【' + e.message + '】'); ensure File.open('$5','w') {|f| YAML.dump(Value, f)}; end" 2>/dev/null >> $LOG_FILE \ No newline at end of file diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh index 07cb743742..d19545f2e8 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_groups_get.sh @@ -242,7 +242,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " x['proxies'].each{ |y| if Value_1.include?(y) then - uci_commands << uci_add + 'other_group=\"^' + y.to_s + '$\"' + commands = uci_add + 'other_group=\"^' + y.to_s + '$\"' + system(commands) end } end diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh index b12b54c907..33080ab8a1 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_groups_name_ch.sh @@ -47,7 +47,7 @@ cfg_groups_set() sed -i "s/new_servers_group \'${convert_old_name_cfg}\'/new_servers_group \'${convert_name}\'/g" $CFG_FILE 2>/dev/null sed -i "s/relay_groups \'${convert_old_name_cfg}\'/relay_groups \'${convert_name}\'/g" $CFG_FILE 2>/dev/null #第三方规则处理 - OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOGo" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI Suite" "AppleTV" "Crypto" "Discord") + OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "MainlandTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI_Suite" "AppleTV" "Crypto" "Discord" "HTTPDNS") for i in ${OTHER_RULE_NAMES[@]}; do sed -i "s/option ${i} \'${convert_old_name_cfg}\'/option ${i} \'${convert_name}\'/g" $CFG_FILE 2>/dev/null done 2>/dev/null diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh index aa9b44ca80..6fd9bbf9a2 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_get.sh @@ -171,8 +171,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin YAML.LOG('Start Getting【${CONFIG_NAME} - ' + y['type'].to_s + ' - ' + x.to_s + '】Proxy-provider Setting...'); #代理集存在时获取代理集编号 - cmd = 'grep -E \'\.' + x + '$\' ${match_provider} 2>/dev/null|awk -F \".\" \'{print \$1}\''; - provider_nums=%x(#{cmd}).chomp; + cmd = 'grep -F \'.' + x + '\' ${match_provider} 2>/dev/null |awk -F \".\" \'{print \$1}\''; + provider_nums = %x(#{cmd}).chomp; if not provider_nums.empty? then cmd = 'sed -i \"/^' + provider_nums + '\./c\\#match#\" $match_provider 2>/dev/null'; system(cmd); @@ -181,7 +181,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " uci_add='uci -q add_list openclash.@proxy-provider[' + provider_nums + '].'; uci_del='uci -q delete openclash.@proxy-provider[' + provider_nums + '].'; cmd = uci_get + 'manual'; - if not %x(#{cmd}).chomp then + if not provider_nums then uci_commands << uci_set + 'manual=0'; end; uci_commands << uci_set + 'type=\"' + y['type'].to_s + '\"'; @@ -269,7 +269,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " #新代理集且设置默认策略组时加入指定策略组 new_provider_groups = %x{uci get openclash.config.new_servers_group}.chomp.split(\"'\").map { |x| x.strip }.reject { |x| x.empty? }; new_provider_groups.each do |x| - uci_commands << uci_add + 'groups=\"' + x + '\"' + uci_commands << uci_add + 'groups=\"^' + x + '$\"' end elsif '$servers_if_update' != '1' then threads_agr = []; @@ -304,8 +304,8 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin YAML.LOG('Start Getting【${CONFIG_NAME} - ' + x['type'].to_s + ' - ' + x['name'].to_s + '】Proxy Setting...'); #节点存在时获取节点编号 - cmd = 'grep -E \'\.' + x['name'].to_s + '$\' ${match_servers} 2>/dev/null|awk -F \".\" \'{print \$1}\''; - server_num=%x(#{cmd}).chomp; + cmd = 'grep -F \'.' + x['name'].to_s + '\' ${match_servers} 2>/dev/null |awk -F \".\" \'{print \$1}\''; + server_num = %x(#{cmd}).chomp; if not server_num.empty? then #更新已有节点 cmd = 'sed -i \"/^' + server_num + '\./c\\#match#\" $match_servers 2>/dev/null'; @@ -315,7 +315,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " uci_add='uci -q add_list openclash.@servers[' + server_num + '].'; uci_del='uci -q delete openclash.@servers[' + server_num + '].'; cmd = uci_get + 'manual'; - if not %x(#{cmd}).chomp then + if not server_num then uci_commands << uci_set + 'manual=0'; end; else @@ -1329,10 +1329,10 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " threads << Thread.new{ #加入策略组 if '$servers_if_update' == '1' and '$config_group_exist' == '1' and '$servers_update' == '1' and server_num.empty? then - #新代理集且设置默认策略组时加入指定策略组 + #新代理且设置默认策略组时加入指定策略组 new_provider_groups = %x{uci get openclash.config.new_servers_group}.chomp.split(\"'\").map { |x| x.strip }.reject { |x| x.empty? }; new_provider_groups.each do |x| - uci_commands << uci_add + 'groups=\"' + x + '\"' + uci_commands << uci_add + 'groups=\"^' + x + '$\"' end elsif '$servers_if_update' != '1' then threads_gr = []; @@ -1345,7 +1345,7 @@ ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " z['proxies'].each{ |v| if v == x['name'] then - uci_commands << uci_add + 'groups=^\"' + z['name'] + '$\"' + uci_commands << uci_add + 'groups=\"^' + z['name'] + '$\"' break end } diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh index f39cd882ca..184ff62689 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh @@ -1577,7 +1577,7 @@ cat >> "$SERVER_FILE" <<-EOF - name: Bilibili type: select proxies: - - Asian TV + - CN Mainland TV - DIRECT EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null @@ -1615,20 +1615,6 @@ cat >> "$SERVER_FILE" <<-EOF EOF fi cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null -cat >> "$SERVER_FILE" <<-EOF - - name: HBO Go - type: select - proxies: - - Global TV - - DIRECT -EOF -cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null -if [ -f "/tmp/Proxy_Provider" ]; then -cat >> "$SERVER_FILE" <<-EOF - use: -EOF -fi -cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null cat >> "$SERVER_FILE" <<-EOF - name: Pornhub type: select @@ -1763,6 +1749,26 @@ cat >> "$SERVER_FILE" <<-EOF - REJECT - DIRECT - Proxy + - name: HTTPDNS + type: select + proxies: + - REJECT + - DIRECT + - Proxy +EOF +cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null +if [ -f "/tmp/Proxy_Provider" ]; then +cat >> "$SERVER_FILE" <<-EOF + use: +EOF +fi +cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null +cat >> "$SERVER_FILE" <<-EOF + - name: CN Mainland TV + type: select + proxies: + - DIRECT + - Proxy EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null if [ -f "/tmp/Proxy_Provider" ]; then @@ -1775,8 +1781,8 @@ cat >> "$SERVER_FILE" <<-EOF - name: Asian TV type: select proxies: - - DIRECT - Proxy + - DIRECT EOF cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null if [ -f "/tmp/Proxy_Provider" ]; then @@ -1879,12 +1885,12 @@ ${uci_set}rule_name="lhie1" ${uci_set}config="$CONFIG_NAME" ${uci_set}GlobalTV="Global TV" ${uci_set}AsianTV="Asian TV" +${uci_set}MainlandTV="CN Mainland TV" ${uci_set}Proxy="Proxy" ${uci_set}Youtube="Youtube" ${uci_set}Bilibili="Bilibili" ${uci_set}Bahamut="Bahamut" ${uci_set}HBOMax="HBO Max" -${uci_set}HBOGo="HBO Go" ${uci_set}Pornhub="Pornhub" ${uci_set}Apple="Apple" ${uci_set}AppleTV="Apple TV" @@ -1900,6 +1906,7 @@ ${uci_set}Spotify="Spotify" ${uci_set}Steam="Steam" ${uci_set}miHoYo="miHoYo" ${uci_set}AdBlock="AdBlock" +${uci_set}HTTPDNS="HTTPDNS" ${uci_set}Speedtest="Speedtest" ${uci_set}Telegram="Telegram" ${uci_set}Crypto="Crypto" @@ -1917,9 +1924,9 @@ ${uci_set}Others="Others" ${UCI_DEL_LIST}="Bilibili" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bilibili" >/dev/null 2>&1 ${UCI_DEL_LIST}="Bahamut" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bahamut" >/dev/null 2>&1 ${UCI_DEL_LIST}="HBO Max" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Max" >/dev/null 2>&1 - ${UCI_DEL_LIST}="HBO Go" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Go" >/dev/null 2>&1 ${UCI_DEL_LIST}="Pornhub" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Pornhub" >/dev/null 2>&1 ${UCI_DEL_LIST}="Asian TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Asian TV" >/dev/null 2>&1 + ${UCI_DEL_LIST}="CN Mainland TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="CN Mainland TV" >/dev/null 2>&1 ${UCI_DEL_LIST}="Global TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Global TV" >/dev/null 2>&1 ${UCI_DEL_LIST}="Netflix" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Netflix" >/dev/null 2>&1 ${UCI_DEL_LIST}="Discovery Plus" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discovery Plus" >/dev/null 2>&1 diff --git a/small/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh b/small/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh index 45aafced87..e498e16088 100644 --- a/small/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh +++ b/small/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh @@ -133,8 +133,6 @@ yml_gen_rule_provider_file() else if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ] || [ "$github_address_mod" == "https://fastly.jsdelivr.net/" ] || [ "$github_address_mod" == "https://testingcf.jsdelivr.net/" ]; then RULE_PROVIDER_FILE_URL="${github_address_mod}gh/"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"@master"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F 'master' '{print $2}')"" - elif [ "$github_address_mod" == "https://raw.fastgit.org/" ]; then - RULE_PROVIDER_FILE_URL="https://raw.fastgit.org/"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F '/master' '{print $1}' 2>/dev/null)"/master"$(echo "$RULE_PROVIDER_FILE_URL_PATH" |awk -F 'master' '{print $2}')"" else RULE_PROVIDER_FILE_URL="${github_address_mod}https://raw.githubusercontent.com/${RULE_PROVIDER_FILE_URL_PATH}" fi @@ -288,7 +286,6 @@ yml_other_set() config_foreach yml_rule_group_get "rule_provider_config" "$3" config_foreach yml_rule_group_get "rule_providers" "$3" config_foreach yml_rule_group_get "game_config" "$3" - local fake_ip="$(echo "${11}" |awk -F '/' '{print $1}')" ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " begin Value = YAML.load_file('$3'); @@ -312,73 +309,41 @@ yml_other_set() Value['rule-providers']=Value_1['rule-providers'] end end; - Value['script']=Value_1['script']; Value['rules']=Value_1['rules']; Value['rules'].to_a.collect!{|x| - x.to_s.gsub(/,[\s]?Bilibili,[\s]?Asian TV$/, ', Bilibili, $Bilibili#delete_') - .gsub(/,[\s]?Bahamut,[\s]?Global TV$/, ', Bahamut, $Bahamut#delete_') - .gsub(/,[\s]?HBO Max,[\s]?Global TV$/, ', HBO Max, $HBOMax#delete_') - .gsub(/,[\s]?HBO Go,[\s]?Global TV$/, ', HBO Go, $HBOGo#delete_') - .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ', Discovery Plus, $Discovery#delete_') - .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ', DAZN, $DAZN#delete_') - .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ', Pornhub, $Pornhub#delete_') - .gsub(/,[\s]?Global TV$/, ', $GlobalTV#delete_') - .gsub(/,[\s]?Asian TV$/, ', $AsianTV#delete_') - .gsub(/,[\s]?Proxy$/, ', $Proxy#delete_') - .gsub(/,[\s]?YouTube$/, ', $Youtube#delete_') - .gsub(/,[\s]?Apple$/, ', $Apple#delete_') - .gsub(/,[\s]?Apple TV$/, ', $AppleTV#delete_') - .gsub(/,[\s]?Scholar$/, ', $Scholar#delete_') - .gsub(/,[\s]?Netflix$/, ', $Netflix#delete_') - .gsub(/,[\s]?Disney$/, ', $Disney#delete_') - .gsub(/,[\s]?Spotify$/, ', $Spotify#delete_') - .gsub(/,[\s]?AI Suite$/, ', $AI_Suite#delete_') - .gsub(/,[\s]?Steam$/, ', $Steam#delete_') - .gsub(/,[\s]?miHoYo$/, ', $miHoYo#delete_') - .gsub(/,[\s]?AdBlock$/, ', $AdBlock#delete_') - .gsub(/,[\s]?Speedtest$/, ', $Speedtest#delete_') - .gsub(/,[\s]?Telegram$/, ', $Telegram#delete_') - .gsub(/,[\s]?Crypto$/, ', $Crypto#delete_') - .gsub(/,[\s]?Discord$/, ', $Discord#delete_') - .gsub(/,[\s]?Microsoft$/, ', $Microsoft#delete_') - .to_s.gsub(/,[\s]?PayPal$/, ', $PayPal#delete_') - .gsub(/,[\s]?Domestic$/, ', $Domestic#delete_') - .gsub(/,[\s]?Others$/, ', $Others#delete_') - .gsub(/,[\s]?Google FCM$/, ', $GoogleFCM#delete_') + x.to_s.gsub(/,[\s]?Bilibili,[\s]?CN Mainland TV$/, ',Bilibili,$Bilibili#delete_') + .gsub(/,[\s]?Bahamut,[\s]?Asian TV$/, ',Bahamut,$Bahamut#delete_') + .gsub(/,[\s]?Max,[\s]?Max$/, ',Max,$HBOMax#delete_') + .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ',Discovery Plus,$Discovery#delete_') + .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ',DAZN,$DAZN#delete_') + .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ',Pornhub,$Pornhub#delete_') + .gsub(/,[\s]?Global TV$/, ',$GlobalTV#delete_') + .gsub(/,[\s]?Asian TV$/, ',$AsianTV#delete_') + .gsub(/,[\s]?CN Mainland TV$/, ',$MainlandTV#delete_') + .gsub(/,[\s]?Proxy$/, ',$Proxy#delete_') + .gsub(/,[\s]?YouTube$/, ',$Youtube#delete_') + .gsub(/,[\s]?Apple$/, ',$Apple#delete_') + .gsub(/,[\s]?Apple TV$/, ',$AppleTV#delete_') + .gsub(/,[\s]?Scholar$/, ',$Scholar#delete_') + .gsub(/,[\s]?Netflix$/, ',$Netflix#delete_') + .gsub(/,[\s]?Disney$/, ',$Disney#delete_') + .gsub(/,[\s]?Spotify$/, ',$Spotify#delete_') + .gsub(/,[\s]?AI Suite$/, ',$AI_Suite#delete_') + .gsub(/,[\s]?Steam$/, ',$Steam#delete_') + .gsub(/,[\s]?miHoYo$/, ',$miHoYo#delete_') + .gsub(/,[\s]?AdBlock$/, ',$AdBlock#delete_') + .gsub(/,[\s]?HTTPDNS$/, ',$HTTPDNS#delete_') + .gsub(/,[\s]?Speedtest$/, ',$Speedtest#delete_') + .gsub(/,[\s]?Telegram$/, ',$Telegram#delete_') + .gsub(/,[\s]?Crypto$/, ',$Crypto#delete_') + .gsub(/,[\s]?Discord$/, ',$Discord#delete_') + .gsub(/,[\s]?Microsoft$/, ',$Microsoft#delete_') + .to_s.gsub(/,[\s]?PayPal$/, ',$PayPal#delete_') + .gsub(/,[\s]?Domestic$/, ',$Domestic#delete_') + .gsub(/,[\s]?Others$/, ',$Others#delete_') + .gsub(/,[\s]?Google FCM$/, ',$GoogleFCM#delete_') .gsub(/#delete_/, '') }; - Value['script']['code'].to_s.gsub!(/\'Bilibili\': \'Asian TV\'/,'\'Bilibili\': \'$Bilibili#delete_\'') - .gsub!(/\'Bahamut\': \'Global TV\'/,'\'Bahamut\': \'$Bahamut#delete_\'') - .gsub!(/\'HBO Max\': \'Global TV\'/,'\'HBO Max\': \'$HBOMax#delete_\'') - .gsub!(/\'HBO Go\': \'Global TV\'/,'\'HBO Go\': \'$HBOGo#delete_\'') - .gsub!(/\'Discovery Plus\': \'Global TV\'/,'\'Discovery Plus\': \'$Discovery#delete_\'') - .gsub!(/\'DAZN\': \'Global TV\'/,'\'DAZN\': \'$DAZN#delete_\'') - .gsub!(/\'Pornhub\': \'Global TV\'/,'\'Pornhub\': \'$Pornhub#delete_\'') - .gsub!(/: \'Global TV\'/,': \'$GlobalTV#delete_\'') - .gsub!(/: \'Asian TV\'/,': \'$AsianTV#delete_\'') - .gsub!(/: \'Proxy\'/,': \'$Proxy#delete_\'') - .gsub!(/: \'YouTube\'/,': \'$Youtube#delete_\'') - .gsub!(/: \'Apple\'/,': \'$Apple#delete_\'') - .gsub!(/: \'Apple TV\'/,': \'$AppleTV#delete_\'') - .gsub!(/: \'Scholar\'/,': \'$Scholar#delete_\'') - .gsub!(/: \'Netflix\'/,': \'$Netflix#delete_\'') - .gsub!(/: \'Disney\'/,': \'$Disney#delete_\'') - .gsub!(/: \'Spotify\'/,': \'$Spotify#delete_\'') - .gsub!(/: \'AI Suite\'/,': \'$AI_Suite#delete_\'') - .gsub!(/: \'Steam\'/,': \'$Steam#delete_\'') - .gsub!(/: \'miHoYo\'/,': \'$miHoYo#delete_\'') - .gsub!(/: \'AdBlock\'/,': \'$AdBlock#delete_\'') - .gsub!(/: \'Speedtest\'/,': \'$Speedtest#delete_\'') - .gsub!(/: \'Telegram\'/,': \'$Telegram#delete_\'') - .gsub!(/: \'Crypto\'/,': \'$Crypto#delete_\'') - .gsub!(/: \'Discord\'/,': \'$Discord#delete_\'') - .gsub!(/: \'Microsoft\'/,': \'$Microsoft#delete_\'') - .gsub!(/: \'PayPal\'/,': \'$PayPal#delete_\'') - .gsub!(/: \'Domestic\'/,': \'$Domestic#delete_\'') - .gsub!(/: \'Google FCM\'/,': \'$GoogleFCM#delete_\'') - .gsub!(/return \'Domestic\'$/, 'return \'$Domestic#delete_\'') - .gsub!(/return \'Others\'$/, 'return \'$Others#delete_\'') - .gsub!(/#delete_/, ''); end; rescue Exception => e YAML.LOG('Error: Set lhie1 Rules Failed,【' + e.message + '】'); @@ -436,19 +401,15 @@ yml_other_set() #Router Self Proxy Rule begin - if $6 == 0 and ${10} != 2 and '${12}' == 'fake-ip' then + if $6 == 0 and $8 != 2 and '$9' == 'fake-ip' then if Value.has_key?('rules') and not Value['rules'].to_a.empty? then - if Value['rules'].to_a.grep(/(?=.*SRC-IP-CIDR,'${fake_ip}')/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'SRC-IP-CIDR,${11},DIRECT'); - end if Value['rules'].to_a.grep(/(?=.*SRC-IP-CIDR,'$7')/).empty? and not '$7'.empty? then Value['rules']=Value['rules'].to_a.insert(0,'SRC-IP-CIDR,$7/32,DIRECT'); end; else - Value['rules']=['SRC-IP-CIDR,${11},DIRECT','SRC-IP-CIDR,$7/32,DIRECT']; + Value['rules']=['SRC-IP-CIDR,$7/32,DIRECT']; end; elsif Value.has_key?('rules') and not Value['rules'].to_a.empty? then - Value['rules'].delete('SRC-IP-CIDR,${11},DIRECT'); Value['rules'].delete('SRC-IP-CIDR,$7/32,DIRECT'); end; rescue Exception => e @@ -479,12 +440,7 @@ yml_other_set() end; if File::exist?('/tmp/yaml_rule_set_top_custom.yaml') then Value_1 = YAML.load_file('/tmp/yaml_rule_set_top_custom.yaml'); - if Value['rules'].to_a.grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).empty? then - Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(0,x)}; - else - ruby_add_index = Value['rules'].index(Value['rules'].grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).first); - Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(ruby_add_index + 1,x)}; - end; + Value_1['rules'].uniq.reverse.each{|x| Value['rules'].insert(0,x)}; end; else if File::exist?('/tmp/yaml_rule_set_top_custom.yaml') then @@ -658,25 +614,6 @@ yml_other_set() rescue Exception => e YAML.LOG('Error: Set Custom Rules Failed,【' + e.message + '】'); end; - - #loop prevent - begin - if Value.has_key?('rules') and not Value['rules'].to_a.empty? then - if Value['rules'].to_a.grep(/(?=.*'${fake_ip}')(?=.*REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'IP-CIDR,${11},REJECT,no-resolve'); - end; - if Value['rules'].to_a.grep(/(?=.*DST-PORT,'$8',REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'DST-PORT,$8,REJECT'); - end; - if Value['rules'].to_a.grep(/(?=.*DST-PORT,'$9',REJECT)/).empty? then - Value['rules']=Value['rules'].to_a.insert(0,'DST-PORT,$9,REJECT'); - end; - else - Value['rules']=['IP-CIDR,${11},REJECT,no-resolve','DST-PORT,$8,REJECT','DST-PORT,$9,REJECT']; - end; - rescue Exception => e - YAML.LOG('Error: Set Loop Protect Rules Failed,【' + e.message + '】'); - end; }; t2=Thread.new{ @@ -750,10 +687,6 @@ yml_other_set() if x['url'] and x['url'] =~ /^https:\/\/raw.githubusercontent.com/ then x['url'] = '$github_address_mod' + 'gh/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '@' + x['url'].split(x['url'].split('/')[2] + '/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/')[1]; end; - elsif '$github_address_mod' == 'https://raw.fastgit.org/' then - if x['url'] and x['url'] =~ /^https:\/\/raw.githubusercontent.com/ then - x['url'] = 'https://raw.fastgit.org/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/' + x['url'].split(x['url'].split('/')[2] + '/' + x['url'].split('/')[3] + '/' + x['url'].split('/')[4] + '/')[1]; - end; else if x['url'] and x['url'] =~ /^https:\/\/(raw.|gist.)(githubusercontent.com|github.com)/ then x['url'] = '$github_address_mod' + x['url']; @@ -871,12 +804,12 @@ yml_other_rules_get() config_get "rule_name" "$section" "rule_name" "" config_get "GlobalTV" "$section" "GlobalTV" "" config_get "AsianTV" "$section" "AsianTV" "" + config_get "MainlandTV" "$section" "MainlandTV" "DIRECT" config_get "Proxy" "$section" "Proxy" "" config_get "Youtube" "$section" "Youtube" "" config_get "Bilibili" "$section" "Bilibili" "" config_get "Bahamut" "$section" "Bahamut" "" config_get "HBOMax" "$section" "HBOMax" "$GlobalTV" - config_get "HBOGo" "$section" "HBOGo" "$GlobalTV" config_get "Pornhub" "$section" "Pornhub" "" config_get "Apple" "$section" "Apple" "" config_get "Scholar" "$section" "Scholar" "" @@ -885,6 +818,7 @@ yml_other_rules_get() config_get "Spotify" "$section" "Spotify" "" config_get "Steam" "$section" "Steam" "" config_get "AdBlock" "$section" "AdBlock" "" + config_get "HTTPDNS" "$section" "HTTPDNS" "REJECT" config_get "Netease_Music" "$section" "Netease_Music" "" config_get "Speedtest" "$section" "Speedtest" "" config_get "Telegram" "$section" "Telegram" "" @@ -912,18 +846,18 @@ if [ "$1" != "0" ]; then config_foreach yml_other_rules_get "other_rules" "$5" if [ -z "$rule_name" ]; then SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 #判断策略组是否存在 elif [ "$rule_name" = "lhie1" ]; then if [ -z "$(grep -F "$GlobalTV" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AsianTV" /tmp/Proxy_Group)" ]\ + || [ -z "$(grep -F "$MainlandTV" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Proxy" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Youtube" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Bilibili" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Bahamut" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$HBOMax" /tmp/Proxy_Group)" ]\ - || [ -z "$(grep -F "$HBOGo" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Pornhub" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Apple" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AppleTV" /tmp/Proxy_Group)" ]\ @@ -937,6 +871,7 @@ if [ "$1" != "0" ]; then || [ -z "$(grep -F "$Steam" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$miHoYo" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$AdBlock" /tmp/Proxy_Group)" ]\ + || [ -z "$(grep -F "$HTTPDNS" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Speedtest" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Telegram" /tmp/Proxy_Group)" ]\ || [ -z "$(grep -F "$Crypto" /tmp/Proxy_Group)" ]\ @@ -948,16 +883,16 @@ if [ "$1" != "0" ]; then || [ -z "$(grep -F "$Domestic" /tmp/Proxy_Group)" ]; then LOG_OUT "Warning: Because of The Different Porxy-Group's Name, Stop Setting The Other Rules!" SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 fi fi if [ -z "$Proxy" ]; then LOG_OUT "Error: Missing Porxy-Group's Name, Stop Setting The Other Rules!" SKIP_CUSTOM_OTHER_RULES=1 - yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" + yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" exit 0 fi fi -yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" +yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" diff --git a/small/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg b/small/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg index 4664f7519b..a245a36be4 100644 --- a/small/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg +++ b/small/luci-app-openclash/root/www/luci-static/resources/openclash/img/version.svg @@ -1 +1 @@ -Current Version: v0.00.00-betaCurrent Versionv0.00.00-beta \ No newline at end of file +Current Version: v0.00.00Current Versionv0.00.00 \ No newline at end of file diff --git a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index b185a4dbd7..fee631579c 100644 --- a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -146,7 +146,7 @@ end sources.write = dynamicList_write ---- TCP No Redir Ports -local TCP_NO_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_no_redir_ports") +local TCP_NO_REDIR_PORTS = m:get("@global_forwarding[0]", "tcp_no_redir_ports") o = s:option(Value, "tcp_no_redir_ports", translate("TCP No Redir Ports")) o:value("", translate("Use global config") .. "(" .. TCP_NO_REDIR_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -154,7 +154,7 @@ o:value("1:65535", translate("All")) o.validate = port_validate ---- UDP No Redir Ports -local UDP_NO_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_no_redir_ports") +local UDP_NO_REDIR_PORTS = m:get("@global_forwarding[0]", "udp_no_redir_ports") o = s:option(Value, "udp_no_redir_ports", translate("UDP No Redir Ports"), "" .. translate("Fill in the ports you don't want to be forwarded by the agent, with the highest priority.") .. @@ -203,7 +203,7 @@ o.value = "1" o:depends({ udp_node = "", ['!reverse'] = true }) ---- TCP Proxy Drop Ports -local TCP_PROXY_DROP_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_proxy_drop_ports") +local TCP_PROXY_DROP_PORTS = m:get("@global_forwarding[0]", "tcp_proxy_drop_ports") o = s:option(Value, "tcp_proxy_drop_ports", translate("TCP Proxy Drop Ports")) o:value("", translate("Use global config") .. "(" .. TCP_PROXY_DROP_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -212,7 +212,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- UDP Proxy Drop Ports -local UDP_PROXY_DROP_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_proxy_drop_ports") +local UDP_PROXY_DROP_PORTS = m:get("@global_forwarding[0]", "udp_proxy_drop_ports") o = s:option(Value, "udp_proxy_drop_ports", translate("UDP Proxy Drop Ports")) o:value("", translate("Use global config") .. "(" .. UDP_PROXY_DROP_PORTS .. ")") o:value("disable", translate("No patterns are used")) @@ -222,7 +222,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- TCP Redir Ports -local TCP_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "tcp_redir_ports") +local TCP_REDIR_PORTS = m:get("@global_forwarding[0]", "tcp_redir_ports") o = s:option(Value, "tcp_redir_ports", translate("TCP Redir Ports"), translatef("Only work with using the %s node.", "TCP")) o:value("", translate("Use global config") .. "(" .. TCP_REDIR_PORTS .. ")") o:value("1:65535", translate("All")) @@ -234,7 +234,7 @@ o:depends({ use_global_config = true }) o:depends({ _tcp_node_bool = "1" }) ---- UDP Redir Ports -local UDP_REDIR_PORTS = m.uci:get(appname, "@global_forwarding[0]", "udp_redir_ports") +local UDP_REDIR_PORTS = m:get("@global_forwarding[0]", "udp_redir_ports") o = s:option(Value, "udp_redir_ports", translate("UDP Redir Ports"), translatef("Only work with using the %s node.", "UDP")) o:value("", translate("Use global config") .. "(" .. UDP_REDIR_PORTS .. ")") o:value("1:65535", translate("All")) diff --git a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 4168039c24..620f3f5aa7 100644 --- a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -37,7 +37,7 @@ end local socks_list = {} -local tcp_socks_server = "127.0.0.1" .. ":" .. (m.uci:get(appname, "@global[0]", "tcp_node_socks_port") or "1070") +local tcp_socks_server = "127.0.0.1" .. ":" .. (m:get("@global[0]", "tcp_node_socks_port") or "1070") local socks_table = {} socks_table[#socks_table + 1] = { id = tcp_socks_server, @@ -594,7 +594,7 @@ o = s:taboption("DNS", Flag, "dns_redirect", translate("DNS Redirect"), translat o.default = "1" o.rmempty = false -if (m.uci:get(appname, "@global_forwarding[0]", "use_nft") or "0") == "1" then +if (m:get("@global_forwarding[0]", "use_nft") or "0") == "1" then o = s:taboption("DNS", Button, "clear_ipset", translate("Clear NFTSET"), translate("Try this feature if the rule modification does not take effect.")) else o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect.")) diff --git a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua index e3212bc792..e2fda69eaa 100644 --- a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua +++ b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua @@ -4,7 +4,7 @@ local appname = "passwall" m = Map(appname, translate("Node Config")) m.redirect = api.url() -if not arg[1] or not m.uci:get(appname, arg[1]) then +if not arg[1] or not m:get(arg[1]) then luci.http.redirect(api.url("node_list")) end diff --git a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua index 187beaaa3b..bc1ab22d87 100644 --- a/small/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua +++ b/small/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua @@ -22,7 +22,7 @@ o.rmempty = false local auto_switch_tip local current_node = api.get_cache_var("socks_" .. arg[1]) if current_node then - local n = m.uci:get_all(appname, current_node) + local n = m:get(current_node) if n then if tonumber(m:get(arg[1], "enable_autoswitch") or 0) == 1 then if n then diff --git a/small/luci-app-passwall/luasrc/passwall/util_xray.lua b/small/luci-app-passwall/luasrc/passwall/util_xray.lua index bd8ff36c42..c3ac56c205 100644 --- a/small/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/small/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -655,11 +655,21 @@ function gen_config(var) } } if inbound.sniffing.enabled == true then - inbound.sniffing.destOverride = {"http", "tls", "quic", (remote_dns_fake) and "fakedns"} + inbound.sniffing.destOverride = {"http", "tls", "quic"} inbound.sniffing.metadataOnly = false inbound.sniffing.routeOnly = xray_settings.sniffing_override_dest ~= "1" or nil inbound.sniffing.domainsExcluded = xray_settings.sniffing_override_dest == "1" and get_domain_excluded() or nil end + if remote_dns_fake then + inbound.sniffing.enabled = true + if not inbound.sniffing.destOverride then + inbound.sniffing.destOverride = {"fakedns"} + inbound.sniffing.metadataOnly = true + else + table.insert(inbound.sniffing.destOverride, "fakedns") + inbound.sniffing.metadataOnly = false + end + end if tcp_redir_port then local tcp_inbound = api.clone(inbound) diff --git a/small/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm b/small/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm index 5177cf8f7a..1df050c006 100644 --- a/small/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm +++ b/small/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm @@ -2,12 +2,12 @@ <% local api = require "luci.passwall.api" local appname = 'passwall' -local uci = self.map.uci -local ss_type = uci:get(appname, "@global_subscribe[0]", "ss_type") or "xray" -local trojan_type = uci:get(appname, "@global_subscribe[0]", "trojan_type") or "xray" -local vmess_type = uci:get(appname, "@global_subscribe[0]", "vmess_type") or "xray" -local vless_type = uci:get(appname, "@global_subscribe[0]", "vless_type") or "xray" -local hysteria2_type = uci:get(appname, "@global_subscribe[0]", "hysteria2_type") or "sing-box" +local map = self.map +local ss_type = map:get("@global_subscribe[0]", "ss_type") or "xray" +local trojan_type = map:get("@global_subscribe[0]", "trojan_type") or "xray" +local vmess_type = map:get("@global_subscribe[0]", "vmess_type") or "xray" +local vless_type = map:get("@global_subscribe[0]", "vless_type") or "xray" +local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sing-box" -%>