mirror of
https://github.com/bolucat/Archive.git
synced 2025-11-03 11:02:18 +08:00
Update On Mon Nov 18 19:38:12 CET 2024
This commit is contained in:
1
.github/update.log
vendored
1
.github/update.log
vendored
@@ -828,3 +828,4 @@ Update On Thu Nov 14 19:39:40 CET 2024
|
||||
Update On Fri Nov 15 19:36:45 CET 2024
|
||||
Update On Sat Nov 16 19:33:37 CET 2024
|
||||
Update On Sun Nov 17 19:33:17 CET 2024
|
||||
Update On Mon Nov 18 19:38:02 CET 2024
|
||||
|
||||
13
clash-meta/.github/workflows/build.yml
vendored
13
clash-meta/.github/workflows/build.yml
vendored
@@ -104,31 +104,24 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
if: ${{ matrix.jobs.goversion == '' && matrix.jobs.goarch != 'loong64' }}
|
||||
if: ${{ matrix.jobs.goversion == '' && matrix.jobs.abi != '1' }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Set up Go
|
||||
if: ${{ matrix.jobs.goversion != '' && matrix.jobs.goarch != 'loong64' }}
|
||||
if: ${{ matrix.jobs.goversion != '' && matrix.jobs.abi != '1' }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.jobs.goversion }}
|
||||
|
||||
- name: Set up Go1.22 loongarch abi1
|
||||
- name: Set up Go1.23 loongarch abi1
|
||||
if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '1' }}
|
||||
run: |
|
||||
wget -q https://github.com/MetaCubeX/loongarch64-golang/releases/download/1.23.0/go1.23.0.linux-amd64-abi1.tar.gz
|
||||
sudo tar zxf go1.23.0.linux-amd64-abi1.tar.gz -C /usr/local
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
|
||||
# - name: Set up Go1.22 loongarch abi2
|
||||
# if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '2' }}
|
||||
# run: |
|
||||
# wget -q https://github.com/MetaCubeX/loongarch64-golang/releases/download/1.22.4/go1.22.4.linux-amd64-abi2.tar.gz
|
||||
# sudo tar zxf go1.22.4.linux-amd64-abi2.tar.gz -C /usr/local
|
||||
# echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
|
||||
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
|
||||
# this patch file only works on golang1.23.x
|
||||
# that means after golang1.24 release it must be changed
|
||||
|
||||
@@ -34,12 +34,5 @@ func SkipAuthRemoteAddress(addr string) bool {
|
||||
}
|
||||
|
||||
func skipAuth(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range skipAuthPrefixes {
|
||||
if prefix.Contains(addr.Unmap()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(skipAuthPrefixes, addr)
|
||||
}
|
||||
|
||||
@@ -31,27 +31,17 @@ func IsRemoteAddrDisAllowed(addr net.Addr) bool {
|
||||
if err := m.SetRemoteAddr(addr); err != nil {
|
||||
return false
|
||||
}
|
||||
return isAllowed(m.AddrPort().Addr().Unmap()) && !isDisAllowed(m.AddrPort().Addr().Unmap())
|
||||
ipAddr := m.AddrPort().Addr()
|
||||
if ipAddr.IsValid() {
|
||||
return isAllowed(ipAddr) && !isDisAllowed(ipAddr)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func isAllowed(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range lanAllowedIPs {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(lanAllowedIPs, addr)
|
||||
}
|
||||
|
||||
func isDisAllowed(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range lanDisAllowedIPs {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(lanDisAllowedIPs, addr)
|
||||
}
|
||||
|
||||
@@ -61,3 +61,19 @@ func parseHTTPAddr(request *http.Request) *C.Metadata {
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
||||
func prefixesContains(prefixes []netip.Prefix, addr netip.Addr) bool {
|
||||
if len(prefixes) == 0 {
|
||||
return false
|
||||
}
|
||||
if !addr.IsValid() {
|
||||
return false
|
||||
}
|
||||
addr = addr.Unmap().WithZone("") // netip.Prefix.Contains returns false if ip has an IPv6 zone
|
||||
for _, prefix := range prefixes {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func (i *IPCIDR) Match(metadata *C.Metadata) (bool, string) {
|
||||
if i.isSourceIP {
|
||||
ip = metadata.SrcIP
|
||||
}
|
||||
return ip.IsValid() && i.ipnet.Contains(ip), i.adapter
|
||||
return ip.IsValid() && i.ipnet.Contains(ip.WithZone("")), i.adapter
|
||||
}
|
||||
|
||||
func (i *IPCIDR) Adapter() string {
|
||||
|
||||
4
clash-nyanpasu/backend/Cargo.lock
generated
4
clash-nyanpasu/backend/Cargo.lock
generated
@@ -7810,9 +7810,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
||||
|
||||
[[package]]
|
||||
name = "simd-json"
|
||||
version = "0.14.2"
|
||||
version = "0.14.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1df0290e9bfe79ddd5ff8798ca887cd107b75353d2957efe9777296e17f26b5"
|
||||
checksum = "aa2bcf6c6e164e81bc7a5d49fc6988b3d515d9e8c07457d7b74ffb9324b9cd40"
|
||||
dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
"halfbrown",
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
"@emotion/react": "11.13.3",
|
||||
"@iconify/json": "2.2.273",
|
||||
"@monaco-editor/react": "4.6.0",
|
||||
"@tanstack/react-router": "1.81.14",
|
||||
"@tanstack/router-devtools": "1.81.14",
|
||||
"@tanstack/react-router": "1.82.1",
|
||||
"@tanstack/router-devtools": "1.82.1",
|
||||
"@tanstack/router-plugin": "1.81.9",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0",
|
||||
"@tauri-apps/plugin-dialog": "2.0.1",
|
||||
@@ -79,7 +79,7 @@
|
||||
"monaco-yaml": "5.2.3",
|
||||
"nanoid": "5.0.8",
|
||||
"sass": "1.81.0",
|
||||
"shiki": "1.23.0",
|
||||
"shiki": "1.23.1",
|
||||
"tailwindcss-textshadow": "2.1.3",
|
||||
"unplugin-auto-import": "0.18.4",
|
||||
"unplugin-icons": "0.20.1",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 1,
|
||||
"latest": {
|
||||
"mihomo": "v1.18.10",
|
||||
"mihomo_alpha": "alpha-de19f92",
|
||||
"mihomo_alpha": "alpha-25b3c86",
|
||||
"clash_rs": "v0.7.1",
|
||||
"clash_premium": "2023-09-05-gdcc8d87",
|
||||
"clash_rs_alpha": "0.7.1-alpha+sha.5f2306a"
|
||||
@@ -69,5 +69,5 @@
|
||||
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
|
||||
}
|
||||
},
|
||||
"updated_at": "2024-11-14T22:20:48.929Z"
|
||||
"updated_at": "2024-11-17T22:20:55.383Z"
|
||||
}
|
||||
|
||||
98
clash-nyanpasu/pnpm-lock.yaml
generated
98
clash-nyanpasu/pnpm-lock.yaml
generated
@@ -218,7 +218,7 @@ importers:
|
||||
version: link:../ui
|
||||
'@tanstack/router-zod-adapter':
|
||||
specifier: 1.81.5
|
||||
version: 1.81.5(@tanstack/react-router@1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(zod@3.23.8)
|
||||
version: 1.81.5(@tanstack/react-router@1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(zod@3.23.8)
|
||||
'@tauri-apps/api':
|
||||
specifier: 2.1.1
|
||||
version: 2.1.1
|
||||
@@ -311,11 +311,11 @@ importers:
|
||||
specifier: 4.6.0
|
||||
version: 4.6.0(monaco-editor@0.52.0)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
'@tanstack/react-router':
|
||||
specifier: 1.81.14
|
||||
version: 1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
specifier: 1.82.1
|
||||
version: 1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
'@tanstack/router-devtools':
|
||||
specifier: 1.81.14
|
||||
version: 1.81.14(@tanstack/react-router@1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(csstype@3.1.3)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
specifier: 1.82.1
|
||||
version: 1.82.1(@tanstack/react-router@1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(csstype@3.1.3)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
'@tanstack/router-plugin':
|
||||
specifier: 1.81.9
|
||||
version: 1.81.9(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.81.0)(stylus@0.62.0)(terser@5.36.0))
|
||||
@@ -386,8 +386,8 @@ importers:
|
||||
specifier: 1.81.0
|
||||
version: 1.81.0
|
||||
shiki:
|
||||
specifier: 1.23.0
|
||||
version: 1.23.0
|
||||
specifier: 1.23.1
|
||||
version: 1.23.1
|
||||
tailwindcss-textshadow:
|
||||
specifier: 2.1.3
|
||||
version: 2.1.3
|
||||
@@ -2526,17 +2526,17 @@ packages:
|
||||
'@rushstack/ts-command-line@4.23.0':
|
||||
resolution: {integrity: sha512-jYREBtsxduPV6ptNq8jOKp9+yx0ld1Tb/Tkdnlj8gTjazl1sF3DwX2VbluyYrNd0meWIL0bNeer7WDf5tKFjaQ==}
|
||||
|
||||
'@shikijs/core@1.23.0':
|
||||
resolution: {integrity: sha512-J4Fo22oBlfRHAXec+1AEzcowv+Qdf4ZQkuP/X/UHYH9+KA9LvyFXSXyS+HxuBRFfon+u7bsmKdRBjoZlbDVRkQ==}
|
||||
'@shikijs/core@1.23.1':
|
||||
resolution: {integrity: sha512-NuOVgwcHgVC6jBVH5V7iblziw6iQbWWHrj5IlZI3Fqu2yx9awH7OIQkXIcsHsUmY19ckwSgUMgrqExEyP5A0TA==}
|
||||
|
||||
'@shikijs/engine-javascript@1.23.0':
|
||||
resolution: {integrity: sha512-CcrppseWShG+8Efp1iil9divltuXVdCaU4iu+CKvzTGZO5RmXyAiSx668M7VbX8+s/vt1ZKu75Vn/jWi8O3G/Q==}
|
||||
'@shikijs/engine-javascript@1.23.1':
|
||||
resolution: {integrity: sha512-i/LdEwT5k3FVu07SiApRFwRcSJs5QM9+tod5vYCPig1Ywi8GR30zcujbxGQFJHwYD7A5BUqagi8o5KS+LEVgBg==}
|
||||
|
||||
'@shikijs/engine-oniguruma@1.23.0':
|
||||
resolution: {integrity: sha512-gS8bZLqVvmZXX+E5JUMJICsBp+kx6gj79MH/UEpKHKIqnUzppgbmEn6zLa6mB5D+sHse2gFei3YYJxQe1EzZXQ==}
|
||||
'@shikijs/engine-oniguruma@1.23.1':
|
||||
resolution: {integrity: sha512-KQ+lgeJJ5m2ISbUZudLR1qHeH3MnSs2mjFg7bnencgs5jDVPeJ2NVDJ3N5ZHbcTsOIh0qIueyAJnwg7lg7kwXQ==}
|
||||
|
||||
'@shikijs/types@1.23.0':
|
||||
resolution: {integrity: sha512-HiwzsihRao+IbPk7FER/EQT/D0dEEK3n5LAtHDzL5iRT+JMblA7y9uitUnjEnHeLkKigNM+ZplrP7MuEyyc5kA==}
|
||||
'@shikijs/types@1.23.1':
|
||||
resolution: {integrity: sha512-98A5hGyEhzzAgQh2dAeHKrWW4HfCMeoFER2z16p5eJ+vmPeF6lZ/elEne6/UCU551F/WqkopqRsr1l2Yu6+A0g==}
|
||||
|
||||
'@shikijs/vscode-textmate@9.3.0':
|
||||
resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==}
|
||||
@@ -2705,8 +2705,8 @@ packages:
|
||||
resolution: {integrity: sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
'@tanstack/react-router@1.81.14':
|
||||
resolution: {integrity: sha512-+pzpblWgIUGXlyYlUAfGTZv7YfNOEMKupB5cP4CY9K/qu94D1qrUipjZ6PAqwj8yAwUDcBGam/AyzOLLTSNY5w==}
|
||||
'@tanstack/react-router@1.82.1':
|
||||
resolution: {integrity: sha512-C3+itdLVvEA3dOd/dYOrFSpqVBhWt/WUfjMWfda5lAGIxGkPM8Cv+7IE6P6LI80JOnUPGLpup23SShPD+cv3kw==}
|
||||
engines: {node: '>=12'}
|
||||
peerDependencies:
|
||||
'@tanstack/router-generator': 1.81.9
|
||||
@@ -2735,11 +2735,11 @@ packages:
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||
|
||||
'@tanstack/router-devtools@1.81.14':
|
||||
resolution: {integrity: sha512-nigYdVDLWC22tff4Z1gBT26R/RBpW/nhBR4Vgs/0kBLqcj+/DFjZK5Q1MS/xSUUTOR4AW4J9av5zpHNqGFgEYQ==}
|
||||
'@tanstack/router-devtools@1.82.1':
|
||||
resolution: {integrity: sha512-sIPuoqrnnFmAGMuCMuw9kMMbIdzZW6ecipTD87xk44VusLtm7Rb4IAIAc2Kr8e4rrKlbOmieQ1Qihte9/KVrrA==}
|
||||
engines: {node: '>=12'}
|
||||
peerDependencies:
|
||||
'@tanstack/react-router': ^1.81.14
|
||||
'@tanstack/react-router': ^1.82.1
|
||||
react: '>=18'
|
||||
react-dom: '>=18'
|
||||
|
||||
@@ -5919,8 +5919,8 @@ packages:
|
||||
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
oniguruma-to-es@0.1.2:
|
||||
resolution: {integrity: sha512-sBYKVJlIMB0WPO+tSu/NNB1ytSFeHyyJZ3Ayxfx3f/QUuXu0lvZk0VB4K7npmdlHSC0ldqanzh/sUSlAbgCTfw==}
|
||||
oniguruma-to-es@0.4.1:
|
||||
resolution: {integrity: sha512-rNcEohFz095QKGRovP/yqPIKc+nP+Sjs4YTHMv33nMePGKrq/r2eu9Yh4646M5XluGJsUnmwoXuiXE69KDs+fQ==}
|
||||
|
||||
open@8.4.2:
|
||||
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
|
||||
@@ -6512,8 +6512,8 @@ packages:
|
||||
regex-utilities@2.3.0:
|
||||
resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
|
||||
|
||||
regex@4.4.0:
|
||||
resolution: {integrity: sha512-uCUSuobNVeqUupowbdZub6ggI5/JZkYyJdDogddJr60L764oxC2pMZov1fQ3wM9bdyzUILDG+Sqx6NAKAz9rKQ==}
|
||||
regex@5.0.1:
|
||||
resolution: {integrity: sha512-gIS00E8eHNWONxofNKOhtlkwBQj/K39ZJamnvMEFH3pNKc06Zz2jtFXF/4ldAaJTzQNhMJU7b5+C7tTq2ukV7Q==}
|
||||
|
||||
regexp.prototype.flags@1.5.2:
|
||||
resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==}
|
||||
@@ -6861,8 +6861,8 @@ packages:
|
||||
shell-quote@1.8.1:
|
||||
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
|
||||
|
||||
shiki@1.23.0:
|
||||
resolution: {integrity: sha512-xfdu9DqPkIpExH29cmiTlgo0/jBki5la1Tkfhsv+Wu5TT3APLNHslR1acxuKJOCWqVdSc+pIbs/2ozjVRGppdg==}
|
||||
shiki@1.23.1:
|
||||
resolution: {integrity: sha512-8kxV9TH4pXgdKGxNOkrSMydn1Xf6It8lsle0fiqxf7a1149K1WGtdOu3Zb91T5r1JpvRPxqxU3C2XdZZXQnrig==}
|
||||
|
||||
side-channel@1.0.6:
|
||||
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
|
||||
@@ -9933,27 +9933,27 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
'@shikijs/core@1.23.0':
|
||||
'@shikijs/core@1.23.1':
|
||||
dependencies:
|
||||
'@shikijs/engine-javascript': 1.23.0
|
||||
'@shikijs/engine-oniguruma': 1.23.0
|
||||
'@shikijs/types': 1.23.0
|
||||
'@shikijs/engine-javascript': 1.23.1
|
||||
'@shikijs/engine-oniguruma': 1.23.1
|
||||
'@shikijs/types': 1.23.1
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@types/hast': 3.0.4
|
||||
hast-util-to-html: 9.0.3
|
||||
|
||||
'@shikijs/engine-javascript@1.23.0':
|
||||
'@shikijs/engine-javascript@1.23.1':
|
||||
dependencies:
|
||||
'@shikijs/types': 1.23.0
|
||||
'@shikijs/types': 1.23.1
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
oniguruma-to-es: 0.1.2
|
||||
oniguruma-to-es: 0.4.1
|
||||
|
||||
'@shikijs/engine-oniguruma@1.23.0':
|
||||
'@shikijs/engine-oniguruma@1.23.1':
|
||||
dependencies:
|
||||
'@shikijs/types': 1.23.0
|
||||
'@shikijs/types': 1.23.1
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
|
||||
'@shikijs/types@1.23.0':
|
||||
'@shikijs/types@1.23.1':
|
||||
dependencies:
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@types/hast': 3.0.4
|
||||
@@ -10100,7 +10100,7 @@ snapshots:
|
||||
dependencies:
|
||||
remove-accents: 0.5.0
|
||||
|
||||
'@tanstack/react-router@1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)':
|
||||
'@tanstack/react-router@1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)':
|
||||
dependencies:
|
||||
'@tanstack/history': 1.81.9
|
||||
'@tanstack/react-store': 0.5.6(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
@@ -10131,9 +10131,9 @@ snapshots:
|
||||
react: 19.0.0-rc.1
|
||||
react-dom: 19.0.0-rc.1(react@19.0.0-rc.1)
|
||||
|
||||
'@tanstack/router-devtools@1.81.14(@tanstack/react-router@1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(csstype@3.1.3)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)':
|
||||
'@tanstack/router-devtools@1.82.1(@tanstack/react-router@1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(csstype@3.1.3)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)':
|
||||
dependencies:
|
||||
'@tanstack/react-router': 1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
'@tanstack/react-router': 1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
clsx: 2.1.1
|
||||
goober: 2.1.16(csstype@3.1.3)
|
||||
react: 19.0.0-rc.1
|
||||
@@ -10173,9 +10173,9 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@tanstack/router-zod-adapter@1.81.5(@tanstack/react-router@1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(zod@3.23.8)':
|
||||
'@tanstack/router-zod-adapter@1.81.5(@tanstack/react-router@1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1))(zod@3.23.8)':
|
||||
dependencies:
|
||||
'@tanstack/react-router': 1.81.14(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
'@tanstack/react-router': 1.82.1(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
||||
zod: 3.23.8
|
||||
|
||||
'@tanstack/store@0.5.5': {}
|
||||
@@ -13751,10 +13751,10 @@ snapshots:
|
||||
dependencies:
|
||||
mimic-function: 5.0.1
|
||||
|
||||
oniguruma-to-es@0.1.2:
|
||||
oniguruma-to-es@0.4.1:
|
||||
dependencies:
|
||||
emoji-regex-xs: 1.0.0
|
||||
regex: 4.4.0
|
||||
regex: 5.0.1
|
||||
regex-recursion: 4.2.1
|
||||
|
||||
open@8.4.2:
|
||||
@@ -14297,7 +14297,7 @@ snapshots:
|
||||
|
||||
regex-utilities@2.3.0: {}
|
||||
|
||||
regex@4.4.0: {}
|
||||
regex@5.0.1: {}
|
||||
|
||||
regexp.prototype.flags@1.5.2:
|
||||
dependencies:
|
||||
@@ -14634,12 +14634,12 @@ snapshots:
|
||||
|
||||
shell-quote@1.8.1: {}
|
||||
|
||||
shiki@1.23.0:
|
||||
shiki@1.23.1:
|
||||
dependencies:
|
||||
'@shikijs/core': 1.23.0
|
||||
'@shikijs/engine-javascript': 1.23.0
|
||||
'@shikijs/engine-oniguruma': 1.23.0
|
||||
'@shikijs/types': 1.23.0
|
||||
'@shikijs/core': 1.23.1
|
||||
'@shikijs/engine-javascript': 1.23.1
|
||||
'@shikijs/engine-oniguruma': 1.23.1
|
||||
'@shikijs/types': 1.23.1
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@types/hast': 3.0.4
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .162
|
||||
LINUX_KERNEL_HASH-5.15.162 = 91bfc0ea152ce7b102a0b79d35a7c92843874ebf085c99d2ba8b4d85e62b1a7c
|
||||
LINUX_VERSION-5.15 = .173
|
||||
LINUX_KERNEL_HASH-5.15.173 = 8a4b2a47ccc9b208b2b6ed9a216ea1a5eb12852c723bec1a04de9e671a1d7da8
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.1 = .117
|
||||
LINUX_KERNEL_HASH-6.1.117 = a8fbffe691974a3bf6a21d34eefad71a64c2a1fcc4513218356f1a87e390788b
|
||||
LINUX_VERSION-6.1 = .118
|
||||
LINUX_KERNEL_HASH-6.1.118 = 010784bd7161c32c4cd68a423d4dcb14e4587677d238b2825a31fe012869224c
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .61
|
||||
LINUX_KERNEL_HASH-6.6.61 = 418fc24df9190f1c3ed9906dc3b7651c2a2eae5c1cb9ab4a6348e20faf047c0b
|
||||
LINUX_VERSION-6.6 = .62
|
||||
LINUX_KERNEL_HASH-6.6.62 = e2c35611775534941b9d4dd871f3ae5b988b6594dc9033b5ca784366e07d9336
|
||||
|
||||
@@ -46,6 +46,13 @@ define U-Boot/nanopi-r2s-rk3328
|
||||
friendlyarm_nanopi-neo3
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r2s-plus-rk3328
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=NanoPi R2S Plus
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2s-plus
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi-r1-plus-rk3328
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=Orange Pi R1 Plus
|
||||
@@ -355,6 +362,13 @@ define U-Boot/orangepi-5-rk3588s
|
||||
xunlong_orangepi-5
|
||||
endef
|
||||
|
||||
define U-Boot/rock5a-rk3588s
|
||||
$(U-Boot/rk3588/Default)
|
||||
NAME:=ROCK 5A
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-5a
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
nanopi-r3s-rk3566 \
|
||||
panther-x2-rk3566 \
|
||||
@@ -377,6 +391,7 @@ UBOOT_TARGETS := \
|
||||
nanopi-r6c-rk3588s \
|
||||
nanopi-r6s-rk3588s \
|
||||
orangepi-5-rk3588s \
|
||||
rock5a-rk3588s \
|
||||
dlfr100-rk3399 \
|
||||
h3399pc-rk3399 \
|
||||
fine3399-rk3399 \
|
||||
@@ -392,6 +407,7 @@ UBOOT_TARGETS := \
|
||||
xiaobao-nas-v1-rk3399 \
|
||||
nanopi-r2c-rk3328 \
|
||||
nanopi-r2s-rk3328 \
|
||||
nanopi-r2s-plus-rk3328 \
|
||||
orangepi-r1-plus-rk3328 \
|
||||
orangepi-r1-plus-lts-rk3328
|
||||
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
From d6a55cc9e7e7d44b4b357818a9690e05af5d87e2 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Bostandzhyan <jin@mediatomb.cc>
|
||||
Date: Fri, 1 Nov 2024 22:21:29 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
|
||||
|
||||
The R2S Plus is basically an R2S with additional eMMC.
|
||||
|
||||
The eMMC configuration for the DTS has been extracted and copied from
|
||||
rk3328-nanopi-r2.dts, v2017.09 branch from the friendlyarm/uboot-rockchip
|
||||
repository.
|
||||
|
||||
Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
|
||||
Link: https://lore.kernel.org/r/20240814170048.23816-2-jin@mediatomb.cc
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
[ upstream commit: b8c02878292200ebb5b4a8cfc9dbf227327908bd ]
|
||||
|
||||
(cherry picked from commit c9bf98827964441f4dd16faa45bd4046f472e693)
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
.../arm64/rockchip/rk3328-nanopi-r2s-plus.dts | 32 +++++++++++++++++++
|
||||
1 file changed, 32 insertions(+)
|
||||
create mode 100644 dts/upstream/src/arm64/rockchip/rk3328-nanopi-r2s-plus.dts
|
||||
|
||||
diff --git a/dts/upstream/src/arm64/rockchip/rk3328-nanopi-r2s-plus.dts b/dts/upstream/src/arm64/rockchip/rk3328-nanopi-r2s-plus.dts
|
||||
new file mode 100644
|
||||
index 000000000000..cb81ba3f23ff
|
||||
--- /dev/null
|
||||
+++ b/dts/upstream/src/arm64/rockchip/rk3328-nanopi-r2s-plus.dts
|
||||
@@ -0,0 +1,32 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * (C) Copyright 2018 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3328-nanopi-r2s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "friendlyarm,nanopi-r2s-plus", "rockchip,rk3328";
|
||||
+ model = "FriendlyElec NanoPi R2S Plus";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc1 = &emmc;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ disable-wp;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
+ supports-emmc;
|
||||
+ status = "okay";
|
||||
+};
|
||||
From 3133b7c645157846590f6fc16e26f54d70f5e1d6 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Fri, 1 Nov 2024 22:21:30 +0000
|
||||
Subject: [PATCH] board: rockchip: Add FriendlyElec NanoPi R2S Plus
|
||||
|
||||
The FriendlyElec NanoPi R2S Plus is a single-board computer based on
|
||||
Rockchip RK3328 SoC. It features e.g. 1 GB DDR4 RAM, 32 GB eMMC,
|
||||
SD-card, 2x GbE LAN, optional M.2 SDIO Wi-Fi and 2x USB 2.0 host.
|
||||
|
||||
Features tested on a NanoPi R2S Plus 2309:
|
||||
- SD-card boot
|
||||
- eMMC boot
|
||||
- Ethernet
|
||||
- USB gadget
|
||||
- USB host
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
.../dts/rk3328-nanopi-r2s-plus-u-boot.dtsi | 3 +
|
||||
board/rockchip/evb_rk3328/MAINTAINERS | 6 +
|
||||
configs/nanopi-r2s-plus-rk3328_defconfig | 108 ++++++++++++++++++
|
||||
doc/board/rockchip/rockchip.rst | 1 +
|
||||
4 files changed, 118 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3328-nanopi-r2s-plus-u-boot.dtsi
|
||||
create mode 100644 configs/nanopi-r2s-plus-rk3328_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2s-plus-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-plus-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..2ab32cf00a1d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2s-plus-u-boot.dtsi
|
||||
@@ -0,0 +1,3 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+#include "rk3328-nanopi-r2s-u-boot.dtsi"
|
||||
diff --git a/board/rockchip/evb_rk3328/MAINTAINERS b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
index 8f619e54e0e7..5f81be55b8e0 100644
|
||||
--- a/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
@@ -28,6 +28,12 @@ F: configs/nanopi-r2s-rk3328_defconfig
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s.dts
|
||||
|
||||
+NANOPI-R2S-PLUS-RK3328
|
||||
+M: Jonas Karlman <jonas@kwiboo.se>
|
||||
+S: Maintained
|
||||
+F: configs/nanopi-r2s-plus-rk3328_defconfig
|
||||
+F: arch/arm/dts/rk3328-nanopi-r2s-plus-u-boot.dtsi
|
||||
+
|
||||
ORANGEPI-R1-PLUS-RK3328
|
||||
M: Tianling Shen <cnsztl@gmail.com>
|
||||
S: Maintained
|
||||
diff --git a/configs/nanopi-r2s-plus-rk3328_defconfig b/configs/nanopi-r2s-plus-rk3328_defconfig
|
||||
new file mode 100644
|
||||
index 000000000000..6e6785fcc882
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r2s-plus-rk3328_defconfig
|
||||
@@ -0,0 +1,108 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SPL_GPIO=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3328-nanopi-r2s-plus"
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_ROCKCHIP_RK3328=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2s-plus.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_POWER=y
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_ROCKUSB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_TPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_TPL_OF_PLATDATA=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=0
|
||||
+CONFIG_TPL_DM=y
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_TPL_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_TPL_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_PHY_MOTORCOMM=y
|
||||
+CONFIG_PHY_REALTEK=y
|
||||
+CONFIG_DM_MDIO=y
|
||||
+CONFIG_DM_ETH_PHY=y
|
||||
+CONFIG_PHY_GIGE=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_SPL_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_TPL_RAM=y
|
||||
+CONFIG_DM_RNG=y
|
||||
+CONFIG_RNG_ROCKCHIP=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_SYSINFO=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_TPL_SYSRESET is not set
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_DM_USB_GADGET=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_GENERIC=y
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
+CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_TPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
|
||||
index 3056e071f4ff..9bab86d23479 100644
|
||||
--- a/doc/board/rockchip/rockchip.rst
|
||||
+++ b/doc/board/rockchip/rockchip.rst
|
||||
@@ -65,6 +65,7 @@ List of mainline supported Rockchip boards:
|
||||
- FriendlyElec NanoPi R2C (nanopi-r2c-rk3328)
|
||||
- FriendlyElec NanoPi R2C Plus (nanopi-r2c-plus-rk3328)
|
||||
- FriendlyElec NanoPi R2S (nanopi-r2s-rk3328)
|
||||
+ - FriendlyElec NanoPi R2S Plus (nanopi-r2s-plus-rk3328)
|
||||
- Pine64 Rock64 (rock64-rk3328)
|
||||
- Radxa ROCK Pi E (rock-pi-e-rk3328)
|
||||
- Xunlong Orange Pi R1 Plus (orangepi-r1-plus-rk3328)
|
||||
@@ -147,7 +147,7 @@ Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
genlmsg_end(msg, hdr);
|
||||
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,115) && LINUX_VERSION_IS_LESS(6,1,999)
|
||||
+#if (LINUX_VERSION_IS_GEQ(6,1,115) && LINUX_VERSION_IS_LESS(6,1,999)) || ((LINUX_VERSION_IS_GEQ(5,15,170) && LINUX_VERSION_IS_LESS(5,15,999)))
|
||||
+ genlmsg_multicast_allns(&nl80211_fam, msg, 0,
|
||||
+ NL80211_MCGRP_REGULATORY);
|
||||
+#else
|
||||
@@ -163,7 +163,7 @@ Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
genlmsg_end(msg, hdr);
|
||||
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,115) && LINUX_VERSION_IS_LESS(6,1,999)
|
||||
+#if (LINUX_VERSION_IS_GEQ(6,1,115) && LINUX_VERSION_IS_LESS(6,1,999)) || ((LINUX_VERSION_IS_GEQ(5,15,170) && LINUX_VERSION_IS_LESS(5,15,999)))
|
||||
+ genlmsg_multicast_allns(&nl80211_fam, msg, 0,
|
||||
+ NL80211_MCGRP_REGULATORY);
|
||||
+#else
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1404,6 +1407,9 @@
|
||||
@@ -1405,6 +1408,9 @@
|
||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
|
||||
/*
|
||||
* A cached value of the page's pageblock's migratetype, used when the page is
|
||||
* put on a pcplist. Used to avoid the pageblock migratetype lookup when
|
||||
@@ -2095,12 +2116,13 @@ __rmqueue(struct zone *zone, unsigned in
|
||||
@@ -2094,12 +2115,13 @@ __rmqueue(struct zone *zone, unsigned in
|
||||
if (IS_ENABLED(CONFIG_CMA)) {
|
||||
/*
|
||||
* Balance movable allocations between regular and CMA areas by
|
||||
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
|
||||
|
||||
--- a/mm/mempolicy.c
|
||||
+++ b/mm/mempolicy.c
|
||||
@@ -2974,7 +2974,9 @@ void __init numa_policy_init(void)
|
||||
@@ -2963,7 +2963,9 @@ void __init numa_policy_init(void)
|
||||
/* Reset policy of current process to default */
|
||||
void numa_default_policy(void)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2992,7 +2994,6 @@ static const char * const policy_modes[]
|
||||
@@ -2981,7 +2983,6 @@ static const char * const policy_modes[]
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
|
||||
/**
|
||||
* mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option.
|
||||
* @str: string containing mempolicy to parse
|
||||
@@ -3005,13 +3006,18 @@ static const char * const policy_modes[]
|
||||
@@ -2994,13 +2995,18 @@ static const char * const policy_modes[]
|
||||
*/
|
||||
int mpol_parse_str(char *str, struct mempolicy **mpol)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
|
||||
if (flags)
|
||||
*flags++ = '\0'; /* terminate mode string */
|
||||
|
||||
@@ -3090,9 +3096,16 @@ int mpol_parse_str(char *str, struct mem
|
||||
@@ -3079,9 +3085,16 @@ int mpol_parse_str(char *str, struct mem
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
|
||||
|
||||
/*
|
||||
* Save nodes for mpol_to_str() to show the tmpfs mount options
|
||||
@@ -3125,7 +3138,29 @@ out:
|
||||
@@ -3114,7 +3127,29 @@ out:
|
||||
*mpol = new;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
endmenu
|
||||
--- a/mm/huge_memory.c
|
||||
+++ b/mm/huge_memory.c
|
||||
@@ -2366,7 +2366,8 @@ static void __split_huge_page_tail(struc
|
||||
@@ -2362,7 +2362,8 @@ static void __split_huge_page_tail(struc
|
||||
#ifdef CONFIG_64BIT
|
||||
(1L << PG_arch_2) |
|
||||
#endif
|
||||
@@ -594,7 +594,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -5179,6 +5179,7 @@ static void __mem_cgroup_free(struct mem
|
||||
@@ -5199,6 +5199,7 @@ static void __mem_cgroup_free(struct mem
|
||||
|
||||
static void mem_cgroup_free(struct mem_cgroup *memcg)
|
||||
{
|
||||
@@ -602,17 +602,17 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
memcg_wb_domain_exit(memcg);
|
||||
__mem_cgroup_free(memcg);
|
||||
}
|
||||
@@ -5242,6 +5243,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
memcg->deferred_split_queue.split_queue_len = 0;
|
||||
#endif
|
||||
@@ -5262,6 +5263,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
spin_lock(&memcg_idr_lock);
|
||||
idr_replace(&mem_cgroup_idr, memcg, memcg->id.id);
|
||||
spin_unlock(&memcg_idr_lock);
|
||||
+ lru_gen_init_memcg(memcg);
|
||||
return memcg;
|
||||
fail:
|
||||
mem_cgroup_id_remove(memcg);
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -4805,6 +4805,27 @@ static inline void mm_account_fault(stru
|
||||
@@ -4821,6 +4821,27 @@ static inline void mm_account_fault(stru
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/*
|
||||
* By the time we get here, we already hold the mm semaphore
|
||||
*
|
||||
@@ -4836,11 +4857,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||
@@ -4852,11 +4873,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||
if (flags & FAULT_FLAG_USER)
|
||||
mem_cgroup_enter_user_fault();
|
||||
|
||||
|
||||
@@ -195,20 +195,37 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
|
||||
return connmark_tg_shift(skb, info);
|
||||
}
|
||||
@@ -167,6 +194,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.targetsize = sizeof(struct xt_connmark_tginfo2),
|
||||
@@ -168,6 +195,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.destroy = connmark_tg_destroy,
|
||||
.me = THIS_MODULE,
|
||||
+ },
|
||||
},
|
||||
+ {
|
||||
+ .name = "CONNMARK",
|
||||
+ .revision = 3,
|
||||
+ .family = NFPROTO_UNSPEC,
|
||||
+ .family = NFPROTO_IPV4,
|
||||
+ .checkentry = connmark_tg_check,
|
||||
+ .target = connmark_tg_v3,
|
||||
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
|
||||
+ .destroy = connmark_tg_destroy,
|
||||
+ .me = THIS_MODULE,
|
||||
}
|
||||
+ },
|
||||
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
|
||||
{
|
||||
.name = "CONNMARK",
|
||||
@@ -189,6 +226,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.destroy = connmark_tg_destroy,
|
||||
.me = THIS_MODULE,
|
||||
},
|
||||
+ {
|
||||
+ .name = "CONNMARK",
|
||||
+ .revision = 3,
|
||||
+ .family = NFPROTO_IPV6,
|
||||
+ .checkentry = connmark_tg_check,
|
||||
+ .target = connmark_tg_v3,
|
||||
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
|
||||
+ .destroy = connmark_tg_destroy,
|
||||
+ .me = THIS_MODULE,
|
||||
+ },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From f7982c726e02001afc19052fe48f642dfcbc00b2 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Tremblay <vincent@vtremblay.dev>
|
||||
Date: Mon, 26 Dec 2022 21:10:37 -0500
|
||||
Subject: [PATCH 1/2] spidev: Add Silicon Labs EM3581 device compatible
|
||||
|
||||
Add compatible string for Silicon Labs EM3581 device.
|
||||
|
||||
Note: This patch is adapted from a patch submitted to the for-next branch (v6.3).
|
||||
|
||||
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
||||
---
|
||||
drivers/spi/spidev.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -691,6 +691,7 @@ static const struct spi_device_id spidev
|
||||
{ .name = "m53cpld" },
|
||||
{ .name = "spi-petra" },
|
||||
{ .name = "spi-authenta" },
|
||||
+ { .name = "em3581" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, spidev_spi_ids);
|
||||
@@ -705,6 +706,7 @@ static const struct of_device_id spidev_
|
||||
{ .compatible = "menlo,m53cpld" },
|
||||
{ .compatible = "cisco,spi-petra" },
|
||||
{ .compatible = "micron,spi-authenta" },
|
||||
+ { .compatible = "silabs,em3581" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -692,6 +692,7 @@ static const struct spi_device_id spidev
|
||||
@@ -693,6 +693,7 @@ static const struct spi_device_id spidev
|
||||
{ .name = "spi-petra" },
|
||||
{ .name = "spi-authenta" },
|
||||
{ .name = "em3581" },
|
||||
@@ -22,11 +22,11 @@ Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, spidev_spi_ids);
|
||||
@@ -707,6 +708,7 @@ static const struct of_device_id spidev_
|
||||
{ .compatible = "cisco,spi-petra" },
|
||||
{ .compatible = "micron,spi-authenta" },
|
||||
{ .compatible = "silabs,em3581" },
|
||||
+ { .compatible = "silabs,si3210" },
|
||||
@@ -722,6 +723,7 @@ static const struct of_device_id spidev_
|
||||
{ .compatible = "rohm,dh2228fv", .data = &spidev_of_check },
|
||||
{ .compatible = "semtech,sx1301", .data = &spidev_of_check },
|
||||
{ .compatible = "silabs,em3581", .data = &spidev_of_check },
|
||||
+ { .compatible = "silabs,si3210", .data = &spidev_of_check },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1424,6 +1424,9 @@ static const struct usb_device_id produc
|
||||
{QMI_FIXED_INTF(0x2692, 0x9025, 4)}, /* Cellient MPL200 (rebranded Qualcomm 05c6:9025) */
|
||||
{QMI_QUIRK_SET_DTR(0x1546, 0x1342, 4)}, /* u-blox LARA-L6 */
|
||||
{QMI_QUIRK_SET_DTR(0x33f8, 0x0104, 4)}, /* Rolling RW101 RMNET */
|
||||
+ {QMI_FIXED_INTF(0x2077, 0x2002, 4)}, /* T&W TW04C */
|
||||
+ {QMI_FIXED_INTF(0x2077, 0x2003, 4)}, /* T&W TW12G */
|
||||
+ {QMI_FIXED_INTF(0x2077, 0x2004, 4)}, /* T&W TW510M */
|
||||
|
||||
/* 4. Gobi 1000 devices */
|
||||
{QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -2310,9 +2310,13 @@ static const struct usb_device_id option
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a06, 0xff) }, /* Fibocom FM650-CN (RNDIS mode) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a07, 0xff) }, /* Fibocom FM650-CN (MBIM mode) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1402, 0xff) }, /* GosunCn GM800 (Download mode) */
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1403, 0xff) }, /* GosunCn GM800 (rmnet, old) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1421, 0xff) }, /* GosunCn GM800 (rmnet) */
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1422, 0xff) }, /* GosunCn GM800 (EAP) */
|
||||
{ USB_DEVICE(0x33f8, 0x0104), /* Rolling RW101-GL (laptop RMNET) */
|
||||
.driver_info = RSVD(4) | RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x01a2, 0xff) }, /* Rolling RW101-GL (laptop MBIM) */
|
||||
@@ -11,6 +11,7 @@ board_config_update
|
||||
case $board in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r2s-plus|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r6c|\
|
||||
sharevdi,guangmiao-g4c|\
|
||||
|
||||
@@ -15,6 +15,7 @@ rockchip_setup_interfaces()
|
||||
ezpro,mrkaio-m68s-plus|\
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r2s-plus|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r4se|\
|
||||
friendlyarm,nanopi-r6c|\
|
||||
@@ -107,6 +108,7 @@ rockchip_setup_macs()
|
||||
friendlyarm,nanopc-t6|\
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r2s-plus|\
|
||||
hinlink,opc-h28k|\
|
||||
hinlink,opc-h66k|\
|
||||
hinlink,opc-h68k|\
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdmmc0;
|
||||
mmc1 = &sdhci;
|
||||
|
||||
led-boot = &power_led;
|
||||
led-failsafe = &power_led;
|
||||
led-running = &power_led;
|
||||
led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
|
||||
@@ -0,0 +1,790 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Radxa ROCK 5A";
|
||||
compatible = "radxa,rock-5a", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
|
||||
led-boot = &status_led;
|
||||
led-failsafe = &status_led;
|
||||
led-running = &status_led;
|
||||
led-upgrade = &status_led;
|
||||
};
|
||||
|
||||
analog-sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "rk3588-es8316";
|
||||
|
||||
widgets = "Microphone", "Mic Jack",
|
||||
"Headphone", "Headphones";
|
||||
|
||||
routing = "MIC2", "Mic Jack",
|
||||
"Headphones", "HPOL",
|
||||
"Headphones", "HPOR";
|
||||
|
||||
dais = <&i2s0_8ch_p0>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&io_led>;
|
||||
|
||||
status_led: io-led {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 95 145 195 255>;
|
||||
fan-supply = <&vcc_5v0>;
|
||||
pwms = <&pwm3 0 50000 0>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
vcc3v3_wf: vcc3v3-wf-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_wf";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&pow_en>;
|
||||
pinctrl-names = "default";
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc_5v0: vcc-5v0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc_5v0_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
eeprom: eeprom@50 {
|
||||
compatible = "belling,bl24c16a", "atmel,24c16";
|
||||
reg = <0x50>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c5m2_xfer>;
|
||||
};
|
||||
|
||||
&i2c7 {
|
||||
status = "okay";
|
||||
|
||||
es8316: audio-codec@11 {
|
||||
compatible = "everest,es8316";
|
||||
reg = <0x11>;
|
||||
clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
clock-names = "mclk";
|
||||
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
assigned-clock-rates = <12288000>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
port {
|
||||
es8316_p0_0: endpoint {
|
||||
remote-endpoint = <&i2s0_8ch_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s0_lrck
|
||||
&i2s0_mclk
|
||||
&i2s0_sclk
|
||||
&i2s0_sdi0
|
||||
&i2s0_sdo0>;
|
||||
status = "okay";
|
||||
|
||||
i2s0_8ch_p0: port {
|
||||
i2s0_8ch_p0_0: endpoint {
|
||||
dai-format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
remote-endpoint = <&es8316_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-mode = "rgmii";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
tx_delay = <0x3a>;
|
||||
rx_delay = <0x3e>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
/* RTL8211F */
|
||||
compatible = "ethernet-phy-id001c.c916";
|
||||
reg = <0x1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtl8211f_rst>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
pinctrl-0 = <&pcie20x1m0_pins>;
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_wf>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
leds {
|
||||
io_led: io-led {
|
||||
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie {
|
||||
pow_en: pow-en {
|
||||
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
power {
|
||||
vcc_5v0_en: vcc-5v0-en {
|
||||
rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
rtl8211f {
|
||||
rtl8211f_rst: rtl8211f-rst {
|
||||
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3m1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sfc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&fspim0_pins>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <104000000>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-tx-bus-width = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
num-cs = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
reg = <0x0>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
spi-max-frequency = <1000000>;
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-name = "vdd_log_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-name = "vccio_sd_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-name = "pldo6_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
status = "okay";
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
};
|
||||
|
||||
&u2phy3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3_host {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
status = "okay";
|
||||
rockchip,dp-lane-mux = <2 3>;
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -164,6 +164,16 @@ define Device/friendlyarm_nanopi-r2s
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2s
|
||||
|
||||
define Device/friendlyarm_nanopi-r2s-plus
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2S Plus
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := nanopi-r2s-plus-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2s-plus
|
||||
|
||||
define Device/friendlyarm_nanopi-r3s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R3S
|
||||
@@ -374,6 +384,16 @@ define Device/radxa_rock-pi-4
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-pi-4
|
||||
|
||||
define Device/radxa_rock-5a
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := ROCK 5A
|
||||
SOC := rk3588s
|
||||
UBOOT_DEVICE_NAME := rock5a-rk3588s
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-hwmon-pwmfan
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-5a
|
||||
|
||||
define Device/rongpin_king3399
|
||||
DEVICE_VENDOR := Rongpin
|
||||
DEVICE_MODEL := King3399
|
||||
|
||||
@@ -25,7 +25,6 @@ Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de
|
||||
.../boot/dts/rockchip/rk3588s-indiedroid-nova.dts | 1 -
|
||||
.../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 13 +++++++++++++
|
||||
13 files changed, 13 insertions(+), 19 deletions(-)
|
||||
|
||||
@@ -95,16 +94,6 @@ Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -14,7 +14,6 @@
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
analog-sound {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -18,6 +18,19 @@
|
||||
|
||||
@@ -36,9 +36,9 @@ to status_led in accordance with the board schematics.
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-neo3.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
|
||||
|
||||
13
mihomo/.github/workflows/build.yml
vendored
13
mihomo/.github/workflows/build.yml
vendored
@@ -104,31 +104,24 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
if: ${{ matrix.jobs.goversion == '' && matrix.jobs.goarch != 'loong64' }}
|
||||
if: ${{ matrix.jobs.goversion == '' && matrix.jobs.abi != '1' }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Set up Go
|
||||
if: ${{ matrix.jobs.goversion != '' && matrix.jobs.goarch != 'loong64' }}
|
||||
if: ${{ matrix.jobs.goversion != '' && matrix.jobs.abi != '1' }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.jobs.goversion }}
|
||||
|
||||
- name: Set up Go1.22 loongarch abi1
|
||||
- name: Set up Go1.23 loongarch abi1
|
||||
if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '1' }}
|
||||
run: |
|
||||
wget -q https://github.com/MetaCubeX/loongarch64-golang/releases/download/1.23.0/go1.23.0.linux-amd64-abi1.tar.gz
|
||||
sudo tar zxf go1.23.0.linux-amd64-abi1.tar.gz -C /usr/local
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
|
||||
# - name: Set up Go1.22 loongarch abi2
|
||||
# if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '2' }}
|
||||
# run: |
|
||||
# wget -q https://github.com/MetaCubeX/loongarch64-golang/releases/download/1.22.4/go1.22.4.linux-amd64-abi2.tar.gz
|
||||
# sudo tar zxf go1.22.4.linux-amd64-abi2.tar.gz -C /usr/local
|
||||
# echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
|
||||
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
|
||||
# this patch file only works on golang1.23.x
|
||||
# that means after golang1.24 release it must be changed
|
||||
|
||||
@@ -34,12 +34,5 @@ func SkipAuthRemoteAddress(addr string) bool {
|
||||
}
|
||||
|
||||
func skipAuth(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range skipAuthPrefixes {
|
||||
if prefix.Contains(addr.Unmap()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(skipAuthPrefixes, addr)
|
||||
}
|
||||
|
||||
@@ -31,27 +31,17 @@ func IsRemoteAddrDisAllowed(addr net.Addr) bool {
|
||||
if err := m.SetRemoteAddr(addr); err != nil {
|
||||
return false
|
||||
}
|
||||
return isAllowed(m.AddrPort().Addr().Unmap()) && !isDisAllowed(m.AddrPort().Addr().Unmap())
|
||||
ipAddr := m.AddrPort().Addr()
|
||||
if ipAddr.IsValid() {
|
||||
return isAllowed(ipAddr) && !isDisAllowed(ipAddr)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func isAllowed(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range lanAllowedIPs {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(lanAllowedIPs, addr)
|
||||
}
|
||||
|
||||
func isDisAllowed(addr netip.Addr) bool {
|
||||
if addr.IsValid() {
|
||||
for _, prefix := range lanDisAllowedIPs {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return prefixesContains(lanDisAllowedIPs, addr)
|
||||
}
|
||||
|
||||
@@ -61,3 +61,19 @@ func parseHTTPAddr(request *http.Request) *C.Metadata {
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
||||
func prefixesContains(prefixes []netip.Prefix, addr netip.Addr) bool {
|
||||
if len(prefixes) == 0 {
|
||||
return false
|
||||
}
|
||||
if !addr.IsValid() {
|
||||
return false
|
||||
}
|
||||
addr = addr.Unmap().WithZone("") // netip.Prefix.Contains returns false if ip has an IPv6 zone
|
||||
for _, prefix := range prefixes {
|
||||
if prefix.Contains(addr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func (i *IPCIDR) Match(metadata *C.Metadata) (bool, string) {
|
||||
if i.isSourceIP {
|
||||
ip = metadata.SrcIP
|
||||
}
|
||||
return ip.IsValid() && i.ipnet.Contains(ip), i.adapter
|
||||
return ip.IsValid() && i.ipnet.Contains(ip.WithZone("")), i.adapter
|
||||
}
|
||||
|
||||
func (i *IPCIDR) Adapter() string {
|
||||
|
||||
@@ -354,7 +354,9 @@ function store_action(param)
|
||||
uci:set("istore", "istore", "last_path", autopath)
|
||||
uci:commit("istore")
|
||||
end
|
||||
if autoenable ~= nil then
|
||||
autoenv = autoenv .. " enable=" .. autoenable
|
||||
end
|
||||
code, out, err = _action(myopkg, luci.util.shellquote(autoenv), action, metapkg)
|
||||
else
|
||||
code, out, err = _action(myopkg, action, metapkg)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.78-4
|
||||
PKG_RELEASE:=
|
||||
PKG_VERSION:=24.11.18
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
||||
|
||||
@@ -927,11 +927,9 @@ function gen_config(var)
|
||||
if node.protocol == "_shunt" then
|
||||
local rules = {}
|
||||
|
||||
local preproxy_enabled = node.preproxy_enabled == "1"
|
||||
local preproxy_rule_name = "main"
|
||||
local preproxy_tag = "main"
|
||||
local preproxy_node_id = node["main_node"]
|
||||
local preproxy_node = preproxy_enabled and preproxy_node_id and uci:get_all(appname, preproxy_node_id) or nil
|
||||
local preproxy_rule_name = node.preproxy_enabled == "1" and "main" or nil
|
||||
local preproxy_tag = preproxy_rule_name
|
||||
local preproxy_node_id = preproxy_rule_name and node["main_node"] or nil
|
||||
|
||||
local function gen_shunt_node(rule_name, _node_id)
|
||||
if not rule_name then return nil, nil end
|
||||
@@ -956,7 +954,6 @@ function gen_config(var)
|
||||
}
|
||||
local _outbound = gen_outbound(flag, _node, rule_name)
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
table.insert(outbounds, _outbound)
|
||||
rule_outboundTag = _outbound.tag
|
||||
end
|
||||
@@ -966,10 +963,10 @@ function gen_config(var)
|
||||
if not _node then return nil, nil end
|
||||
|
||||
if api.is_normal_node(_node) then
|
||||
local proxy = preproxy_enabled and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local use_proxy = preproxy_tag and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local copied_outbound
|
||||
for index, value in ipairs(outbounds) do
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == preproxy_tag then
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == (use_proxy and preproxy_tag or nil) then
|
||||
copied_outbound = api.clone(value)
|
||||
break
|
||||
end
|
||||
@@ -979,7 +976,7 @@ function gen_config(var)
|
||||
table.insert(outbounds, copied_outbound)
|
||||
rule_outboundTag = copied_outbound.tag
|
||||
else
|
||||
if proxy then
|
||||
if use_proxy then
|
||||
local pre_proxy = nil
|
||||
if _node.type ~= "sing-box" then
|
||||
pre_proxy = true
|
||||
@@ -1006,7 +1003,7 @@ function gen_config(var)
|
||||
end
|
||||
end
|
||||
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = proxy and preproxy_tag or nil })
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = use_proxy and preproxy_tag or nil })
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
rule_outboundTag = set_outbound_detour(_node, _outbound, outbounds, rule_name)
|
||||
@@ -1030,12 +1027,10 @@ function gen_config(var)
|
||||
return rule_outboundTag
|
||||
end
|
||||
|
||||
if preproxy_node then
|
||||
if preproxy_tag and preproxy_node_id then
|
||||
local preproxy_outboundTag = gen_shunt_node(preproxy_rule_name, preproxy_node_id)
|
||||
if preproxy_outboundTag then
|
||||
preproxy_tag = preproxy_outboundTag
|
||||
else
|
||||
preproxy_node = nil
|
||||
end
|
||||
end
|
||||
--default_node
|
||||
|
||||
@@ -758,16 +758,15 @@ function gen_config(var)
|
||||
end
|
||||
-- new balancer
|
||||
local blc_nodes = _node.balancing_node
|
||||
local length = #blc_nodes
|
||||
local valid_nodes = {}
|
||||
for i = 1, length do
|
||||
for i = 1, #blc_nodes do
|
||||
local blc_node_id = blc_nodes[i]
|
||||
local blc_node_tag = "blc-" .. blc_node_id
|
||||
local is_new_blc_node = true
|
||||
for _, outbound in ipairs(outbounds) do
|
||||
if outbound.tag == blc_node_tag then
|
||||
if outbound.tag:find("^" .. blc_node_tag) == 1 then
|
||||
is_new_blc_node = false
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -777,20 +776,22 @@ function gen_config(var)
|
||||
if outbound then
|
||||
outbound.tag = outbound.tag .. ":" .. blc_node.remarks
|
||||
table.insert(outbounds, outbound)
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
end
|
||||
end
|
||||
end
|
||||
if #valid_nodes == 0 then return nil end
|
||||
|
||||
-- fallback node
|
||||
local fallback_node_tag = nil
|
||||
local fallback_node_id = _node.fallback_node
|
||||
if fallback_node_id == "" then fallback_node_id = nil end
|
||||
if fallback_node_id == "" or fallback_node_id == "nil" then fallback_node_id = nil end
|
||||
if fallback_node_id then
|
||||
local is_new_node = true
|
||||
for _, outbound in ipairs(outbounds) do
|
||||
if outbound.tag == fallback_node_id then
|
||||
if outbound.tag:find("^" .. fallback_node_id) == 1 then
|
||||
is_new_node = false
|
||||
fallback_node_tag = outbound.tag
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -801,12 +802,7 @@ function gen_config(var)
|
||||
if outbound then
|
||||
outbound.tag = outbound.tag .. ":" .. fallback_node.remarks
|
||||
table.insert(outbounds, outbound)
|
||||
else
|
||||
fallback_node_id = nil
|
||||
end
|
||||
else
|
||||
if not gen_balancer(fallback_node) then
|
||||
fallback_node_id = nil
|
||||
fallback_node_tag = outbound.tag
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -814,10 +810,10 @@ function gen_config(var)
|
||||
table.insert(balancers, {
|
||||
tag = balancer_tag,
|
||||
selector = valid_nodes,
|
||||
fallbackTag = fallback_node_id,
|
||||
fallbackTag = fallback_node_tag,
|
||||
strategy = { type = _node.balancingStrategy or "random" }
|
||||
})
|
||||
if _node.balancingStrategy == "leastPing" or fallback_node_id then
|
||||
if _node.balancingStrategy == "leastPing" or fallback_node_tag then
|
||||
if not observatory then
|
||||
observatory = {
|
||||
subjectSelector = { "blc-" },
|
||||
@@ -1192,14 +1188,9 @@ function gen_config(var)
|
||||
|
||||
--[[
|
||||
local default_dns_flag = "remote"
|
||||
if node_id and tcp_redir_port then
|
||||
local node = uci:get_all(appname, node_id)
|
||||
if node.protocol == "_shunt" then
|
||||
if node.default_node == "_direct" then
|
||||
if (not COMMON.default_balancer_tag and not COMMON.default_outbound_tag) or COMMON.default_outbound_tag == "direct" then
|
||||
default_dns_flag = "direct"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if dns.servers and #dns.servers > 0 then
|
||||
local dns_servers = nil
|
||||
@@ -1241,7 +1232,9 @@ function gen_config(var)
|
||||
}
|
||||
})
|
||||
else
|
||||
if COMMON.default_outbound_tag then
|
||||
if COMMON.default_balancer_tag then
|
||||
dns_outbound_tag = nil
|
||||
elseif COMMON.default_outbound_tag then
|
||||
dns_outbound_tag = COMMON.default_outbound_tag
|
||||
end
|
||||
end
|
||||
@@ -1262,9 +1255,9 @@ function gen_config(var)
|
||||
table.insert(outbounds, {
|
||||
tag = "dns-out",
|
||||
protocol = "dns",
|
||||
proxySettings = {
|
||||
proxySettings = dns_outbound_tag and {
|
||||
tag = dns_outbound_tag
|
||||
},
|
||||
} or nil,
|
||||
settings = {
|
||||
address = remote_dns_tcp_server,
|
||||
port = tonumber(remote_dns_tcp_port),
|
||||
@@ -1288,6 +1281,7 @@ function gen_config(var)
|
||||
remote_dns_tcp_server
|
||||
},
|
||||
port = tonumber(remote_dns_tcp_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
if _remote_dns_host then
|
||||
@@ -1299,6 +1293,7 @@ function gen_config(var)
|
||||
_remote_dns_host
|
||||
},
|
||||
port = tonumber(remote_dns_doh_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
end
|
||||
@@ -1311,6 +1306,7 @@ function gen_config(var)
|
||||
remote_dns_doh_ip
|
||||
},
|
||||
port = tonumber(remote_dns_doh_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
end
|
||||
|
||||
@@ -812,6 +812,11 @@ local api = require "luci.passwall.api"
|
||||
queryParam.type = "mkcp"
|
||||
if (queryParam.type === "h2" || queryParam.type === "http")
|
||||
queryParam.type = "h2"
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
queryParam.type = "tcp";
|
||||
} else if (dom_prefix == "xray_" && queryParam.type === "tcp") {
|
||||
queryParam.type = "raw";
|
||||
}
|
||||
opt.set(dom_prefix + 'transport', queryParam.type);
|
||||
if (queryParam.type === "raw" || queryParam.type === "tcp") {
|
||||
opt.set(dom_prefix + 'tcp_guise', queryParam.headerType || "none");
|
||||
@@ -851,7 +856,7 @@ local api = require "luci.passwall.api"
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode);
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -922,6 +927,11 @@ local api = require "luci.passwall.api"
|
||||
queryParam.type = "mkcp"
|
||||
if (queryParam.type === "h2" || queryParam.type === "http")
|
||||
queryParam.type = "h2"
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
queryParam.type = "tcp";
|
||||
} else if (dom_prefix == "xray_" && queryParam.type === "tcp") {
|
||||
queryParam.type = "raw";
|
||||
}
|
||||
opt.set(dom_prefix + 'transport', queryParam.type);
|
||||
if (queryParam.type === "raw" || queryParam.type === "tcp") {
|
||||
opt.set(dom_prefix + 'tcp_guise', queryParam.headerType || "none");
|
||||
@@ -961,7 +971,7 @@ local api = require "luci.passwall.api"
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode);
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
|
||||
}
|
||||
|
||||
if (m.hash) {
|
||||
@@ -1001,8 +1011,13 @@ local api = require "luci.passwall.api"
|
||||
ssm.net = ssm.net.toLowerCase();
|
||||
if (ssm.net === "kcp" || ssm.net === "mkcp")
|
||||
ssm.net = "mkcp"
|
||||
if (dom_prefix == "singbox_" && ssm.net === "raw") {
|
||||
ssm.net = "tcp";
|
||||
} else if (dom_prefix == "xray_" && ssm.net === "tcp") {
|
||||
ssm.net = "raw";
|
||||
}
|
||||
opt.set(dom_prefix + 'transport', ssm.net);
|
||||
if (ssm.net === "raw") {
|
||||
if (ssm.net === "raw" || ssm.net === "tcp") {
|
||||
opt.set(dom_prefix + 'tcp_guise', (ssm.host && ssm.path) ? "http" : "none");
|
||||
if (ssm.host && ssm.path) {
|
||||
opt.set(dom_prefix + 'tcp_guise_http_host', ssm.host);
|
||||
@@ -1109,6 +1124,11 @@ local api = require "luci.passwall.api"
|
||||
queryParam.type = "mkcp"
|
||||
if (queryParam.type === "h2" || queryParam.type === "http")
|
||||
queryParam.type = "h2"
|
||||
if (dom_prefix == "singbox_" && queryParam.type === "raw") {
|
||||
queryParam.type = "tcp";
|
||||
} else if (dom_prefix == "xray_" && queryParam.type === "tcp") {
|
||||
queryParam.type = "raw";
|
||||
}
|
||||
opt.set(dom_prefix + 'transport', queryParam.type);
|
||||
if (queryParam.type === "raw" || queryParam.type === "tcp") {
|
||||
opt.set(dom_prefix + 'tcp_guise', queryParam.headerType || "none");
|
||||
@@ -1148,7 +1168,7 @@ local api = require "luci.passwall.api"
|
||||
opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
|
||||
} else if (queryParam.type === "grpc") {
|
||||
opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode);
|
||||
opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
|
||||
} else if (queryParam.type === "xhttp" || queryParam.type === "splithttp") {
|
||||
opt.set(dom_prefix + 'xhttp_host', queryParam.host || "");
|
||||
opt.set(dom_prefix + 'xhttp_path', queryParam.path || "");
|
||||
|
||||
@@ -442,10 +442,13 @@ local function processData(szType, content, add_mode, add_from)
|
||||
-- result.mux = 1
|
||||
-- result.mux_concurrency = 8
|
||||
|
||||
if not info.net then
|
||||
info.net = "tcp"
|
||||
end
|
||||
if not info.net then info.net = "tcp" end
|
||||
info.net = string.lower(info.net)
|
||||
if result.type == "sing-box" and info.net == "raw" then
|
||||
info.net = "tcp"
|
||||
elseif result.type == "Xray" and info.net == "tcp" then
|
||||
info.net = "raw"
|
||||
end
|
||||
result.transport = info.net
|
||||
if info.net == 'ws' then
|
||||
result.ws_host = info.host
|
||||
@@ -514,7 +517,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.tls = "0"
|
||||
end
|
||||
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "raw" or result.transport == "splithttp") then
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "splithttp") then
|
||||
log("跳过节点:" .. result.remarks ..",因Sing-Box不支持" .. szType .. "协议的" .. result.transport .. "传输方式,需更换Xray。")
|
||||
return nil
|
||||
end
|
||||
@@ -602,7 +605,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if ss_type_default == "xray" and has_xray then
|
||||
result.type = 'Xray'
|
||||
result.protocol = 'shadowsocks'
|
||||
result.transport = 'tcp'
|
||||
result.transport = 'raw'
|
||||
end
|
||||
if ss_type_default == "sing-box" and has_singbox then
|
||||
result.type = 'sing-box'
|
||||
@@ -643,6 +646,11 @@ local function processData(szType, content, add_mode, add_from)
|
||||
|
||||
if params.type then
|
||||
params.type = string.lower(params.type)
|
||||
if result.type == "sing-box" and params.type == "raw" then
|
||||
params.type = "tcp"
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
params.type = "raw"
|
||||
end
|
||||
result.transport = params.type
|
||||
if result.type ~= "SS-Rust" and result.type ~= "SS" then
|
||||
if params.type == 'ws' then
|
||||
@@ -699,7 +707,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if params.type == 'grpc' then
|
||||
if params.path then result.grpc_serviceName = params.path end
|
||||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode
|
||||
result.grpc_mode = params.mode or "gun"
|
||||
end
|
||||
result.tls = "0"
|
||||
if params.security == "tls" or params.security == "reality" then
|
||||
@@ -783,10 +791,13 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.tls_allowInsecure = allowInsecure_default and "1" or "0"
|
||||
end
|
||||
|
||||
if not params.type then
|
||||
params.type = "tcp"
|
||||
end
|
||||
if not params.type then params.type = "tcp" end
|
||||
params.type = string.lower(params.type)
|
||||
if result.type == "sing-box" and params.type == "raw" then
|
||||
params.type = "tcp"
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
params.type = "raw"
|
||||
end
|
||||
result.transport = params.type
|
||||
if params.type == 'ws' then
|
||||
result.ws_host = params.host
|
||||
@@ -842,9 +853,9 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if params.type == 'grpc' then
|
||||
if params.path then result.grpc_serviceName = params.path end
|
||||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode
|
||||
result.grpc_mode = params.mode or "gun"
|
||||
end
|
||||
if info.net == 'xhttp' or info.net == 'splithttp' then
|
||||
if params.type == 'xhttp' or params.type == 'splithttp' then
|
||||
result.xhttp_host = params.host
|
||||
result.xhttp_path = params.path
|
||||
end
|
||||
@@ -857,7 +868,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
|
||||
result.flow = params.flow or nil
|
||||
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "raw" or result.transport == "splithttp") then
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "splithttp") then
|
||||
log("跳过节点:" .. result.remarks ..",因Sing-Box不支持" .. szType .. "协议的" .. result.transport .. "传输方式,需更换Xray。")
|
||||
return nil
|
||||
end
|
||||
@@ -920,10 +931,13 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.address = host_port
|
||||
end
|
||||
|
||||
if not params.type then
|
||||
params.type = "tcp"
|
||||
end
|
||||
if not params.type then params.type = "tcp" end
|
||||
params.type = string.lower(params.type)
|
||||
if result.type == "sing-box" and params.type == "raw" then
|
||||
params.type = "tcp"
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
params.type = "raw"
|
||||
end
|
||||
result.transport = params.type
|
||||
if params.type == 'ws' then
|
||||
result.ws_host = params.host
|
||||
@@ -979,9 +993,9 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if params.type == 'grpc' then
|
||||
if params.path then result.grpc_serviceName = params.path end
|
||||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode
|
||||
result.grpc_mode = params.mode or "gun"
|
||||
end
|
||||
if info.net == 'xhttp' or info.net == 'splithttp' then
|
||||
if params.type == 'xhttp' or params.type == 'splithttp' then
|
||||
result.xhttp_host = params.host
|
||||
result.xhttp_path = params.path
|
||||
end
|
||||
@@ -1011,7 +1025,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.port = port
|
||||
result.tls_allowInsecure = allowInsecure_default and "1" or "0"
|
||||
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "raw" or result.transport == "splithttp") then
|
||||
if result.type == "sing-box" and (result.transport == "mkcp" or result.transport == "xhttp" or result.transport == "splithttp") then
|
||||
log("跳过节点:" .. result.remarks ..",因Sing-Box不支持" .. szType .. "协议的" .. result.transport .. "传输方式,需更换Xray。")
|
||||
return nil
|
||||
end
|
||||
|
||||
46
openwrt-passwall2/.github/ISSUE_TEMPLATE/bug.yml
vendored
46
openwrt-passwall2/.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: Bug上报
|
||||
description: 报告您使用中遇到的Bug以帮助我们改进
|
||||
name: Bug Reporting
|
||||
description: Report any Bugs you encounter to help us improve.
|
||||
title: "[Bug]: "
|
||||
labels: bug
|
||||
|
||||
@@ -8,68 +8,68 @@ body:
|
||||
id: tips
|
||||
attributes:
|
||||
value: |
|
||||
请按此规范填写,有效的反馈能让我们更好地解决您的问题
|
||||
Please fill in this specification. Effective feedback will help us better solve your problem.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 描述您遇到的bug
|
||||
description: 请尽可能简单清晰地描述问题
|
||||
label: Describe the Bug you encountered
|
||||
description: Please describe the problem as simply and clearly as possible.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: 复现此Bug的步骤
|
||||
label: Steps to reproduce this Bug
|
||||
placeholder: |
|
||||
1. 选择菜单'...'
|
||||
2. 点击按钮'....'
|
||||
3. 然后...
|
||||
4. 出现Bug:
|
||||
1. Select Menu'...'
|
||||
2. Click the button'....'
|
||||
3. Then...
|
||||
4. Appear:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: purpose
|
||||
attributes:
|
||||
label: 您想要实现的目的
|
||||
description: 请尽可能简单清晰地描述您期望发生的事
|
||||
label: What you want to implement
|
||||
description: Please describe what you expect to happen as simply and clearly as possible.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: 日志信息
|
||||
description: 提交包括问题相关的所有系统日志信息(这个很重要)
|
||||
label: Log information
|
||||
description: Submit all system log information related to the problem (this is very important).
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: pics
|
||||
attributes:
|
||||
label: 截图
|
||||
description: 如果适用,您可以添加屏幕截图以便更好地解释您的问题
|
||||
label: Screenshot
|
||||
description: If applicable, you can add screenshots to better explain your problem.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: 系统相关信息
|
||||
description: 填写相关信息以便更好的确定问题
|
||||
label: System related information
|
||||
description: Fill in relevant information to better identify the problem.
|
||||
placeholder: |
|
||||
- Passwall2版本:
|
||||
- 浏览器版本(如Chrome 96.0.4664.45 64位 正式版):
|
||||
- 其他:
|
||||
- Passwall2 version:
|
||||
- Browser version (such as Chrome 96.0.4664.45 64-bit official version):
|
||||
- Other:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: supplements
|
||||
attributes:
|
||||
label: 其他信息
|
||||
description: 与此Bug相关的其他信息
|
||||
label: Other Information
|
||||
description: Other information related to this Bug.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 功能请求
|
||||
description: 为此项目提出关于新功能的想法
|
||||
name: Feature Requests
|
||||
description: Propose new feature ideas for this project.
|
||||
title: "[Feature Request]: "
|
||||
labels: enhancement
|
||||
|
||||
@@ -7,31 +7,31 @@ body:
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 描述你想要的新功能
|
||||
description: 尽可能简单清晰地描述你想要的新功能或是希望解决的问题
|
||||
label: Describe the new feature you want
|
||||
description: Describe the new feature you want or the problem you want solved as simply and clearly as possible.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: ideal-solution
|
||||
attributes:
|
||||
label: 描述你想要的解决方案
|
||||
description: 尽可能简单清晰地描述你想要的新功能
|
||||
label: Describe the solution you want
|
||||
description: Describe the new feature you want as simply and clearly as possible.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: other-solutions
|
||||
attributes:
|
||||
label: 描述你考虑过的替代方案
|
||||
description: 尽可能简单清晰地描述你考虑过的任何替代解决方案或功能
|
||||
label: Describe the alternatives you considered
|
||||
description: Describe any alternative solutions or features you considered as simply and clearly as possible.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: supplements
|
||||
attributes:
|
||||
label: 其他信息
|
||||
description: 在此处添加有关功能请求的任何其他信息或屏幕截图
|
||||
label: Other Information
|
||||
description: Add any other information or screenshots about your feature request here.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
@@ -21,6 +21,7 @@ env:
|
||||
passwall2: ${{ github.repository }}
|
||||
packages: xiaorouji/openwrt-passwall-packages
|
||||
|
||||
|
||||
jobs:
|
||||
job_check:
|
||||
name: Check Version
|
||||
@@ -28,27 +29,29 @@ jobs:
|
||||
outputs:
|
||||
passwall2_version: ${{ steps.check_version.outputs.latest_version }}
|
||||
has_update: ${{ steps.check_version.outputs.has_update }}
|
||||
prerelease: ${{ steps.check_version.outputs.prerelease }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: 'main'
|
||||
ref: ${{ github.ref_name }}
|
||||
|
||||
- name: Check version
|
||||
id: check_version
|
||||
env:
|
||||
url_release: https://api.github.com/repos/${{ env.passwall2 }}/releases/latest
|
||||
url_tags: https://api.github.com/repos/${{ env.passwall2 }}/tags
|
||||
run: |
|
||||
cd luci-app-passwall2
|
||||
latest_version=$(awk -F ':=' '/PKG_VERSION|PKG_RELEASE/ {print $2}' Makefile | sed ':a;N;s/\n$//;s/\n/-/;ba')
|
||||
latest_release=$(wget -qO- -t1 -T2 ${{env.url_release}} | awk -F '"' '/tag_name/{print $4}')
|
||||
has_update=$([ "${latest_version}" != "${latest_release}" ] && echo true || echo false)
|
||||
latest_version=$(awk -F ':=' '/PKG_VERSION|PKG_RELEASE/ {print $2}' Makefile | sed ':a;N;s/\$(PKG_VERSION)-//;s/\n$//;s/\n/-/;ba')
|
||||
has_update=$([ -z "$(wget -qO- -t1 -T2 ${{env.url_tags}} | grep \"${latest_version}\")" ] && echo true || echo false)
|
||||
prerelease=$([ "${{ github.ref_name }}" == "main" ] && echo false || echo true)
|
||||
echo "latest_version=${latest_version}" >> $GITHUB_OUTPUT
|
||||
echo "has_update=${has_update}" >> $GITHUB_OUTPUT
|
||||
echo "prerelease=${prerelease}" >> $GITHUB_OUTPUT
|
||||
echo "latest_version: ${latest_version}"
|
||||
echo "latest_release: ${latest_release}"
|
||||
echo "has_update: ${has_update}"
|
||||
echo "prerelease: ${prerelease}"
|
||||
|
||||
- name: Prepare release
|
||||
if: steps.check_version.outputs.has_update == 'true'
|
||||
@@ -66,6 +69,8 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{steps.check_version.outputs.latest_version}}
|
||||
target_commitish: ${{ github.ref_name }}
|
||||
prerelease: ${{steps.check_version.outputs.prerelease}}
|
||||
body_path: release.txt
|
||||
|
||||
|
||||
@@ -85,13 +90,11 @@ jobs:
|
||||
- sdk_ver: 23.05
|
||||
luci_ver: 23.05
|
||||
sdk_url: https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/openwrt-sdk-23.05.0-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz
|
||||
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
docker rmi `docker images -q`
|
||||
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
|
||||
df -hT
|
||||
echo "Install packages"
|
||||
sudo -E apt-get -qq update
|
||||
sudo -E apt-get -qq install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils python3-setuptools rsync swig unzip zlib1g-dev file wget
|
||||
@@ -103,68 +106,52 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: sdk
|
||||
key: openwrt-sdk-23.05-rc3-x86_64
|
||||
key: openwrt-luci-${{ matrix.luci_ver }}-x86_64
|
||||
|
||||
- name: Initialization environment
|
||||
if: steps.cache-sdk.outputs.cache-hit != 'true'
|
||||
env:
|
||||
url_sdk: https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/openwrt-sdk-23.05.0-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz
|
||||
run: |
|
||||
wget ${{ env.url_sdk }}
|
||||
file_name=$(echo ${{env.url_sdk}} | awk -F/ '{print $NF}')
|
||||
wget ${{ matrix.sdk_url }}
|
||||
file_name=$(echo ${{ matrix.sdk_url }} | awk -F/ '{print $NF}')
|
||||
mkdir sdk && tar -xJf $file_name -C ./sdk --strip-components=1
|
||||
cd sdk
|
||||
echo "src-git base https://github.com/openwrt/openwrt.git;openwrt-${{ matrix.sdk_ver }}" > feeds.conf
|
||||
echo "src-git packages https://github.com/openwrt/packages.git;openwrt-${{ matrix.sdk_ver }}" >> feeds.conf
|
||||
echo "src-git luci https://github.com/openwrt/luci.git;openwrt-${{ matrix.luci_ver }}" >> feeds.conf
|
||||
echo "src-git routing https://git.openwrt.org/feed/routing.git;openwrt-${{ matrix.sdk_ver }}" >> feeds.conf
|
||||
echo "src-git passwall_packages https://github.com/${{ env.packages}}.git;main" >> feeds.conf
|
||||
echo "src-git passwall2 https://github.com/${{ env.passwall2 }}.git;main" >> feeds.conf
|
||||
echo "src-git passwall_packages https://github.com/${{ env.packages }}.git;main" >> feeds.conf
|
||||
echo "src-git passwall2 https://github.com/${{ env.passwall2 }}.git;${{ github.ref_name }}" >> feeds.conf
|
||||
./scripts/feeds update -a
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2=m" > .config
|
||||
./scripts/feeds install -d n luci-app-passwall2
|
||||
make download -j8
|
||||
make package/luci-app-passwall2/download -j1
|
||||
|
||||
- name: Configure passwall2
|
||||
- name: Update passwall2 feeds
|
||||
if: steps.cache-sdk.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
cd sdk
|
||||
sed -i '6s/main/${{ github.ref_name }}/' feeds.conf
|
||||
./scripts/feeds update passwall_packages
|
||||
./scripts/feeds update passwall2
|
||||
./scripts/feeds install luci-app-passwall2
|
||||
echo "CONFIG_ALL_NONSHARED=n" > .config
|
||||
echo "CONFIG_ALL_KMODS=n" >> .config
|
||||
echo "CONFIG_ALL=n" >> .config
|
||||
echo "CONFIG_AUTOREMOVE=n" >> .config
|
||||
echo "CONFIG_LUCI_LANG_zh_Hans=y" >> .config
|
||||
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2=m" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_Iptables_Transparent_Proxy=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_Nftables_Transparent_Proxy=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Haproxy=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Hysteria=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_IPv6_Nat=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_NaiveProxy=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Libev_Client=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Libev_Server=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Rust_Client=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Rust_Server=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_ShadowsocksR_Libev_Client=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_ShadowsocksR_Libev_Server=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Simple_Obfs=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_SingBox=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_tuic_client=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_V2ray_Plugin=n" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Compile passwall2
|
||||
id: compile
|
||||
run: |
|
||||
cd sdk
|
||||
echo "make package/luci-app-passwall2/{clean,compile} -j$(nproc)"
|
||||
echo "CONFIG_ALL_NONSHARED=n" > .config
|
||||
echo "CONFIG_ALL_KMODS=n" >> .config
|
||||
echo "CONFIG_ALL=n" >> .config
|
||||
echo "CONFIG_AUTOREMOVE=n" >> .config
|
||||
echo "CONFIG_LUCI_LANG_zh_Hans=y" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2=m" >> .config
|
||||
make defconfig
|
||||
echo "make package/luci-app-passwall2/{clean,compile} -j1"
|
||||
make package/luci-app-passwall2/{clean,compile} -j1
|
||||
mv bin/packages/x86_64/passwall2/ ../
|
||||
make clean
|
||||
rm .config .config.old
|
||||
rm -rf feeds/passwall2 feeds/passwall2.*
|
||||
cd ../passwall2
|
||||
for i in $(ls); do mv $i luci-${{ matrix.luci_ver }}_$i; done
|
||||
cd ..
|
||||
@@ -182,7 +169,7 @@ jobs:
|
||||
|
||||
|
||||
job_auto_compile:
|
||||
if: needs.job_check.outputs.has_update == 'true'
|
||||
if: ${{ needs.job_check.outputs.has_update == 'true' && needs.job_check.outputs.prerelease == 'false' }}
|
||||
needs: job_check
|
||||
runs-on: ubuntu-latest
|
||||
name: build (${{ matrix.platform }})
|
||||
@@ -246,7 +233,6 @@ jobs:
|
||||
run: |
|
||||
docker rmi `docker images -q`
|
||||
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
|
||||
df -hT
|
||||
echo "install packages!!!!!!"
|
||||
sudo -E apt-get -qq update
|
||||
sudo -E apt-get -qq install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils python3-setuptools rsync swig unzip zlib1g-dev file wget
|
||||
@@ -271,7 +257,7 @@ jobs:
|
||||
echo "src-git packages https://github.com/openwrt/packages.git;openwrt-23.05" >> feeds.conf
|
||||
echo "src-git luci https://github.com/openwrt/luci.git;openwrt-23.05" >> feeds.conf
|
||||
echo "src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05" >> feeds.conf
|
||||
echo "src-git passwall_packages https://github.com/${{ env.packages}}.git;main" >> feeds.conf
|
||||
echo "src-git passwall_packages https://github.com/${{ env.packages }}.git;main" >> feeds.conf
|
||||
echo "src-git passwall2 https://github.com/${{ env.passwall2 }}.git;main" >> feeds.conf
|
||||
|
||||
./scripts/feeds update -a
|
||||
@@ -281,12 +267,11 @@ jobs:
|
||||
rm -rf feeds/packages/lang/golang
|
||||
git clone https://github.com/sbwml/packages_lang_golang -b 22.x feeds/packages/lang/golang
|
||||
|
||||
|
||||
|
||||
echo "CONFIG_ALL_NONSHARED=n" > .config
|
||||
echo "CONFIG_ALL_KMODS=n" >> .config
|
||||
echo "CONFIG_ALL=n" >> .config
|
||||
echo "CONFIG_AUTOREMOVE=n" >> .config
|
||||
echo "CONFIG_SIGNED_PACKAGES=n" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2=m" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_Iptables_Transparent_Proxy=y" >> .config
|
||||
echo "CONFIG_PACKAGE_luci-app-passwall2_Nftables_Transparent_Proxy=y" >> .config
|
||||
@@ -311,7 +296,7 @@ jobs:
|
||||
- name: ${{ matrix.platform }} download
|
||||
run: |
|
||||
cd sdk
|
||||
make download -j8
|
||||
make download -j1
|
||||
find dl -size -1024c -exec ls -l {} \;
|
||||
|
||||
- name: ${{ matrix.platform }} compile
|
||||
@@ -320,7 +305,7 @@ jobs:
|
||||
cd sdk
|
||||
for package in $(ls feeds/passwall_packages); do
|
||||
if [ -d "feeds/passwall_packages/$package" ]; then
|
||||
make package/feeds/passwall_packages/$package/compile -j$(nproc) 2>/dev/null
|
||||
make package/feeds/passwall_packages/$package/compile -j1 2>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -333,7 +318,7 @@ jobs:
|
||||
cd sdk
|
||||
mkdir upload
|
||||
|
||||
zip -jr upload/passwall2_packages_ipk_${{ matrix.platform }}.zip bin/packages/*/passwall_packages/
|
||||
zip -jr upload/passwall_packages_ipk_${{ matrix.platform }}.zip bin/packages/*/passwall_packages/*.ipk
|
||||
|
||||
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
stale-issue-label: "no-issue-activity"
|
||||
exempt-issue-labels: "awaiting-approval,awaiting,work-in-progress"
|
||||
stale-pr-label: "no-pr-activity"
|
||||
exempt-pr-labels: "awaiting-approval,awaiting,work-in-progress"
|
||||
exempt-pr-labels: "awaiting-approval,awaiting,work-in-progress,automated-pr"
|
||||
# only-labels: 'bug,enhancement'
|
||||
days-before-issue-stale: 10
|
||||
days-before-pr-stale: 10
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
operations-per-run: 500
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@v2.0.3
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=24.11.17
|
||||
PKG_VERSION:=24.11.18
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -918,14 +918,9 @@ function gen_config(var)
|
||||
if node.protocol == "_shunt" then
|
||||
local rules = {}
|
||||
|
||||
local preproxy_enabled = node.preproxy_enabled == "1"
|
||||
local preproxy_rule_name = "main"
|
||||
local preproxy_tag = "main"
|
||||
local preproxy_node_id = node["main_node"]
|
||||
local preproxy_node = preproxy_enabled and preproxy_node_id and uci:get_all(appname, preproxy_node_id) or nil
|
||||
if preproxy_node then
|
||||
preproxy_tag = preproxy_tag .. ":" .. preproxy_node.remarks
|
||||
end
|
||||
local preproxy_rule_name = node.preproxy_enabled == "1" and "main" or nil
|
||||
local preproxy_tag = preproxy_rule_name
|
||||
local preproxy_node_id = preproxy_rule_name and node["main_node"] or nil
|
||||
|
||||
local function gen_shunt_node(rule_name, _node_id)
|
||||
if not rule_name then return nil end
|
||||
@@ -950,7 +945,6 @@ function gen_config(var)
|
||||
}
|
||||
local _outbound = gen_outbound(flag, _node, rule_name)
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
table.insert(outbounds, _outbound)
|
||||
rule_outboundTag = _outbound.tag
|
||||
end
|
||||
@@ -960,10 +954,10 @@ function gen_config(var)
|
||||
if not _node then return nil end
|
||||
|
||||
if api.is_normal_node(_node) then
|
||||
local proxy = preproxy_enabled and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local use_proxy = preproxy_tag and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local copied_outbound
|
||||
for index, value in ipairs(outbounds) do
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == preproxy_tag then
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == (use_proxy and preproxy_tag or nil) then
|
||||
copied_outbound = api.clone(value)
|
||||
break
|
||||
end
|
||||
@@ -973,7 +967,7 @@ function gen_config(var)
|
||||
table.insert(outbounds, copied_outbound)
|
||||
rule_outboundTag = copied_outbound.tag
|
||||
else
|
||||
if proxy then
|
||||
if use_proxy then
|
||||
local pre_proxy = nil
|
||||
if _node.type ~= "sing-box" then
|
||||
pre_proxy = true
|
||||
@@ -999,7 +993,8 @@ function gen_config(var)
|
||||
})
|
||||
end
|
||||
end
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = proxy and preproxy_tag or nil })
|
||||
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = use_proxy and preproxy_tag or nil })
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
rule_outboundTag = set_outbound_detour(_node, _outbound, outbounds, rule_name)
|
||||
@@ -1023,10 +1018,10 @@ function gen_config(var)
|
||||
return rule_outboundTag
|
||||
end
|
||||
|
||||
if preproxy_node then
|
||||
proxy_outboundTag = gen_shunt_node(preproxy_rule_name, preproxy_node_id)
|
||||
if not proxy_outboundTag then
|
||||
preproxy_node = nil
|
||||
if preproxy_tag and preproxy_node_id then
|
||||
local preproxy_outboundTag = gen_shunt_node(preproxy_rule_name, preproxy_node_id)
|
||||
if preproxy_outboundTag then
|
||||
preproxy_tag = preproxy_outboundTag
|
||||
end
|
||||
end
|
||||
--default_node
|
||||
|
||||
@@ -756,16 +756,15 @@ function gen_config(var)
|
||||
end
|
||||
-- new balancer
|
||||
local blc_nodes = _node.balancing_node
|
||||
local length = #blc_nodes
|
||||
local valid_nodes = {}
|
||||
for i = 1, length do
|
||||
for i = 1, #blc_nodes do
|
||||
local blc_node_id = blc_nodes[i]
|
||||
local blc_node_tag = "blc-" .. blc_node_id
|
||||
local is_new_blc_node = true
|
||||
for _, outbound in ipairs(outbounds) do
|
||||
if outbound.tag == blc_node_tag then
|
||||
if outbound.tag:find("^" .. blc_node_tag) == 1 then
|
||||
is_new_blc_node = false
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -775,20 +774,22 @@ function gen_config(var)
|
||||
if outbound then
|
||||
outbound.tag = outbound.tag .. ":" .. blc_node.remarks
|
||||
table.insert(outbounds, outbound)
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
end
|
||||
end
|
||||
end
|
||||
if #valid_nodes == 0 then return nil end
|
||||
|
||||
-- fallback node
|
||||
local fallback_node_tag = nil
|
||||
local fallback_node_id = _node.fallback_node
|
||||
if fallback_node_id == "" then fallback_node_id = nil end
|
||||
if fallback_node_id == "" or fallback_node_id == "nil" then fallback_node_id = nil end
|
||||
if fallback_node_id then
|
||||
local is_new_node = true
|
||||
for _, outbound in ipairs(outbounds) do
|
||||
if outbound.tag == fallback_node_id then
|
||||
if outbound.tag:find("^" .. fallback_node_id) == 1 then
|
||||
is_new_node = false
|
||||
fallback_node_tag = outbound.tag
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -799,12 +800,7 @@ function gen_config(var)
|
||||
if outbound then
|
||||
outbound.tag = outbound.tag .. ":" .. fallback_node.remarks
|
||||
table.insert(outbounds, outbound)
|
||||
else
|
||||
fallback_node_id = nil
|
||||
end
|
||||
else
|
||||
if not gen_balancer(fallback_node) then
|
||||
fallback_node_id = nil
|
||||
fallback_node_tag = outbound.tag
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -812,10 +808,10 @@ function gen_config(var)
|
||||
table.insert(balancers, {
|
||||
tag = balancer_tag,
|
||||
selector = valid_nodes,
|
||||
fallbackTag = fallback_node_id,
|
||||
fallbackTag = fallback_node_tag,
|
||||
strategy = { type = _node.balancingStrategy or "random" }
|
||||
})
|
||||
if _node.balancingStrategy == "leastPing" or fallback_node_id then
|
||||
if _node.balancingStrategy == "leastPing" or fallback_node_tag then
|
||||
if not observatory then
|
||||
observatory = {
|
||||
subjectSelector = { "blc-" },
|
||||
@@ -1050,6 +1046,7 @@ function gen_config(var)
|
||||
local domain_table = {
|
||||
shunt_rule_name = e[".name"],
|
||||
outboundTag = outboundTag,
|
||||
balancerTag = balancerTag,
|
||||
domain = {},
|
||||
}
|
||||
domains = {}
|
||||
@@ -1058,7 +1055,7 @@ function gen_config(var)
|
||||
table.insert(domains, w)
|
||||
table.insert(domain_table.domain, w)
|
||||
end)
|
||||
if outboundTag and outboundTag ~= "nil" then
|
||||
if (outboundTag and outboundTag ~= "nil") or (balancerTag and balancerTag ~= "nil") then
|
||||
table.insert(dns_domain_rules, api.clone(domain_table))
|
||||
end
|
||||
if #domains == 0 then domains = nil end
|
||||
@@ -1107,16 +1104,15 @@ function gen_config(var)
|
||||
end
|
||||
end
|
||||
end)
|
||||
--[[
|
||||
if default_outboundTag or default_balancerTag then
|
||||
|
||||
if default_balancerTag then
|
||||
table.insert(rules, {
|
||||
_flag = "default",
|
||||
outboundTag = default_outboundTag,
|
||||
ruleTag = "default",
|
||||
balancerTag = default_balancerTag,
|
||||
network = "tcp,udp"
|
||||
})
|
||||
end
|
||||
]]
|
||||
|
||||
routing = {
|
||||
domainStrategy = node.domainStrategy or "AsIs",
|
||||
domainMatcher = node.domainMatcher or "hybrid",
|
||||
@@ -1367,7 +1363,7 @@ function gen_config(var)
|
||||
end
|
||||
|
||||
local default_dns_flag = "remote"
|
||||
if not COMMON.default_outbound_tag or COMMON.default_outbound_tag == "direct" then
|
||||
if (not COMMON.default_balancer_tag and not COMMON.default_outbound_tag) or COMMON.default_outbound_tag == "direct" then
|
||||
default_dns_flag = "direct"
|
||||
end
|
||||
|
||||
@@ -1395,7 +1391,7 @@ function gen_config(var)
|
||||
--按分流顺序DNS
|
||||
if dns_domain_rules and #dns_domain_rules > 0 then
|
||||
for index, value in ipairs(dns_domain_rules) do
|
||||
if value.outboundTag and value.domain then
|
||||
if value.domain and (value.outboundTag or value.balancerTag) then
|
||||
local dns_server = nil
|
||||
if value.outboundTag == "direct" then
|
||||
dns_server = api.clone(_direct_dns)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use std::{
|
||||
fmt::{self, Debug},
|
||||
net::SocketAddr,
|
||||
sync::{
|
||||
atomic::{AtomicU32, Ordering},
|
||||
Arc,
|
||||
@@ -102,7 +103,7 @@ impl ServerIdent {
|
||||
}
|
||||
|
||||
if let Some(bind_local_addr) = svr_cfg.outbound_bind_addr {
|
||||
connect_opts.bind_local_addr = Some(bind_local_addr);
|
||||
connect_opts.bind_local_addr = Some(SocketAddr::new(bind_local_addr, 0));
|
||||
}
|
||||
|
||||
if let Some(ref bind_interface) = svr_cfg.outbound_bind_interface {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use std::{
|
||||
io::{self, ErrorKind},
|
||||
net::SocketAddr,
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
@@ -130,7 +131,7 @@ impl Server {
|
||||
vpn_protect_path: config.outbound_vpn_protect_path,
|
||||
|
||||
bind_interface: config.outbound_bind_interface,
|
||||
bind_local_addr: config.outbound_bind_addr,
|
||||
bind_local_addr: config.outbound_bind_addr.map(|ip| SocketAddr::new(ip, 0)),
|
||||
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! Service for managing multiple relay servers. [Manage Multiple Users](https://github.com/shadowsocks/shadowsocks/wiki/Manage-Multiple-Users)
|
||||
|
||||
use std::{io, sync::Arc};
|
||||
use std::{io, net::SocketAddr, sync::Arc};
|
||||
|
||||
use log::trace;
|
||||
use shadowsocks::net::{AcceptOpts, ConnectOpts};
|
||||
@@ -40,7 +40,7 @@ pub async fn run(config: Config) -> io::Result<()> {
|
||||
#[cfg(target_os = "android")]
|
||||
vpn_protect_path: config.outbound_vpn_protect_path,
|
||||
|
||||
bind_local_addr: config.outbound_bind_addr,
|
||||
bind_local_addr: config.outbound_bind_addr.map(|ip| SocketAddr::new(ip, 0)),
|
||||
bind_interface: config.outbound_bind_interface,
|
||||
|
||||
..Default::default()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Shadowsocks server
|
||||
|
||||
use std::{io, sync::Arc, time::Duration};
|
||||
use std::{io, net::SocketAddr, sync::Arc, time::Duration};
|
||||
|
||||
use futures::future;
|
||||
use log::trace;
|
||||
@@ -64,7 +64,7 @@ pub async fn run(config: Config) -> io::Result<()> {
|
||||
#[cfg(target_os = "android")]
|
||||
vpn_protect_path: config.outbound_vpn_protect_path,
|
||||
|
||||
bind_local_addr: config.outbound_bind_addr,
|
||||
bind_local_addr: config.outbound_bind_addr.map(|ip| SocketAddr::new(ip, 0)),
|
||||
bind_interface: config.outbound_bind_interface,
|
||||
|
||||
..Default::default()
|
||||
@@ -110,7 +110,7 @@ pub async fn run(config: Config) -> io::Result<()> {
|
||||
}
|
||||
|
||||
if let Some(bind_local_addr) = inst.outbound_bind_addr {
|
||||
connect_opts.bind_local_addr = Some(bind_local_addr);
|
||||
connect_opts.bind_local_addr = Some(SocketAddr::new(bind_local_addr, 0));
|
||||
}
|
||||
|
||||
if let Some(bind_interface) = inst.outbound_bind_interface {
|
||||
|
||||
@@ -80,7 +80,7 @@ impl RuntimeProvider for ShadowDnsRuntimeProvider {
|
||||
let mut connect_opts = self.connect_opts.clone();
|
||||
|
||||
if let Some(bind_addr) = bind_addr {
|
||||
connect_opts.bind_local_addr = Some(bind_addr.ip());
|
||||
connect_opts.bind_local_addr = Some(bind_addr);
|
||||
}
|
||||
|
||||
let wait_for = wait_for.unwrap_or_else(|| Duration::from_secs(5));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Options for connecting to remote server
|
||||
|
||||
use std::{net::IpAddr, time::Duration};
|
||||
use std::{net::SocketAddr, time::Duration};
|
||||
|
||||
/// Options for connecting to TCP remote server
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -60,7 +60,7 @@ pub struct ConnectOpts {
|
||||
/// Outbound socket binds to this IP address, mostly for choosing network interfaces
|
||||
///
|
||||
/// It only affects sockets that trying to connect to addresses with the same family
|
||||
pub bind_local_addr: Option<IpAddr>,
|
||||
pub bind_local_addr: Option<SocketAddr>,
|
||||
|
||||
/// Outbound socket binds to interface
|
||||
pub bind_interface: Option<String>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
io::{self, ErrorKind},
|
||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
net::{Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
};
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
@@ -23,13 +23,13 @@ cfg_if! {
|
||||
|
||||
fn set_common_sockopt_for_connect(addr: SocketAddr, socket: &TcpSocket, opts: &ConnectOpts) -> io::Result<()> {
|
||||
// Binds to IP address
|
||||
if let Some(ip) = opts.bind_local_addr {
|
||||
match (ip, addr.ip()) {
|
||||
(IpAddr::V4(..), IpAddr::V4(..)) => {
|
||||
socket.bind(SocketAddr::new(ip, 0))?;
|
||||
if let Some(baddr) = opts.bind_local_addr {
|
||||
match (baddr, addr) {
|
||||
(SocketAddr::V4(..), SocketAddr::V4(..)) => {
|
||||
socket.bind(baddr)?;
|
||||
}
|
||||
(IpAddr::V6(..), IpAddr::V6(..)) => {
|
||||
socket.bind(SocketAddr::new(ip, 0))?;
|
||||
(SocketAddr::V6(..), SocketAddr::V6(..)) => {
|
||||
socket.bind(baddr)?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
io, mem,
|
||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
net::{Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
os::unix::io::{AsRawFd, RawFd},
|
||||
pin::Pin,
|
||||
ptr,
|
||||
@@ -227,8 +227,8 @@ pub fn set_disable_ip_fragmentation<S: AsRawFd>(af: AddrFamily, socket: &S) -> i
|
||||
#[inline]
|
||||
pub async fn create_outbound_udp_socket(af: AddrFamily, config: &ConnectOpts) -> io::Result<UdpSocket> {
|
||||
let bind_addr = match (af, config.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(IpAddr::V4(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv6, Some(IpAddr::V6(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
|
||||
(AddrFamily::Ipv6, ..) => SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), 0),
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::{
|
||||
collections::HashMap,
|
||||
io::{self, ErrorKind},
|
||||
mem,
|
||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, TcpStream as StdTcpStream},
|
||||
net::{Ipv4Addr, Ipv6Addr, SocketAddr, TcpStream as StdTcpStream},
|
||||
os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd},
|
||||
pin::Pin,
|
||||
ptr,
|
||||
@@ -355,8 +355,8 @@ pub fn set_disable_ip_fragmentation<S: AsRawFd>(af: AddrFamily, socket: &S) -> i
|
||||
#[inline]
|
||||
pub async fn create_outbound_udp_socket(af: AddrFamily, config: &ConnectOpts) -> io::Result<UdpSocket> {
|
||||
let bind_addr = match (af, config.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(IpAddr::V4(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv6, Some(IpAddr::V6(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
|
||||
(AddrFamily::Ipv6, ..) => SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), 0),
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
io, mem,
|
||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
net::{Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd},
|
||||
pin::Pin,
|
||||
ptr,
|
||||
@@ -286,8 +286,8 @@ pub fn set_disable_ip_fragmentation<S: AsRawFd>(af: AddrFamily, socket: &S) -> i
|
||||
#[inline]
|
||||
pub async fn create_outbound_udp_socket(af: AddrFamily, config: &ConnectOpts) -> io::Result<UdpSocket> {
|
||||
let bind_addr = match (af, config.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(IpAddr::V4(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv6, Some(IpAddr::V6(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
|
||||
(AddrFamily::Ipv6, ..) => SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), 0),
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
io,
|
||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
net::{Ipv4Addr, Ipv6Addr, SocketAddr},
|
||||
ops::{Deref, DerefMut},
|
||||
os::fd::AsRawFd,
|
||||
pin::Pin,
|
||||
@@ -81,8 +81,8 @@ pub fn set_disable_ip_fragmentation<S: AsRawFd>(_af: AddrFamily, _socket: &S) ->
|
||||
#[inline]
|
||||
pub async fn create_outbound_udp_socket(af: AddrFamily, config: &ConnectOpts) -> io::Result<UdpSocket> {
|
||||
let bind_addr = match (af, config.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(IpAddr::V4(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv6, Some(IpAddr::V6(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
|
||||
(AddrFamily::Ipv6, ..) => SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), 0),
|
||||
};
|
||||
|
||||
@@ -467,9 +467,9 @@ pub async fn create_inbound_udp_socket(addr: &SocketAddr, ipv6_only: bool) -> io
|
||||
/// Create a `UdpSocket` for connecting to `addr`
|
||||
#[inline(always)]
|
||||
pub async fn create_outbound_udp_socket(af: AddrFamily, opts: &ConnectOpts) -> io::Result<UdpSocket> {
|
||||
let bind_addr = match (af, opts.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(IpAddr::V4(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
(AddrFamily::Ipv6, Some(IpAddr::V6(ip))) => SocketAddr::new(ip.into(), 0),
|
||||
let bind_addr = match (af, config.bind_local_addr) {
|
||||
(AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(),
|
||||
(AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
|
||||
(AddrFamily::Ipv6, ..) => SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), 0),
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace "io.nekohasekai.sfa"
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
|
||||
ndkVersion "26.2.11394342"
|
||||
|
||||
@@ -22,7 +22,7 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "io.nekohasekai.sfa"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
targetSdk 35
|
||||
versionCode getVersionProps("VERSION_CODE").toInteger()
|
||||
versionName getVersionProps("VERSION_NAME")
|
||||
setProperty("archivesBaseName", "SFA-" + versionName)
|
||||
@@ -90,23 +90,23 @@ android {
|
||||
dependencies {
|
||||
implementation(fileTree("libs"))
|
||||
|
||||
implementation "androidx.core:core-ktx:1.13.1"
|
||||
implementation "androidx.core:core-ktx:1.15.0"
|
||||
implementation "androidx.appcompat:appcompat:1.7.0"
|
||||
implementation "com.google.android.material:material:1.12.0"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.6"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:2.8.2"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:2.8.2"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.2.0"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.7"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:2.8.3"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:2.8.3"
|
||||
implementation "com.google.zxing:core:3.5.3"
|
||||
implementation "androidx.room:room-runtime:2.6.1"
|
||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
|
||||
implementation "androidx.preference:preference-ktx:1.2.1"
|
||||
implementation "androidx.camera:camera-view:1.3.4"
|
||||
implementation "androidx.camera:camera-lifecycle:1.3.4"
|
||||
implementation "androidx.camera:camera-camera2:1.3.4"
|
||||
implementation "androidx.camera:camera-view:1.4.0"
|
||||
implementation "androidx.camera:camera-lifecycle:1.4.0"
|
||||
implementation "androidx.camera:camera-camera2:1.4.0"
|
||||
ksp "androidx.room:room-compiler:2.6.1"
|
||||
implementation "androidx.work:work-runtime-ktx:2.9.1"
|
||||
implementation "androidx.work:work-runtime-ktx:2.10.0"
|
||||
implementation "androidx.browser:browser:1.8.0"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class Application : Application() {
|
||||
|
||||
override fun attachBaseContext(base: Context?) {
|
||||
super.attachBaseContext(base)
|
||||
|
||||
application = this
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
package io.nekohasekai.sfa.bg
|
||||
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.Service
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.os.ParcelFileDescriptor
|
||||
import android.os.PowerManager
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import go.Seq
|
||||
@@ -17,6 +22,7 @@ import io.nekohasekai.libbox.BoxService
|
||||
import io.nekohasekai.libbox.CommandServer
|
||||
import io.nekohasekai.libbox.CommandServerHandler
|
||||
import io.nekohasekai.libbox.Libbox
|
||||
import io.nekohasekai.libbox.Notification
|
||||
import io.nekohasekai.libbox.PlatformInterface
|
||||
import io.nekohasekai.libbox.SystemProxyStatus
|
||||
import io.nekohasekai.sfa.Application
|
||||
@@ -27,6 +33,7 @@ import io.nekohasekai.sfa.constant.Status
|
||||
import io.nekohasekai.sfa.database.ProfileManager
|
||||
import io.nekohasekai.sfa.database.Settings
|
||||
import io.nekohasekai.sfa.ktx.hasPermission
|
||||
import io.nekohasekai.sfa.ui.MainActivity
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
@@ -36,8 +43,7 @@ import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
|
||||
class BoxService(
|
||||
private val service: Service,
|
||||
private val platformInterface: PlatformInterface
|
||||
private val service: Service, private val platformInterface: PlatformInterface
|
||||
) : CommandServerHandler {
|
||||
|
||||
companion object {
|
||||
@@ -101,8 +107,7 @@ class BoxService(
|
||||
}
|
||||
|
||||
private fun startCommandServer() {
|
||||
val commandServer =
|
||||
CommandServer(this, 300)
|
||||
val commandServer = CommandServer(this, 300)
|
||||
commandServer.start()
|
||||
this.commandServer = commandServer
|
||||
}
|
||||
@@ -328,4 +333,45 @@ class BoxService(
|
||||
commandServer?.writeMessage(message)
|
||||
}
|
||||
|
||||
internal fun sendNotification(notification: Notification) {
|
||||
val builder =
|
||||
NotificationCompat.Builder(service, notification.identifier).setShowWhen(false)
|
||||
.setContentTitle(notification.title)
|
||||
.setContentText(notification.body)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setSmallIcon(R.drawable.ic_menu)
|
||||
.setCategory(NotificationCompat.CATEGORY_EVENT)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
.setAutoCancel(true)
|
||||
if (!notification.subtitle.isNullOrBlank()) {
|
||||
builder.setContentInfo(notification.subtitle)
|
||||
}
|
||||
if (!notification.openURL.isNullOrBlank()) {
|
||||
builder.setContentIntent(
|
||||
PendingIntent.getActivity(
|
||||
service,
|
||||
0,
|
||||
Intent(
|
||||
service, MainActivity::class.java
|
||||
).apply {
|
||||
setAction(Action.OPEN_URL).setData(Uri.parse(notification.openURL))
|
||||
setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
||||
},
|
||||
ServiceNotification.flags,
|
||||
)
|
||||
)
|
||||
}
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Application.notification.createNotificationChannel(
|
||||
NotificationChannel(
|
||||
notification.identifier,
|
||||
notification.typeName,
|
||||
NotificationManager.IMPORTANCE_HIGH
|
||||
)
|
||||
)
|
||||
}
|
||||
Application.notification.notify(notification.typeID, builder.build())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.nekohasekai.sfa.bg
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Process
|
||||
@@ -136,6 +137,9 @@ interface PlatformInterfaceWrapper : PlatformInterface {
|
||||
element.interfaceAddresses.mapTo(mutableListOf()) { it.toPrefix() }
|
||||
.iterator()
|
||||
)
|
||||
runCatching {
|
||||
flags = element.flags
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +150,13 @@ interface PlatformInterfaceWrapper : PlatformInterface {
|
||||
"${address.hostAddress}/${networkPrefixLength}"
|
||||
}
|
||||
}
|
||||
|
||||
private val NetworkInterface.flags: Int
|
||||
@SuppressLint("SoonBlockedPrivateApi")
|
||||
get() {
|
||||
val getFlagsMethod = NetworkInterface::class.java.getDeclaredMethod("getFlags")
|
||||
return getFlagsMethod.invoke(this) as Int
|
||||
}
|
||||
}
|
||||
|
||||
private class StringArray(private val iterator: Iterator<String>) : StringIterator {
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.nekohasekai.sfa.bg
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import io.nekohasekai.libbox.Notification
|
||||
|
||||
class ProxyService : Service(), PlatformInterfaceWrapper {
|
||||
|
||||
@@ -14,4 +15,8 @@ class ProxyService : Service(), PlatformInterfaceWrapper {
|
||||
override fun onDestroy() = service.onDestroy()
|
||||
|
||||
override fun writeLog(message: String) = service.writeLog(message)
|
||||
|
||||
override fun sendNotification(notification: Notification) =
|
||||
service.sendNotification(notification)
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ class ServiceNotification(
|
||||
companion object {
|
||||
private const val notificationId = 1
|
||||
private const val notificationChannel = "service"
|
||||
private val flags =
|
||||
val flags =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) PendingIntent.FLAG_IMMUTABLE else 0
|
||||
|
||||
fun checkPermission(): Boolean {
|
||||
@@ -83,7 +83,7 @@ class ServiceNotification(
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Application.notification.createNotificationChannel(
|
||||
NotificationChannel(
|
||||
notificationChannel, "sing-box service", NotificationManager.IMPORTANCE_LOW
|
||||
notificationChannel, "Service Notifications", NotificationManager.IMPORTANCE_LOW
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.net.ProxyInfo
|
||||
import android.net.VpnService
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import io.nekohasekai.libbox.Notification
|
||||
import io.nekohasekai.libbox.TunOptions
|
||||
import io.nekohasekai.sfa.database.Settings
|
||||
import io.nekohasekai.sfa.ktx.toIpPrefix
|
||||
@@ -188,4 +189,7 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
||||
|
||||
override fun writeLog(message: String) = service.writeLog(message)
|
||||
|
||||
override fun sendNotification(notification: Notification) =
|
||||
service.sendNotification(notification)
|
||||
|
||||
}
|
||||
@@ -3,4 +3,5 @@ package io.nekohasekai.sfa.constant
|
||||
object Action {
|
||||
const val SERVICE = "io.nekohasekai.sfa.SERVICE"
|
||||
const val SERVICE_CLOSE = "io.nekohasekai.sfa.SERVICE_CLOSE"
|
||||
const val OPEN_URL = "io.nekohasekai.sfa.SERVICE_OPEN_URL"
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.nekohasekai.sfa.ktx
|
||||
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import androidx.annotation.StringRes
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import io.nekohasekai.sfa.R
|
||||
@@ -14,26 +13,12 @@ fun Context.errorDialogBuilder(@StringRes messageId: Int): MaterialAlertDialogBu
|
||||
}
|
||||
|
||||
fun Context.errorDialogBuilder(message: String): MaterialAlertDialogBuilder {
|
||||
return errorDialogBuilder(message, null)
|
||||
}
|
||||
|
||||
fun Context.errorDialogBuilder(
|
||||
message: String,
|
||||
listener: DialogInterface.OnClickListener?
|
||||
): MaterialAlertDialogBuilder {
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.error_title)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(android.R.string.ok, listener)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
}
|
||||
|
||||
fun Context.errorDialogBuilder(exception: Throwable): MaterialAlertDialogBuilder {
|
||||
return errorDialogBuilder(exception, null)
|
||||
}
|
||||
|
||||
fun Context.errorDialogBuilder(
|
||||
exception: Throwable,
|
||||
listener: DialogInterface.OnClickListener?
|
||||
): MaterialAlertDialogBuilder {
|
||||
return errorDialogBuilder(exception.localizedMessage ?: exception.toString(), listener)
|
||||
return errorDialogBuilder(exception.localizedMessage ?: exception.toString())
|
||||
}
|
||||
@@ -33,6 +33,7 @@ import io.nekohasekai.sfa.Application
|
||||
import io.nekohasekai.sfa.R
|
||||
import io.nekohasekai.sfa.bg.ServiceConnection
|
||||
import io.nekohasekai.sfa.bg.ServiceNotification
|
||||
import io.nekohasekai.sfa.constant.Action
|
||||
import io.nekohasekai.sfa.constant.Alert
|
||||
import io.nekohasekai.sfa.constant.ServiceMode
|
||||
import io.nekohasekai.sfa.constant.Status
|
||||
@@ -43,6 +44,7 @@ import io.nekohasekai.sfa.database.TypedProfile
|
||||
import io.nekohasekai.sfa.databinding.ActivityMainBinding
|
||||
import io.nekohasekai.sfa.ktx.errorDialogBuilder
|
||||
import io.nekohasekai.sfa.ktx.hasPermission
|
||||
import io.nekohasekai.sfa.ktx.launchCustomTab
|
||||
import io.nekohasekai.sfa.ui.profile.NewProfileActivity
|
||||
import io.nekohasekai.sfa.ui.settings.CoreFragment
|
||||
import io.nekohasekai.sfa.ui.shared.AbstractActivity
|
||||
@@ -127,6 +129,12 @@ class MainActivity : AbstractActivity<ActivityMainBinding>(),
|
||||
override public fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
val uri = intent.data ?: return
|
||||
when (intent.action) {
|
||||
Action.OPEN_URL -> {
|
||||
launchCustomTab(uri.toString())
|
||||
return
|
||||
}
|
||||
}
|
||||
if (uri.scheme == "sing-box" && uri.host == "import-remote-profile") {
|
||||
val profile = try {
|
||||
Libbox.parseRemoteProfileImportLink(uri.toString())
|
||||
|
||||
@@ -78,9 +78,9 @@ class VPNScanActivity : AbstractActivity<ActivityVpnScanBinding>() {
|
||||
RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
fun bind(element: AppInfo) {
|
||||
binding.appIcon.setImageDrawable(element.packageInfo.applicationInfo.loadIcon(binding.root.context.packageManager))
|
||||
binding.appIcon.setImageDrawable(element.packageInfo.applicationInfo!!.loadIcon(binding.root.context.packageManager))
|
||||
binding.appName.text =
|
||||
element.packageInfo.applicationInfo.loadLabel(binding.root.context.packageManager)
|
||||
element.packageInfo.applicationInfo!!.loadLabel(binding.root.context.packageManager)
|
||||
binding.packageName.text = element.packageInfo.packageName
|
||||
val appType = element.vpnType.appType
|
||||
if (appType != null) {
|
||||
@@ -129,7 +129,8 @@ class VPNScanActivity : AbstractActivity<ActivityVpnScanBinding>() {
|
||||
}
|
||||
val vpnAppList =
|
||||
installedPackages.filter {
|
||||
it.services?.any { it.permission == Manifest.permission.BIND_VPN_SERVICE } ?: false
|
||||
it.services?.any { it.permission == Manifest.permission.BIND_VPN_SERVICE && it.applicationInfo != null }
|
||||
?: false
|
||||
}
|
||||
for ((index, packageInfo) in vpnAppList.withIndex()) {
|
||||
val appType = runCatching { getVPNAppType(packageInfo) }.getOrNull()
|
||||
@@ -181,7 +182,7 @@ class VPNScanActivity : AbstractActivity<ActivityVpnScanBinding>() {
|
||||
}
|
||||
|
||||
private fun getVPNAppType(packageInfo: PackageInfo): String? {
|
||||
ZipFile(File(packageInfo.applicationInfo.publicSourceDir)).use { packageFile ->
|
||||
ZipFile(File(packageInfo.applicationInfo!!.publicSourceDir)).use { packageFile ->
|
||||
for (packageEntry in packageFile.entries()) {
|
||||
if (!(packageEntry.name.startsWith("classes") && packageEntry.name.endsWith(
|
||||
".dex"
|
||||
@@ -235,8 +236,8 @@ class VPNScanActivity : AbstractActivity<ActivityVpnScanBinding>() {
|
||||
}
|
||||
|
||||
private fun getVPNCoreType(packageInfo: PackageInfo): VPNCoreType? {
|
||||
val packageFiles = mutableListOf(packageInfo.applicationInfo.publicSourceDir)
|
||||
packageInfo.applicationInfo.splitPublicSourceDirs?.also {
|
||||
val packageFiles = mutableListOf(packageInfo.applicationInfo!!.publicSourceDir)
|
||||
packageInfo.applicationInfo!!.splitPublicSourceDirs?.also {
|
||||
packageFiles.addAll(it)
|
||||
}
|
||||
val vpnType = try {
|
||||
|
||||
@@ -8,14 +8,23 @@ import androidx.annotation.StringRes
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import io.nekohasekai.libbox.DeprecatedNoteIterator
|
||||
import io.nekohasekai.libbox.Libbox
|
||||
import io.nekohasekai.sfa.R
|
||||
import io.nekohasekai.sfa.bg.BoxService
|
||||
import io.nekohasekai.sfa.constant.Status
|
||||
import io.nekohasekai.sfa.databinding.FragmentDashboardBinding
|
||||
import io.nekohasekai.sfa.ktx.errorDialogBuilder
|
||||
import io.nekohasekai.sfa.ktx.launchCustomTab
|
||||
import io.nekohasekai.sfa.ui.MainActivity
|
||||
import io.nekohasekai.sfa.ui.dashboard.GroupsFragment
|
||||
import io.nekohasekai.sfa.ui.dashboard.OverviewFragment
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class DashboardFragment : Fragment(R.layout.fragment_dashboard) {
|
||||
|
||||
@@ -49,6 +58,7 @@ class DashboardFragment : Fragment(R.layout.fragment_dashboard) {
|
||||
}
|
||||
|
||||
Status.Started -> {
|
||||
checkDeprecatedNotes()
|
||||
enablePager()
|
||||
binding.fab.setImageResource(R.drawable.ic_stop_24)
|
||||
binding.fab.show()
|
||||
@@ -99,6 +109,38 @@ class DashboardFragment : Fragment(R.layout.fragment_dashboard) {
|
||||
binding = null
|
||||
}
|
||||
|
||||
private fun checkDeprecatedNotes() {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val notes = Libbox.newStandaloneCommandClient().deprecatedNotes
|
||||
if (notes.hasNext()) {
|
||||
withContext(Dispatchers.Main) {
|
||||
loopShowDeprecatedNotes(notes)
|
||||
}
|
||||
}
|
||||
}.onFailure {
|
||||
activity?.errorDialogBuilder(it)?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loopShowDeprecatedNotes(notes: DeprecatedNoteIterator) {
|
||||
if (notes.hasNext()) {
|
||||
val note = notes.next()
|
||||
val builder = MaterialAlertDialogBuilder(requireContext())
|
||||
builder.setTitle(getString(R.string.service_error_title_deprecated_warning))
|
||||
builder.setMessage(note.message())
|
||||
builder.setPositiveButton(R.string.ok) { _, _ ->
|
||||
loopShowDeprecatedNotes(notes)
|
||||
}
|
||||
builder.setNeutralButton(R.string.service_error_deprecated_warning_documentation) { _, _ ->
|
||||
requireContext().launchCustomTab(note.migrationLink)
|
||||
loopShowDeprecatedNotes(notes)
|
||||
}
|
||||
builder.show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun enablePager() {
|
||||
val activity = activity ?: return
|
||||
val binding = binding ?: return
|
||||
|
||||
@@ -139,12 +139,12 @@ class LogFragment : Fragment(), CommandClient.Handler {
|
||||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
val messageLen = messageList.size
|
||||
val removeLen = logList.size + messageLen - 300
|
||||
logList.addAll(messageList)
|
||||
if (removeLen > 0) {
|
||||
repeat(removeLen) {
|
||||
logList.removeFirst()
|
||||
}
|
||||
}
|
||||
logList.addAll(messageList)
|
||||
updateViews(removeLen, messageLen)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,17 +75,25 @@ class QRScanActivity : AbstractActivity<ActivityQrScanBinding>() {
|
||||
}
|
||||
private val onFailure: (Exception) -> Unit = {
|
||||
lifecycleScope.launch {
|
||||
errorDialogBuilder(it).show()
|
||||
resetAnalyzer()
|
||||
errorDialogBuilder("MLKit error: ${it.localizedMessage}").show()
|
||||
}
|
||||
}
|
||||
private val vendorAnalyzer = Vendor.createQRCodeAnalyzer(onSuccess, onFailure)
|
||||
private var useVendorAnalyzer = vendorAnalyzer != null
|
||||
private fun resetAnalyzer() {
|
||||
if (useVendorAnalyzer) {
|
||||
useVendorAnalyzer = false
|
||||
imageAnalysis.clearAnalyzer()
|
||||
imageAnalyzer = ZxingQRCodeAnalyzer(onSuccess, onFailure)
|
||||
imageAnalysis.setAnalyzer(analysisExecutor, imageAnalyzer)
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var cameraProvider: ProcessCameraProvider
|
||||
private lateinit var cameraPreview: Preview
|
||||
private lateinit var camera: Camera
|
||||
|
||||
// prevent multiple error dialogs shows up at the same time
|
||||
private var invalidRawDataErrorDialogShowing: Boolean = false
|
||||
|
||||
private fun startCamera() {
|
||||
val cameraProviderFuture = try {
|
||||
ProcessCameraProvider.getInstance(this)
|
||||
@@ -132,14 +140,8 @@ class QRScanActivity : AbstractActivity<ActivityQrScanBinding>() {
|
||||
importRemoteProfileFromString(value)
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
if (invalidRawDataErrorDialogShowing) return false
|
||||
|
||||
invalidRawDataErrorDialogShowing = true
|
||||
|
||||
lifecycleScope.launch {
|
||||
errorDialogBuilder(e) { _, _ ->
|
||||
invalidRawDataErrorDialogShowing = false
|
||||
}.show()
|
||||
errorDialogBuilder(e).show()
|
||||
}
|
||||
}
|
||||
return false
|
||||
@@ -155,11 +157,19 @@ class QRScanActivity : AbstractActivity<ActivityQrScanBinding>() {
|
||||
finish()
|
||||
}
|
||||
|
||||
override fun onPrepareOptionsMenu(menu: Menu?): Boolean {
|
||||
if (!useVendorAnalyzer) {
|
||||
menu!!.findItem(R.id.action_use_vendor_analyzer).also {
|
||||
it.isEnabled = false
|
||||
it.isChecked = false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.qr_scan_menu, menu)
|
||||
if (vendorAnalyzer == null) {
|
||||
menu.findItem(R.id.action_use_vendor_analyzer).isEnabled = false
|
||||
} else {
|
||||
if (useVendorAnalyzer) {
|
||||
menu.findItem(R.id.action_use_vendor_analyzer).isChecked = true
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -53,24 +53,25 @@ class PerAppProxyActivity : AbstractActivity<ActivityPerAppProxyBinding>() {
|
||||
|
||||
inner class PackageCache(
|
||||
private val packageInfo: PackageInfo,
|
||||
private val appInfo: ApplicationInfo,
|
||||
) {
|
||||
|
||||
val packageName: String get() = packageInfo.packageName
|
||||
|
||||
val uid get() = packageInfo.applicationInfo.uid
|
||||
val uid get() = packageInfo.applicationInfo!!.uid
|
||||
|
||||
val installTime get() = packageInfo.firstInstallTime
|
||||
val updateTime get() = packageInfo.lastUpdateTime
|
||||
val isSystem get() = packageInfo.applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM == 1
|
||||
val isSystem get() = appInfo.flags and ApplicationInfo.FLAG_SYSTEM == 1
|
||||
val isOffline get() = packageInfo.requestedPermissions?.contains(Manifest.permission.INTERNET) != true
|
||||
val isDisabled get() = packageInfo.applicationInfo.flags and ApplicationInfo.FLAG_INSTALLED == 0
|
||||
val isDisabled get() = appInfo.flags and ApplicationInfo.FLAG_INSTALLED == 0
|
||||
|
||||
val applicationIcon by lazy {
|
||||
packageInfo.applicationInfo.loadIcon(packageManager)
|
||||
appInfo.loadIcon(packageManager)
|
||||
}
|
||||
|
||||
val applicationLabel by lazy {
|
||||
packageInfo.applicationInfo.loadLabel(packageManager).toString()
|
||||
appInfo.loadLabel(packageManager).toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +131,8 @@ class PerAppProxyActivity : AbstractActivity<ActivityPerAppProxyBinding>() {
|
||||
val packages = mutableListOf<PackageCache>()
|
||||
for (packageInfo in installedPackages) {
|
||||
if (packageInfo.packageName == packageName) continue
|
||||
packages.add(PackageCache(packageInfo))
|
||||
val appInfo = packageInfo.applicationInfo ?: continue
|
||||
packages.add(PackageCache(packageInfo, appInfo))
|
||||
}
|
||||
val selectedPackageNames = Settings.perAppProxyList.toMutableSet()
|
||||
val selectedUIDs = mutableSetOf<Int>()
|
||||
@@ -699,6 +701,7 @@ class PerAppProxyActivity : AbstractActivity<ActivityPerAppProxyBinding>() {
|
||||
packageName, packageManagerFlags
|
||||
)
|
||||
}
|
||||
val appInfo = packageInfo.applicationInfo ?: return false
|
||||
packageInfo.services?.forEach {
|
||||
if (it.name.matches(chinaAppRegex)) {
|
||||
Log.d("PerAppProxyActivity", "Match service ${it.name} in $packageName")
|
||||
@@ -723,7 +726,7 @@ class PerAppProxyActivity : AbstractActivity<ActivityPerAppProxyBinding>() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
ZipFile(File(packageInfo.applicationInfo.publicSourceDir)).use {
|
||||
ZipFile(File(appInfo.publicSourceDir)).use {
|
||||
for (packageEntry in it.entries()) {
|
||||
if (packageEntry.name.startsWith("firebase-")) return false
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import kotlinx.coroutines.launch
|
||||
open class CommandClient(
|
||||
private val scope: CoroutineScope,
|
||||
private val connectionType: ConnectionType,
|
||||
private val handler: Handler
|
||||
private val handler: Handler,
|
||||
) {
|
||||
|
||||
enum class ConnectionType {
|
||||
@@ -31,16 +31,19 @@ open class CommandClient(
|
||||
|
||||
fun onConnected() {}
|
||||
fun onDisconnected() {}
|
||||
|
||||
fun updateStatus(status: StatusMessage) {}
|
||||
fun updateGroups(newGroups: MutableList<OutboundGroup>) {}
|
||||
|
||||
fun clearLogs() {}
|
||||
fun appendLogs(message: List<String>) {}
|
||||
|
||||
fun updateGroups(newGroups: MutableList<OutboundGroup>) {}
|
||||
|
||||
fun initializeClashMode(modeList: List<String>, currentMode: String) {}
|
||||
fun updateClashMode(newMode: String) {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private var commandClient: CommandClient? = null
|
||||
private val clientHandler = ClientHandler()
|
||||
fun connect() {
|
||||
@@ -52,7 +55,7 @@ open class CommandClient(
|
||||
ConnectionType.Log -> Libbox.CommandLog
|
||||
ConnectionType.ClashMode -> Libbox.CommandClashMode
|
||||
}
|
||||
options.statusInterval = 2 * 1000 * 1000 * 1000
|
||||
options.statusInterval = 1 * 1000 * 1000 * 1000
|
||||
val commandClient = CommandClient(clientHandler, options)
|
||||
scope.launch(Dispatchers.IO) {
|
||||
for (i in 1..10) {
|
||||
@@ -119,10 +122,7 @@ open class CommandClient(
|
||||
handler.appendLogs(messageList.toList())
|
||||
}
|
||||
|
||||
override fun writeStatus(message: StatusMessage?) {
|
||||
if (message == null) {
|
||||
return
|
||||
}
|
||||
override fun writeStatus(message: StatusMessage) {
|
||||
handler.updateStatus(message)
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
<string name="service_error_title_start_command_server">Start command server</string>
|
||||
<string name="service_error_title_create_service">Create service</string>
|
||||
<string name="service_error_title_start_service">Start service</string>
|
||||
<string name="service_error_title_deprecated_warning">Deprecated Warning</string>
|
||||
<string name="service_error_deprecated_warning_documentation">Documentation</string>
|
||||
|
||||
<string name="status_status">Status</string>
|
||||
<string name="status_memory">Memory</string>
|
||||
|
||||
@@ -29,7 +29,9 @@ class MLKitQRCodeAnalyzer(
|
||||
override fun analyze(image: ImageProxy) {
|
||||
if (image.image == null) return
|
||||
|
||||
if (failureOccurred && System.currentTimeMillis() - failureTimestamp < 1000L) {
|
||||
val nowMills = System.currentTimeMillis()
|
||||
if (failureOccurred && nowMills - failureTimestamp < 5000L) {
|
||||
failureTimestamp = nowMills
|
||||
Log.d("MLKitQRCodeAnalyzer", "throttled analysis since error occurred in previous pass")
|
||||
image.close()
|
||||
return
|
||||
|
||||
@@ -5,8 +5,8 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '8.7.0' apply false
|
||||
id 'com.android.library' version '8.7.0' apply false
|
||||
id 'com.android.application' version '8.7.2' apply false
|
||||
id 'com.android.library' version '8.7.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
|
||||
id 'com.google.devtools.ksp' version '1.9.23-1.0.20' apply false
|
||||
id 'com.github.triplet.play' version '3.8.4' apply false
|
||||
|
||||
@@ -10,6 +10,7 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
}
|
||||
rootProject.name = "sing-box"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
VERSION_CODE=401
|
||||
VERSION_NAME=1.10.1
|
||||
GO_VERSION=go1.23.2
|
||||
VERSION_CODE=423
|
||||
VERSION_NAME=1.10.2
|
||||
GO_VERSION=go1.23.3
|
||||
|
||||
@@ -83,6 +83,7 @@ public struct DashboardView: View {
|
||||
}
|
||||
|
||||
struct DashboardView1: View {
|
||||
@Environment(\.openURL) var openURL
|
||||
@EnvironmentObject private var environments: ExtensionEnvironments
|
||||
@EnvironmentObject private var profile: ExtensionProfile
|
||||
@State private var alert: Alert?
|
||||
@@ -100,6 +101,9 @@ public struct DashboardView: View {
|
||||
if newValue == .disconnecting || newValue == .connected {
|
||||
Task {
|
||||
await checkServiceError()
|
||||
if newValue == .connected {
|
||||
await checkDeprecatedNotes()
|
||||
}
|
||||
}
|
||||
} else if newValue == .connecting {
|
||||
notStarted = true
|
||||
@@ -115,6 +119,45 @@ public struct DashboardView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private nonisolated func checkDeprecatedNotes() async {
|
||||
do {
|
||||
let reports = try LibboxNewStandaloneCommandClient()!.getDeprecatedNotes()
|
||||
if reports.hasNext() {
|
||||
await MainActor.run {
|
||||
loopShowDeprecateNotes(reports)
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
await MainActor.run {
|
||||
alert = Alert(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
private func loopShowDeprecateNotes(_ reports: any LibboxDeprecatedNoteIteratorProtocol) {
|
||||
if reports.hasNext() {
|
||||
let report = reports.next()!
|
||||
alert = Alert(
|
||||
title: Text("Deprecated Warning"),
|
||||
message: Text(report.message()),
|
||||
primaryButton: .default(Text("Documentation")) {
|
||||
openURL(URL(string: report.migrationLink)!)
|
||||
Task.detached {
|
||||
try await Task.sleep(nanoseconds: 300 * MSEC_PER_SEC)
|
||||
await loopShowDeprecateNotes(reports)
|
||||
}
|
||||
},
|
||||
secondaryButton: .cancel(Text("Ok")) {
|
||||
Task.detached {
|
||||
try await Task.sleep(nanoseconds: 300 * MSEC_PER_SEC)
|
||||
await loopShowDeprecateNotes(reports)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private nonisolated func checkServiceError() async {
|
||||
var error: NSError?
|
||||
let message = LibboxReadServiceError(&error)
|
||||
|
||||
@@ -5,6 +5,7 @@ import SwiftUI
|
||||
public struct ExtensionStatusView: View {
|
||||
@Environment(\.scenePhase) private var scenePhase
|
||||
@StateObject private var commandClient = CommandClient(.status)
|
||||
|
||||
@State private var columnCount: Int = 4
|
||||
@State private var alert: Alert?
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ public struct GroupView: View {
|
||||
}
|
||||
.alertBinding($alert)
|
||||
.padding([.top, .bottom], 8)
|
||||
.animation(.easeInOut, value: group.isExpand)
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
|
||||
@@ -14,7 +14,6 @@ public class CommandClient: ObservableObject {
|
||||
private let logMaxLines: Int
|
||||
private var commandClient: LibboxCommandClient?
|
||||
private var connectTask: Task<Void, Error>?
|
||||
|
||||
@Published public var isConnected: Bool
|
||||
@Published public var status: LibboxStatusMessage?
|
||||
@Published public var groups: [LibboxOutboundGroup]?
|
||||
@@ -173,7 +172,7 @@ public class CommandClient: ObservableObject {
|
||||
}
|
||||
DispatchQueue.main.async { [self] in
|
||||
if commandClient.logList.count >= commandClient.logMaxLines {
|
||||
commandClient.logList.removeSubrange(0 ..< Int(messageList.len()))
|
||||
commandClient.logList.removeFirst()
|
||||
}
|
||||
while messageList.hasNext() {
|
||||
commandClient.logList.append(messageList.next())
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import Libbox
|
||||
import NetworkExtension
|
||||
import UserNotifications
|
||||
#if canImport(CoreWLAN)
|
||||
import CoreWLAN
|
||||
#endif
|
||||
@@ -39,7 +40,10 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
|
||||
if let error {
|
||||
throw error
|
||||
}
|
||||
settings.dnsSettings = NEDNSSettings(servers: [dnsServer])
|
||||
let dnsSettings = NEDNSSettings(servers: [dnsServer])
|
||||
dnsSettings.matchDomains = [""]
|
||||
dnsSettings.matchDomainsNoSearch = true
|
||||
settings.dnsSettings = dnsSettings
|
||||
|
||||
var ipv4Address: [String] = []
|
||||
var ipv4Mask: [String] = []
|
||||
@@ -335,4 +339,28 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
|
||||
func reset() {
|
||||
networkSettings = nil
|
||||
}
|
||||
|
||||
public func send(_ notification: LibboxNotification?) throws {
|
||||
#if !os(tvOS)
|
||||
guard let notification else {
|
||||
return
|
||||
}
|
||||
let center = UNUserNotificationCenter.current()
|
||||
let content = UNMutableNotificationContent()
|
||||
|
||||
content.title = notification.title
|
||||
content.subtitle = notification.subtitle
|
||||
content.body = notification.body
|
||||
if !notification.openURL.isEmpty {
|
||||
content.userInfo["OPEN_URL"] = notification.openURL
|
||||
content.categoryIdentifier = "OPEN_URL"
|
||||
}
|
||||
content.interruptionLevel = .active
|
||||
let request = UNNotificationRequest(identifier: notification.identifier, content: content, trigger: nil)
|
||||
try runBlocking {
|
||||
try await center.requestAuthorization(options: [.alert])
|
||||
try await center.add(request)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,25 @@ import ApplicationLibrary
|
||||
import Foundation
|
||||
import Libbox
|
||||
import Library
|
||||
import UserNotifications
|
||||
|
||||
open class ApplicationDelegate: NSObject, NSApplicationDelegate {
|
||||
open class ApplicationDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDelegate {
|
||||
public func applicationDidFinishLaunching(_: Notification) {
|
||||
NSLog("Here I stand")
|
||||
LibboxSetup(FilePath.sharedDirectory.relativePath, FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, false)
|
||||
let notificationCenter = UNUserNotificationCenter.current()
|
||||
notificationCenter.setNotificationCategories([
|
||||
UNNotificationCategory(
|
||||
identifier: "OPEN_URL",
|
||||
actions: [
|
||||
UNNotificationAction(identifier: "COPY_URL", title: "Copy URL", options: .foreground, icon: UNNotificationActionIcon(systemImageName: "clipboard.fill")),
|
||||
UNNotificationAction(identifier: "OPEN_URL", title: "Open", options: .foreground, icon: UNNotificationActionIcon(systemImageName: "safari.fill")),
|
||||
],
|
||||
intentIdentifiers: []
|
||||
),
|
||||
]
|
||||
)
|
||||
notificationCenter.delegate = self
|
||||
let event = NSAppleEventManager.shared().currentAppleEvent
|
||||
let launchedAsLogInItem =
|
||||
event?.eventID == kAEOpenApplication &&
|
||||
@@ -34,6 +48,23 @@ open class ApplicationDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
public func userNotificationCenter(_: UNUserNotificationCenter, willPresent _: UNNotification) async -> UNNotificationPresentationOptions {
|
||||
.banner
|
||||
}
|
||||
|
||||
public func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async {
|
||||
if let url = response.notification.request.content.userInfo["OPEN_URL"] as? String {
|
||||
switch response.actionIdentifier {
|
||||
case "COPY_URL":
|
||||
NSPasteboard.general.setString(url, forType: .URL)
|
||||
case "OPEN_URL":
|
||||
fallthrough
|
||||
default:
|
||||
NSWorkspace.shared.open(URL(string: url)!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool {
|
||||
SharedPreferences.inDebug || !SharedPreferences.menuBarExtraInBackground.getBlocking()
|
||||
}
|
||||
|
||||
@@ -4,17 +4,48 @@ import Libbox
|
||||
import Library
|
||||
import Network
|
||||
import UIKit
|
||||
import UserNotifications
|
||||
|
||||
class ApplicationDelegate: NSObject, UIApplicationDelegate {
|
||||
class ApplicationDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
|
||||
private var profileServer: ProfileServer?
|
||||
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
NSLog("Here I stand")
|
||||
LibboxSetup(FilePath.sharedDirectory.relativePath, FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, false)
|
||||
let notificationCenter = UNUserNotificationCenter.current()
|
||||
notificationCenter.setNotificationCategories([
|
||||
UNNotificationCategory(
|
||||
identifier: "OPEN_URL",
|
||||
actions: [
|
||||
UNNotificationAction(identifier: "COPY_URL", title: "Copy URL", options: .foreground, icon: UNNotificationActionIcon(systemImageName: "clipboard.fill")),
|
||||
UNNotificationAction(identifier: "OPEN_URL", title: "Open", options: .foreground, icon: UNNotificationActionIcon(systemImageName: "safari.fill")),
|
||||
],
|
||||
intentIdentifiers: []
|
||||
),
|
||||
]
|
||||
)
|
||||
notificationCenter.delegate = self
|
||||
setup()
|
||||
return true
|
||||
}
|
||||
|
||||
func userNotificationCenter(_: UNUserNotificationCenter, willPresent _: UNNotification) async -> UNNotificationPresentationOptions {
|
||||
.banner
|
||||
}
|
||||
|
||||
func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async {
|
||||
if let url = response.notification.request.content.userInfo["OPEN_URL"] as? String {
|
||||
switch response.actionIdentifier {
|
||||
case "COPY_URL":
|
||||
UIPasteboard.general.string = url
|
||||
case "OPEN_URL":
|
||||
fallthrough
|
||||
default:
|
||||
await UIApplication.shared.open(URL(string: url)!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
do {
|
||||
try UIProfileUpdateTask.configure()
|
||||
|
||||
@@ -483,7 +483,6 @@
|
||||
3A27D8FF2A89BE230031EBCC /* CommandClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandClient.swift; sourceTree = "<group>"; };
|
||||
3A27D9012A89C6870031EBCC /* ExtensionEnvironments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionEnvironments.swift; sourceTree = "<group>"; };
|
||||
3A2EAEEC2A6F4CBB00D00DE3 /* StandaloneApplicationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandaloneApplicationDelegate.swift; sourceTree = "<group>"; };
|
||||
3A334ECF2C0F621E00E9C577 /* ConnectionDetailsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionDetailsView.swift; sourceTree = "<group>"; };
|
||||
3A2F29EA2C998A5D007E024C /* Export.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Export.plist; sourceTree = "<group>"; };
|
||||
3A334ECF2C0F621E00E9C577 /* ConnectionDetailsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionDetailsView.swift; sourceTree = "<group>"; };
|
||||
3A3AB2A62B70C146001815AE /* CoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreView.swift; sourceTree = "<group>"; };
|
||||
@@ -2148,7 +2147,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
SDKROOT = appletvos;
|
||||
@@ -2183,7 +2182,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
SDKROOT = appletvos;
|
||||
@@ -2488,7 +2487,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
@@ -2530,7 +2529,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
@@ -2553,7 +2552,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 284;
|
||||
CURRENT_PROJECT_VERSION = 286;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 287TTNZF8L;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
@@ -2571,7 +2570,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
OTHER_CODE_SIGN_FLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
@@ -2593,7 +2592,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 284;
|
||||
CURRENT_PROJECT_VERSION = 286;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 287TTNZF8L;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
@@ -2611,7 +2610,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
OTHER_CODE_SIGN_FLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt;
|
||||
PRODUCT_NAME = "sing-box";
|
||||
@@ -2739,7 +2738,7 @@
|
||||
"@executable_path/../../../../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt.system;
|
||||
PRODUCT_NAME = "$(inherited)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -2775,7 +2774,7 @@
|
||||
"@executable_path/../../../../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt.system;
|
||||
PRODUCT_NAME = "$(inherited)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -2817,7 +2816,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt.standalone;
|
||||
PRODUCT_NAME = SFM;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -2858,7 +2857,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
MARKETING_VERSION = 1.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfavt.standalone;
|
||||
PRODUCT_NAME = SFM;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -97,6 +97,10 @@ func (c *echServerConfig) startWatcher() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.watcher.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.watcher = watcher
|
||||
return nil
|
||||
}
|
||||
@@ -232,7 +236,7 @@ func NewECHServer(ctx context.Context, logger log.Logger, options option.Inbound
|
||||
var echKey []byte
|
||||
if len(options.ECH.Key) > 0 {
|
||||
echKey = []byte(strings.Join(options.ECH.Key, "\n"))
|
||||
} else if options.KeyPath != "" {
|
||||
} else if options.ECH.KeyPath != "" {
|
||||
content, err := os.ReadFile(options.ECH.KeyPath)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "read ECH key")
|
||||
|
||||
@@ -106,6 +106,10 @@ func (c *STDServerConfig) startWatcher() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.watcher.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.watcher = watcher
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
icon: material/alert-decagram
|
||||
---
|
||||
|
||||
#### 1.11.0-alpha.19
|
||||
|
||||
* Fixes and improvements
|
||||
|
||||
### 1.10.2
|
||||
|
||||
* Add deprecated warnings
|
||||
* Fix proxying websocket connections in HTTP/mixed inbounds
|
||||
* Fixes and improvements
|
||||
|
||||
#### 1.11.0-alpha.18
|
||||
|
||||
* Fixes and improvements
|
||||
|
||||
@@ -25,14 +25,14 @@ require (
|
||||
github.com/sagernet/gvisor v0.0.0-20241021032506-a4324256e4a3
|
||||
github.com/sagernet/quic-go v0.48.1-beta.1
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691
|
||||
github.com/sagernet/sing v0.6.0-alpha.16
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2
|
||||
github.com/sagernet/sing v0.6.0-alpha.17
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9
|
||||
github.com/sagernet/sing-vmess v0.1.12
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7
|
||||
github.com/sagernet/utls v1.6.7
|
||||
@@ -53,6 +53,8 @@ require (
|
||||
howett.net/plist v1.0.1
|
||||
)
|
||||
|
||||
//replace github.com/sagernet/sing => ../sing
|
||||
|
||||
require (
|
||||
github.com/ajg/form v1.5.1 // indirect
|
||||
github.com/andybalholm/brotli v1.0.6 // indirect
|
||||
|
||||
@@ -110,24 +110,22 @@ github.com/sagernet/quic-go v0.48.1-beta.1/go.mod h1:1WgdDIVD1Gybp40JTWketeSfKA/
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc=
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU=
|
||||
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
|
||||
github.com/sagernet/sing v0.6.0-alpha.16 h1:Ml+nJa8J9d+Svqv2pBvJoet+8PF302Snb6wcMUXaoy4=
|
||||
github.com/sagernet/sing v0.6.0-alpha.16/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2 h1:0x5WjrO+Ifk9sqJlHRz/tKENHwoEinQ8HQCHAhpJHAQ=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2/go.mod h1:ZiXcacKL54jSSYZMbYF3qKNFkkW674Jt+85YCmK64K8=
|
||||
github.com/sagernet/sing v0.6.0-alpha.17 h1:y//jVrBjJMW6tRpA/ElT7+Snp3DHEJvO60D+DByg/Es=
|
||||
github.com/sagernet/sing v0.6.0-alpha.17/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3 h1:TcAQdz68Gs28VD9o9zDIW7IS8A9LZDruTPI9g9JbGHA=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3/go.mod h1:9LHcYKg2bGQpbtXrfNbopz8ok/zBK9ljiI2kmFG9JKg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1/go.mod h1:FTcImmdfW38Lz7b+HQ+mxxOth1lz4ao8uEnz+MwIJQE=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3 h1:2svvOqgQCJg7FNrIrLTaRB6oDzXPiIyWIt9csjZxD6Q=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3/go.mod h1:Fmnpy0XoyYdjJrxNqEyl3LC9uLibMNNbxG7dt6HATY4=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4 h1:P9xAx3nIfcqb9M8jfgs0uLm+VxCcaY++FCqaBfHY3dQ=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4/go.mod h1:h5RkKTmUhudJKzK7c87FPXD5w1bJjVyxMN9+opZcctA=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.1.5-0.20241117084441-2711c0c857f0 h1:zH35YfgT29AphYX8OWDftjun4ClA+oTptUkKLPC0KeY=
|
||||
github.com/sagernet/sing-shadowtls v0.1.5-0.20241117084441-2711c0c857f0/go.mod h1:9wA+bA/j7RiGPNKo7As8neMTu/PRU9FDpFhU5yVT4lE=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1 h1:Mu2mp1TRaHY+yL+oxMP9XQIQwvwYLTVg8jhuOQbF/XY=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1/go.mod h1:9wA+bA/j7RiGPNKo7As8neMTu/PRU9FDpFhU5yVT4lE=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8 h1:HhXyUvXxtaXgT+IILZMq6kbrAyDbUwbN+Df/XxpL7Vo=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8/go.mod h1:JkgiLLnQUXln1zLGVoJqUwAulJGT0xoiPU4/pYF1fhU=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 h1:RPrpgAdkP5td0vLfS5ldvYosFjSsZtRPxiyLV6jyKg0=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2/go.mod h1:0j5XlzKxaWRIEjc1uiSKmVoWb0k+L9QgZVb876+thZA=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9 h1:Qf667035KnlydZ+ftj3U4HH+oddi3RdyKzBiCcnSgaI=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9/go.mod h1:TgvxE2YD7O9c/unHju0nWAGBGsVppWIuju13vlmdllM=
|
||||
github.com/sagernet/sing-vmess v0.1.12 h1:2gFD8JJb+eTFMoa8FIVMnknEi+vCSfaiTXTfEYAYAPg=
|
||||
github.com/sagernet/sing-vmess v0.1.12/go.mod h1:luTSsfyBGAc9VhtCqwjR+dt1QgqBhuYBCONB/POhF8I=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
|
||||
@@ -13,9 +13,9 @@ require (
|
||||
github.com/docker/go-connections v0.5.0
|
||||
github.com/gofrs/uuid/v5 v5.3.0
|
||||
github.com/sagernet/quic-go v0.48.1-beta.1
|
||||
github.com/sagernet/sing v0.6.0-alpha.16
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3
|
||||
github.com/sagernet/sing v0.6.0-alpha.17
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
||||
github.com/spyzhov/ajson v0.9.4
|
||||
@@ -25,7 +25,7 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.4.14 // indirect
|
||||
github.com/ajg/form v1.5.1 // indirect
|
||||
github.com/andybalholm/brotli v1.0.6 // indirect
|
||||
github.com/caddyserver/certmagic v0.20.0 // indirect
|
||||
@@ -33,7 +33,7 @@ require (
|
||||
github.com/containerd/log v0.1.0 // indirect
|
||||
github.com/cretz/bine v0.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/distribution/reference v0.5.0 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
@@ -68,10 +68,10 @@ require (
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.2 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/oschwald/maxminddb-golang v1.12.0 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.14 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/errors v0.8.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/quic-go/qpack v0.4.0 // indirect
|
||||
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
|
||||
@@ -84,8 +84,8 @@ require (
|
||||
github.com/sagernet/nftables v0.3.0-beta.4 // indirect
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1 // indirect
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 // indirect
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9 // indirect
|
||||
github.com/sagernet/sing-vmess v0.1.12 // indirect
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 // indirect
|
||||
github.com/sagernet/utls v1.6.7 // indirect
|
||||
@@ -94,12 +94,12 @@ require (
|
||||
github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect
|
||||
github.com/vishvananda/netns v0.0.4 // indirect
|
||||
github.com/zeebo/blake3 v0.2.3 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
|
||||
go.opentelemetry.io/otel v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.31.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect
|
||||
go.opentelemetry.io/otel v1.32.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.32.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.32.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
||||
@@ -111,7 +111,7 @@ require (
|
||||
golang.org/x/text v0.20.0 // indirect
|
||||
golang.org/x/time v0.7.0 // indirect
|
||||
golang.org/x/tools v0.24.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
|
||||
google.golang.org/grpc v1.67.1 // indirect
|
||||
google.golang.org/protobuf v1.35.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
|
||||
@@ -19,8 +19,8 @@ github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbe
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
|
||||
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI=
|
||||
github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
||||
@@ -62,8 +62,8 @@ github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5X
|
||||
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0=
|
||||
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/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2 h1:9K06NfxkBh25x56yVhWWlKFE8YpicaSfHwoV8SFbueA=
|
||||
@@ -78,6 +78,7 @@ github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6K
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/libdns/alidns v1.0.3 h1:LFHuGnbseq5+HCeGa1aW8awyX/4M2psB9962fdD2+yQ=
|
||||
@@ -113,14 +114,14 @@ github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU=
|
||||
github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
||||
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/oschwald/maxminddb-golang v1.12.0 h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=
|
||||
github.com/oschwald/maxminddb-golang v1.12.0/go.mod h1:q0Nob5lTCqyQ8WT6FYgS1L7PXKVVbgiymefNwIjPzgY=
|
||||
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
|
||||
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
|
||||
@@ -146,22 +147,22 @@ github.com/sagernet/quic-go v0.48.1-beta.1/go.mod h1:1WgdDIVD1Gybp40JTWketeSfKA/
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc=
|
||||
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU=
|
||||
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
|
||||
github.com/sagernet/sing v0.6.0-alpha.16 h1:Ml+nJa8J9d+Svqv2pBvJoet+8PF302Snb6wcMUXaoy4=
|
||||
github.com/sagernet/sing v0.6.0-alpha.16/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2 h1:0x5WjrO+Ifk9sqJlHRz/tKENHwoEinQ8HQCHAhpJHAQ=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.2/go.mod h1:ZiXcacKL54jSSYZMbYF3qKNFkkW674Jt+85YCmK64K8=
|
||||
github.com/sagernet/sing v0.6.0-alpha.17 h1:y//jVrBjJMW6tRpA/ElT7+Snp3DHEJvO60D+DByg/Es=
|
||||
github.com/sagernet/sing v0.6.0-alpha.17/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3 h1:TcAQdz68Gs28VD9o9zDIW7IS8A9LZDruTPI9g9JbGHA=
|
||||
github.com/sagernet/sing-dns v0.4.0-alpha.3/go.mod h1:9LHcYKg2bGQpbtXrfNbopz8ok/zBK9ljiI2kmFG9JKg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg=
|
||||
github.com/sagernet/sing-mux v0.3.0-alpha.1/go.mod h1:FTcImmdfW38Lz7b+HQ+mxxOth1lz4ao8uEnz+MwIJQE=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3 h1:2svvOqgQCJg7FNrIrLTaRB6oDzXPiIyWIt9csjZxD6Q=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.3/go.mod h1:Fmnpy0XoyYdjJrxNqEyl3LC9uLibMNNbxG7dt6HATY4=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4 h1:P9xAx3nIfcqb9M8jfgs0uLm+VxCcaY++FCqaBfHY3dQ=
|
||||
github.com/sagernet/sing-quic v0.4.0-alpha.4/go.mod h1:h5RkKTmUhudJKzK7c87FPXD5w1bJjVyxMN9+opZcctA=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1 h1:Mu2mp1TRaHY+yL+oxMP9XQIQwvwYLTVg8jhuOQbF/XY=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.1/go.mod h1:9wA+bA/j7RiGPNKo7As8neMTu/PRU9FDpFhU5yVT4lE=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8 h1:HhXyUvXxtaXgT+IILZMq6kbrAyDbUwbN+Df/XxpL7Vo=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.8/go.mod h1:JkgiLLnQUXln1zLGVoJqUwAulJGT0xoiPU4/pYF1fhU=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2 h1:RPrpgAdkP5td0vLfS5ldvYosFjSsZtRPxiyLV6jyKg0=
|
||||
github.com/sagernet/sing-shadowtls v0.2.0-alpha.2/go.mod h1:0j5XlzKxaWRIEjc1uiSKmVoWb0k+L9QgZVb876+thZA=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9 h1:Qf667035KnlydZ+ftj3U4HH+oddi3RdyKzBiCcnSgaI=
|
||||
github.com/sagernet/sing-tun v0.6.0-alpha.9/go.mod h1:TgvxE2YD7O9c/unHju0nWAGBGsVppWIuju13vlmdllM=
|
||||
github.com/sagernet/sing-vmess v0.1.12 h1:2gFD8JJb+eTFMoa8FIVMnknEi+vCSfaiTXTfEYAYAPg=
|
||||
github.com/sagernet/sing-vmess v0.1.12/go.mod h1:luTSsfyBGAc9VhtCqwjR+dt1QgqBhuYBCONB/POhF8I=
|
||||
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
|
||||
@@ -172,11 +173,14 @@ github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8 h1:R0OMYASco
|
||||
github.com/sagernet/wireguard-go v0.0.0-20231215174105-89dec3b2f3e8/go.mod h1:K4J7/npM+VAMUeUmTa2JaA02JmyheP0GpRBOUvn3ecc=
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854/go.mod h1:LtfoSK3+NG57tvnVEHgcuBW9ujgE8enPSgzgwStwCAA=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spyzhov/ajson v0.9.4 h1:MVibcTCgO7DY4IlskdqIlCmDOsUOZ9P7oKj8ifdcf84=
|
||||
github.com/spyzhov/ajson v0.9.4/go.mod h1:a6oSw0MMb7Z5aD2tPoPO+jq11ETKgXUr2XktHdT8Wt8=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
@@ -193,20 +197,20 @@ github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg=
|
||||
github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ=
|
||||
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
|
||||
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM=
|
||||
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
|
||||
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4=
|
||||
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
|
||||
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
|
||||
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
|
||||
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94=
|
||||
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
|
||||
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI=
|
||||
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
|
||||
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
|
||||
go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4=
|
||||
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
|
||||
go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
|
||||
go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
@@ -242,8 +246,10 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
|
||||
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -274,10 +280,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
|
||||
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
|
||||
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
|
||||
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.78-4
|
||||
PKG_RELEASE:=
|
||||
PKG_VERSION:=24.11.18
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
||||
|
||||
@@ -927,11 +927,9 @@ function gen_config(var)
|
||||
if node.protocol == "_shunt" then
|
||||
local rules = {}
|
||||
|
||||
local preproxy_enabled = node.preproxy_enabled == "1"
|
||||
local preproxy_rule_name = "main"
|
||||
local preproxy_tag = "main"
|
||||
local preproxy_node_id = node["main_node"]
|
||||
local preproxy_node = preproxy_enabled and preproxy_node_id and uci:get_all(appname, preproxy_node_id) or nil
|
||||
local preproxy_rule_name = node.preproxy_enabled == "1" and "main" or nil
|
||||
local preproxy_tag = preproxy_rule_name
|
||||
local preproxy_node_id = preproxy_rule_name and node["main_node"] or nil
|
||||
|
||||
local function gen_shunt_node(rule_name, _node_id)
|
||||
if not rule_name then return nil, nil end
|
||||
@@ -956,7 +954,6 @@ function gen_config(var)
|
||||
}
|
||||
local _outbound = gen_outbound(flag, _node, rule_name)
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
table.insert(outbounds, _outbound)
|
||||
rule_outboundTag = _outbound.tag
|
||||
end
|
||||
@@ -966,10 +963,10 @@ function gen_config(var)
|
||||
if not _node then return nil, nil end
|
||||
|
||||
if api.is_normal_node(_node) then
|
||||
local proxy = preproxy_enabled and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local use_proxy = preproxy_tag and node[rule_name .. "_proxy_tag"] == preproxy_rule_name and _node_id ~= preproxy_node_id
|
||||
local copied_outbound
|
||||
for index, value in ipairs(outbounds) do
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == preproxy_tag then
|
||||
if value["_id"] == _node_id and value["_flag_proxy_tag"] == (use_proxy and preproxy_tag or nil) then
|
||||
copied_outbound = api.clone(value)
|
||||
break
|
||||
end
|
||||
@@ -979,7 +976,7 @@ function gen_config(var)
|
||||
table.insert(outbounds, copied_outbound)
|
||||
rule_outboundTag = copied_outbound.tag
|
||||
else
|
||||
if proxy then
|
||||
if use_proxy then
|
||||
local pre_proxy = nil
|
||||
if _node.type ~= "sing-box" then
|
||||
pre_proxy = true
|
||||
@@ -1006,7 +1003,7 @@ function gen_config(var)
|
||||
end
|
||||
end
|
||||
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = proxy and preproxy_tag or nil })
|
||||
local _outbound = gen_outbound(flag, _node, rule_name, { tag = use_proxy and preproxy_tag or nil })
|
||||
if _outbound then
|
||||
_outbound.tag = _outbound.tag .. ":" .. _node.remarks
|
||||
rule_outboundTag = set_outbound_detour(_node, _outbound, outbounds, rule_name)
|
||||
@@ -1030,12 +1027,10 @@ function gen_config(var)
|
||||
return rule_outboundTag
|
||||
end
|
||||
|
||||
if preproxy_node then
|
||||
if preproxy_tag and preproxy_node_id then
|
||||
local preproxy_outboundTag = gen_shunt_node(preproxy_rule_name, preproxy_node_id)
|
||||
if preproxy_outboundTag then
|
||||
preproxy_tag = preproxy_outboundTag
|
||||
else
|
||||
preproxy_node = nil
|
||||
end
|
||||
end
|
||||
--default_node
|
||||
|
||||
@@ -758,16 +758,15 @@ function gen_config(var)
|
||||
end
|
||||
-- new balancer
|
||||
local blc_nodes = _node.balancing_node
|
||||
local length = #blc_nodes
|
||||
local valid_nodes = {}
|
||||
for i = 1, length do
|
||||
for i = 1, #blc_nodes do
|
||||
local blc_node_id = blc_nodes[i]
|
||||
local blc_node_tag = "blc-" .. blc_node_id
|
||||
local is_new_blc_node = true
|
||||
for _, outbound in ipairs(outbounds) do
|
||||
if outbound.tag == blc_node_tag then
|
||||
if outbound.tag:find("^" .. blc_node_tag) == 1 then
|
||||
is_new_blc_node = false
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -777,7 +776,7 @@ function gen_config(var)
|
||||
if outbound then
|
||||
outbound.tag = outbound.tag .. ":" .. blc_node.remarks
|
||||
table.insert(outbounds, outbound)
|
||||
valid_nodes[#valid_nodes + 1] = blc_node_tag
|
||||
valid_nodes[#valid_nodes + 1] = outbound.tag
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1241,7 +1240,9 @@ function gen_config(var)
|
||||
}
|
||||
})
|
||||
else
|
||||
if COMMON.default_outbound_tag then
|
||||
if COMMON.default_balancer_tag then
|
||||
dns_outbound_tag = nil
|
||||
elseif COMMON.default_outbound_tag then
|
||||
dns_outbound_tag = COMMON.default_outbound_tag
|
||||
end
|
||||
end
|
||||
@@ -1262,9 +1263,9 @@ function gen_config(var)
|
||||
table.insert(outbounds, {
|
||||
tag = "dns-out",
|
||||
protocol = "dns",
|
||||
proxySettings = {
|
||||
proxySettings = dns_outbound_tag and {
|
||||
tag = dns_outbound_tag
|
||||
},
|
||||
} or nil,
|
||||
settings = {
|
||||
address = remote_dns_tcp_server,
|
||||
port = tonumber(remote_dns_tcp_port),
|
||||
@@ -1288,6 +1289,7 @@ function gen_config(var)
|
||||
remote_dns_tcp_server
|
||||
},
|
||||
port = tonumber(remote_dns_tcp_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
if _remote_dns_host then
|
||||
@@ -1299,6 +1301,7 @@ function gen_config(var)
|
||||
_remote_dns_host
|
||||
},
|
||||
port = tonumber(remote_dns_doh_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
end
|
||||
@@ -1311,6 +1314,7 @@ function gen_config(var)
|
||||
remote_dns_doh_ip
|
||||
},
|
||||
port = tonumber(remote_dns_doh_port),
|
||||
balancerTag = COMMON.default_balancer_tag,
|
||||
outboundTag = dns_outbound_tag
|
||||
})
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user