Compare commits

...

141 Commits

Author SHA1 Message Date
clash-meta-maintainer[bot]
6a9a469073 Update Dependencies (#500)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-05-10 12:43:43 +08:00
GitHub Action
ac6cfa02c8 Bump version to 2.11.9 (211009) 2025-04-21 15:15:17 +00:00
clash-meta-maintainer[bot]
2e852e54f8 Update Dependencies (#493)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-04-21 22:23:12 +08:00
Zongle Wang
309cc6af12 Support opening from app info (#497) 2025-04-17 21:10:49 +08:00
wwqgtxx
39987022c6 fix action 2025-04-10 22:38:44 +08:00
Zongle Wang
6f521d5ac1 Support hiding app icon (#492) 2025-04-10 22:19:19 +08:00
GitHub Action
efb2df507d Bump version to 2.11.8 (211008) 2025-04-01 15:28:37 +00:00
clash-meta-maintainer[bot]
54077cb29f Update Dependencies (#477)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-04-01 22:52:27 +08:00
wwqgtxx
19cc82e0db send all dns server to core 2025-03-17 23:20:44 +08:00
wwqgtxx
4e45661e26 handle ipv6 address's scopeId for dns server 2025-03-17 23:20:44 +08:00
clash-meta-maintainer[bot]
5816076bf6 Update Dependencies (#471)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-03-17 22:00:34 +08:00
clash-meta-maintainer[bot]
59f2a2019e Update Dependencies (#470) 2025-03-11 23:38:04 +08:00
GitHub Action
effbf8f244 Bump version to 2.11.7 (211007) 2025-03-03 04:09:43 +00:00
clash-meta-maintainer[bot]
b240eb7e25 Update Dependencies (#458)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-03-03 12:00:21 +08:00
wwqgtxx
f444075342 update go1.24 2025-02-19 18:30:41 +08:00
clash-meta-maintainer[bot]
a6ceb88956 Update Dependencies (#454)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-02-19 18:18:35 +08:00
ForestL
9db73ea07b fix sniffer.sniff config (#455) 2025-02-19 18:17:56 +08:00
ForestL
356a845b69 hide update function of inline (#415) 2025-02-19 18:15:58 +08:00
汐殇
d344cc8e77 Update Proxy.kt 2025-02-18 16:30:54 +08:00
clash-meta-maintainer[bot]
d8e46ae27d Update Dependencies (#447)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-02-18 16:28:42 +08:00
clash-meta-maintainer[bot]
4f22a46f93 Update Dependencies (#441)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-02-11 01:40:45 +08:00
ForestL
a012d81cd1 fix build error and filter target arch (#443) 2025-02-10 19:56:23 +08:00
GitHub Action
57f043408f Bump version to 2.11.6 (211006) 2025-02-09 13:47:46 +00:00
clash-meta-maintainer[bot]
e5d8c9f355 Update Dependencies (#437)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-02-05 17:52:17 +08:00
5ec1cff
2760de9d40 remove unnecessary READ_EXTERNAL_STORAGE permission (#439) 2025-02-05 17:52:03 +08:00
5ec1cff
64a69e6627 app: refine LogsActivity & LogcatActivity (#431) 2025-01-22 10:07:37 +08:00
clash-meta-maintainer[bot]
9fd394d7c5 Update Dependencies (#422) 2025-01-21 21:38:41 +08:00
5ec1cff
e8e00108e6 Update app (#428) 2025-01-21 21:35:45 +08:00
GitHub Action
3100e1700c Bump version to 2.11.5 (211005) 2024-12-31 17:11:31 +00:00
clash-meta-maintainer[bot]
7598481c01 Update Dependencies (#414)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2025-01-01 00:29:21 +08:00
clash-meta-maintainer[bot]
565d1d7a81 Update Dependencies (#412)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-12-25 20:34:04 +08:00
GitHub Action
e15477cc04 Bump version to 2.11.4 (211004) 2024-12-22 11:55:41 +00:00
汐殇
94c46a04c4 Update Provider.kt 2024-12-22 19:38:14 +08:00
GitHub Action
c513a198f4 Bump version to 2.11.3 (211003) 2024-12-19 13:32:18 +00:00
clash-meta-maintainer[bot]
754f2801ee Update Dependencies (#407)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-12-19 20:59:41 +08:00
汐殇
4b96ce2556 Update Proxy.kt 2024-12-19 20:59:10 +08:00
clash-meta-maintainer[bot]
15f283c1c7 Update Dependencies (#405)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-12-09 18:14:45 +08:00
clash-meta-maintainer[bot]
6c39a894ba Update Dependencies (#401)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-12-06 11:54:36 +08:00
clash-meta-maintainer[bot]
af2a309c7a Update Dependencies (#385)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-12-03 07:56:39 +08:00
clash-meta-maintainer[bot]
94489d1dca Update Dependencies (#384)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-11-06 20:59:01 +08:00
GitHub Action
88f92dd98f Bump version to 2.11.2 (211002) 2024-11-03 09:34:45 +00:00
clash-meta-maintainer[bot]
deeebdb271 Update Dependencies (#371)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-11-03 17:25:29 +08:00
Trịnh Văn Lợi
f75ee05b52 Add Vietnamese (#367) 2024-10-14 20:52:22 +08:00
clash-meta-maintainer[bot]
c39838e631 Update Dependencies (#363)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-13 19:54:53 +08:00
wwqgtxx
b7e4ff551a fix dnsList handle 2024-10-06 00:56:02 +08:00
clash-meta-maintainer[bot]
7b828ee0d9 Update Dependencies (#362)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-06 00:33:37 +08:00
wwqgtxx
266c9da66d better Version and BuildTime handle 2024-10-06 00:32:33 +08:00
clash-meta-maintainer[bot]
f0f82fb9f9 Update Dependencies (#361)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-05 14:22:57 +08:00
clash-meta-maintainer[bot]
54cfb54b8b Update Dependencies (#360)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-05 14:02:39 +08:00
clash-meta-maintainer[bot]
1430b29340 Update Dependencies (#359)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-05 13:42:06 +08:00
wwqgtxx
d79fbf2519 set GIT_VERSION to core 2024-10-05 13:02:40 +08:00
wwqgtxx
aea7edd2f8 add init log 2024-10-05 10:09:56 +08:00
clash-meta-maintainer[bot]
8f8c7724ba Update Dependencies (#357)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-04 16:18:14 +08:00
clash-meta-maintainer[bot]
2ac1ade188 Update Dependencies (#355)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-10-01 13:23:04 +08:00
GitHub Action
6122aeffb5 Bump version to 2.11.1 (211001) 2024-09-30 05:44:31 +00:00
wwqgtxx
97f52bbcb6 adopt external-controller-cors 2024-09-30 13:12:58 +08:00
clash-meta-maintainer[bot]
e39bfe8832 Update Dependencies (#354)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-09-30 13:11:32 +08:00
wwqgtxx
36bc78070a fix patchProviders works abnormally when path is empty 2024-09-28 00:20:17 +08:00
wwqgtxx
e164e219bd code cleanup 2024-09-27 21:57:22 +08:00
clash-meta-maintainer[bot]
309726dddd Update Dependencies (#346)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-09-27 21:53:09 +08:00
clash-meta-maintainer[bot]
786ac02a1d Update Dependencies (#342)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-09-23 11:43:05 +08:00
wwqgtxx
e966e52b77 replace launch_name for alpha 2024-09-12 14:48:37 +08:00
GitHub Action
0e1f3f5823 Bump version to 2.11.0 (211000) 2024-09-12 06:18:29 +00:00
clash-meta-maintainer[bot]
649201f52d Update Dependencies (#332)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-09-12 14:16:50 +08:00
wwqgtxx
bbe9dc42d2 move UpdatableProvider define in here 2024-09-12 11:18:28 +08:00
wwqgtxx
3ce66040b3 don't call provider.Suspend 2024-09-12 11:10:19 +08:00
Larvan2
43337eacd2 remove redundant 'Meta' 2024-09-12 02:55:28 +00:00
wwqgtxx
a197f8fce1 patch more unsupported config 2024-09-12 10:50:27 +08:00
wwqgtxx
8f1c235af5 call FreeOSMemory in forceGc 2024-09-12 09:57:21 +08:00
wwqgtxx
c6810bc441 support set fake-ip-filter-mode 2024-09-12 09:20:17 +08:00
ForestL
fb1c6a2cc3 add asn import (#333) 2024-09-11 22:21:39 +08:00
wwqgtxx
3cc77c7c95 support set tun stack 2024-09-11 19:46:12 +08:00
karin0
bb2c5283f8 only apply ExternalController in Override settings (#330) 2024-09-11 17:17:59 +08:00
wwqgtxx
a04c1883fa switch from dhcp://system to system:// 2024-09-11 16:30:31 +08:00
clash-meta-maintainer[bot]
e834d67922 Update Dependencies (#329) 2024-09-11 16:27:26 +08:00
wwqgtxx
cfe71bbe60 remove unneeded code 2024-09-11 15:57:56 +08:00
wwqgtxx
262a6b563c remove geoip embed and sideload
we had geoip.metadb and geosite.dat in asserts
2024-09-11 14:54:22 +08:00
clash-meta-maintainer[bot]
a1d838a98a Update Dependencies (#328)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-09-11 13:38:57 +08:00
wwqgtxx
b1459134e8 setup grade in update-dependencies.yaml too 2024-09-11 11:01:57 +08:00
wwqgtxx
9edf35c4bc add ipv6 support for tun 2024-09-11 09:37:57 +08:00
Zongle Wang
b661d94278 Migrate to gradle/actions/setup-gradle@v4 (#293)
https://github.com/gradle/actions/releases/tag/v4.0.0
https://github.com/gradle/actions/blob/main/setup-gradle/README.md
2024-09-10 23:13:58 +08:00
clash-meta-maintainer[bot]
c82acb38d5 Update Dependencies (#326) 2024-09-10 21:50:21 +08:00
clash-meta-maintainer[bot]
7e24d7fea3 Update Dependencies (#315) 2024-09-10 17:23:09 +08:00
wwqgtxx
158e47b372 using sing-tun instead of tun2socket 2024-09-10 16:38:59 +08:00
GitHub Action
4df39342a2 Bump version to 2.10.4 (210004) 2024-09-02 08:47:41 +00:00
汐殇
0dc219193b Merge pull request #312 from MetaCubeX/update-dependencies
Update Dependencies
2024-09-02 16:41:25 +08:00
clash-meta-maintainer[bot]
8c587fd22a Update Dependencies 2024-09-02 08:26:41 +00:00
wwqgtxx
c9fa690601 remove depend of gopkg.in/yaml.v2 2024-09-01 00:22:56 +08:00
wwqgtxx
e548b933e2 using hub.ApplyConfig to start the external controller 2024-08-31 22:48:53 +08:00
clash-meta-maintainer[bot]
90f3a09805 Update Dependencies (#311)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-08-31 22:47:18 +08:00
汐殇
d62430af1b Merge pull request #299 from karin0/external-controller
feat: support external controller and its override settings
2024-08-31 18:01:07 +08:00
karin0
bacc75393b feat: support external controller and its override settings 2024-08-31 17:47:17 +08:00
汐殇
fec7df02e4 Merge pull request #304 from aviraxp/patch-1
Avoid starting foreground service repeatedly
2024-08-31 01:35:26 +08:00
汐殇
0a1406eb86 Merge pull request #291 from MetaCubeX/update-dependencies
Update Dependencies
2024-08-31 01:22:57 +08:00
Wang Han
26c2ecef6d Avoid starting foreground service repeatedly 2024-08-31 00:15:22 +08:00
clash-meta-maintainer[bot]
15ef59a856 Update Dependencies 2024-08-30 12:13:34 +00:00
wwqgtxx
a9b10acac2 cleanup code 2024-08-27 11:02:45 +08:00
GitHub Action
08f87e27ed Bump version to 2.10.3 (210003) 2024-08-15 05:53:16 +00:00
Larvan2
2e0d02ac1d ci: bump go version 2024-08-15 05:39:12 +00:00
clash-meta-maintainer[bot]
904353a1f3 Update Dependencies (#278)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-08-15 13:28:54 +08:00
Shun Zi
143c84d47b fix: (native conn.go) closeMatch logic should really close all matching conns; closes PacketConn also (#248) 2024-07-30 13:26:57 +08:00
GitHub Action
65bfd8a132 Bump version to 2.10.2 (210002) 2024-07-28 05:38:37 +00:00
汐殇
e7e870ac0f Merge pull request #269 from MetaCubeX/update-dependencies
Update Dependencies
2024-07-28 13:22:28 +08:00
clash-meta-maintainer[bot]
f64c4b5bc9 Update Dependencies 2024-07-28 03:03:41 +00:00
clash-meta-maintainer[bot]
8d88011c08 Update Dependencies (#247)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-07-01 23:02:01 +08:00
汐殇
bc8c24af3b fix: outbound type 2024-06-15 18:31:26 +08:00
clash-meta-maintainer[bot]
fa627f0da8 Update Dependencies (#234) 2024-06-08 18:28:25 +08:00
wwqgtxx
e701551655 add update-go-mod-replace 2024-05-24 11:40:55 +08:00
clash-meta-maintainer[bot]
7242f2719c Update Dependencies (#228)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-05-21 12:32:43 +08:00
clash-meta-maintainer[bot]
0126d3b09d Update Dependencies (#222) 2024-05-10 14:10:19 +08:00
Larvan2
e5bbbe28c5 fix: reject drop 2024-05-03 03:01:20 +00:00
Esing
5e397c2aed Fix typos in README.md (#185) 2024-04-30 15:25:32 +08:00
clash-meta-maintainer[bot]
5e8d6df9f0 Update Dependencies (#218)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-04-30 15:21:59 +08:00
clash-meta-maintainer[bot]
ef88732a9a Update Dependencies (#214)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-04-26 11:22:24 +08:00
clash-meta-maintainer[bot]
2419d14505 Update Dependencies (#212)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-04-23 12:40:26 +08:00
H1JK
937d9c5d3b ci: Update dependencies & Go version 2024-04-20 13:21:55 +08:00
Larvan2
1f6dbe4278 ci: trigger action when PR merged 2024-04-20 11:01:04 +08:00
Το μοχθηρό ^_^
e2b1b10d33 Update BaseActivity.kt (#198) 2024-04-20 10:58:31 +08:00
clash-meta-maintainer[bot]
f0d388d571 Update Dependencies (#204) 2024-04-19 23:08:05 +08:00
wwqgtxx
667d6b6109 Update build.gradle.kts 2024-04-19 12:04:19 +08:00
clash-meta-maintainer[bot]
58d16cb3de Update Dependencies (#196)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-04-05 15:12:19 +08:00
clash-meta-maintainer[bot]
78ffee360c Update Dependencies (#193)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-03-31 15:53:34 +08:00
Larvan2
53bc1da503 Merge pull request #190 from xixiha5230/patch-1
Use CMake string(TIMESTAMP) for portable compile timestamp
2024-03-31 15:52:23 +08:00
Larvan2
436f8600d2 Merge pull request #194 from shunf4/fix/bad_tz_override
fix: correctly convert timezone offset from Java TimeZone.getRawOffset() to arg for golang time.FixedZone
2024-03-28 15:03:02 +08:00
shunf4
669e644d81 fix: correctly convert timezone offset from Java TimeZone.getRawOffset() to arg for golang time.FixedZone 2024-03-17 18:26:51 +08:00
clash-meta-maintainer[bot]
346096aab7 Update Dependencies (#192)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-02-25 14:35:34 +08:00
clash-meta-maintainer[bot]
9506f50850 Update Dependencies (#187)
Co-authored-by: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
2024-02-24 19:50:59 +08:00
xixiha5230
d7328953ba Use CMake string(TIMESTAMP) for portable compile timestamp
The previous usage of the date command is not portable across different platforms. date is not guaranteed to be available and the format varies.

Replace it with CMake's built-in string(TIMESTAMP) command which generates a string with the given timestamp format independent of the platform. This commit changes it to use "%y%m%d" format for a YYMMDD timestamp commonly used for compilation.
2024-02-24 17:57:12 +08:00
Το μοχθηρό ^_^
2a2686fa11 Fix high-risk vulnerabilities(CIRCL's Kyber: timing side-channel (kyberslash2) ) (#186)
* chore(deps): bump github.com/cloudflare/circl in /core/src/foss/golang

Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.6 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.6...v1.3.7)
2024-02-20 13:42:32 +08:00
clash-meta-maintainer[bot]
1377d42dc2 Update Dependencies (#184) 2024-02-18 16:16:28 +08:00
Το μοχθηρό ^_^
c7c13b3a89 update dependency (#180) 2024-02-14 18:56:48 +08:00
clash-meta-maintainer[bot]
cd3aad232b Update Dependencies (#183) 2024-02-14 18:15:59 +08:00
GitHub Action
c18fe9ab77 Bump version to 2.10.1 (210001) 2024-02-08 07:47:39 +00:00
clash-meta-maintainer[bot]
2832c9ee4c Update Dependencies (#182)
Co-authored-by: clash-meta-maintainer[bot] <clash-meta-maintainer[bot]@users.noreply.github.com>
2024-02-08 11:15:35 +08:00
clash-meta-maintainer[bot]
fa360d83f8 Update Dependencies (#181) 2024-02-05 23:46:28 +08:00
clash-meta-maintainer[bot]
916d6a7777 Update Dependencies (#179)
Co-authored-by: clash-meta-maintainer[bot] <clash-meta-maintainer[bot]@users.noreply.github.com>
2024-01-24 17:59:48 +08:00
Larvan2
dccab90843 fix: delay 2024-01-21 23:38:01 +08:00
clash-meta-maintainer[bot]
c64e1a005e Update Dependencies (#177)
Co-authored-by: clash-meta-maintainer[bot] <clash-meta-maintainer[bot]@users.noreply.github.com>
2024-01-21 17:16:33 +08:00
GitHub Action
4dd7aec7ec Bump version to 2.10.0 (210000) 2024-01-18 09:54:42 +00:00
Το μοχθηρό ^_^
8fa4e33bda Update dependency (#174)
* Add renovate.json

* fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.3

* chore(deps): update dependency gradle to v7.6.3

* chore(deps): update devofure/advance-android-version-actions action to v1.5

* chore(deps): update mikepenz/release-changelog-builder-action action to v3.7.3

* chore(deps): update actions/upload-artifact action to v4

* chore(deps): update mikepenz/release-changelog-builder-action action to v4

* chore(deps): update actions/setup-go action to v5

* chore(deps): update actions/setup-java action to v4

* chore(deps): update actions/cache action to v4

* chore(deps): update actions/checkout action to v4

* chore(deps): update tibdex/github-app-token action to v2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 09:54:42 +00:00
cmfaapp[bot]
1b5ce606e4 Update Dependencies (#1)
Co-authored-by: aylz10 <aylz10@users.noreply.github.com>
2024-01-18 09:54:32 +00:00
130 changed files with 1811 additions and 1684 deletions

View File

@@ -3,29 +3,35 @@ on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
push:
branches:
- main
jobs:
BuildDebug:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote --force
run: git submodule update --init --recursive --force
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
distribution: "temurin"
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.24"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
@@ -50,47 +56,44 @@ jobs:
- name: Build
if: success()
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon app:assembleMeta-AlphaRelease
run: ./gradlew --no-daemon app:assembleAlphaRelease
- name: Upload Aritfact (universal)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: CMFA Debug Unsigned APK (universal)
path: |
app/build/outputs/apk/meta-alpha/release/*-universal-*.apk
app/build/outputs/apk/alpha/release/*-universal-*.apk
- name: Upload Aritfact (arm64-v8a)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: CMFA Debug Unsigned APK (arm64-v8a)
path: |
app/build/outputs/apk/meta-alpha/release/*-arm64-v8a-*.apk
app/build/outputs/apk/alpha/release/*-arm64-v8a-*.apk
- name: Upload Aritfact (armeabi-v7a)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: CMFA Debug Unsigned APK (armeabi-v7a)
path: |
app/build/outputs/apk/meta-alpha/release/*-armeabi-v7a-*.apk
app/build/outputs/apk/alpha/release/*-armeabi-v7a-*.apk
- name: Upload Aritfact (x86_64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: CMFA Debug Unsigned APK (x86_64)
path: |
app/build/outputs/apk/meta-alpha/release/*-x86_64-*.apk
app/build/outputs/apk/alpha/release/*-x86_64-*.apk
- name: Upload Aritfact (x86)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() }}
with:
name: CMFA Debug Unsigned APK (x86)
path: |
app/build/outputs/apk/meta-alpha/release/*-x86-*.apk
app/build/outputs/apk/alpha/release/*-x86-*.apk

View File

@@ -1,29 +1,35 @@
name: Build Pre-Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
BuildPreRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote --force
run: git submodule update --init --recursive --force
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
distribution: "temurin"
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.24"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
@@ -48,12 +54,10 @@ jobs:
- name: Pre-release Build
if: success()
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon app:assembleMeta-AlphaRelease
run: ./gradlew --no-daemon app:assembleAlphaRelease
# Delete old Prerelease-alpha
- uses: dev-drprasad/delete-tag-and-release@v1.0
- uses: dev-drprasad/delete-tag-and-release@v1.1
with:
tag_name: Prerelease-alpha
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -67,13 +71,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Alpha
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: ${{ success() }}
with:
tag_name: Prerelease-alpha
files: app/build/outputs/apk/meta-alpha/release/*
files: app/build/outputs/apk/alpha/release/*
prerelease: true
generate_release_notes: true
- name: Release Changelog Builder
uses: mikepenz/release-changelog-builder-action@v3.6.0
uses: mikepenz/release-changelog-builder-action@v4

View File

@@ -12,25 +12,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout submodules
run: git submodule update --init --recursive --remote
run: git submodule update --init --recursive --force
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
distribution: "temurin"
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.24"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
@@ -52,7 +55,7 @@ jobs:
# Re-write version in build.gradle.kts
- name: Re-write version
uses: Devofure/advance-android-version-actions@v1.4
uses: Devofure/advance-android-version-actions@v1.5
with:
gradlePath: build.gradle.kts
versionCode: ${{ steps.process-version.outputs.versonCode }}
@@ -90,9 +93,7 @@ jobs:
- name: Release Build
if: success()
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon app:assembleMetaRelease
run: ./gradlew --no-daemon app:assembleMetaRelease
- name: Tag Repo
uses: richardsimko/update-tag@v1
@@ -110,7 +111,7 @@ jobs:
generate_release_notes: true
- name: Release Changelog Builder
uses: mikepenz/release-changelog-builder-action@v3.6.0
uses: mikepenz/release-changelog-builder-action@v4.1.1
with:
configurationJson: |
{

View File

@@ -10,23 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout submodules
- name: Checkout and Update submodules
run: git submodule update --init --recursive --remote --force
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
distribution: "temurin"
java-version: 21
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.24"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
@@ -34,22 +34,24 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download GeoIP Database
- name: Install update-go-mod-replace
run: |
./gradlew :core:downloadGeoipDatabase
go install github.com/metacubex/update-go-mod-replace@latest
- name: Update Foss Gomod
run: |
cd ${{ github.workspace }}/core/src/foss/golang/
update-go-mod-replace ${{ github.workspace }}/core/src/foss/golang/clash/go.mod $(pwd)/go.mod
go mod tidy
- name: Update Main Gomod
run: |
cd ${{ github.workspace }}/core/src/main/golang/native/
cd ${{ github.workspace }}/core/src/main/golang/
update-go-mod-replace ${{ github.workspace }}/core/src/foss/golang/clash/go.mod $(pwd)/go.mod
go mod tidy
- uses: tibdex/github-app-token@v1
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.MAINTAINER_APPID }}
@@ -57,7 +59,7 @@ jobs:
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: Update Dependencies

View File

@@ -60,7 +60,7 @@ APP package name is `com.github.metacubex.clash.meta`
- Import a profile
- URL Scheme `clash://install-config?url=<encoded URI>` or `clashmeta://install-config?url=<encoded URI>`
### Contribution and Project Maintainance
### Contribution and Project Maintenance
#### Meta Kernel
@@ -68,7 +68,7 @@ APP package name is `com.github.metacubex.clash.meta`
- If you want to contribute to the kernel, make PRs to `Alpha` branch of the Meta kernel repository.
- If you want to contribute Android-specific patches to the kernel, make PRs to `android-open` branch of the Meta kernel repository.
#### Maintainance
#### Maintenance
- When `MetaCubeX/Clash.Meta` kernel is updated to a new version, the `Update Dependencies` actions in this repo will be triggered automatically.
- It will pull the new version of the meta kernel, update all the golang dependencies, and create a PR without manual intervention.

View File

@@ -38,6 +38,7 @@ task("downloadGeoFiles") {
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb" to "geoip.metadb",
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat" to "geosite.dat",
// "https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb" to "country.mmdb",
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb" to "ASN.mmdb",
)
doLast {

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.github.kr328.clash">
xmlns:tools="http://schemas.android.com/tools">
<uses-feature
android:name="android.software.leanback"
@@ -12,10 +11,11 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:name=".MainApplication"
@@ -44,16 +44,25 @@
android:label="@string/launch_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
</intent-filter>
</activity>
<activity-alias
android:name=".MainActivityAlias"
android:exported="true"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity-alias>
<activity
android:name=".ExternalControlActivity"
android:exported="true"
@@ -172,7 +181,11 @@
<service
android:name=".LogcatService"
android:exported="false"
android:label="@string/clash_logcat" />
android:label="@string/clash_logcat"
android:foregroundServiceType="specialUse">
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="explanation_for_special_use"/>
</service>
<service
android:name=".TileService"
android:exported="true"
@@ -193,5 +206,14 @@
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
<receiver android:name=".DialerReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<!-- 252746382 is the name of Clash Meta in T9 -->
<data android:scheme="android_secret_code" android:host="252746382" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@@ -120,6 +120,9 @@ class AccessControlActivity : BaseActivity<AccessControlDesign>() {
.filter {
it.packageName == "android" || it.requestedPermissions?.contains(INTERNET) == true
}
.filter {
it.applicationInfo != null
}
.filter {
systemApp || !it.isSystemApp
}
@@ -132,6 +135,6 @@ class AccessControlActivity : BaseActivity<AccessControlDesign>() {
private val PackageInfo.isSystemApp: Boolean
get() {
return applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM != 0
return applicationInfo?.flags?.and(ApplicationInfo.FLAG_SYSTEM) != 0
}
}

View File

@@ -1,5 +1,6 @@
package com.github.kr328.clash
import android.content.ComponentName
import android.content.pm.PackageManager
import com.github.kr328.clash.common.util.componentName
import com.github.kr328.clash.design.AppSettingsDesign
@@ -17,6 +18,7 @@ class AppSettingsActivity : BaseActivity<AppSettingsDesign>(), Behavior {
ServiceStore(this),
this,
clashRunning,
::onHideIconChange,
)
setContentDesign(design)
@@ -59,4 +61,17 @@ class AppSettingsActivity : BaseActivity<AppSettingsDesign>(), Behavior {
PackageManager.DONT_KILL_APP,
)
}
private fun onHideIconChange(hide: Boolean) {
val newState = if (hide) {
PackageManager.COMPONENT_ENABLED_STATE_DISABLED
} else {
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
}
packageManager.setComponentEnabledSetting(
ComponentName(this, mainActivityAlias),
newState,
PackageManager.DONT_KILL_APP
)
}
}

View File

@@ -28,33 +28,20 @@ import java.util.*
import java.util.concurrent.atomic.AtomicInteger
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
import com.github.kr328.clash.design.R
abstract class BaseActivity<D : Design<*>> :
AppCompatActivity(),
abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
CoroutineScope by MainScope(),
Broadcasts.Observer {
enum class Event {
ServiceRecreated,
ActivityStart,
ActivityStop,
ClashStop,
ClashStart,
ProfileLoaded,
ProfileChanged,
ProfileUpdateCompleted,
ProfileUpdateFailed
}
protected val uiStore by lazy { UiStore(this) }
protected val events = Channel<Event>(Channel.UNLIMITED)
protected var activityStarted: Boolean = false
protected val clashRunning: Boolean
get() = Remote.broadcasts.clashRunning
protected var design: D? = null
private set(value) {
set(value) {
field = value
if (value != null) {
setContentView(value.root)
} else {
@@ -75,14 +62,14 @@ abstract class BaseActivity<D : Design<*>> :
suspend fun <I, O> startActivityForResult(
contracts: ActivityResultContract<I, O>,
input: I
input: I,
): O = withContext(Dispatchers.Main) {
val requestKey = nextRequestKey.getAndIncrement().toString()
ActivityResultLifecycle().use { lifecycle, start ->
suspendCoroutine { c ->
activityResultRegistry.register(requestKey, lifecycle, contracts) {
c.resumeWith(Result.success(it))
c.resume(it)
}.apply { start() }.launch(input)
}
}
@@ -92,7 +79,6 @@ abstract class BaseActivity<D : Design<*>> :
suspendCoroutine<Unit> {
window.decorView.post {
this.design = design
it.resume(Unit)
}
}
@@ -100,49 +86,35 @@ abstract class BaseActivity<D : Design<*>> :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
applyDayNight()
launch {
main()
finish()
}
}
override fun onStart() {
super.onStart()
activityStarted = true
Remote.broadcasts.addObserver(this)
events.trySend(Event.ActivityStart)
}
override fun onStop() {
super.onStop()
activityStarted = false
Remote.broadcasts.removeObserver(this)
events.trySend(Event.ActivityStop)
}
override fun onDestroy() {
design?.cancel()
cancel()
super.onDestroy()
}
override fun finish() {
if (deferRunning) {
return
}
if (deferRunning) return
deferRunning = true
launch {
@@ -172,7 +144,6 @@ abstract class BaseActivity<D : Design<*>> :
override fun onSupportNavigateUp(): Boolean {
this.onBackPressed()
return true
}
@@ -212,49 +183,45 @@ abstract class BaseActivity<D : Design<*>> :
private fun queryDayNight(config: Configuration = resources.configuration): DayNight {
return when (uiStore.darkMode) {
DarkMode.Auto -> {
if (config.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES)
DayNight.Night
else
DayNight.Day
}
DarkMode.ForceLight -> {
DayNight.Day
}
DarkMode.ForceDark -> {
DayNight.Night
}
DarkMode.Auto -> if (config.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES) DayNight.Night else DayNight.Day
DarkMode.ForceLight -> DayNight.Day
DarkMode.ForceDark -> DayNight.Night
}
}
private fun applyDayNight(config: Configuration = resources.configuration) {
val dayNight = queryDayNight(config)
when (dayNight) {
DayNight.Night -> {
theme.applyStyle(R.style.AppThemeDark, true)
}
DayNight.Day -> {
theme.applyStyle(R.style.AppThemeLight, true)
}
DayNight.Night -> theme.applyStyle(R.style.AppThemeDark, true)
DayNight.Day -> theme.applyStyle(R.style.AppThemeLight, true)
}
window.isAllowForceDarkCompat = false
window.isSystemBarsTranslucentCompat = true
window.statusBarColor = resolveThemedColor(android.R.attr.statusBarColor)
window.navigationBarColor = resolveThemedColor(android.R.attr.navigationBarColor)
if (Build.VERSION.SDK_INT >= 23) {
window.isLightStatusBarsCompat =
resolveThemedBoolean(android.R.attr.windowLightStatusBar)
window.isLightStatusBarsCompat = resolveThemedBoolean(android.R.attr.windowLightStatusBar)
}
if (Build.VERSION.SDK_INT >= 27) {
window.isLightNavigationBarCompat =
resolveThemedBoolean(android.R.attr.windowLightNavigationBar)
window.isLightNavigationBarCompat = resolveThemedBoolean(android.R.attr.windowLightNavigationBar)
}
this.dayNight = dayNight
}
enum class Event {
ServiceRecreated,
ActivityStart,
ActivityStop,
ClashStop,
ClashStart,
ProfileLoaded,
ProfileChanged,
ProfileUpdateCompleted,
ProfileUpdateFailed,
}
}

View File

@@ -0,0 +1,13 @@
package com.github.kr328.clash
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
class DialerReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val intent = Intent(context, MainActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
}
}

View File

@@ -20,6 +20,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import java.util.*
import com.github.kr328.clash.design.R
class ExternalControlActivity : Activity(), CoroutineScope by MainScope() {
override fun onCreate(savedInstanceState: Bundle?) {

View File

@@ -81,24 +81,6 @@ class FilesActivity : BaseActivity<FilesDesign>() {
client.renameDocument(it.file.id, newName)
}
is FilesDesign.Request.ImportFile -> {
if (Build.VERSION.SDK_INT >= 23) {
val hasPermission = ContextCompat.checkSelfPermission(
this@FilesActivity,
Manifest.permission.READ_EXTERNAL_STORAGE
) == PackageManager.PERMISSION_GRANTED
if (!hasPermission) {
val granted = startActivityForResult(
ActivityResultContracts.RequestPermission(),
Manifest.permission.READ_EXTERNAL_STORAGE,
)
if (!granted) {
return@onReceive
}
}
}
val uri: Uri? = startActivityForResult(
ActivityResultContracts.GetContent(),
"*/*"

View File

@@ -28,6 +28,7 @@ import kotlinx.coroutines.withContext
import java.io.OutputStreamWriter
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
import com.github.kr328.clash.design.R
class LogcatActivity : BaseActivity<LogcatDesign>() {
private var conn: ServiceConnection? = null
@@ -111,7 +112,7 @@ class LogcatActivity : BaseActivity<LogcatDesign>() {
when (it) {
LogcatDesign.Request.Close -> {
stopService(LogcatService::class.intent)
startActivity(LogsActivity::class.intent)
finish()
}
else -> Unit

View File

@@ -14,6 +14,7 @@ import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import com.github.kr328.clash.common.compat.getColorCompat
import com.github.kr328.clash.common.compat.pendingIntentFlags
import com.github.kr328.clash.common.compat.startForegroundCompat
import com.github.kr328.clash.common.log.Log
import com.github.kr328.clash.common.util.intent
import com.github.kr328.clash.core.model.LogMessage
@@ -130,17 +131,17 @@ class LogcatService : Service(), CoroutineScope by CoroutineScope(Dispatchers.De
NotificationChannelCompat.Builder(
CHANNEL_ID,
NotificationManagerCompat.IMPORTANCE_DEFAULT
).setName(getString(R.string.clash_logcat)).build()
).setName(getString(com.github.kr328.clash.design.R.string.clash_logcat)).build()
)
}
private fun showNotification() {
val notification = NotificationCompat
.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.ic_logo_service)
.setColor(getColorCompat(R.color.color_clash_light))
.setContentTitle(getString(R.string.clash_logcat))
.setContentText(getString(R.string.running))
.setSmallIcon(com.github.kr328.clash.service.R.drawable.ic_logo_service)
.setColor(getColorCompat(com.github.kr328.clash.design.R.color.color_clash_light))
.setContentTitle(getString(com.github.kr328.clash.design.R.string.clash_logcat))
.setContentText(getString(com.github.kr328.clash.design.R.string.running))
.setContentIntent(
PendingIntent.getActivity(
this,
@@ -152,7 +153,7 @@ class LogcatService : Service(), CoroutineScope by CoroutineScope(Dispatchers.De
)
.build()
startForeground(R.id.nf_logcat_status, notification)
startForegroundCompat(R.id.nf_logcat_status, notification)
}
companion object {

View File

@@ -11,11 +11,8 @@ import kotlinx.coroutines.selects.select
import kotlinx.coroutines.withContext
class LogsActivity : BaseActivity<LogsDesign>() {
override suspend fun main() {
if (LogcatService.running) {
return startActivity(LogcatActivity::class.intent)
}
override suspend fun main() {
val design = LogsDesign(this)
setContentDesign(design)
@@ -38,7 +35,6 @@ class LogsActivity : BaseActivity<LogsDesign>() {
when (it) {
LogsDesign.Request.StartLogcat -> {
startActivity(LogcatActivity::class.intent)
finish()
}
LogsDesign.Request.DeleteAll -> {

View File

@@ -1,6 +1,13 @@
package com.github.kr328.clash
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.os.PersistableBundle
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.result.contract.ActivityResultContracts.RequestPermission
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.github.kr328.clash.common.util.intent
import com.github.kr328.clash.common.util.ticker
import com.github.kr328.clash.design.MainDesign
@@ -9,11 +16,13 @@ import com.github.kr328.clash.util.startClashService
import com.github.kr328.clash.util.stopClashService
import com.github.kr328.clash.util.withClash
import com.github.kr328.clash.util.withProfile
import com.github.kr328.clash.core.bridge.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.isActive
import kotlinx.coroutines.selects.select
import kotlinx.coroutines.withContext
import java.util.concurrent.TimeUnit
import com.github.kr328.clash.design.R
class MainActivity : BaseActivity<MainDesign>() {
override suspend fun main() {
@@ -50,8 +59,13 @@ class MainActivity : BaseActivity<MainDesign>() {
startActivity(ProfilesActivity::class.intent)
MainDesign.Request.OpenProviders ->
startActivity(ProvidersActivity::class.intent)
MainDesign.Request.OpenLogs ->
startActivity(LogsActivity::class.intent)
MainDesign.Request.OpenLogs -> {
if (LogcatService.running) {
startActivity(LogcatActivity::class.intent)
} else {
startActivity(LogsActivity::class.intent)
}
}
MainDesign.Request.OpenSettings ->
startActivity(SettingsActivity::class.intent)
MainDesign.Request.OpenHelp ->
@@ -125,7 +139,25 @@ class MainActivity : BaseActivity<MainDesign>() {
private suspend fun queryAppVersionName(): String {
return withContext(Dispatchers.IO) {
packageManager.getPackageInfo(packageName, 0).versionName
packageManager.getPackageInfo(packageName, 0).versionName + "\n" + Bridge.nativeCoreVersion().replace("_", "-")
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
val requestPermissionLauncher =
registerForActivityResult(RequestPermission()
) { isGranted: Boolean ->
}
if (ContextCompat.checkSelfPermission(
this,
android.Manifest.permission.POST_NOTIFICATIONS
) != PackageManager.PERMISSION_GRANTED) {
requestPermissionLauncher.launch(android.Manifest.permission.POST_NOTIFICATIONS)
}
}
}
}
val mainActivityAlias = "${MainActivity::class.java.name}Alias"

View File

@@ -54,6 +54,13 @@ class MainApplication : Application() {
assets.open("geosite.dat").copyTo(it);
}
}
val ASNFile = File(clashDir, "ASN.mmdb")
if(!ASNFile.exists()) {
FileOutputStream(ASNFile).use {
assets.open("ASN.mmdb").copyTo(it);
}
}
}
fun finalize() {

View File

@@ -16,6 +16,7 @@ import kotlinx.coroutines.selects.select
import kotlinx.coroutines.withContext
import java.io.File
import java.io.FileOutputStream
import com.github.kr328.clash.design.R
class MetaFeatureSettingsActivity : BaseActivity<MetaFeatureSettingsDesign>() {
@@ -70,6 +71,12 @@ class MetaFeatureSettingsActivity : BaseActivity<MetaFeatureSettingsDesign>() {
"*/*")
importGeoFile(uri, MetaFeatureSettingsDesign.Request.ImportCountry)
}
MetaFeatureSettingsDesign.Request.ImportASN -> {
val uri = startActivityForResult(
ActivityResultContracts.GetContent(),
"*/*")
importGeoFile(uri, MetaFeatureSettingsDesign.Request.ImportASN)
}
}
}
}
@@ -107,6 +114,8 @@ class MetaFeatureSettingsActivity : BaseActivity<MetaFeatureSettingsDesign>() {
"geosite$ext"
MetaFeatureSettingsDesign.Request.ImportCountry ->
"country$ext"
MetaFeatureSettingsDesign.Request.ImportASN ->
"ASN$ext"
else -> ""
}

View File

@@ -18,6 +18,7 @@ import kotlinx.coroutines.isActive
import kotlinx.coroutines.selects.select
import kotlinx.coroutines.withContext
import java.util.*
import com.github.kr328.clash.design.R
class NewProfileActivity : BaseActivity<NewProfileDesign>() {
private val self: NewProfileActivity

View File

@@ -45,45 +45,14 @@ class OverrideSettingsActivity : BaseActivity<OverrideSettingsDesign>() {
withClash {
clearOverride(Clash.OverrideSlot.Persist)
}
service.sideloadGeoip = ""
}
finish()
}
}
OverrideSettingsDesign.Request.EditSideloadGeoip -> {
withContext(Dispatchers.IO) {
val list = querySideloadProviders()
val initial = service.sideloadGeoip
val exist = list.any { info -> info.packageName == initial }
service.sideloadGeoip =
design.requestSelectSideload(if (exist) initial else "", list)
}
}
}
}
}
}
}
private fun querySideloadProviders(): List<AppInfo> {
val apps = packageManager.getInstalledPackages(PackageManager.GET_META_DATA)
.filter {
it.applicationInfo.metaData?.containsKey(Metadata.GEOIP_FILE_NAME)
?: false
}
.map { it.toAppInfo(packageManager) }
return listOf(
AppInfo(
packageName = "",
label = getString(R.string.use_built_in),
icon = getDrawableCompat(R.drawable.ic_baseline_work)!!,
installTime = 0,
updateDate = 0,
)
) + apps
}
}

View File

@@ -9,7 +9,6 @@ import com.github.kr328.clash.common.util.setUUID
import com.github.kr328.clash.common.util.ticker
import com.github.kr328.clash.design.ProfilesDesign
import com.github.kr328.clash.design.ui.ToastDuration
import com.github.kr328.clash.R
import com.github.kr328.clash.service.model.Profile
import com.github.kr328.clash.util.withProfile
import kotlinx.coroutines.Dispatchers
@@ -19,6 +18,7 @@ import kotlinx.coroutines.selects.select
import kotlinx.coroutines.withContext
import java.util.*
import java.util.concurrent.TimeUnit
import com.github.kr328.clash.design.R
class ProfilesActivity : BaseActivity<ProfilesDesign>() {
override suspend fun main() {

View File

@@ -12,9 +12,11 @@ import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.selects.select
import com.github.kr328.clash.design.R
class PropertiesActivity : BaseActivity<PropertiesDesign>() {
private var canceled: Boolean = false
private lateinit var original: Profile
override suspend fun main() {
setResult(RESULT_CANCELED)
@@ -22,7 +24,7 @@ class PropertiesActivity : BaseActivity<PropertiesDesign>() {
val uuid = intent.uuid ?: return finish()
val design = PropertiesDesign(this)
val original = withProfile { queryByUUID(uuid) } ?: return finish()
original = withProfile { queryByUUID(uuid) } ?: return finish()
design.profile = original
@@ -71,7 +73,7 @@ class PropertiesActivity : BaseActivity<PropertiesDesign>() {
design?.apply {
launch {
if (!progressing) {
if (requestExitWithoutSaving())
if (original == profile || requestExitWithoutSaving())
finish()
}
}

View File

@@ -9,6 +9,7 @@ import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.selects.select
import java.util.concurrent.TimeUnit
import com.github.kr328.clash.design.R
class ProvidersActivity : BaseActivity<ProvidersDesign>() {
override suspend fun main() {

View File

@@ -9,11 +9,13 @@ import android.os.Build
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import androidx.annotation.RequiresApi
import com.github.kr328.clash.common.compat.registerReceiverCompat
import com.github.kr328.clash.common.constants.Intents
import com.github.kr328.clash.common.constants.Permissions
import com.github.kr328.clash.remote.StatusClient
import com.github.kr328.clash.util.startClashService
import com.github.kr328.clash.util.stopClashService
import com.github.kr328.clash.service.R
@RequiresApi(Build.VERSION_CODES.N)
class TileService : TileService() {
@@ -36,7 +38,7 @@ class TileService : TileService() {
override fun onStartListening() {
super.onStartListening()
registerReceiver(
registerReceiverCompat(
receiver,
IntentFilter().apply {
addAction(Intents.ACTION_CLASH_STARTED)

View File

@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import com.github.kr328.clash.common.compat.registerReceiverCompat
import com.github.kr328.clash.common.constants.Intents
import com.github.kr328.clash.common.log.Log
import java.util.*
@@ -88,7 +89,7 @@ class Broadcasts(private val context: Application) {
return
try {
context.registerReceiver(broadcastReceiver, IntentFilter().apply {
context.registerReceiverCompat(broadcastReceiver, IntentFilter().apply {
addAction(Intents.ACTION_SERVICE_RECREATED)
addAction(Intents.ACTION_CLASH_STARTED)
addAction(Intents.ACTION_CLASH_STOPPED)

View File

@@ -7,16 +7,12 @@ import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.withContext
class ActivityResultLifecycle : LifecycleOwner {
private val lifecycle = LifecycleRegistry(this)
override val lifecycle = LifecycleRegistry(this)
init {
lifecycle.currentState = Lifecycle.State.INITIALIZED
}
override fun getLifecycle(): Lifecycle {
return lifecycle
}
suspend fun <T> use(block: suspend (lifecycle: ActivityResultLifecycle, start: () -> Unit) -> T): T {
return try {
markCreated()

View File

@@ -9,7 +9,7 @@ buildscript {
repositories {
mavenCentral()
google()
maven("https://maven.kr328.app/releases")
maven("https://raw.githubusercontent.com/MetaCubeX/maven-backup/main/releases")
}
dependencies {
classpath(libs.build.android)
@@ -24,7 +24,7 @@ subprojects {
repositories {
mavenCentral()
google()
maven("https://maven.kr328.app/releases")
maven("https://raw.githubusercontent.com/MetaCubeX/maven-backup/main/releases")
}
val isApp = name == "app"
@@ -32,20 +32,30 @@ subprojects {
apply(plugin = if (isApp) "com.android.application" else "com.android.library")
extensions.configure<BaseExtension> {
buildFeatures.buildConfig = true
defaultConfig {
if (isApp) {
applicationId = "com.github.metacubex.clash"
}
minSdk = 21
targetSdk = 31
project.name.let { name ->
namespace = if (name == "app") "com.github.kr328.clash"
else "com.github.kr328.clash.$name"
}
versionName = "2.9.0"
versionCode = 209000
minSdk = 21
targetSdk = 35
versionName = "2.11.9"
versionCode = 211009
resValue("string", "release_name", "v$versionName")
resValue("integer", "release_code", "$versionCode")
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
}
externalNativeBuild {
cmake {
abiFilters("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
@@ -59,7 +69,7 @@ subprojects {
}
}
ndkVersion = "23.0.7599858"
ndkVersion = "27.2.12479018"
compileSdkVersion(defaultConfig.targetSdk!!)
@@ -74,15 +84,18 @@ subprojects {
productFlavors {
flavorDimensions("feature")
create("meta-alpha") {
create("alpha") {
isDefault = true
dimension = flavorDimensionList[0]
versionNameSuffix = ".Meta-Alpha"
versionNameSuffix = ".Alpha"
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
resValue("string", "launch_name", "@string/launch_name_alpha")
resValue("string", "application_name", "@string/application_name_alpha")
if (isApp) {
applicationIdSuffix = ".meta"
applicationIdSuffix = ".alpha"
}
}
@@ -93,6 +106,9 @@ subprojects {
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
resValue("string", "launch_name", "@string/launch_name_meta")
resValue("string", "application_name", "@string/application_name_meta")
if (isApp) {
applicationIdSuffix = ".meta"
}
@@ -103,7 +119,7 @@ subprojects {
getByName("meta") {
java.srcDirs("src/foss/java")
}
getByName("meta-alpha") {
getByName("alpha") {
java.srcDirs("src/foss/java")
}
}
@@ -128,7 +144,7 @@ subprojects {
named("release") {
isMinifyEnabled = isApp
isShrinkResources = isApp
signingConfig = signingConfigs.findByName("release")
signingConfig = signingConfigs.findByName("release") ?: signingConfigs["debug"]
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
@@ -152,9 +168,16 @@ subprojects {
abi {
isEnable = true
isUniversalApk = true
reset()
include("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
}
@@ -172,4 +195,4 @@ tasks.wrapper {
file("gradle/wrapper/gradle-wrapper.properties")
.appendText("distributionSha256Sum=$sha256")
}
}
}

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.kr328.clash.common">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<permission
android:name="${applicationId}.permission.RECEIVE_BROADCASTS"

View File

@@ -2,8 +2,13 @@
package com.github.kr328.clash.common.compat
import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.IntentFilter
import android.graphics.drawable.Drawable
import android.os.Build
import android.os.Handler
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
@@ -14,4 +19,19 @@ fun Context.getColorCompat(@ColorRes id: Int): Int {
fun Context.getDrawableCompat(@DrawableRes id: Int): Drawable? {
return ContextCompat.getDrawable(this, id)
}
}
@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerReceiverCompat(
receiver: BroadcastReceiver,
filter: IntentFilter,
permission: String? = null,
handler: Handler? = null
) =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
registerReceiver(receiver, filter, permission, handler,
if (permission == null) Context.RECEIVER_EXPORTED else Context.RECEIVER_NOT_EXPORTED
)
else
registerReceiver(receiver, filter, permission, handler)

View File

@@ -1,7 +1,10 @@
package com.github.kr328.clash.common.compat
import android.app.Notification
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.ServiceInfo
import android.os.Build
fun Context.startForegroundServiceCompat(intent: Intent) {
@@ -10,4 +13,12 @@ fun Context.startForegroundServiceCompat(intent: Intent) {
} else {
startService(intent)
}
}
}
fun Service.startForegroundCompat(id: Int, notification: Notification) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
startForeground(id, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
} else {
startForeground(id, notification)
}
}

1
core/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/src/main/cpp/version.h

View File

@@ -1,8 +1,6 @@
import android.databinding.tool.ext.capitalizeUS
import com.github.kr328.golang.GolangBuildTask
import com.github.kr328.golang.GolangPlugin
import java.io.FileOutputStream
import java.net.URL
import java.time.Duration
plugins {
kotlin("android")
@@ -11,15 +9,11 @@ plugins {
id("golang-android")
}
val geoipDatabaseUrl =
"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb"
val geoipInvalidate = Duration.ofDays(7)!!
val geoipOutput = buildDir.resolve("intermediates/golang_blob")
val golangSource = file("src/main/golang/native")
golang {
sourceSets {
create("meta-alpha") {
create("alpha") {
tags.set(listOf("foss","with_gvisor","cmfa"))
srcDir.set(file("src/foss/golang"))
}
@@ -68,50 +62,17 @@ afterEvaluate {
}
}
task("downloadGeoipDatabase") {
val databaseFile = geoipOutput.resolve("Country.mmdb")
val moduleFile = geoipOutput.resolve("go.mod")
val sourceFile = geoipOutput.resolve("blob.go")
val abis = listOf("arm64-v8a" to "Arm64V8a", "armeabi-v7a" to "ArmeabiV7a", "x86" to "X86", "x86_64" to "X8664")
val moduleContent = """
module "cfa/blob"
""".trimIndent()
androidComponents.onVariants { variant ->
val cmakeName = if (variant.buildType == "debug") "Debug" else "RelWithDebInfo"
val sourceContent = """
package blob
import _ "embed"
//go:embed Country.mmdb
var GeoipDatabase []byte
""".trimIndent()
outputs.dir(geoipOutput)
onlyIf {
System.currentTimeMillis() - databaseFile.lastModified() > geoipInvalidate.toMillis()
}
doLast {
geoipOutput.mkdirs()
moduleFile.writeText(moduleContent)
sourceFile.writeText(sourceContent)
URL(geoipDatabaseUrl).openConnection().getInputStream().use { input ->
FileOutputStream(databaseFile).use { output ->
input.copyTo(output)
abis.forEach { (abi, goAbi) ->
tasks.configureEach {
if (name.startsWith("buildCMake$cmakeName[$abi]")) {
dependsOn("externalGolangBuild${variant.name.capitalizeUS()}$goAbi")
println("Set up dependency: $name -> externalGolangBuild${variant.name.capitalizeUS()}$goAbi")
}
}
}
}
afterEvaluate {
val downloadTask = tasks["downloadGeoipDatabase"]
tasks.forEach {
if (it.name.startsWith("externalGolangBuild")) {
it.dependsOn(downloadTask)
}
}
}
}

View File

@@ -4,54 +4,71 @@ go 1.20
require cfa v0.0.0
require cfa/blob v0.0.0-00010101000000-000000000000 // indirect
require (
github.com/3andne/restls-client-go v0.1.6 // indirect
github.com/metacubex/mihomo v1.7.0 // indirect
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34 // indirect
github.com/RyuaNerin/go-krypto v1.0.2 // indirect
github.com/RyuaNerin/go-krypto v1.3.0 // indirect
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/cilium/ebpf v0.12.0 // indirect
github.com/coreos/go-iptables v0.7.0 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/coreos/go-iptables v0.8.0 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615 // indirect
github.com/enfein/mieru/v3 v3.13.0 // indirect
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gaukas/godicttls v0.0.4 // indirect
github.com/go-chi/chi/v5 v5.2.1 // indirect
github.com/go-chi/render v1.0.3 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.0 // indirect
github.com/gofrs/uuid/v5 v5.0.0 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/gofrs/uuid/v5 v5.3.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/socket v0.4.1 // indirect
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab // indirect
github.com/metacubex/bart v0.19.0 // indirect
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399 // indirect
github.com/metacubex/chacha v0.1.2 // indirect
github.com/metacubex/fswatch v0.1.1 // indirect
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8 // indirect
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b // indirect
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966 // indirect
github.com/metacubex/sing-shadowsocks v0.2.5 // indirect
github.com/metacubex/sing-shadowsocks2 v0.1.4 // indirect
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd // indirect
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74 // indirect
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b // indirect
github.com/metacubex/mihomo v1.7.0 // indirect
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14 // indirect
github.com/metacubex/randv2 v0.2.0 // indirect
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7 // indirect
github.com/metacubex/sing-mux v0.3.2 // indirect
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b // indirect
github.com/metacubex/sing-shadowsocks v0.2.9 // indirect
github.com/metacubex/sing-shadowsocks2 v0.2.3 // indirect
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6 // indirect
github.com/metacubex/sing-vmess v0.2.1 // indirect
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee // indirect
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 // indirect
github.com/metacubex/utls v1.7.0-alpha.2 // indirect
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 // indirect
github.com/miekg/dns v1.1.63 // indirect
github.com/mroth/weightedrand/v2 v2.1.0 // indirect
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
@@ -59,22 +76,12 @@ require (
github.com/oschwald/maxminddb-golang v1.12.0 // indirect
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61 // indirect
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 // indirect
github.com/sagernet/sing v0.2.14 // indirect
github.com/sagernet/sing-mux v0.1.3 // indirect
github.com/sagernet/sing-shadowtls v0.1.4 // indirect
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37 // indirect
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6 // indirect
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2 // indirect
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9 // indirect
github.com/shirou/gopsutil/v3 v3.23.9 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sagernet/cors v1.2.1 // indirect
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a // indirect
github.com/samber/lo v1.50.0 // indirect
github.com/shirou/gopsutil/v4 v4.25.1 // indirect
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b // indirect
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c // indirect
github.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e // indirect
@@ -82,32 +89,29 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/zhangyunhao116/fastrand v0.3.0 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 // indirect
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/mock v0.3.0 // indirect
go4.org/netipx v0.0.0-20230824141953-6213f710f925 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
go.uber.org/mock v0.4.0 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.24.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)
replace github.com/sagernet/sing => github.com/metacubex/sing v0.0.0-20240111014253-f1818b6a82b2
replace cfa => ../../main/golang
replace github.com/metacubex/mihomo => ./clash
replace cfa/blob => ../../../build/intermediates/golang_blob

View File

@@ -1,30 +1,37 @@
github.com/3andne/restls-client-go v0.1.6 h1:tRx/YilqW7iHpgmEL4E1D8dAsuB0tFF3uvncS+B6I08=
github.com/3andne/restls-client-go v0.1.6/go.mod h1:iEdTZNt9kzPIxjIGSMScUFSBrUH6bFRNg0BWlP4orEY=
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34 h1:USCTqih5d1bUXUxWNS9ZD5Tx/lb0jXHEtRIIx/F9dMc=
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34/go.mod h1:YR9wK13TgI5ww8iKWm91MHiSoHC7Oz0U4beCCmtXqLw=
github.com/RyuaNerin/go-krypto v1.0.2 h1:9KiZrrBs+tDrQ66dNy4nrX6SzntKtSKdm0wKHhdB4WM=
github.com/RyuaNerin/go-krypto v1.0.2/go.mod h1:17LzMeJCgzGTkPH3TmfzRnEJ/yA7ErhTPp9sxIqONtA=
github.com/RyuaNerin/go-krypto v1.3.0 h1:smavTzSMAx8iuVlGb4pEwl9MD2qicqMzuXR2QWp2/Pg=
github.com/RyuaNerin/go-krypto v1.3.0/go.mod h1:9R9TU936laAIqAmjcHo/LsaXYOZlymudOAxjaBf62UM=
github.com/RyuaNerin/testingutil v0.1.0 h1:IYT6JL57RV3U2ml3dLHZsVtPOP6yNK7WUVdzzlpNrss=
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 h1:cDVUiFo+npB0ZASqnw4q90ylaVAbnYyx0JYqK4YcGok=
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
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=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/cilium/ebpf v0.12.0 h1:oQEuIQIXgYhe1v7sYUG0P9vtJTYZLLdA6tiQmrOB1mo=
github.com/cilium/ebpf v0.12.0/go.mod h1:u9H29/Iq+8cy70YqI6p5pfADkFl3vdnV2qXDg5JL0Zo=
github.com/coreos/go-iptables v0.7.0 h1:XWM3V+MPRr5/q51NuWSgU0fqMad64Zyxs8ZUoMsamr8=
github.com/coreos/go-iptables v0.7.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/coreos/go-iptables v0.8.0 h1:MPc2P89IhuVpLI7ETL/2tx3XZ61VeICZjYqDEgNsPRc=
github.com/coreos/go-iptables v0.8.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
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/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8=
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615 h1:W7mpP4uiOAbBOdDnRXT9EUdauFv7bz+ERT5rPIord00=
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/enfein/mieru/v3 v3.13.0 h1:eGyxLGkb+lut9ebmx+BGwLJ5UMbEc/wGIYO0AXEKy98=
github.com/enfein/mieru/v3 v3.13.0/go.mod h1:zJBUCsi5rxyvHM8fjFf+GLaEl4OEjjBXr1s5F6Qd3hM=
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 h1:kXYqH/sL8dS/FdoFjr12ePjnLPorPo2FsnrHNuXSDyo=
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g=
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391/go.mod h1:K2R7GhgxrlJzHw2qiPWsCZXf/kXEJN9PLnQK73Ll0po=
github.com/ericlagergren/saferand v0.0.0-20220206064634-960a4dd2bc5c h1:RUzBDdZ+e/HEe2Nh8lYsduiPAZygUfVXJn0Ncj5sHMg=
@@ -32,11 +39,14 @@ github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 h1:tlDMEdcPRQKBE
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1/go.mod h1:4RfsapbGx2j/vU5xC/5/9qB3kn9Awp1YDiEnN43QrJ4=
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 h1:fuGucgPk5dN6wzfnxl3D0D3rVLw4v2SbBT9jb4VnxzA=
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010/go.mod h1:JtBcj7sBuTTRupn7c2bFspMDIObMJsVK8TeUvpShPok=
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk=
github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI=
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
@@ -47,70 +57,96 @@ github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.3.0 h1:sbeU3Y4Qzlb+MOzIe6mQGf7QR4Hkv6ZD0qhGkBFL2O0=
github.com/gobwas/ws v1.3.0/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
github.com/gofrs/uuid/v5 v5.3.2 h1:2jfO8j3XgSwlz/wHqemAEugfnTlikAYHhnqQ8Xh4fE0=
github.com/gofrs/uuid/v5 v5.3.2/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a h1:S33o3djA1nPRd+d/bf7jbbXytXuK/EoXow7+aa76grQ=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a/go.mod h1:zmdm3sTSDP3vOOX3CEWRkkRHtKr1DxBx+J1OQFoDQQs=
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 h1:q3OEI9RaN/wwcx+qgGo6ZaoJkCiDYe/gjDLfq7lQQF4=
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 h1:EnfXoSqDfSNJv0VBNqY/88RNnhSGYkrHaO0mmFGbVsc=
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab h1:Chbw+/31UC14YFNr78pESt5Vowlc62zziw05JCUqoL4=
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab/go.mod h1:xVKK8jC5Sd3hfh7WjmCq+HorehIbrBijaUWmcuKjPcI=
github.com/metacubex/bart v0.19.0 h1:XQ9AJeI+WO+phRPkUOoflAFwlqDJnm5BPQpixciJQBY=
github.com/metacubex/bart v0.19.0/go.mod h1:DCcyfP4MC+Zy7sLK7XeGuMw+P5K9mIRsYOBgiE8icsI=
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399 h1:oBowHVKZycNtAFbZ6avaCSZJYeme2Nrj+4RpV2cNJig=
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399/go.mod h1:4xcieuIK+M4bGQmQYZVqEaIYqjS1ahO4kXG7EmDgEro=
github.com/metacubex/chacha v0.1.2 h1:QulCq3eVm3TO6+4nVIWJtmSe7BT2GMrgVHuAoqRQnlc=
github.com/metacubex/chacha v0.1.2/go.mod h1:Djn9bPZxLTXbJFSeyo0/qzEzQI+gUSSzttuzZM75GH8=
github.com/metacubex/fswatch v0.1.1 h1:jqU7C/v+g0qc2RUFgmAOPoVvfl2BXXUXEumn6oQuxhU=
github.com/metacubex/fswatch v0.1.1/go.mod h1:czrTT7Zlbz7vWft8RQu9Qqh+JoX+Nnb+UabuyN1YsgI=
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 h1:cjd4biTvOzK9ubNCCkQ+ldc4YSH/rILn53l/xGBFHHI=
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759/go.mod h1:UHOv2xu+RIgLwpXca7TLrXleEd4oR3sPatW6IF8wU88=
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8 h1:npBvaPAT145UY8682AzpUMWpdIxJti/WPLjy7gCiYYs=
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8/go.mod h1:ZR6Gas7P1GcADCVBc1uOrA0bLQqDDyp70+63fD/BE2c=
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b h1:uZ++sW8yg7Fr/Wvmmrb/V+SfxvRs0iMC+2+u2bRmO8g=
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b/go.mod h1:4pe6cY+nAMFU/Uxn1rfnxNIowsaJGDQ3uyy4VuiPkP4=
github.com/metacubex/sing v0.0.0-20231001053806-1230641572b9 h1:F0+IuW0tZ96QHEmrebXAdYnz7ab7Gz4l5yYC4g6Cg8k=
github.com/metacubex/sing v0.0.0-20231001053806-1230641572b9/go.mod h1:GQ673iPfUnkbK/dIPkfd1Xh1MjOGo36gkl/mkiHY7Jg=
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966 h1:wbOsbU3kfD5LRuJIntJwEPmgGSQukof8CgLNypi8az8=
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966/go.mod h1:GU7g2AZesXItk4CspDP8Dc7eGtlA2GVDihyCwsUXRSo=
github.com/metacubex/sing-shadowsocks v0.2.5 h1:O2RRSHlKGEpAVG/OHJQxyHqDy8uvvdCW/oW2TDBOIhc=
github.com/metacubex/sing-shadowsocks v0.2.5/go.mod h1:Xz2uW9BEYGEoA8B4XEpoxt7ERHClFCwsMAvWaruoyMo=
github.com/metacubex/sing-shadowsocks2 v0.1.4 h1:OOCf8lgsVcpTOJUeaFAMzyKVebaQOBnKirDdUdBoKIE=
github.com/metacubex/sing-shadowsocks2 v0.1.4/go.mod h1:Qz028sLfdY3qxGRm9FDI+IM2Ae3ty2wR7HIzD/56h/k=
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd h1:k0+92eARqyTAovGhg2AxdsMWHjUsdiGCnR5NuXF3CQY=
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd/go.mod h1:Q7zmpJ+qOvMMXyUoYlxGQuWkqALUpXzFSSqO+KLPyzA=
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74 h1:FtupiyFkaVjFvRa7B/uDtRWg5BNsoyPC9MTev3sDasY=
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74/go.mod h1:8EWBZpc+qNvf5gmvjAtMHK1/DpcWqzfcBL842K00BsM=
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170 h1:DBGA0hmrP4pVIwLiXUONdphjcppED+plmVaKf1oqkwk=
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170/go.mod h1:/VbJfbdLnANE+SKXyMk/96sTRrD4GdFLh5mkegqqFcY=
github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE=
github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY=
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b h1:RUh4OdVPz/jDrM9MQ2ySuqu2aeBqcA8rtfWUYLZ8RtI=
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b/go.mod h1:8LpS0IJW1VmWzUm3ylb0e2SK5QDm5lO/2qwWLZgRpBU=
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 h1:1Qpuy+sU3DmyX9HwI+CrBT/oLNJngvBorR2RbajJcqo=
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793/go.mod h1:RjRNb4G52yAgfR+Oe/kp9G4PJJ97Fnj89eY1BFO3YyA=
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14 h1:vhB4KEgiN89xXtLlyYWczu3AxgN2T1lp0kIDYT4Faag=
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14/go.mod h1:9R1NOzCgTcWsdWvOMlmtMuF0uKzuOpsfvEf7U3I8zM0=
github.com/metacubex/randv2 v0.2.0 h1:uP38uBvV2SxYfLj53kuvAjbND4RUDfFJjwr4UigMiLs=
github.com/metacubex/randv2 v0.2.0/go.mod h1:kFi2SzrQ5WuneuoLLCMkABtiBu6VRrMrWFqSPyj2cxY=
github.com/metacubex/sing v0.5.2/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7 h1:m4nSxvw46JEgxMzzmnXams+ebwabcry4Ydep/zNiesQ=
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
github.com/metacubex/sing-mux v0.3.2 h1:nJv52pyRivHcaZJKk2JgxpaVvj1GAXG81scSa9N7ncw=
github.com/metacubex/sing-mux v0.3.2/go.mod h1:3rt1soewn0O6j89GCLmwAQFsq257u0jf2zQSPhTL3Bw=
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b h1:JKx0yY/eXU7U5tHiAxANytFtkfEjzOte19qLlc+pFeY=
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b/go.mod h1:mqtr9bgM9eLvLKQqiLOi5I6AJHkvqAw2a61ABZcLuoE=
github.com/metacubex/sing-shadowsocks v0.2.9 h1:2e++13WNN7EGjGtvrGLUzW1xrCdQbW2gIFpgw5GEw00=
github.com/metacubex/sing-shadowsocks v0.2.9/go.mod h1:CJSEGO4FWQAWe+ZiLZxCweGdjRR60A61SIoVjdjQeBA=
github.com/metacubex/sing-shadowsocks2 v0.2.3 h1:v3rNS/5Ywh0NIZ6VU/NmdERQIN5RePzyxCFeQsU4Cx0=
github.com/metacubex/sing-shadowsocks2 v0.2.3/go.mod h1:/WNy/Q8ahLCoPRriWuFZFD0Jy+JNp1MEQl28Zw6SaF8=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6 h1:TAwL91XPa6x1QK55CRm+VTzPvLPUfEr/uFDnOZArqEU=
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6/go.mod h1:HDaHDL6onAX2ZGbAGUXKp++PohRdNb7Nzt6zxzhox+U=
github.com/metacubex/sing-vmess v0.2.1 h1:I6gM3VUjtvJ15D805EUbNH+SRBuqzJeFnuIbKYUsWZ0=
github.com/metacubex/sing-vmess v0.2.1/go.mod h1:DsODWItJtOMZNna8Qhheg8r3tUivrcO3vWgaTYKnfTo=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80=
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee h1:lp6hJ+4wCLZu113awp7P6odM2okB5s60HUyF0FMqKmo=
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee/go.mod h1:4bPD8HWx9jPJ9aE4uadgyN7D1/Wz3KmPy+vale8sKLE=
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY=
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
github.com/metacubex/utls v1.7.0-alpha.2 h1:kLRg6zDV12R1uclL5qW9Tx4RD6ztGIIrTZWY5zrJXCg=
github.com/metacubex/utls v1.7.0-alpha.2/go.mod h1:oknYT0qTOwE4hjPmZOEpzVdefnW7bAdGLvZcqmk4TLU=
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ=
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181/go.mod h1:phewKljNYiTVT31Gcif8RiCKnTUOgVWFJjccqYM8s+Y=
github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY=
github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs=
github.com/mroth/weightedrand/v2 v2.1.0 h1:o1ascnB1CIVzsqlfArQQjeMy1U0NcIbBO5rfd5E/OeU=
github.com/mroth/weightedrand/v2 v2.1.0/go.mod h1:f2faGsfOGOwc1p94wzHKKZyTpcJUW7OJ/9U4yfiNAOU=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 h1:1102pQc2SEPp5+xrS26wEaeb26sZy6k9/ZXlZN+eXE4=
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7/go.mod h1:UqoUn6cHESlliMhOnKLWr+CBH+e3bazUPvFj1XZwAjs=
github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q=
@@ -130,39 +166,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU=
github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU=
github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++5Fg=
github.com/puzpuzpuz/xsync/v3 v3.5.1/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/qtls-go1-20 v0.3.4 h1:MfFAPULvst4yoMgY9QmtpYmfij/em7O8UUi+bNVm7Cg=
github.com/quic-go/qtls-go1-20 v0.3.4/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61 h1:5+m7c6AkmAylhauulqN/c5dnh8/KssrE9c93TQrXldA=
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61/go.mod h1:QUQ4RRHD6hGGHdFMEtR8T2P6GS6R3D/CXKdaYHKKXms=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 h1:iL5gZI3uFp0X6EslacyapiRz7LLSJyr4RajF/BhMVyE=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/sagernet/sing-mux v0.1.3 h1:fAf7PZa2A55mCeh0KKM02f1k2Y4vEmxuZZ/51ahkkLA=
github.com/sagernet/sing-mux v0.1.3/go.mod h1:wGeIeiiFLx4HUM5LAg65wrNZ/X1muOimqK0PEhNbPi0=
github.com/sagernet/sing-shadowtls v0.1.4 h1:aTgBSJEgnumzFenPvc+kbD9/W0PywzWevnVpEx6Tw3k=
github.com/sagernet/sing-shadowtls v0.1.4/go.mod h1:F8NBgsY5YN2beQavdgdm1DPlhaKQlaL6lpDdcBglGK4=
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37 h1:HuE6xSwco/Xed8ajZ+coeYLmioq0Qp1/Z2zczFaV8as=
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37/go.mod h1:3skNSftZDJWTGVtVaM2jfbce8qHnmH/AGDRe62iNOg0=
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6 h1:Px+hN4Vzgx+iCGVnWH5A8eR7JhNnIV3rGQmBxA7cw6Q=
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6/go.mod h1:zovq6vTvEM6ECiqE3Eeb9rpIylPpamPcmrJ9tv0Bt0M=
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2 h1:kDUqhc9Vsk5HJuhfIATJ8oQwBmpOZJuozQG7Vk88lL4=
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2/go.mod h1:JKQMZq/O2qnZjdrt+B57olmfgEmLtY9iiSIEYtWvoSM=
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f h1:Kvo8w8Y9lzFGB/7z09MJ3TR99TFtfI/IuY87Ygcycho=
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f/go.mod h1:mySs0abhpc/gLlvhoq7HP1RzOaRmIXVeZGCh++zoApk=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9 h1:rc/CcqLH3lh8n+csdOuDfP+NuykE0U6AeYSJJHKDgSg=
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9/go.mod h1:a/83NAfUXvEuLpmxDssAXxgUgrEy12MId3Wd7OTs76s=
github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E=
github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/sagernet/cors v1.2.1 h1:Cv5Z8y9YSD6Gm+qSpNrL3LO4lD3eQVvbFYJSG7JCMHQ=
github.com/sagernet/cors v1.2.1/go.mod h1:O64VyOjjhrkLmQIjF4KGRrJO/5dVXFdpEmCW/eISRAI=
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/samber/lo v1.50.0 h1:XrG0xOeHs+4FQ8gJR97zDz5uOFMW7OwFWiFVzqopKgY=
github.com/samber/lo v1.50.0/go.mod h1:RjZyNk6WSnUFRKK6EyOhsRJMqft3G+pg7dCWHQCWvsc=
github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs=
github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI=
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b h1:rXHg9GrUEtWZhEkrykicdND3VPjlVbYiLdX9J7gimS8=
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b/go.mod h1:X7qrxNQViEaAN9LNZOPl9PfvQtp3V3c7LTo0dvGi0fM=
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c h1:DjKMC30y6yjG3IxDaeAj3PCoRr+IsO+bzyT+Se2m2Hk=
@@ -174,13 +189,15 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
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.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
@@ -190,37 +207,41 @@ github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 h1:gga7acRE695APm9hlsSMoOoE65U4/TcqNj90mc69Rlg=
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zhangyunhao116/fastrand v0.3.0 h1:7bwe124xcckPulX6fxtr2lFdO2KQqaefdtbk+mqO/Ig=
github.com/zhangyunhao116/fastrand v0.3.0/go.mod h1:0v5KgHho0VE6HU192HnY15de/oDS8UrbBChIFjIhBtc=
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 h1:UNrDfkQqiEYzdMlNsVvBYOAJWZjdktqFE9tQh5BT2+4=
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7/go.mod h1:E+rxHvJG9H6PUdzq9NRG6csuLN3XUx98BfGOVWNYnXs=
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go4.org/netipx v0.0.0-20230824141953-6213f710f925 h1:eeQDDVKFkx0g4Hyy8pHgmZaK0EqB4SD6rvKbUdN3ziQ=
go4.org/netipx v0.0.0-20230824141953-6213f710f925/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
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-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -232,32 +253,29 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ=
golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
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=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.kr328.clash.core">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@@ -1,7 +1,50 @@
cmake_minimum_required(VERSION 3.0)
# 获取git hash
message(STATUS "CMAKE_CURRENT_SOURCE_DIR= ${CMAKE_CURRENT_SOURCE_DIR}")
execute_process(
COMMAND git submodule foreach git log -1 --format=%H
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE COMMIT_HASH
)
string(REPLACE "\n" ";" COMMIT_HASH "${COMMIT_HASH}")
list(GET COMMIT_HASH 1 COMMIT_HASH)
string (REGEX REPLACE "[\n\t\r]" "" COMMIT_HASH ${COMMIT_HASH})
string(SUBSTRING ${COMMIT_HASH} 0 7 COMMIT_HASH)
message(STATUS "git hash= ${COMMIT_HASH}")
# 获取分支名称
execute_process(
COMMAND git submodule foreach git branch -r --contains ${COMMIT_HASH}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE CURRENT_BRANCH
)
string(REPLACE "\n" ";" CURRENT_BRANCH "${CURRENT_BRANCH}")
list(GET CURRENT_BRANCH 1 CURRENT_BRANCH)
string (REGEX REPLACE "origin/" "" CURRENT_BRANCH ${CURRENT_BRANCH})
string (REGEX REPLACE "[\n\t\r]" "" CURRENT_BRANCH ${CURRENT_BRANCH})
#string(SUBSTRING ${CURRENT_BRANCH} 0 8 CURRENT_BRANCH)
message(STATUS "git current branch = ${CURRENT_BRANCH}")
# 获取生成时间
string(TIMESTAMP COMPILE_TIME "%y%m%d")
string (REGEX REPLACE "[\n\t\r]" "" COMPILE_TIME ${COMPILE_TIME})
string(REGEX REPLACE "\"" "" COMPILE_TIME ${COMPILE_TIME})
# 生成版本信息
set(GIT_VERSION "${CURRENT_BRANCH}_${COMMIT_HASH}_${COMPILE_TIME}")
message(STATUS "version info = ${GIT_VERSION}")
# 去除空格
string(REGEX REPLACE "[ ]+" "" GIT_VERSION "${GIT_VERSION}")
# 保存变量到文件
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/version.h @ONLY)
project(clash-bridge C)
set(CMAKE_POSITION_INDEPENDENT_CODE on)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
@@ -23,4 +66,4 @@ include_directories("${GO_SOURCE}")
link_directories("${GO_OUTPUT_BASE}/${CMAKE_ANDROID_ARCH_ABI}")
add_library(bridge SHARED main.c jni_helper.c bridge_helper.c)
target_link_libraries(bridge log clash)
target_link_libraries(bridge log clash)

View File

@@ -8,6 +8,9 @@
#include "jni_helper.h"
#include "trace.h"
#include "version.h" // 添加当前编译core版本号变量
JNIEXPORT void JNICALL
Java_com_github_kr328_clash_core_bridge_Bridge_nativeInit(JNIEnv *env, jobject thiz,
jstring home,
@@ -16,8 +19,9 @@ Java_com_github_kr328_clash_core_bridge_Bridge_nativeInit(JNIEnv *env, jobject t
scoped_string _home = get_string(home);
scoped_string _version_name = get_string(version_name);
char* _git_version = make_String(GIT_VERSION);
coreInit(_home, _version_name, sdk_version);
coreInit(_home, _version_name, _git_version, sdk_version);
}
JNIEXPORT void JNICALL
@@ -108,18 +112,20 @@ Java_com_github_kr328_clash_core_bridge_Bridge_nativeNotifyInstalledAppChanged(J
JNIEXPORT void JNICALL
Java_com_github_kr328_clash_core_bridge_Bridge_nativeStartTun(JNIEnv *env, jobject thiz,
jint fd,
jstring stack,
jstring gateway,
jstring portal,
jstring dns,
jobject cb) {
TRACE_METHOD();
scoped_string _stack = get_string(stack);
scoped_string _gateway = get_string(gateway);
scoped_string _portal = get_string(portal);
scoped_string _dns = get_string(dns);
jobject _interface = new_global(cb);
startTun(fd, _gateway, _portal, _dns, _interface);
startTun(fd, _stack, _gateway, _portal, _dns, _interface);
}
JNIEXPORT void JNICALL
@@ -284,33 +290,6 @@ Java_com_github_kr328_clash_core_bridge_Bridge_nativeClearOverride(JNIEnv *env,
clearOverride(slot);
}
JNIEXPORT void JNICALL
Java_com_github_kr328_clash_core_bridge_Bridge_nativeInstallSideloadGeoip(JNIEnv *env, jobject thiz,
jbyteArray data) {
TRACE_METHOD();
if (data == NULL) {
installSideloadGeoip(NULL, 0);
return;
}
jbyte *bytes = (*env)->GetByteArrayElements(env, data, NULL);
int size = (*env)->GetArrayLength(env, data);
scoped_string err = installSideloadGeoip(bytes, size);
(*env)->ReleaseByteArrayElements(env, data, bytes, JNI_ABORT);
if (err != NULL) {
(*env)->ThrowNew(
env,
find_class("com/github/kr328/clash/core/bridge/ClashException"),
err
);
}
}
JNIEXPORT jstring JNICALL
Java_com_github_kr328_clash_core_bridge_Bridge_nativeQueryConfiguration(JNIEnv *env, jobject thiz) {
TRACE_METHOD();
@@ -330,6 +309,7 @@ Java_com_github_kr328_clash_core_bridge_Bridge_nativeSubscribeLogcat(JNIEnv *env
subscribeLogcat(_callback);
}
static jmethodID m_tun_interface_mark_socket;
static jmethodID m_tun_interface_query_socket_uid;
static jmethodID m_completable_complete;
@@ -537,4 +517,13 @@ JNI_OnLoad(JavaVM *vm, void *reserved) {
release_object_func = &release_jni_object_impl;
return JNI_VERSION_1_6;
}
JNIEXPORT jstring JNICALL
Java_com_github_kr328_clash_core_bridge_Bridge_nativeCoreVersion(JNIEnv *env, jobject thiz) {
TRACE_METHOD();
char* Version = make_String(GIT_VERSION);
return new_string(Version);
}

View File

@@ -0,0 +1,12 @@
#ifndef VERSION_H_IN
#define VERSION_H_IN
/**
* 当前编译core版本号
*/
#define GIT_VERSION @GIT_VERSION@
#define make_Str(x) #x
#define make_String(x) make_Str(x)
#endif

View File

@@ -5,7 +5,6 @@
<option name="MOVE_ALL_IMPORTS_IN_ONE_DECLARATION" value="true" />
<option name="MOVE_ALL_STDLIB_IMPORTS_IN_ONE_GROUP" value="true" />
<option name="GROUP_STDLIB_IMPORTS" value="true" />
<option name="GROUP_CURRENT_PROJECT_IMPORTS" value="true" />
</GoCodeStyleSettings>
</code_scheme>
</component>

View File

@@ -3,83 +3,91 @@ module cfa
go 1.20
require (
github.com/dlclark/regexp2 v1.11.5
github.com/metacubex/mihomo v1.7.0
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34
github.com/dlclark/regexp2 v1.10.0
github.com/miekg/dns v1.1.56
github.com/oschwald/maxminddb-golang v1.12.0
golang.org/x/sync v0.4.0
gopkg.in/yaml.v2 v2.4.0
golang.org/x/sync v0.11.0
gopkg.in/yaml.v3 v3.0.1
)
replace github.com/metacubex/mihomo => ../../foss/golang/clash
replace github.com/sagernet/sing => github.com/metacubex/sing v0.0.0-20240111014253-f1818b6a82b2
require (
github.com/3andne/restls-client-go v0.1.6 // indirect
github.com/RyuaNerin/go-krypto v1.0.2 // indirect
github.com/RyuaNerin/go-krypto v1.3.0 // indirect
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/cilium/ebpf v0.12.0 // indirect
github.com/coreos/go-iptables v0.7.0 // indirect
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/coreos/go-iptables v0.8.0 // indirect
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615 // indirect
github.com/enfein/mieru/v3 v3.13.0 // indirect
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gaukas/godicttls v0.0.4 // indirect
github.com/go-chi/chi/v5 v5.2.1 // indirect
github.com/go-chi/render v1.0.3 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.0 // indirect
github.com/gofrs/uuid/v5 v5.0.0 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/gofrs/uuid/v5 v5.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/socket v0.4.1 // indirect
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab // indirect
github.com/metacubex/bart v0.19.0 // indirect
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399 // indirect
github.com/metacubex/chacha v0.1.2 // indirect
github.com/metacubex/fswatch v0.1.1 // indirect
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8 // indirect
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b // indirect
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966 // indirect
github.com/metacubex/sing-shadowsocks v0.2.5 // indirect
github.com/metacubex/sing-shadowsocks2 v0.1.4 // indirect
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd // indirect
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74 // indirect
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170 // indirect
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b // indirect
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14 // indirect
github.com/metacubex/randv2 v0.2.0 // indirect
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7 // indirect
github.com/metacubex/sing-mux v0.3.2 // indirect
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b // indirect
github.com/metacubex/sing-shadowsocks v0.2.9 // indirect
github.com/metacubex/sing-shadowsocks2 v0.2.3 // indirect
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6 // indirect
github.com/metacubex/sing-vmess v0.2.1 // indirect
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee // indirect
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 // indirect
github.com/metacubex/utls v1.7.0-alpha.2 // indirect
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 // indirect
github.com/miekg/dns v1.1.63 // indirect
github.com/mroth/weightedrand/v2 v2.1.0 // indirect
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/openacid/low v0.1.21 // indirect
github.com/oschwald/maxminddb-golang v1.12.0 // indirect
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61 // indirect
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 // indirect
github.com/sagernet/sing v0.2.14 // indirect
github.com/sagernet/sing-mux v0.1.3 // indirect
github.com/sagernet/sing-shadowtls v0.1.4 // indirect
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37 // indirect
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6 // indirect
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2 // indirect
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9 // indirect
github.com/shirou/gopsutil/v3 v3.23.9 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sagernet/cors v1.2.1 // indirect
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a // indirect
github.com/samber/lo v1.50.0 // indirect
github.com/shirou/gopsutil/v4 v4.25.1 // indirect
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b // indirect
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c // indirect
github.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e // indirect
@@ -87,22 +95,23 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/zhangyunhao116/fastrand v0.3.0 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 // indirect
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/mock v0.3.0 // indirect
go4.org/netipx v0.0.0-20230824141953-6213f710f925 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
go.uber.org/mock v0.4.0 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.24.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)

View File

@@ -1,30 +1,37 @@
github.com/3andne/restls-client-go v0.1.6 h1:tRx/YilqW7iHpgmEL4E1D8dAsuB0tFF3uvncS+B6I08=
github.com/3andne/restls-client-go v0.1.6/go.mod h1:iEdTZNt9kzPIxjIGSMScUFSBrUH6bFRNg0BWlP4orEY=
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34 h1:USCTqih5d1bUXUxWNS9ZD5Tx/lb0jXHEtRIIx/F9dMc=
github.com/Kr328/tun2socket v0.0.0-20220414050025-d07c78d06d34/go.mod h1:YR9wK13TgI5ww8iKWm91MHiSoHC7Oz0U4beCCmtXqLw=
github.com/RyuaNerin/go-krypto v1.0.2 h1:9KiZrrBs+tDrQ66dNy4nrX6SzntKtSKdm0wKHhdB4WM=
github.com/RyuaNerin/go-krypto v1.0.2/go.mod h1:17LzMeJCgzGTkPH3TmfzRnEJ/yA7ErhTPp9sxIqONtA=
github.com/RyuaNerin/go-krypto v1.3.0 h1:smavTzSMAx8iuVlGb4pEwl9MD2qicqMzuXR2QWp2/Pg=
github.com/RyuaNerin/go-krypto v1.3.0/go.mod h1:9R9TU936laAIqAmjcHo/LsaXYOZlymudOAxjaBf62UM=
github.com/RyuaNerin/testingutil v0.1.0 h1:IYT6JL57RV3U2ml3dLHZsVtPOP6yNK7WUVdzzlpNrss=
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 h1:cDVUiFo+npB0ZASqnw4q90ylaVAbnYyx0JYqK4YcGok=
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
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=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/cilium/ebpf v0.12.0 h1:oQEuIQIXgYhe1v7sYUG0P9vtJTYZLLdA6tiQmrOB1mo=
github.com/cilium/ebpf v0.12.0/go.mod h1:u9H29/Iq+8cy70YqI6p5pfADkFl3vdnV2qXDg5JL0Zo=
github.com/coreos/go-iptables v0.7.0 h1:XWM3V+MPRr5/q51NuWSgU0fqMad64Zyxs8ZUoMsamr8=
github.com/coreos/go-iptables v0.7.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/coreos/go-iptables v0.8.0 h1:MPc2P89IhuVpLI7ETL/2tx3XZ61VeICZjYqDEgNsPRc=
github.com/coreos/go-iptables v0.8.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
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/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9 h1:/5RkVc9Rc81XmMyVqawCiDyrBHZbLAZgTTCqou4mwj8=
github.com/ericlagergren/aegis v0.0.0-20230312195928-b4ce538b56f9/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615 h1:W7mpP4uiOAbBOdDnRXT9EUdauFv7bz+ERT5rPIord00=
github.com/ebitengine/purego v0.8.3-0.20250507171810-1638563e3615/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/enfein/mieru/v3 v3.13.0 h1:eGyxLGkb+lut9ebmx+BGwLJ5UMbEc/wGIYO0AXEKy98=
github.com/enfein/mieru/v3 v3.13.0/go.mod h1:zJBUCsi5rxyvHM8fjFf+GLaEl4OEjjBXr1s5F6Qd3hM=
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 h1:kXYqH/sL8dS/FdoFjr12ePjnLPorPo2FsnrHNuXSDyo=
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g=
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391/go.mod h1:K2R7GhgxrlJzHw2qiPWsCZXf/kXEJN9PLnQK73Ll0po=
github.com/ericlagergren/saferand v0.0.0-20220206064634-960a4dd2bc5c h1:RUzBDdZ+e/HEe2Nh8lYsduiPAZygUfVXJn0Ncj5sHMg=
@@ -32,11 +39,14 @@ github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 h1:tlDMEdcPRQKBE
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1/go.mod h1:4RfsapbGx2j/vU5xC/5/9qB3kn9Awp1YDiEnN43QrJ4=
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 h1:fuGucgPk5dN6wzfnxl3D0D3rVLw4v2SbBT9jb4VnxzA=
github.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010/go.mod h1:JtBcj7sBuTTRupn7c2bFspMDIObMJsVK8TeUvpShPok=
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk=
github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI=
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
@@ -47,70 +57,97 @@ github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.3.0 h1:sbeU3Y4Qzlb+MOzIe6mQGf7QR4Hkv6ZD0qhGkBFL2O0=
github.com/gobwas/ws v1.3.0/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
github.com/gofrs/uuid/v5 v5.3.2 h1:2jfO8j3XgSwlz/wHqemAEugfnTlikAYHhnqQ8Xh4fE0=
github.com/gofrs/uuid/v5 v5.3.2/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a h1:S33o3djA1nPRd+d/bf7jbbXytXuK/EoXow7+aa76grQ=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a/go.mod h1:zmdm3sTSDP3vOOX3CEWRkkRHtKr1DxBx+J1OQFoDQQs=
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 h1:q3OEI9RaN/wwcx+qgGo6ZaoJkCiDYe/gjDLfq7lQQF4=
github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 h1:EnfXoSqDfSNJv0VBNqY/88RNnhSGYkrHaO0mmFGbVsc=
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab h1:Chbw+/31UC14YFNr78pESt5Vowlc62zziw05JCUqoL4=
github.com/metacubex/amneziawg-go v0.0.0-20240922133038-fdf3a4d5a4ab/go.mod h1:xVKK8jC5Sd3hfh7WjmCq+HorehIbrBijaUWmcuKjPcI=
github.com/metacubex/bart v0.19.0 h1:XQ9AJeI+WO+phRPkUOoflAFwlqDJnm5BPQpixciJQBY=
github.com/metacubex/bart v0.19.0/go.mod h1:DCcyfP4MC+Zy7sLK7XeGuMw+P5K9mIRsYOBgiE8icsI=
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399 h1:oBowHVKZycNtAFbZ6avaCSZJYeme2Nrj+4RpV2cNJig=
github.com/metacubex/bbolt v0.0.0-20240822011022-aed6d4850399/go.mod h1:4xcieuIK+M4bGQmQYZVqEaIYqjS1ahO4kXG7EmDgEro=
github.com/metacubex/chacha v0.1.2 h1:QulCq3eVm3TO6+4nVIWJtmSe7BT2GMrgVHuAoqRQnlc=
github.com/metacubex/chacha v0.1.2/go.mod h1:Djn9bPZxLTXbJFSeyo0/qzEzQI+gUSSzttuzZM75GH8=
github.com/metacubex/fswatch v0.1.1 h1:jqU7C/v+g0qc2RUFgmAOPoVvfl2BXXUXEumn6oQuxhU=
github.com/metacubex/fswatch v0.1.1/go.mod h1:czrTT7Zlbz7vWft8RQu9Qqh+JoX+Nnb+UabuyN1YsgI=
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 h1:cjd4biTvOzK9ubNCCkQ+ldc4YSH/rILn53l/xGBFHHI=
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759/go.mod h1:UHOv2xu+RIgLwpXca7TLrXleEd4oR3sPatW6IF8wU88=
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8 h1:npBvaPAT145UY8682AzpUMWpdIxJti/WPLjy7gCiYYs=
github.com/metacubex/gvisor v0.0.0-20231001104248-0f672c3fb8d8/go.mod h1:ZR6Gas7P1GcADCVBc1uOrA0bLQqDDyp70+63fD/BE2c=
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b h1:uZ++sW8yg7Fr/Wvmmrb/V+SfxvRs0iMC+2+u2bRmO8g=
github.com/metacubex/quic-go v0.39.1-0.20231019030608-fd969d66f16b/go.mod h1:4pe6cY+nAMFU/Uxn1rfnxNIowsaJGDQ3uyy4VuiPkP4=
github.com/metacubex/sing v0.0.0-20231001053806-1230641572b9 h1:F0+IuW0tZ96QHEmrebXAdYnz7ab7Gz4l5yYC4g6Cg8k=
github.com/metacubex/sing v0.0.0-20231001053806-1230641572b9/go.mod h1:GQ673iPfUnkbK/dIPkfd1Xh1MjOGo36gkl/mkiHY7Jg=
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966 h1:wbOsbU3kfD5LRuJIntJwEPmgGSQukof8CgLNypi8az8=
github.com/metacubex/sing-quic v0.0.0-20231008050747-a684db516966/go.mod h1:GU7g2AZesXItk4CspDP8Dc7eGtlA2GVDihyCwsUXRSo=
github.com/metacubex/sing-shadowsocks v0.2.5 h1:O2RRSHlKGEpAVG/OHJQxyHqDy8uvvdCW/oW2TDBOIhc=
github.com/metacubex/sing-shadowsocks v0.2.5/go.mod h1:Xz2uW9BEYGEoA8B4XEpoxt7ERHClFCwsMAvWaruoyMo=
github.com/metacubex/sing-shadowsocks2 v0.1.4 h1:OOCf8lgsVcpTOJUeaFAMzyKVebaQOBnKirDdUdBoKIE=
github.com/metacubex/sing-shadowsocks2 v0.1.4/go.mod h1:Qz028sLfdY3qxGRm9FDI+IM2Ae3ty2wR7HIzD/56h/k=
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd h1:k0+92eARqyTAovGhg2AxdsMWHjUsdiGCnR5NuXF3CQY=
github.com/metacubex/sing-tun v0.1.15-0.20231103033938-170591e8d5bd/go.mod h1:Q7zmpJ+qOvMMXyUoYlxGQuWkqALUpXzFSSqO+KLPyzA=
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74 h1:FtupiyFkaVjFvRa7B/uDtRWg5BNsoyPC9MTev3sDasY=
github.com/metacubex/sing-vmess v0.1.9-0.20230921005247-a0488d7dac74/go.mod h1:8EWBZpc+qNvf5gmvjAtMHK1/DpcWqzfcBL842K00BsM=
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170 h1:DBGA0hmrP4pVIwLiXUONdphjcppED+plmVaKf1oqkwk=
github.com/metacubex/sing-wireguard v0.0.0-20231001110902-321836559170/go.mod h1:/VbJfbdLnANE+SKXyMk/96sTRrD4GdFLh5mkegqqFcY=
github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE=
github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY=
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b h1:RUh4OdVPz/jDrM9MQ2ySuqu2aeBqcA8rtfWUYLZ8RtI=
github.com/metacubex/gvisor v0.0.0-20250324165734-5857f47bd43b/go.mod h1:8LpS0IJW1VmWzUm3ylb0e2SK5QDm5lO/2qwWLZgRpBU=
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 h1:1Qpuy+sU3DmyX9HwI+CrBT/oLNJngvBorR2RbajJcqo=
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793/go.mod h1:RjRNb4G52yAgfR+Oe/kp9G4PJJ97Fnj89eY1BFO3YyA=
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14 h1:vhB4KEgiN89xXtLlyYWczu3AxgN2T1lp0kIDYT4Faag=
github.com/metacubex/quic-go v0.51.1-0.20250423035655-e3948b36ce14/go.mod h1:9R1NOzCgTcWsdWvOMlmtMuF0uKzuOpsfvEf7U3I8zM0=
github.com/metacubex/randv2 v0.2.0 h1:uP38uBvV2SxYfLj53kuvAjbND4RUDfFJjwr4UigMiLs=
github.com/metacubex/randv2 v0.2.0/go.mod h1:kFi2SzrQ5WuneuoLLCMkABtiBu6VRrMrWFqSPyj2cxY=
github.com/metacubex/sing v0.5.2/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7 h1:m4nSxvw46JEgxMzzmnXams+ebwabcry4Ydep/zNiesQ=
github.com/metacubex/sing v0.5.3-0.20250504031621-1f99e54c15b7/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
github.com/metacubex/sing-mux v0.3.2 h1:nJv52pyRivHcaZJKk2JgxpaVvj1GAXG81scSa9N7ncw=
github.com/metacubex/sing-mux v0.3.2/go.mod h1:3rt1soewn0O6j89GCLmwAQFsq257u0jf2zQSPhTL3Bw=
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b h1:JKx0yY/eXU7U5tHiAxANytFtkfEjzOte19qLlc+pFeY=
github.com/metacubex/sing-quic v0.0.0-20250504030450-1e678cb3d50b/go.mod h1:mqtr9bgM9eLvLKQqiLOi5I6AJHkvqAw2a61ABZcLuoE=
github.com/metacubex/sing-shadowsocks v0.2.9 h1:2e++13WNN7EGjGtvrGLUzW1xrCdQbW2gIFpgw5GEw00=
github.com/metacubex/sing-shadowsocks v0.2.9/go.mod h1:CJSEGO4FWQAWe+ZiLZxCweGdjRR60A61SIoVjdjQeBA=
github.com/metacubex/sing-shadowsocks2 v0.2.3 h1:v3rNS/5Ywh0NIZ6VU/NmdERQIN5RePzyxCFeQsU4Cx0=
github.com/metacubex/sing-shadowsocks2 v0.2.3/go.mod h1:/WNy/Q8ahLCoPRriWuFZFD0Jy+JNp1MEQl28Zw6SaF8=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6 h1:TAwL91XPa6x1QK55CRm+VTzPvLPUfEr/uFDnOZArqEU=
github.com/metacubex/sing-tun v0.4.6-0.20250503065609-efb9f0beb6f6/go.mod h1:HDaHDL6onAX2ZGbAGUXKp++PohRdNb7Nzt6zxzhox+U=
github.com/metacubex/sing-vmess v0.2.1 h1:I6gM3VUjtvJ15D805EUbNH+SRBuqzJeFnuIbKYUsWZ0=
github.com/metacubex/sing-vmess v0.2.1/go.mod h1:DsODWItJtOMZNna8Qhheg8r3tUivrcO3vWgaTYKnfTo=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80=
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee h1:lp6hJ+4wCLZu113awp7P6odM2okB5s60HUyF0FMqKmo=
github.com/metacubex/smux v0.0.0-20250503055512-501391591dee/go.mod h1:4bPD8HWx9jPJ9aE4uadgyN7D1/Wz3KmPy+vale8sKLE=
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY=
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
github.com/metacubex/utls v1.7.0-alpha.2 h1:kLRg6zDV12R1uclL5qW9Tx4RD6ztGIIrTZWY5zrJXCg=
github.com/metacubex/utls v1.7.0-alpha.2/go.mod h1:oknYT0qTOwE4hjPmZOEpzVdefnW7bAdGLvZcqmk4TLU=
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181 h1:hJLQviGySBuaynlCwf/oYgIxbVbGRUIKZCxdya9YrbQ=
github.com/metacubex/wireguard-go v0.0.0-20240922131502-c182e7471181/go.mod h1:phewKljNYiTVT31Gcif8RiCKnTUOgVWFJjccqYM8s+Y=
github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY=
github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs=
github.com/mroth/weightedrand/v2 v2.1.0 h1:o1ascnB1CIVzsqlfArQQjeMy1U0NcIbBO5rfd5E/OeU=
github.com/mroth/weightedrand/v2 v2.1.0/go.mod h1:f2faGsfOGOwc1p94wzHKKZyTpcJUW7OJ/9U4yfiNAOU=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 h1:1102pQc2SEPp5+xrS26wEaeb26sZy6k9/ZXlZN+eXE4=
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7/go.mod h1:UqoUn6cHESlliMhOnKLWr+CBH+e3bazUPvFj1XZwAjs=
github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q=
@@ -130,39 +167,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU=
github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU=
github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++5Fg=
github.com/puzpuzpuz/xsync/v3 v3.5.1/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/qtls-go1-20 v0.3.4 h1:MfFAPULvst4yoMgY9QmtpYmfij/em7O8UUi+bNVm7Cg=
github.com/quic-go/qtls-go1-20 v0.3.4/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61 h1:5+m7c6AkmAylhauulqN/c5dnh8/KssrE9c93TQrXldA=
github.com/sagernet/go-tun2socks v1.16.12-0.20220818015926-16cb67876a61/go.mod h1:QUQ4RRHD6hGGHdFMEtR8T2P6GS6R3D/CXKdaYHKKXms=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 h1:iL5gZI3uFp0X6EslacyapiRz7LLSJyr4RajF/BhMVyE=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/sagernet/sing-mux v0.1.3 h1:fAf7PZa2A55mCeh0KKM02f1k2Y4vEmxuZZ/51ahkkLA=
github.com/sagernet/sing-mux v0.1.3/go.mod h1:wGeIeiiFLx4HUM5LAg65wrNZ/X1muOimqK0PEhNbPi0=
github.com/sagernet/sing-shadowtls v0.1.4 h1:aTgBSJEgnumzFenPvc+kbD9/W0PywzWevnVpEx6Tw3k=
github.com/sagernet/sing-shadowtls v0.1.4/go.mod h1:F8NBgsY5YN2beQavdgdm1DPlhaKQlaL6lpDdcBglGK4=
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37 h1:HuE6xSwco/Xed8ajZ+coeYLmioq0Qp1/Z2zczFaV8as=
github.com/sagernet/smux v0.0.0-20230312102458-337ec2a5af37/go.mod h1:3skNSftZDJWTGVtVaM2jfbce8qHnmH/AGDRe62iNOg0=
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6 h1:Px+hN4Vzgx+iCGVnWH5A8eR7JhNnIV3rGQmBxA7cw6Q=
github.com/sagernet/tfo-go v0.0.0-20230816093905-5a5c285d44a6/go.mod h1:zovq6vTvEM6ECiqE3Eeb9rpIylPpamPcmrJ9tv0Bt0M=
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2 h1:kDUqhc9Vsk5HJuhfIATJ8oQwBmpOZJuozQG7Vk88lL4=
github.com/sagernet/utls v0.0.0-20230309024959-6732c2ab36f2/go.mod h1:JKQMZq/O2qnZjdrt+B57olmfgEmLtY9iiSIEYtWvoSM=
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f h1:Kvo8w8Y9lzFGB/7z09MJ3TR99TFtfI/IuY87Ygcycho=
github.com/sagernet/wireguard-go v0.0.0-20230807125731-5d4a7ef2dc5f/go.mod h1:mySs0abhpc/gLlvhoq7HP1RzOaRmIXVeZGCh++zoApk=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9 h1:rc/CcqLH3lh8n+csdOuDfP+NuykE0U6AeYSJJHKDgSg=
github.com/scjalliance/comshim v0.0.0-20230315213746-5e51f40bd3b9/go.mod h1:a/83NAfUXvEuLpmxDssAXxgUgrEy12MId3Wd7OTs76s=
github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E=
github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/sagernet/cors v1.2.1 h1:Cv5Z8y9YSD6Gm+qSpNrL3LO4lD3eQVvbFYJSG7JCMHQ=
github.com/sagernet/cors v1.2.1/go.mod h1:O64VyOjjhrkLmQIjF4KGRrJO/5dVXFdpEmCW/eISRAI=
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/samber/lo v1.50.0 h1:XrG0xOeHs+4FQ8gJR97zDz5uOFMW7OwFWiFVzqopKgY=
github.com/samber/lo v1.50.0/go.mod h1:RjZyNk6WSnUFRKK6EyOhsRJMqft3G+pg7dCWHQCWvsc=
github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs=
github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI=
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b h1:rXHg9GrUEtWZhEkrykicdND3VPjlVbYiLdX9J7gimS8=
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b/go.mod h1:X7qrxNQViEaAN9LNZOPl9PfvQtp3V3c7LTo0dvGi0fM=
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c h1:DjKMC30y6yjG3IxDaeAj3PCoRr+IsO+bzyT+Se2m2Hk=
@@ -174,13 +190,15 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
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.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
@@ -190,37 +208,41 @@ github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 h1:gga7acRE695APm9hlsSMoOoE65U4/TcqNj90mc69Rlg=
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zhangyunhao116/fastrand v0.3.0 h1:7bwe124xcckPulX6fxtr2lFdO2KQqaefdtbk+mqO/Ig=
github.com/zhangyunhao116/fastrand v0.3.0/go.mod h1:0v5KgHho0VE6HU192HnY15de/oDS8UrbBChIFjIhBtc=
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 h1:UNrDfkQqiEYzdMlNsVvBYOAJWZjdktqFE9tQh5BT2+4=
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7/go.mod h1:E+rxHvJG9H6PUdzq9NRG6csuLN3XUx98BfGOVWNYnXs=
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go4.org/netipx v0.0.0-20230824141953-6213f710f925 h1:eeQDDVKFkx0g4Hyy8pHgmZaK0EqB4SD6rvKbUdN3ziQ=
go4.org/netipx v0.0.0-20230824141953-6213f710f925/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
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-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -232,32 +254,29 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ=
golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
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=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=

View File

@@ -7,14 +7,10 @@ import (
)
func NotifyDnsChanged(dnsList string) {
dL := strings.Split(dnsList, ",")
ns := make([]dns.NameServer, 0, len(dnsList))
for _, d := range dL {
ns = append(ns, dns.NameServer{Addr: d})
var addr []string
if len(dnsList) > 0 {
addr = strings.Split(dnsList, ",")
}
dns.UpdateSystemDNS(dL)
dns.UpdateSystemDNS(addr)
dns.FlushCacheWithDefaultResolver()
}

View File

@@ -112,7 +112,7 @@ func FetchAndValid(
return err
}
forEachProviders(rawCfg, func(index int, total int, name string, provider map[string]any) {
forEachProviders(rawCfg, func(index int, total int, name string, provider map[string]any, prefix string) {
bytes, _ := json.Marshal(&Status{
Action: "FetchProviders",
Args: []string{name},

View File

@@ -1,18 +1,18 @@
package config
import (
"io/ioutil"
"os"
P "path"
"runtime"
"strings"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
"cfa/native/app"
"github.com/metacubex/mihomo/log"
"github.com/metacubex/mihomo/config"
"github.com/metacubex/mihomo/hub/executor"
"github.com/metacubex/mihomo/hub"
"github.com/metacubex/mihomo/log"
)
func logDns(cfg *config.RawConfig) {
@@ -33,7 +33,7 @@ func logDns(cfg *config.RawConfig) {
func UnmarshalAndPatch(profilePath string) (*config.RawConfig, error) {
configPath := P.Join(profilePath, "config.yaml")
configData, err := ioutil.ReadFile(configPath)
configData, err := os.ReadFile(configPath)
if err != nil {
return nil, err
}
@@ -76,7 +76,8 @@ func Load(path string) error {
return err
}
executor.ApplyConfig(cfg, true)
// like hub.Parse()
hub.ApplyConfig(cfg)
app.ApplySubtitlePattern(rawCfg.ClashForAndroid.UiSubtitlePattern)
@@ -91,5 +92,5 @@ func LoadDefault() {
panic(err.Error())
}
executor.ApplyConfig(cfg, true)
hub.ApplyConfig(cfg)
}

View File

@@ -1,7 +1,7 @@
package config
import (
"io/ioutil"
"io"
"os"
"github.com/metacubex/mihomo/constant"
@@ -31,7 +31,7 @@ func ReadOverride(slot OverrideSlot) string {
return defaultPersistOverride
}
buf, err := ioutil.ReadAll(file)
buf, err := io.ReadAll(file)
if err != nil {
return defaultPersistOverride
}

View File

@@ -9,18 +9,21 @@ import (
"github.com/dlclark/regexp2"
"cfa/native/common"
"github.com/metacubex/mihomo/common/utils"
"github.com/metacubex/mihomo/config"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
"github.com/metacubex/mihomo/config"
"github.com/metacubex/mihomo/dns"
)
var processors = []processor{
patchExternalController, // must before patchOverride, so we only apply ExternalController in Override settings
patchOverride,
patchGeneral,
patchProfile,
patchDns,
patchTun,
patchListeners,
patchProviders,
validConfig,
}
@@ -38,10 +41,19 @@ func patchOverride(cfg *config.RawConfig, _ string) error {
return nil
}
func patchGeneral(cfg *config.RawConfig, _ string) error {
cfg.Interface = ""
cfg.ExternalUI = ""
func patchExternalController(cfg *config.RawConfig, _ string) error {
cfg.ExternalController = ""
cfg.ExternalControllerTLS = ""
return nil
}
func patchGeneral(cfg *config.RawConfig, profileDir string) error {
cfg.Interface = ""
cfg.RoutingMark = 0
if cfg.ExternalController != "" || cfg.ExternalControllerTLS != "" {
cfg.ExternalUI = profileDir + "/ui"
}
return nil
}
@@ -69,17 +81,45 @@ func patchDns(cfg *config.RawConfig, _ string) error {
}
if cfg.ClashForAndroid.AppendSystemDNS {
cfg.DNS.NameServer = append(cfg.DNS.NameServer, "dhcp://"+dns.SystemDNSPlaceholder)
cfg.DNS.NameServer = append(cfg.DNS.NameServer, "system://")
}
return nil
}
func patchProviders(cfg *config.RawConfig, profileDir string) error {
forEachProviders(cfg, func(index int, total int, key string, provider map[string]any) {
if path, ok := provider["path"].(string); ok {
provider["path"] = profileDir + "/providers/" + common.ResolveAsRoot(path)
func patchTun(cfg *config.RawConfig, _ string) error {
cfg.Tun.Enable = false
cfg.Tun.AutoRoute = false
cfg.Tun.AutoDetectInterface = false
return nil
}
func patchListeners(cfg *config.RawConfig, _ string) error {
newListeners := make([]map[string]any, 0, len(cfg.Listeners))
for _, mapping := range cfg.Listeners {
if proxyType, existType := mapping["type"].(string); existType {
switch proxyType {
case "tproxy", "redir", "tun":
continue // remove those listeners which is not supported
}
}
newListeners = append(newListeners, mapping)
}
cfg.Listeners = newListeners
return nil
}
func patchProviders(cfg *config.RawConfig, profileDir string) error {
forEachProviders(cfg, func(index int, total int, key string, provider map[string]any, prefix string) {
path, _ := provider["path"].(string)
if len(path) > 0 {
path = common.ResolveAsRoot(path)
} else if url, ok := provider["url"].(string); ok {
path = prefix + "/" + utils.MakeHash([]byte(url)).String() // same as C.GetPathByHash
} else {
return // both path and url is empty, WTF???
}
provider["path"] = profileDir + "/providers/" + path
})
return nil

View File

@@ -6,18 +6,23 @@ import (
"github.com/metacubex/mihomo/config"
)
func forEachProviders(rawCfg *config.RawConfig, fun func(index int, total int, key string, provider map[string]any)) {
const (
PROXIES = "proxies"
RULES = "rules"
)
func forEachProviders(rawCfg *config.RawConfig, fun func(index int, total int, key string, provider map[string]any, prefix string)) {
total := len(rawCfg.ProxyProvider) + len(rawCfg.RuleProvider)
index := 0
for k, v := range rawCfg.ProxyProvider {
fun(index, total, k, v)
fun(index, total, k, v, PROXIES)
index++
}
for k, v := range rawCfg.RuleProvider {
fun(index, total, k, v)
fun(index, total, k, v, RULES)
index++
}
@@ -25,10 +30,14 @@ func forEachProviders(rawCfg *config.RawConfig, fun func(index int, total int, k
func destroyProviders(cfg *config.Config) {
for _, p := range cfg.Providers {
_ = p.(io.Closer).Close()
if p, ok := p.(io.Closer); ok {
_ = p.Close()
}
}
for _, p := range cfg.RuleProviders {
_ = p.(io.Closer).Close()
if p, ok := p.(io.Closer); ok {
_ = p.Close()
}
}
}

View File

@@ -2,10 +2,10 @@ package delegate
import (
"errors"
"fmt"
"strings"
"syscall"
"cfa/blob"
"github.com/metacubex/mihomo/component/process"
"github.com/metacubex/mihomo/log"
@@ -13,15 +13,22 @@ import (
"cfa/native/platform"
"github.com/metacubex/mihomo/component/dialer"
"github.com/metacubex/mihomo/component/mmdb"
"github.com/metacubex/mihomo/constant"
)
var errBlocked = errors.New("blocked")
func Init(home, versionName string, platformVersion int) {
mmdb.LoadFromBytes(blob.GeoipDatabase)
func Init(home, versionName, gitVersion string, platformVersion int) {
log.Infoln("Init core, home: %s, versionName: %s, gitVersion: %s, platformVersion: %d", home, versionName, gitVersion, platformVersion)
constant.SetHomeDir(home)
// gitVersion = ${CURRENT_BRANCH}_${COMMIT_HASH}_${COMPILE_TIME}
if versions := strings.Split(gitVersion, "_"); len(versions) == 3 {
constant.Version = fmt.Sprintf("%s-%s-CMFA-%s", strings.ToLower(versions[0]), versions[1], strings.ToLower(versionName))
constant.BuildTime = versions[2]
} else {
constant.Version = gitVersion
}
constant.Version = strings.ToLower(constant.Version)
app.ApplyVersionName(versionName)
app.ApplyPlatformVersion(platformVersion)

View File

@@ -1,5 +1,3 @@
//go:build !premium
package main
//#include "bridge.h"

View File

@@ -1,75 +0,0 @@
//go:build premium
package main
//#include "bridge.h"
import "C"
import (
"strings"
"time"
"unsafe"
"github.com/metacubex/mihomo/log"
)
type message struct {
Level string `json:"level"`
Message string `json:"message"`
Time int64 `json:"time"`
}
func init() {
go func() {
sub := log.Subscribe()
defer log.UnSubscribe(sub)
for msg := range sub {
cPayload := C.CString(msg.Payload)
switch msg.LogLevel {
case log.INFO:
C.log_info(cPayload)
case log.ERROR:
C.log_error(cPayload)
case log.WARNING:
C.log_warn(cPayload)
case log.DEBUG:
C.log_debug(cPayload)
case log.SILENT:
C.log_verbose(cPayload)
}
}
}()
}
//export subscribeLogcat
func subscribeLogcat(remote unsafe.Pointer) {
go func(remote unsafe.Pointer) {
sub := log.Subscribe()
defer log.UnSubscribe(sub)
for msg := range sub {
if msg.LogLevel < log.Level() && !strings.HasPrefix(msg.Payload, "[APP]") {
continue
}
rMsg := &message{
Level: msg.LogLevel.String(),
Message: msg.Payload,
Time: time.Now().UnixNano() / 1000 / 1000,
}
if C.logcat_received(remote, marshalJson(rMsg)) != 0 {
C.release_object(remote)
log.Debugln("Logcat subscriber closed")
break
}
}
}(remote)
log.Infoln("[APP] Logcat level: %s", log.Level().String())
}

View File

@@ -9,6 +9,7 @@ import "C"
import (
"runtime"
"runtime/debug"
"cfa/native/config"
"cfa/native/delegate"
@@ -22,12 +23,13 @@ func main() {
}
//export coreInit
func coreInit(home, versionName C.c_string, sdkVersion C.int) {
func coreInit(home, versionName, gitVersion C.c_string, sdkVersion C.int) {
h := C.GoString(home)
v := C.GoString(versionName)
g := C.GoString(gitVersion)
s := int(sdkVersion)
delegate.Init(h, v, s)
delegate.Init(h, v, g, s)
reset()
}
@@ -39,6 +41,7 @@ func reset() {
tunnel.CloseAllConnections()
runtime.GC()
debug.FreeOSMemory()
}
//export forceGc
@@ -47,5 +50,6 @@ func forceGc() {
log.Infoln("[APP] request force GC")
runtime.GC()
debug.FreeOSMemory()
}()
}

View File

@@ -18,7 +18,7 @@ func Start(listen string) (listenAt string, err error) {
listener, err = http.NewWithAuthenticate(listen, tunnel.Tunnel, false)
if err == nil {
listenAt = listener.Listener().Addr().String()
listenAt = listener.Address()
}
return

View File

@@ -64,7 +64,7 @@ func (t *remoteTun) close() {
}
//export startTun
func startTun(fd C.int, gateway, portal, dns C.c_string, callback unsafe.Pointer) C.int {
func startTun(fd C.int, stack, gateway, portal, dns C.c_string, callback unsafe.Pointer) C.int {
rTunLock.Lock()
defer rTunLock.Unlock()
@@ -74,6 +74,7 @@ func startTun(fd C.int, gateway, portal, dns C.c_string, callback unsafe.Pointer
}
f := int(fd)
s := C.GoString(stack)
g := C.GoString(gateway)
p := C.GoString(portal)
d := C.GoString(dns)
@@ -82,7 +83,7 @@ func startTun(fd C.int, gateway, portal, dns C.c_string, callback unsafe.Pointer
app.ApplyTunContext(remote.markSocket, remote.querySocketUid)
closer, err := tun.Start(f, g, p, d)
closer, err := tun.Start(f, s, g, p, d)
if err != nil {
remote.close()

View File

@@ -1,33 +0,0 @@
package tun
import (
"net"
"github.com/metacubex/mihomo/dns"
D "github.com/miekg/dns"
)
func shouldHijackDns(dns net.IP, target net.IP, targetPort int) bool {
if targetPort != 53 {
return false
}
return net.IPv4zero.Equal(dns) || target.Equal(dns)
}
func relayDns(payload []byte) ([]byte, error) {
msg := &D.Msg{}
if err := msg.Unpack(payload); err != nil {
return nil, err
}
r, err := dns.ServeDNSWithDefaultServer(msg)
if err != nil {
return nil, err
}
r.SetRcode(msg, r.Rcode)
return r.Pack()
}

View File

@@ -1,23 +0,0 @@
//go:build !premium
package tun
import (
"net"
C "github.com/metacubex/mihomo/constant"
)
func createMetadata(lAddr, rAddr *net.TCPAddr) *C.Metadata {
return &C.Metadata{
NetWork: C.TCP,
Type: C.SOCKS5,
SrcIP: lAddr.AddrPort().Addr(),
DstIP: rAddr.AddrPort().Addr(),
SrcPort: uint16(lAddr.Port),
DstPort: uint16(rAddr.Port),
Host: "",
RawSrcAddr: lAddr,
RawDstAddr: rAddr,
}
}

View File

@@ -1,29 +0,0 @@
//go:build premium
package tun
import (
"net"
"net/netip"
"strconv"
C "github.com/metacubex/mihomo/constant"
)
func createMetadata(lAddr, rAddr *net.TCPAddr) *C.Metadata {
srcAddr, _ := netip.AddrFromSlice(lAddr.IP)
dstAddr, _ := netip.AddrFromSlice(rAddr.IP)
return &C.Metadata{
NetWork: C.TCP,
Type: C.SOCKS5,
SrcIP: srcAddr,
DstIP: dstAddr,
SrcPort: strconv.Itoa(lAddr.Port),
DstPort: strconv.Itoa(rAddr.Port),
AddrType: C.AtypIPv4,
Host: "",
RawSrcAddr: lAddr,
RawDstAddr: rAddr,
}
}

View File

@@ -1,161 +1,77 @@
package tun
import (
"encoding/binary"
"encoding/json"
"io"
"net"
"os"
"time"
"net/netip"
"strings"
"github.com/Kr328/tun2socket"
"github.com/metacubex/mihomo/adapter/inbound"
"github.com/metacubex/mihomo/common/pool"
C "github.com/metacubex/mihomo/constant"
LC "github.com/metacubex/mihomo/listener/config"
"github.com/metacubex/mihomo/listener/sing_tun"
"github.com/metacubex/mihomo/log"
"github.com/metacubex/mihomo/transport/socks5"
"github.com/metacubex/mihomo/tunnel"
)
var _, ipv4LoopBack, _ = net.ParseCIDR("127.0.0.0/8")
func Start(fd int, stack, gateway, portal, dns string) (io.Closer, error) {
log.Debugln("TUN: fd = %d, stack = %s, gateway = %s, portal = %s, dns = %s", fd, stack, gateway, portal, dns)
func Start(fd int, gateway, portal, dns string) (io.Closer, error) {
log.Debugln("TUN: fd = %d, gateway = %s, portal = %s, dns = %s", fd, gateway, portal, dns)
device := os.NewFile(uintptr(fd), "/dev/tun")
ip, network, err := net.ParseCIDR(gateway)
if err != nil {
panic(err.Error())
} else {
network.IP = ip
tunStack, ok := C.StackTypeMapping[strings.ToLower(stack)]
if !ok {
tunStack = C.TunSystem
}
stack, err := tun2socket.StartTun2Socket(device, network, net.ParseIP(portal))
if err != nil {
_ = device.Close()
var prefix4 []netip.Prefix
var prefix6 []netip.Prefix
for _, gatewayStr := range strings.Split(gateway, ",") { // "172.19.0.1/30" or "172.19.0.1/30,fdfe:dcba:9876::1/126"
gatewayStr = strings.TrimSpace(gatewayStr)
if len(gatewayStr) == 0 {
continue
}
prefix, err := netip.ParsePrefix(gatewayStr)
if err != nil {
log.Errorln("TUN:", err)
return nil, err
}
if prefix.Addr().Is4() {
prefix4 = append(prefix4, prefix)
} else {
prefix6 = append(prefix6, prefix)
}
}
var dnsHijack []string
for _, dnsStr := range strings.Split(dns, ",") { // "172.19.0.2" or "0.0.0.0"
dnsStr = strings.TrimSpace(dnsStr)
if len(dnsStr) == 0 {
continue
}
dnsHijack = append(dnsHijack, net.JoinHostPort(dnsStr, "53"))
}
options := LC.Tun{
Enable: true,
Device: sing_tun.InterfaceName,
Stack: tunStack,
DNSHijack: dnsHijack,
AutoRoute: false, // had set route in TunService.kt
AutoDetectInterface: false, // implements by VpnService::protect
Inet4Address: prefix4,
Inet6Address: prefix6,
MTU: 9000, // private const val TUN_MTU = 9000 in TunService.kt
FileDescriptor: fd,
}
tunOptions, _ := json.Marshal(options)
log.Debugln(string(tunOptions))
listener, err := sing_tun.New(options, tunnel.Tunnel)
if err != nil {
log.Errorln("TUN:", err)
return nil, err
}
dnsAddr := net.ParseIP(dns)
tcp := func() {
defer stack.TCP().Close()
defer log.Debugln("TCP: closed")
for stack.TCP().SetDeadline(time.Time{}) == nil {
conn, err := stack.TCP().Accept()
if err != nil {
log.Debugln("Accept connection: %v", err)
continue
}
lAddr := conn.LocalAddr().(*net.TCPAddr)
rAddr := conn.RemoteAddr().(*net.TCPAddr)
if ipv4LoopBack.Contains(rAddr.IP) {
conn.Close()
continue
}
if shouldHijackDns(dnsAddr, rAddr.IP, rAddr.Port) {
go func() {
defer conn.Close()
buf := pool.Get(pool.UDPBufferSize)
defer pool.Put(buf)
for {
conn.SetReadDeadline(time.Now().Add(C.DefaultTCPTimeout))
length := uint16(0)
if err := binary.Read(conn, binary.BigEndian, &length); err != nil {
return
}
if int(length) > len(buf) {
return
}
n, err := conn.Read(buf[:length])
if err != nil {
return
}
msg, err := relayDns(buf[:n])
if err != nil {
return
}
_, _ = conn.Write(msg)
}
}()
continue
}
go tunnel.Tunnel.HandleTCPConn(conn, createMetadata(lAddr, rAddr))
}
}
udp := func() {
defer stack.UDP().Close()
defer log.Debugln("UDP: closed")
for {
buf := pool.Get(pool.UDPBufferSize)
n, lRAddr, rRAddr, err := stack.UDP().ReadFrom(buf)
if err != nil {
return
}
raw := buf[:n]
lAddr := lRAddr.(*net.UDPAddr)
rAddr := rRAddr.(*net.UDPAddr)
if ipv4LoopBack.Contains(rAddr.IP) {
pool.Put(buf)
continue
}
if shouldHijackDns(dnsAddr, rAddr.IP, rAddr.Port) {
go func() {
defer pool.Put(buf)
msg, err := relayDns(raw)
if err != nil {
return
}
_, _ = stack.UDP().WriteTo(msg, rAddr, lAddr)
}()
continue
}
pkt := &packet{
local: lAddr,
data: raw,
writeBack: func(b []byte, addr net.Addr) (int, error) {
return stack.UDP().WriteTo(b, addr, lAddr)
},
drop: func() {
pool.Put(buf)
},
}
tunnel.Tunnel.HandleUDPPacket(inbound.NewPacket(socks5.ParseAddrToSocksAddr(rAddr), pkt, C.SOCKS5))
}
}
go tcp()
go udp()
go udp()
return stack, nil
return listener, nil
}

View File

@@ -1,28 +0,0 @@
package tun
import (
"net"
)
type packet struct {
local *net.UDPAddr
data []byte
writeBack func(b []byte, addr net.Addr) (int, error)
drop func()
}
func (pkt *packet) Data() []byte {
return pkt.data
}
func (pkt *packet) WriteBack(b []byte, addr net.Addr) (n int, err error) {
return pkt.writeBack(b, addr)
}
func (pkt *packet) Drop() {
pkt.drop()
}
func (pkt *packet) LocalAddr() net.Addr {
return pkt.local
}

View File

@@ -109,16 +109,3 @@ func updateProvider(completable unsafe.Pointer, pType C.c_string, name C.c_strin
func suspend(suspended C.int) {
tunnel.Suspend(suspended != 0)
}
//export installSideloadGeoip
func installSideloadGeoip(block unsafe.Pointer, blockSize C.int) *C.char {
if block == nil {
_ = tunnel.InstallSideloadGeoip(nil)
return nil
}
bytes := C.GoBytes(block, blockSize)
return marshalString(tunnel.InstallSideloadGeoip(bytes))
}

View File

@@ -12,20 +12,17 @@ func CloseAllConnections() {
})
}
func closeMatch(filter func(conn C.Conn) bool) {
func closeMatch(filter func(conn C.Connection) bool) {
statistic.DefaultManager.Range(func(c statistic.Tracker) bool {
if cc, ok := c.(C.Conn); ok {
if filter(cc) {
_ = cc.Close()
return true
}
if filter(c) {
_ = c.Close()
}
return false
return true
})
}
func closeConnByGroup(name string) {
closeMatch(func(conn C.Conn) bool {
closeMatch(func(conn C.Connection) bool {
for _, c := range conn.Chains() {
if c == name {
return true

View File

@@ -3,7 +3,6 @@ package tunnel
import (
"sync"
"github.com/metacubex/mihomo/adapter"
"github.com/metacubex/mihomo/adapter/outboundgroup"
"github.com/metacubex/mihomo/constant/provider"
"github.com/metacubex/mihomo/log"
@@ -19,7 +18,7 @@ func HealthCheck(name string) {
return
}
g, ok := p.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup)
g, ok := p.Adapter().(outboundgroup.ProxyGroup)
if !ok {
log.Warnln("Request health check for `%s`: invalid type %s", name, p.Type().String())

View File

@@ -1,24 +0,0 @@
package tunnel
import (
"fmt"
"github.com/metacubex/mihomo/component/mmdb"
"github.com/oschwald/maxminddb-golang"
)
func InstallSideloadGeoip(block []byte) error {
if block == nil {
mmdb.InstallOverride(nil)
return nil
}
db, err := maxminddb.FromBytes(block)
if err != nil {
return fmt.Errorf("load sideload geoip mmdb: %s", err.Error())
}
mmdb.InstallOverride(db)
return nil
}

View File

@@ -1,5 +1,3 @@
//go:build !premium
package tunnel
import (

View File

@@ -1,7 +0,0 @@
//go:build premium
package tunnel
import "net/netip"
var loopback = netip.MustParseAddr("127.0.0.1")

View File

@@ -1,5 +1,3 @@
//go:build !premium
package tunnel
import (
@@ -7,7 +5,6 @@ import (
"fmt"
"time"
P "github.com/metacubex/mihomo/adapter/provider"
"github.com/metacubex/mihomo/constant/provider"
"github.com/metacubex/mihomo/log"
"github.com/metacubex/mihomo/tunnel"
@@ -22,6 +19,10 @@ type Provider struct {
UpdatedAt int64 `json:"updatedAt"`
}
type UpdatableProvider interface {
UpdatedAt() time.Time
}
func QueryProviders() []*Provider {
r := tunnel.RuleProviders()
p := tunnel.Providers()
@@ -49,7 +50,7 @@ func QueryProviders() []*Provider {
for _, p := range providers {
updatedAt := time.Time{}
if s, ok := p.(P.UpdatableProvider); ok {
if s, ok := p.(UpdatableProvider); ok {
updatedAt = s.UpdatedAt()
}

View File

@@ -1,92 +0,0 @@
//go:build premium
package tunnel
import (
"errors"
"fmt"
"time"
P "github.com/metacubex/mihomo/adapter/provider"
"github.com/metacubex/mihomo/constant/provider"
"github.com/metacubex/mihomo/log"
"github.com/metacubex/mihomo/tunnel"
)
var ErrInvalidType = errors.New("invalid type")
type Provider struct {
Name string `json:"name"`
VehicleType string `json:"vehicleType"`
Type string `json:"type"`
UpdatedAt int64 `json:"updatedAt"`
}
func QueryProviders() []*Provider {
r := tunnel.RuleProviders()
p := tunnel.ProxyProviders()
providers := make([]provider.Provider, 0, len(r)+len(p))
for _, rule := range r {
if rule.VehicleType() == provider.Compatible {
continue
}
providers = append(providers, rule)
}
for _, proxy := range p {
if proxy.VehicleType() == provider.Compatible {
continue
}
providers = append(providers, proxy)
}
result := make([]*Provider, 0, len(providers))
for _, p := range providers {
updatedAt := time.Time{}
if s, ok := p.(P.UpdatableProvider[any]); ok {
updatedAt = s.UpdatedAt()
}
result = append(result, &Provider{
Name: p.Name(),
VehicleType: p.VehicleType().String(),
Type: p.Type().String(),
UpdatedAt: updatedAt.UnixNano() / 1000 / 1000,
})
}
return result
}
func UpdateProvider(t string, name string) error {
err := ErrInvalidType
switch t {
case "Rule":
p := tunnel.RuleProviders()[name]
if p == nil {
return fmt.Errorf("%s not found", name)
}
err = p.Update()
case "Proxy":
p := tunnel.ProxyProviders()[name]
if p == nil {
return fmt.Errorf("%s not found", name)
}
err = p.Update()
}
if err != nil {
log.Warnln("Updating provider %s: %s", name, err.Error())
}
return err
}

View File

@@ -6,8 +6,6 @@ import (
"github.com/dlclark/regexp2"
"github.com/metacubex/mihomo/adapter"
"github.com/metacubex/mihomo/adapter/outboundgroup"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/constant/provider"
@@ -61,7 +59,7 @@ func QueryProxyGroupNames(excludeNotSelectable bool) []string {
return []string{}
}
global := tunnel.Proxies()["GLOBAL"].(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup)
global := tunnel.Proxies()["GLOBAL"].Adapter().(outboundgroup.ProxyGroup)
proxies := global.Providers()[0].Proxies()
result := make([]string, 0, len(proxies)+1)
@@ -70,7 +68,7 @@ func QueryProxyGroupNames(excludeNotSelectable bool) []string {
}
for _, p := range proxies {
if _, ok := p.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup); ok {
if _, ok := p.Adapter().(outboundgroup.ProxyGroup); ok {
if !excludeNotSelectable || p.Type() == C.Selector {
result = append(result, p.Name())
}
@@ -89,15 +87,15 @@ func QueryProxyGroup(name string, sortMode SortMode, uiSubtitlePattern *regexp2.
return nil
}
g, ok := p.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup)
g, ok := p.Adapter().(outboundgroup.ProxyGroup)
if !ok {
log.Warnln("Query group `%s`: invalid type %s", name, p.Type().String())
return nil
}
proxies := convertProxies(g.Proxies(), uiSubtitlePattern)
// proxies := collectProviders(g.Providers(), uiSubtitlePattern)
proxies := convertProxies(g.Proxies(), uiSubtitlePattern)
// proxies := collectProviders(g.Providers(), uiSubtitlePattern)
switch sortMode {
case Title:
@@ -138,14 +136,14 @@ func PatchSelector(selector, name string) bool {
return false
}
g, ok := p.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup)
g, ok := p.Adapter().(outboundgroup.ProxyGroup)
if !ok {
log.Warnln("Patch selector `%s`: invalid type %s", selector, p.Type().String())
return false
}
s, ok := g.(*outboundgroup.Selector)
s, ok := g.(outboundgroup.SelectAble)
if !ok {
log.Warnln("Patch selector `%s`: invalid type %s", selector, p.Type().String())
@@ -172,7 +170,7 @@ func convertProxies(proxies []C.Proxy, uiSubtitlePattern *regexp2.Regexp) []*Pro
subtitle := p.Type().String()
if uiSubtitlePattern != nil {
if _, ok := p.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup); !ok {
if _, ok := p.Adapter().(outboundgroup.ProxyGroup); !ok {
runes := []rune(name)
match, err := uiSubtitlePattern.FindRunesMatch(runes)
if err == nil && match != nil {
@@ -181,13 +179,20 @@ func convertProxies(proxies []C.Proxy, uiSubtitlePattern *regexp2.Regexp) []*Pro
}
}
}
testURL := "https://www.gstatic.com/generate_204"
for k := range p.ExtraDelayHistories() {
if len(k) > 0 {
testURL = k
break
}
}
result = append(result, &Proxy{
Name: name,
Title: strings.TrimSpace(title),
Subtitle: strings.TrimSpace(subtitle),
Type: p.Type().String(),
Delay: int(p.LastDelayForTestUrl("https://www.gstatic.com/generate_204")),
Delay: int(p.LastDelayForTestUrl(testURL)),
})
}
return result
@@ -203,7 +208,7 @@ func collectProviders(providers []provider.ProxyProvider, uiSubtitlePattern *reg
subtitle := px.Type().String()
if uiSubtitlePattern != nil {
if _, ok := px.(*adapter.Proxy).ProxyAdapter.(outboundgroup.ProxyGroup); !ok {
if _, ok := px.Adapter().(outboundgroup.ProxyGroup); !ok {
runes := []rune(name)
match, err := uiSubtitlePattern.FindRunesMatch(runes)
if err == nil && match != nil {
@@ -213,12 +218,20 @@ func collectProviders(providers []provider.ProxyProvider, uiSubtitlePattern *reg
}
}
testURL := "https://www.gstatic.com/generate_204"
for k := range px.ExtraDelayHistories() {
if len(k) > 0 {
testURL = k
break
}
}
result = append(result, &Proxy{
Name: name,
Title: strings.TrimSpace(title),
Subtitle: strings.TrimSpace(subtitle),
Type: px.Type().String(),
Delay: int(px.LastDelayForTestUrl("https://www.gstatic.com/generate_204")),
Delay: int(px.LastDelayForTestUrl(testURL)),
})
}
}

View File

@@ -1,7 +1,9 @@
package tunnel
import "github.com/metacubex/mihomo/adapter/provider"
func Suspend(s bool) {
provider.Suspend(s)
// cause by ACTION_SCREEN_OFF/ACTION_SCREEN_ON,
// but we don't know what should do so just ignored.
//
// WARNING: don't call core's Tunnel.OnSuspend/OnRunning at here,
// this will cause the core to stop processing new incoming connections when the screen is locked.
}

View File

@@ -49,7 +49,7 @@ object Clash {
}
fun notifyDnsChanged(dns: List<String>) {
Bridge.nativeNotifyDnsChanged(dns.joinToString(separator = ","))
Bridge.nativeNotifyDnsChanged(dns.toSet().joinToString(separator = ","))
}
fun notifyTimeZoneChanged(name: String, offset: Int) {
@@ -64,13 +64,14 @@ object Clash {
fun startTun(
fd: Int,
stack: String,
gateway: String,
portal: String,
dns: String,
markSocket: (Int) -> Boolean,
querySocketUid: (protocol: Int, source: InetSocketAddress, target: InetSocketAddress) -> Int
) {
Bridge.nativeStartTun(fd, gateway, portal, dns, object : TunInterface {
Bridge.nativeStartTun(fd, stack, gateway, portal, dns, object : TunInterface {
override fun markSocket(fd: Int) {
markSocket(fd)
}
@@ -208,10 +209,6 @@ object Clash {
Bridge.nativeClearOverride(slot.ordinal)
}
fun installSideloadGeoip(data: ByteArray?) {
Bridge.nativeInstallSideloadGeoip(data)
}
fun queryConfiguration(): UiConfiguration {
return Json.Default.decodeFromString(
UiConfiguration.serializer(),

View File

@@ -19,7 +19,7 @@ object Bridge {
external fun nativeNotifyDnsChanged(dnsList: String)
external fun nativeNotifyTimeZoneChanged(name: String, offset: Int)
external fun nativeNotifyInstalledAppChanged(uidList: String)
external fun nativeStartTun(fd: Int, gateway: String, portal: String, dns: String, cb: TunInterface)
external fun nativeStartTun(fd: Int, stack: String, gateway: String, portal: String, dns: String, cb: TunInterface)
external fun nativeStopTun()
external fun nativeStartHttp(listenAt: String): String?
external fun nativeStopHttp()
@@ -46,9 +46,9 @@ object Bridge {
external fun nativeReadOverride(slot: Int): String
external fun nativeWriteOverride(slot: Int, content: String)
external fun nativeClearOverride(slot: Int)
external fun nativeInstallSideloadGeoip(data: ByteArray?)
external fun nativeQueryConfiguration(): String
external fun nativeSubscribeLogcat(callback: LogcatInterface)
external fun nativeCoreVersion(): String
private external fun nativeInit(home: String, versionName: String, sdkVersion: Int)
@@ -61,7 +61,7 @@ object Bridge {
.detachFd()
val home = ctx.filesDir.resolve("clash").apply { mkdirs() }.absolutePath
val versionName = ctx.packageManager.getPackageInfo(ctx.packageName, 0).versionName
val versionName = ctx.packageManager.getPackageInfo(ctx.packageName, 0).versionName ?: "unknown"
val sdkVersion = Build.VERSION.SDK_INT
Log.d("Home = $home")

View File

@@ -41,6 +41,18 @@ data class ConfigurationOverride(
@SerialName("ipv6")
var ipv6: Boolean? = null,
@SerialName("external-controller")
var externalController: String? = null,
@SerialName("external-controller-tls")
var externalControllerTLS: String? = null,
@SerialName("external-controller-cors")
var externalControllerCors: ExternalControllerCors = ExternalControllerCors(),
@SerialName("secret")
var secret: String? = null,
@SerialName("hosts")
var hosts: Map<String, String>? = null,
@@ -100,6 +112,9 @@ data class ConfigurationOverride(
@SerialName("fake-ip-filter")
var fakeIpFilter: List<String>? = null,
@SerialName("fake-ip-filter-mode")
var fakeIPFilterMode: FilterMode? = null,
@SerialName("fallback-filter")
val fallbackFilter: DnsFallbackFilter = DnsFallbackFilter(),
@@ -150,14 +165,22 @@ data class ConfigurationOverride(
@SerialName("fake-ip")
FakeIp,
}
@Serializable
enum class FilterMode {
@SerialName("blacklist")
BlackList,
@SerialName("whitelist")
WhiteList,
}
@Serializable
data class Sniffer(
@SerialName("enable")
var enable: Boolean? = null,
@SerialName("sniffing")
var sniffing: List<String>? = null,
@SerialName("sniff")
var sniff: Sniff = Sniff(),
@SerialName("force-dns-mapping")
var forceDnsMapping: Boolean? = null,
@@ -174,8 +197,11 @@ data class ConfigurationOverride(
@SerialName("skip-domain")
var skipDomain: List<String>? = null,
@SerialName("port-whitelist")
var portWhitelist: List<String>? = null,
@SerialName("skip-src-address")
var skipSrcAddress: List<String>? = null,
@SerialName("skip-dst-address")
var skipDstAddress: List<String>? = null,
)
@Serializable
@@ -190,6 +216,36 @@ data class ConfigurationOverride(
var geosite: String? = null,
)
@Serializable
data class ExternalControllerCors(
@SerialName("allow-origins")
var allowOrigins: List<String>? = null,
@SerialName("allow-private-network")
var allowPrivateNetwork: Boolean? = null,
)
@Serializable
data class Sniff(
@SerialName("HTTP")
var http: ProtocolConig = ProtocolConig(),
@SerialName("TLS")
var tls: ProtocolConig = ProtocolConig(),
@SerialName("QUIC")
var quic: ProtocolConig = ProtocolConig(),
)
@Serializable
data class ProtocolConig(
@SerialName("ports")
var ports: List<String>? = null,
@SerialName("override-destination")
var overrideDestination: Boolean? = null,
)
override fun writeToParcel(parcel: Parcel, flags: Int) {
Parcelizer.encodeToParcel(serializer(), parcel, this)
}

View File

@@ -17,7 +17,7 @@ data class Provider(
}
enum class VehicleType {
HTTP, File, Compatible
HTTP, File, Inline, Compatible
}
override fun writeToParcel(parcel: Parcel, flags: Int) {

View File

@@ -17,6 +17,7 @@ data class Proxy(
enum class Type(val group: Boolean) {
Direct(false),
Reject(false),
RejectDrop(false),
Compatible(false),
Pass(false),
@@ -32,6 +33,10 @@ data class Proxy(
Hysteria2(false),
Tuic(false),
WireGuard(false),
Dns(false),
Ssh(false),
Mieru(false),
AnyTLS(false),
Relay(true),

View File

@@ -1 +1 @@
<manifest package="com.github.kr328.clash.design" />
<manifest />

View File

@@ -19,6 +19,7 @@ class AppSettingsDesign(
srvStore: ServiceStore,
behavior: Behavior,
running: Boolean,
onHideIconChange: (hide: Boolean) -> Unit,
) : Design<AppSettingsDesign.Request>(context) {
enum class Request {
ReCreateAllActivities
@@ -65,6 +66,17 @@ class AppSettingsDesign(
}
}
switch(
value = uiStore::hideAppIcon,
icon = R.drawable.ic_baseline_hide,
title = R.string.hide_app_icon_title,
summary = R.string.hide_app_icon_desc,
) {
listener = OnChangedListener {
onHideIconChange(uiStore::hideAppIcon.get())
}
}
category(R.string.service)
switch(

View File

@@ -81,7 +81,7 @@ class MainDesign(context: Context) : Design<MainDesign.Request>(context) {
init {
binding.self = this
binding.colorClashStarted = context.resolveThemedColor(R.attr.colorPrimary)
binding.colorClashStarted = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
binding.colorClashStopped = context.resolveThemedColor(R.attr.colorClashStopped)
}

View File

@@ -15,7 +15,7 @@ class MetaFeatureSettingsDesign(
configuration: ConfigurationOverride
) : Design<MetaFeatureSettingsDesign.Request>(context) {
enum class Request {
ResetOverride, ImportGeoIp, ImportGeoSite, ImportCountry
ResetOverride, ImportGeoIp, ImportGeoSite, ImportCountry, ImportASN
}
private val binding = DesignSettingsMetaFeatureBinding
@@ -137,13 +137,53 @@ class MetaFeatureSettingsDesign(
}
editableTextList(
value = configuration.sniffer::sniffing,
value = configuration.sniffer.sniff.http::ports,
adapter = TextAdapter.String,
title = R.string.sniffing,
title = R.string.sniff_http_ports,
placeholder = R.string.dont_modify,
configure = snifferDependencies::add,
)
selectableList(
value = configuration.sniffer.sniff.http::overrideDestination,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.sniff_http_override_destination,
configure = snifferDependencies::add,
)
editableTextList(
value = configuration.sniffer.sniff.tls::ports,
adapter = TextAdapter.String,
title = R.string.sniff_tls_ports,
placeholder = R.string.dont_modify,
configure = snifferDependencies::add,
)
selectableList(
value = configuration.sniffer.sniff.tls::overrideDestination,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.sniff_tls_override_destination,
configure = snifferDependencies::add,
)
editableTextList(
value = configuration.sniffer.sniff.quic::ports,
adapter = TextAdapter.String,
title = R.string.sniff_quic_ports,
placeholder = R.string.dont_modify,
configure = snifferDependencies::add,
)
selectableList(
value = configuration.sniffer.sniff.quic::overrideDestination,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.sniff_quic_override_destination,
configure = snifferDependencies::add,
)
selectableList(
value = configuration.sniffer::forceDnsMapping,
values = booleanValues,
@@ -185,9 +225,17 @@ class MetaFeatureSettingsDesign(
)
editableTextList(
value = configuration.sniffer::portWhitelist,
value = configuration.sniffer::skipSrcAddress,
adapter = TextAdapter.String,
title = R.string.port_whitelist,
title = R.string.skip_src_address,
placeholder = R.string.dont_modify,
configure = snifferDependencies::add,
)
editableTextList(
value = configuration.sniffer::skipDstAddress,
adapter = TextAdapter.String,
title = R.string.skip_dst_address,
placeholder = R.string.dont_modify,
configure = snifferDependencies::add,
)
@@ -255,6 +303,15 @@ class MetaFeatureSettingsDesign(
requests.trySend(Request.ImportCountry)
}
}
clickable (
title = R.string.import_asn_file,
summary = R.string.press_to_import,
){
clicked {
requests.trySend(Request.ImportASN)
}
}
}
binding.content.addView(screen.root)

View File

@@ -77,6 +77,13 @@ class NetworkSettingsDesign(
configure = vpnDependencies::add,
)
switch(
value = srvStore::allowIpv6,
title = R.string.allow_ipv6,
summary = R.string.allow_ipv6_summary,
configure = vpnDependencies::add,
)
if (Build.VERSION.SDK_INT >= 29) {
switch(
value = srvStore::systemProxy,
@@ -86,6 +93,22 @@ class NetworkSettingsDesign(
)
}
selectableList(
value = srvStore::tunStackMode,
values = arrayOf(
"system",
"gvisor",
"mixed"
),
valuesText = arrayOf(
R.string.tun_stack_system,
R.string.tun_stack_gvisor,
R.string.tun_stack_mixed
),
title = R.string.tun_stack_mode,
configure = vpnDependencies::add,
)
selectableList(
value = srvStore::accessControlMode,
values = AccessControlMode.values(),

View File

@@ -5,7 +5,6 @@ import android.view.View
import com.github.kr328.clash.core.model.ConfigurationOverride
import com.github.kr328.clash.core.model.LogMessage
import com.github.kr328.clash.core.model.TunnelState
import com.github.kr328.clash.design.adapter.SideloadProviderAdapter
import com.github.kr328.clash.design.databinding.DesignSettingsOverideBinding
import com.github.kr328.clash.design.databinding.DialogPreferenceListBinding
import com.github.kr328.clash.design.dialog.FullScreenDialog
@@ -23,7 +22,7 @@ class OverrideSettingsDesign(
configuration: ConfigurationOverride
) : Design<OverrideSettingsDesign.Request>(context) {
enum class Request {
ResetOverride, EditSideloadGeoip
ResetOverride
}
private val binding = DesignSettingsOverideBinding
@@ -52,49 +51,6 @@ class OverrideSettingsDesign(
}
}
suspend fun requestSelectSideload(initial: String, apps: List<AppInfo>): String =
withContext(Dispatchers.Main) {
suspendCancellableCoroutine { ctx ->
val binding = DialogPreferenceListBinding
.inflate(context.layoutInflater, context.root, false)
val adapter = SideloadProviderAdapter(context, apps, initial)
val dialog = FullScreenDialog(context)
dialog.setContentView(binding.root)
binding.surface = dialog.surface
binding.titleView.text = context.getString(R.string.sideload_geoip)
binding.newView.visibility = View.INVISIBLE
binding.mainList.applyLinearAdapter(context, adapter)
binding.resetView.setOnClickListener {
ctx.resume("")
dialog.dismiss()
}
binding.cancelView.setOnClickListener {
dialog.dismiss()
}
binding.okView.setOnClickListener {
ctx.resume(adapter.selectedPackageName)
dialog.dismiss()
}
dialog.setOnDismissListener {
if (!ctx.isCompleted)
ctx.resume(initial)
}
dialog.show()
}
}
init {
binding.self = this
@@ -185,6 +141,44 @@ class OverrideSettingsDesign(
empty = R.string.default_
)
editableText(
value = configuration::externalController,
adapter = NullableTextAdapter.String,
title = R.string.external_controller,
placeholder = R.string.dont_modify,
empty = R.string.default_
)
editableText(
value = configuration::externalControllerTLS,
adapter = NullableTextAdapter.String,
title = R.string.external_controller_tls,
placeholder = R.string.dont_modify,
empty = R.string.default_
)
editableTextList(
value = configuration.externalControllerCors::allowOrigins,
adapter = TextAdapter.String,
title = R.string.allow_origins,
placeholder = R.string.dont_modify,
)
selectableList(
value = configuration.externalControllerCors::allowPrivateNetwork,
values = booleanValues,
valuesText = booleanValuesText,
title = R.string.allow_private_network,
)
editableText(
value = configuration::secret,
adapter = NullableTextAdapter.String,
title = R.string.secret,
placeholder = R.string.dont_modify,
empty = R.string.default_
)
selectableList(
value = configuration::mode,
values = arrayOf(
@@ -231,15 +225,6 @@ class OverrideSettingsDesign(
placeholder = R.string.dont_modify,
)
clickable(
title = R.string.sideload_geoip,
summary = R.string.sideload_geoip_summary
) {
clicked {
requests.trySend(Request.EditSideloadGeoip)
}
}
category(R.string.dns)
val dnsDependencies: MutableList<Preference> = mutableListOf()
@@ -362,6 +347,22 @@ class OverrideSettingsDesign(
configure = dnsDependencies::add,
)
selectableList(
value = configuration.dns::fakeIPFilterMode,
values = arrayOf(
null,
ConfigurationOverride.FilterMode.BlackList,
ConfigurationOverride.FilterMode.WhiteList
),
valuesText = arrayOf(
R.string.dont_modify,
R.string.blacklist,
R.string.whitelist
),
title = R.string.fakeip_filter_mode,
configure = dnsDependencies::add,
)
selectableList(
value = configuration.dns.fallbackFilter::geoIp,
values = booleanValues,

View File

@@ -55,8 +55,9 @@ class ProvidersDesign(
fun requestUpdateAll() {
adapter.states.filter { !it.updating }.forEachIndexed { index, state ->
state.updating = true
requests.trySend(Request.Update(index, state.provider))
if (state.provider.vehicleType != Provider.VehicleType.Inline) {
requests.trySend(Request.Update(index, state.provider))
}
}
}
}

View File

@@ -108,7 +108,7 @@ class ProxyDesign(
binding.urlTestFloatView.visibility = View.GONE
} else {
binding.urlTestFloatView.supportImageTintList = ColorStateList.valueOf(
context.resolveThemedColor(R.attr.colorOnPrimary)
context.resolveThemedColor(com.google.android.material.R.attr.colorOnPrimary)
)
binding.pagesView.apply {

View File

@@ -15,9 +15,9 @@ class PopupListAdapter(
private val texts: List<CharSequence>,
private val selected: Int,
) : BaseAdapter() {
private val colorPrimary = context.resolveThemedColor(R.attr.colorPrimary)
private val colorOnPrimary = context.resolveThemedColor(R.attr.colorOnPrimary)
private val colorControlNormal = context.resolveThemedColor(R.attr.colorControlNormal)
private val colorPrimary = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
private val colorOnPrimary = context.resolveThemedColor(com.google.android.material.R.attr.colorOnPrimary)
private val colorControlNormal = context.resolveThemedColor(com.google.android.material.R.attr.colorControlNormal)
override fun getCount(): Int {
return texts.size

View File

@@ -55,10 +55,17 @@ class ProviderAdapter(
holder.binding.provider = state.provider
holder.binding.state = state
holder.binding.update = View.OnClickListener {
state.updating = true
requestUpdate(position, state.provider)
if (state.provider.vehicleType == Provider.VehicleType.Inline) {
holder.binding.endView.visibility = View.GONE
holder.binding.elapsedView.visibility = View.GONE
holder.binding.divider.visibility = View.GONE
} else {
holder.binding.endView.visibility = View.VISIBLE
holder.binding.elapsedView.visibility = View.VISIBLE
holder.binding.update = View.OnClickListener {
state.updating = true
requestUpdate(position, state.provider)
}
}
}

View File

@@ -1,48 +0,0 @@
package com.github.kr328.clash.design.adapter
import android.content.Context
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.github.kr328.clash.design.databinding.AdapterSideloadProviderBinding
import com.github.kr328.clash.design.model.AppInfo
import com.github.kr328.clash.design.util.layoutInflater
import com.github.kr328.clash.design.util.root
class SideloadProviderAdapter(
private val context: Context,
private val apps: List<AppInfo>,
var selectedPackageName: String
) : RecyclerView.Adapter<SideloadProviderAdapter.Holder>() {
class Holder(val binding: AdapterSideloadProviderBinding) :
RecyclerView.ViewHolder(binding.root)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): Holder {
return Holder(
AdapterSideloadProviderBinding
.inflate(context.layoutInflater, context.root, false)
)
}
override fun onBindViewHolder(holder: Holder, position: Int) {
val current = apps[position]
holder.binding.appInfo = current
holder.binding.selected = selectedPackageName == current.packageName
holder.binding.root.setOnClickListener {
val index = apps.indexOfFirst { it.packageName == selectedPackageName }
selectedPackageName = current.packageName
if (index >= 0)
notifyItemChanged(index)
notifyItemChanged(position)
}
}
override fun getItemCount(): Int {
return apps.size
}
}

View File

@@ -8,15 +8,15 @@ import com.github.kr328.clash.design.util.resolveThemedColor
import com.github.kr328.clash.design.util.resolveThemedResourceId
class ProxyViewConfig(val context: Context, var proxyLine: Int) {
private val colorSurface = context.resolveThemedColor(R.attr.colorSurface)
private val colorSurface = context.resolveThemedColor(com.google.android.material.R.attr.colorSurface)
val clickableBackground =
context.resolveThemedResourceId(android.R.attr.selectableItemBackground)
val selectedControl = context.resolveThemedColor(R.attr.colorOnPrimary)
val selectedBackground = context.resolveThemedColor(R.attr.colorPrimary)
val selectedControl = context.resolveThemedColor(com.google.android.material.R.attr.colorOnPrimary)
val selectedBackground = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
val unselectedControl = context.resolveThemedColor(R.attr.colorOnSurface)
val unselectedControl = context.resolveThemedColor(com.google.android.material.R.attr.colorOnSurface)
val unselectedBackground: Int
get() = if (proxyLine==1) Color.TRANSPARENT else colorSurface

View File

@@ -25,6 +25,11 @@ class UiStore(context: Context) {
values = DarkMode.values()
)
var hideAppIcon: Boolean by store.boolean(
key = "hide_app_icon",
defaultValue = false
)
var proxyExcludeNotSelectable by store.boolean(
key = "proxy_exclude_not_selectable",
defaultValue = false,

View File

@@ -8,8 +8,8 @@ import com.github.kr328.clash.design.model.AppInfo
fun PackageInfo.toAppInfo(pm: PackageManager): AppInfo {
return AppInfo(
packageName = packageName,
icon = applicationInfo.loadIcon(pm).foreground(),
label = applicationInfo.loadLabel(pm).toString(),
icon = applicationInfo!!.loadIcon(pm).foreground(),
label = applicationInfo!!.loadLabel(pm).toString(),
installTime = firstInstallTime,
updateDate = lastUpdateTime,
)

View File

@@ -29,6 +29,7 @@ fun Provider.type(context: Context): String {
val vehicle = when (vehicleType) {
Provider.VehicleType.HTTP -> context.getString(R.string.http)
Provider.VehicleType.File -> context.getString(R.string.file)
Provider.VehicleType.Inline -> context.getString(R.string.inline)
Provider.VehicleType.Compatible -> context.getString(R.string.compatible)
}

View File

@@ -28,7 +28,7 @@ fun View.setOnInsertsChangedListener(adaptLandscape: Boolean = true, listener: (
listener(if (adaptLandscape) rInsets.landscape(v.context) else rInsets)
compat.toWindowInsets()
compat.toWindowInsets()!!
}
requestApplyInsets()

View File

@@ -14,12 +14,4 @@ class AppRecyclerView @JvmOverloads constructor(
init {
isFocusable = false
}
override fun onDraw(c: Canvas?) {
super.onDraw(c)
}
override fun dispatchDraw(canvas: Canvas?) {
super.dispatchDraw(canvas)
}
}
}

View File

@@ -60,6 +60,6 @@ class LargeActionCard @JvmOverloads constructor(
minimumHeight = context.getPixels(R.dimen.large_action_card_min_height)
radius = context.getPixels(R.dimen.large_action_card_radius).toFloat()
elevation = context.getPixels(R.dimen.large_action_card_elevation).toFloat()
setCardBackgroundColor(context.resolveThemedColor(R.attr.colorSurface))
setCardBackgroundColor(context.resolveThemedColor(com.google.android.material.R.attr.colorSurface))
}
}

View File

@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="@android:color/white"
android:pathData="M825.9,134.2l51.7,51.7 -655.1,655.1 -51.7,-51.7 655.1,-655.1zM804.4,325.8c41.3,39.5 81.3,87.9 120,145.3a73.1,73.1 0,0 1,2.8 77.4l-2.8,4.4 -6.9,10.1C795.2,740.3 660,829 512,829c-58.4,0 -114.9,-13.8 -169.3,-41.4l55.1,-55.1c37.4,15.7 75.5,23.4 114.2,23.4 120.9,0 235.5,-75.1 345.1,-234l6.7,-9.8 -6.7,-9.8c-34.3,-49.7 -69,-91.2 -104.4,-124.7l51.7,-51.7zM512,195c51.4,0 101.3,10.7 149.7,32.1l-56.5,56.5A289.4,289.4 0,0 0,512 268.2c-120.9,0 -235.5,75.1 -345.1,234L160.2,512l6.7,9.8c29.5,42.8 59.4,79.5 89.7,110.3l-51.7,51.7c-36.1,-36.7 -71.3,-80.3 -105.4,-130.9a73.1,73.1 0,0 1,-2.8 -77.4l2.8,-4.4 6.9,-10.1C228.8,283.7 364,195 512,195zM664.8,465.4a161.7,161.7 0,0 1,-205.8 205.8l65.1,-65.1a88.6,88.6 0,0 0,75.6 -75.6l65.1,-65.1zM512,356.7c6.4,0 12.8,0.4 19,1.1l-179.5,179.6A161.7,161.7 0,0 1,512 356.7z" />
</vector>

View File

@@ -58,6 +58,7 @@
android:text="@{IntervalKt.elapsedIntervalString(currentTime.value - state.updatedAt, context)}" />
<View
android:id="@+id/divider"
android:layout_width="@dimen/divider_size"
android:layout_height="wrap_content"
android:layout_centerVertical="true"

View File

@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="launch_name">Clash Meta</string>
<string name="application_name">Clash Meta for Android</string>
<string name="stopped">停止中</string>
<string name="tap_to_start">タップしてスタート</string>
<string name="running">実行中</string>
@@ -119,8 +117,6 @@
<string name="log_level">ログレベル</string>
<string name="ipv6">IPv6</string>
<string name="hosts">ホスト</string>
<string name="sideload_geoip">GeoIPを読み込み中</string>
<string name="sideload_geoip_summary">外部のGeoIPデータベース</string>
<string name="_new">新規</string>
<string name="value"></string>
<string name="strategy">ポリシー</string>

View File

@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="launch_name">Clash Meta</string>
<string name="application_name">Clash Meta for Android</string>
<string name="stopped">중지됨</string>
<string name="tap_to_start">연결하려면 터치</string>
<string name="running">연결중</string>
@@ -119,8 +117,6 @@
<string name="log_level">로그 레벨</string>
<string name="ipv6">IPv6</string>
<string name="hosts">호스트</string>
<string name="sideload_geoip">Sideload GEOIP</string>
<string name="sideload_geoip_summary">외부 GEOIP 데이터베이스</string>
<string name="_new">신규</string>
<string name="value"></string>
<string name="strategy">정책</string>

View File

@@ -1,7 +1,4 @@
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="PluralsCandidate">
<string name="launch_name">Clash Meta</string>
<string name="application_name">Clash Meta для Android</string>
<string name="stopped">Остановлен</string>
<string name="tap_to_start">Нажмите для запуска</string>
<string name="running">Запущен</string>
@@ -145,8 +142,6 @@
<string name="log_level">Уровень логов</string>
<string name="ipv6">IPv6</string>
<string name="hosts">Hosts</string>
<string name="sideload_geoip">Загрузить GeoIP</string>
<string name="sideload_geoip_summary">Внешняя база GeoIP</string>
<string name="_new">Новый</string>
<string name="value">Значение</string>

View File

@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="geofile_import_failed">Nhập thất bại</string>
<string name="toast_profile_updated_complete">Cập nhật thành công %s</string>
<string name="toast_profile_updated_failed">Cập nhật không thành công %1$s %2$s</string>
<string name="press_to_import">Chạm để nhập...</string>
<string name="meta_features">Tính năng của Clash Meta</string>
<string name="allow_ipv6">Cho phép Ipv6</string>
<string name="allow_ipv6_summary">Cho phép lưu lượng ipv6 qua hệ thống Vpn</string>
<string name="tun_stack_gvisor">Gvisor</string>
<string name="tun_stack_mixed">Mixed</string>
<string name="tun_stack_mode">Chế độ xếp chồng dữ liệu</string>
<string name="tun_stack_system">Hệ thống</string>
<string name="application_name_alpha">Clash Meta</string>
<string name="application_name_meta">Clash Meta</string>
<string name="clash_meta_core">Clash Meta Core</string>
<string name="clash_meta_for_android">Clash Meta</string>
<string name="clash_meta_wiki">Clash Meta Wiki</string>
<string name="launch_name_alpha">Clash Meta</string>
<string name="launch_name_meta">Clash Meta</string>
<string name="_new">Mới</string>
<string name="about">Thông tin</string>
<string name="accept_http_content">Chỉ chấp nhận http(s)</string>
<string name="access_control_mode">Chế độ kiểm soát truy cập</string>
<string name="access_control_packages">Các gói kiểm soát truy cập</string>
<string name="access_control_packages_summary">Định cấu hình quyền truy cập cho các ứng dụng</string>
<string name="active_unsaved_tips">Hồ sơ cần được lưu trước khi kích hoạt</string>
<string name="allow_all_apps">Cho phép tất cả các ứng dụng</string>
<string name="allow_bypass">Cho phép bỏ qua</string>
<string name="allow_bypass_summary">Cho phép tất cả các ứng dụng bỏ qua kết nối VPN này</string>
<string name="allow_clash_auto_restart">Cho phép Clash tự khởi động lại</string>
<string name="allow_lan">Cho phép mạng LAN</string>
<string name="allow_selected_apps">Cho phép các ứng dụng đã chọn</string>
<string name="always_dark">Luôn tối</string>
<string name="always_light">Luôn sáng</string>
<string name="app">Ứng dụng</string>
<string name="append_system_dns">Nối hệ thống DNS</string>
<string name="application_broken">Ứng dụng bị lỗi</string>
<string name="application_broken_tips">Ứng dụng thiếu các thành phần cần thiết, nguyên nhân thường là do tải xuống apk không đầy đủ.</string>
<string name="application_crashed">Ứng dụng bị dừng</string>
<string name="at_least_15_minutes">Ít nhất 15 phút hoặc để trống</string>
<string name="authentication">Xác thực</string>
<string name="auto_restart">Khởi động lại tự động</string>
<string name="auto_update">Thời gian tự động cập nhật</string>
<string name="auto_update_minutes">Tự động cập nhật (Phút)</string>
<string name="behavior">Điều hướng</string>
<string name="bind_address">Địa chỉ ràng buộc</string>
<string name="block_loopback">Chặn lặp</string>
<string name="block_loopback_summary">Chặn kết nối lặp lại</string>
<string name="browse_configuration_providers">Duyệt qua tệp cấu hình và nhà cung cấp</string>
<string name="browse_files">Duyệt qua tệp</string>
<string name="bypass_private_network">Bỏ qua mạng riêng</string>
<string name="bypass_private_network_summary">Bỏ qua các địa chỉ mạng riêng</string>
<string name="cancel">Huỷ bỏ</string>
<string name="clash_logcat">Nhật ký Clash</string>
<string name="close">Đóng</string>
<string name="compatible">Tương thích</string>
<string name="copied">Đã sao chép</string>
<string name="create_profile">Tạo cấu hình</string>
<string name="dark_mode">Chế độ tối</string>
<string name="debug">Gỡ lỗi</string>
<string name="default_">Mặc định</string>
<string name="default_name_server">Máy chủ định danh mặc định</string>
<string name="delay">Độ trễ</string>
<string name="delay_test">Kiểm tra độ trễ</string>
<string name="delete">Xoá</string>
<string name="delete_all_logs">Xóa tất cả nhật ký</string>
<string name="delete_all_logs_warn">Tất cả nhật ký lịch sử sẽ *MẤT*</string>
<string name="deny_selected_apps">Từ chối các ứng dụng đã chọn</string>
<string name="detail">Chi tiết</string>
<string name="direct_mode">Chế độ trực tiếp</string>
<string name="disabled">Vô hiệu hóa</string>
<string name="dns">DNS</string>
<string name="dns_hijacking">Định tuyến qua DNS</string>
<string name="dns_hijacking_summary">Xử lý tất cả gói DNS</string>
<string name="document">Tài liệu</string>
<string name="domain_fallback">Dự phòng miền</string>
<string name="donate">Quyên góp</string>
<string name="dont_modify">Chưa sửa đổi</string>
<string name="duplicate">Tạo bản sao</string>
<string name="edit">Sửa</string>
<string name="empty">Trống</string>
<string name="empty_name">Tên trống</string>
<string name="enabled">Bật</string>
<string name="enhanced_mode">Chế độ nâng cao</string>
<string name="error">Lỗi</string>
<string name="exit_without_save">Thoát mà không lưu</string>
<string name="exit_without_save_warning">Tất cả thay đổi sẽ *MẤT*</string>
<string name="export">Xuất</string>
<string name="export_to_clipboard">Nhập từ khay nhớ tạm</string>
<string name="external">Bên ngoài</string>
<string name="fakeip">Fake-IP thành ánh xạ miền</string>
<string name="fakeip_filter">Bộ lọc Fake-IP</string>
<string name="fallback">Máy chủ tên dự phòng</string>
<string name="feedback">Phản hồi</string>
<string name="file">Tệp</string>
<string name="file_exported">Tệp đã xuất</string>
<string name="file_name">Tên tệp</string>
<string name="files">Tệp</string>
<string name="filter">Bộ lọc</string>
<string name="follow_system_android_10">Theo hệ thống (Android 10+)</string>
<string name="force_enable">Buộc bật</string>
<string name="format_days_ago">%d ngày trước</string>
<string name="format_elements">%d elements</string>
<string name="format_fetching_configuration">Tìm nạp cấu hình từ \'%s\'</string>
<string name="format_fetching_provider">Nhà cung cấp tìm nạp \'%s\'</string>
<string name="format_hours_ago">%d giờ trước</string>
<string name="format_minutes">%d phút</string>
<string name="format_minutes_ago">%d phút trước</string>
<string name="format_months_ago">%d tháng trước</string>
<string name="format_profile_activated">%s đang sử dụng</string>
<string name="format_provider_type">%1$s(%2$s)</string>
<string name="format_traffic_forwarded">%s được sử dụng</string>
<string name="format_type_unsaved">%s (Chưa lưu)</string>
<string name="format_update_complete">Cập nhật %s thành công</string>
<string name="format_update_failure">Cập nhật %1$s: %2$s</string>
<string name="format_update_provider_failure">Cập nhật %1$s: %2$s</string>
<string name="format_years_ago">%d năm trước</string>
<string name="general">Chung</string>
<string name="geoip_fallback">Dự phòng GeoIP</string>
<string name="geoip_fallback_code">Mã dự phòng GeoIP</string>
<string name="github_issues">Sự cố trên Github</string>
<string name="github_releases">Bản phát hành trên Github</string>
<string name="global_mode">Chế độ toàn cầu</string>
<string name="help">Trợ giúp</string>
<string name="history">Lịch sử</string>
<string name="hosts">Hosts</string>
<string name="http">HTTP</string>
<string name="http_port">Cổng HTTP</string>
<string name="import_">Nhập</string>
<string name="import_from_clipboard">Nhập từ khay nhớ tạm</string>
<string name="import_from_file">Nhập từ tệp</string>
<string name="import_from_url">Nhập từ liên kết URL</string>
<string name="info">Thông tin</string>
<string name="initializing">Khởi tạo</string>
<string name="install_time">Thời gian cài đặt</string>
<string name="interface_">Giao diện</string>
<string name="invalid_file_name">Tên tệp không hợp lệ</string>
<string name="invalid_log_file">Tệp nhật ký không hợp lệ</string>
<string name="invalid_url">Liên kết URL không hợp lệ</string>
<string name="ipcidr_fallback">Dự phòng IPCIDR</string>
<string name="ipv6">IPv6</string>
<string name="key">Khoá</string>
<string name="keyword">Từ khoá</string>
<string name="layout">Bố cục</string>
<string name="listen">Nghe</string>
<string name="loading">Đang tải</string>
<string name="log_level">Mức nhật ký</string>
<string name="logcat">Nhật ký</string>
<string name="logs">Nhật ký</string>
<string name="mapping">IP thực với ánh xạ miền</string>
<string name="mixed_port">Cổng Mixed</string>
<string name="mode">Chế độ</string>
<string name="mode_switch_tips">Chỉ hợp lệ cho phiên hiện tại</string>
<string name="more">Thêm</string>
<string name="multiple">Nhiều</string>
<string name="name">Tên</string>
<string name="name_server">Tên máy chủ</string>
<string name="name_server_policy">Chính sách máy chủ định danh</string>
<string name="network">Mạng</string>
<string name="new_profile">Cấu hình mới</string>
<string name="no_profile_selected">Không có cấu hình</string>
<string name="not_selectable">Không thể chọn</string>
<string name="not_selected">Trống. Nhấn vào để thêm</string>
<string name="ok">OK</string>
<string name="options_unavailable">Tùy chọn không khả dụng cho đến khi Clash ngắt kết nối</string>
<string name="override">Cài đặt thêm</string>
<string name="package_name">Tên gói</string>
<string name="profile">Cấu hình</string>
<string name="profile_name">Tên cấu hình</string>
<string name="profile_process_result">Kết quả xử lý cấu hình</string>
<string name="profile_process_status">Trạng thái xử lý cấu hình</string>
<string name="profile_service_status">Trạng thái dịch vụ cấu hình</string>
<string name="profile_updater">Trình cập nhật cấu hình</string>
<string name="profile_updating">Cập nhật cấu hình</string>
<string name="profile_url">Liên kết URL cấu hình</string>
<string name="profiles">Cấu hình</string>
<string name="properties">Thuộc tính</string>
<string name="provider_files">Tệp nhà cung cấp</string>
<string name="providers">Nhà cung cấp</string>
<string name="proxy">Proxy</string>
<string name="proxy_empty_tips">Không có nhóm nào được hiển thị</string>
<string name="recently">Vừa xong</string>
<string name="redirect_port">Cổng Redirect</string>
<string name="reinstall">Cài đặt lại</string>
<string name="rename">Đổi tên</string>
<string name="reset">Đặt lại</string>
<string name="reset_override_settings">Đặt lại cài đặt ghi đè</string>
<string name="reset_override_settings_message">Tất cả cài đặt ghi đè sẽ bị hủy</string>
<string name="reverse">Đảo ngược</string>
<string name="route_system_traffic">Định tuyến lưu lượng hệ thống</string>
<string name="routing_via_vpn_service">Tự động định tuyến tất cả lưu lượng hệ thống qua VpnService</string>
<string name="rule">Quy tắc</string>
<string name="rule_mode">Chế độ quy tắc</string>
<string name="running">Đang kết nối</string>
<string name="save">Lưu</string>
<string name="script_mode">Chế độ tập lệnh</string>
<string name="search">Tìm kiếm</string>
<string name="select_all">Chọn tất cả</string>
<string name="select_invert">Chọn Đảo ngược</string>
<string name="select_none">Không chọn</string>
<string name="service">Dịch vụ</string>
<string name="settings">Cài đặt</string>
<string name="should_not_be_blank">Không được để trống</string>
<string name="show_traffic">Hiển thị lưu lượng truy cập</string>
<string name="show_traffic_summary">Tự động làm mới lưu lượng truy cập trong thông báo</string>
<string name="sideload_geoip">Sideload GEOIP</string>
<string name="sideload_geoip_summary">Cơ sở dữ liệu GEOIP bên ngoài</string>
<string name="silent">Im lặng</string>
<string name="single">Đơn</string>
<string name="socks_port">Cổng Socks</string>
<string name="sort">Sắp xếp theo</string>
<string name="sources">Nguồn</string>
<string name="stopped">Đã ngắt kết nối</string>
<string name="strategy">Strategy</string>
<string name="system_apps">Ứng dụng hệ thống</string>
<string name="system_proxy">Proxy hệ thống</string>
<string name="system_proxy_summary">Đính kèm proxy,http vào hệ thống Vpn</string>
<string name="tap_to_start">Chạm để kết nối</string>
<string name="tips_help">Clash Meta là một phần mềm miễn phí và chúng tôi KHÔNG cung cấp bất kỳ dịch vụ trả phí nào cho nó</string>
<string name="tips_properties">Chỉ chấp nhận cấu hình Clash bao gồm Proxy và Quy tắc</string>
<string name="tproxy_port">Cổng TProxy</string>
<string name="unable_to_start_vpn">Không thể khởi động thành phần VPN</string>
<string name="unavailable">Không có sẵn</string>
<string name="update">Cập nhật</string>
<string name="update_all">Cập nhật tất cả</string>
<string name="update_failure">Cập nhật thất bại</string>
<string name="update_successfully">Cập nhật thành công</string>
<string name="update_time">Thời gian cập nhật</string>
<string name="url">Liên kết URL</string>
<string name="use_built_in">Sử dụng tích hợp</string>
<string name="use_hosts">Sử dụng Hosts</string>
<string name="value">Giá trị</string>
<string name="verifying">Đang xác minh</string>
<string name="version_updated">Đã cập nhật ứng dụng</string>
<string name="version_updated_tips">Các cài đặt đã được đặt lại và các cấu hình cũ cần được lưu lại.</string>
<string name="vpn_service_options">Tuỳ chọn VpnService</string>
<string name="warning">Cảnh báo</string>
</resources>

View File

@@ -6,7 +6,6 @@
<string name="access_control_packages">訪問控制應用包列表</string>
<string name="append_system_dns">追加系統 DNS</string>
<string name="application_broken">應用損壞</string>
<string name="application_name">Clash Meta for Android</string>
<string name="auto_update">自動更新</string>
<string name="behavior">行為</string>
<string name="bypass_private_network">繞過私有網絡</string>
@@ -43,7 +42,6 @@
<string name="import_from_url">從 URL 導入</string>
<string name="interface_">界面</string>
<string name="invalid_url">無效的 URL</string>
<string name="launch_name">Clash Meta</string>
<string name="logcat">Logcat</string>
<string name="logs">日誌</string>
<string name="mode">模式</string>
@@ -175,8 +173,6 @@
<string name="format_fetching_provider">正在下載外部資源 %s</string>
<string name="initializing">正在初始化</string>
<string name="verifying">正在校驗</string>
<string name="sideload_geoip">旁加載 GEOIP</string>
<string name="sideload_geoip_summary">外部 GEOIP 數據庫</string>
<string name="force_enable">強制啓用</string>
<string name="document">文檔</string>
<string name="clash_wiki">Clash Wiki</string>

Some files were not shown because too many files have changed in this diff Show More