Package Details: clash-meta 1.18.10-1

Git Clone URL: https://aur.archlinux.org/clash-meta.git (read-only, click to copy)
Package Base: clash-meta
Description: Another Clash Kernel by MetaCubeX
Upstream URL: https://github.com/MetaCubeX/Clash.Meta
Licenses: GPL3
Conflicts: clash-meta
Submitter: sukanka
Maintainer: sukanka (lilac)
Last Packager: lilac
Votes: 6
Popularity: 0.000497
First Submitted: 2022-09-27 05:14 (UTC)
Last Updated: 2024-11-03 13:29 (UTC)

Pinned Comments

sukanka commented on 2023-02-15 01:05 (UTC)

If you want use tun mode, add the following pacman hook.

➜  ~ cat /etc/pacman.d/hooks/clash-meta.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = usr/bin/clash-meta

[Action]
When = PostTransaction
Exec = /usr/bin/setcap 'cap_net_admin,cap_net_bind_service=+ep' /usr/bin/clash-meta

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

zzq commented on 2023-11-24 02:23 (UTC)

Support loongarch.


diff --git a/PKGBUILD b/PKGBUILD
index fe0ca4c..efe5940 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=clash-meta
 pkgver=1.16.0
 pkgrel=4
 pkgdesc="Another Clash Kernel by MetaCubeX"
-arch=("x86_64" 'aarch64')
+arch=("x86_64" 'aarch64' 'loong64')
 url="https://github.com/MetaCubeX/Clash.Meta"
 license=("GPL3")
 depends=('glibc' 'clash-geoip')
@@ -16,16 +16,19 @@ source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz
         "clash-meta@.service"
         "${pkgname}.sysusers"
         "${pkgname}.tmpfiles"
-        "config.yaml")
+        "config.yaml"
+        "loong64.patch")
 sha256sums=('037f926369ac9a0922801f1b0a8e2d79d454e67f6bc2a1e4ca7a52a0a8c641ea'
             'b6b7ce11489a6f6322a41ce840b3f999b1ec88914f8bd6864c220269231bf759'
             'ec4de877464e595124a5f2752c3f4be157adc85ec5f7f8392c0331cb70fc906a'
             '655e8e2edcd82a6bdf2fd12430b7ab6f8e32db8dffce70e7342685a7cc65ebfb'
             '50737592c7bd743fe8f543924034718337477a203fa11ef4272cae496df3769c'
-            '90f7fdacecd5928e37865b4f841517f925c8bedc769f16f7a7a1e89b923f1fb9')
+            '90f7fdacecd5928e37865b4f841517f925c8bedc769f16f7a7a1e89b923f1fb9'
+            'a1d56756c6756d4a1e5133ac5303d4b7a0de1bf1577767026016e81efee54b60')

 build(){
     cd "${srcdir}"/Clash.Meta-${pkgver}
+    patch -p1 < "${srcdir}/loong64.patch"
     BUILDTIME=$(date -u)
     GOOS=linux CGO_ENABLED=0 go build \
     -trimpath \
diff --git a/loong64.patch b/loong64.patch
index e69de29..6e089c5 100644
--- a/loong64.patch
+++ b/loong64.patch
@@ -0,0 +1,36 @@
+diff --git a/component/ebpf/byteorder/byteorder_littleendian.go b/component/ebpf/byteorder/byteorder_littleendian.go
+index 216a5e5..d40f351 100644
+--- a/component/ebpf/byteorder/byteorder_littleendian.go
++++ b/component/ebpf/byteorder/byteorder_littleendian.go
+@@ -1,4 +1,4 @@
+-//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64
++//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64 || loong64
+ 
+ package byteorder
+ 
+diff --git a/component/ebpf/redir/bpf_bpfel.go b/component/ebpf/redir/bpf_bpfel.go
+index 936b84e..1fe3454 100644
+--- a/component/ebpf/redir/bpf_bpfel.go
++++ b/component/ebpf/redir/bpf_bpfel.go
+@@ -1,6 +1,6 @@
+ // Code generated by bpf2go; DO NOT EDIT.
+-//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64
+-// +build 386 amd64 amd64p32 arm arm64 mips64le mips64p32le mipsle ppc64le riscv64
++//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64 || loong64
++// +build 386 amd64 amd64p32 arm arm64 mips64le mips64p32le mipsle ppc64le riscv64 loong64
+ 
+ package redir
+ 
+diff --git a/component/ebpf/tc/bpf_bpfel.go b/component/ebpf/tc/bpf_bpfel.go
+index 07daba1..4cca0e1 100644
+--- a/component/ebpf/tc/bpf_bpfel.go
++++ b/component/ebpf/tc/bpf_bpfel.go
+@@ -1,6 +1,6 @@
+ // Code generated by bpf2go; DO NOT EDIT.
+-//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64
+-// +build 386 amd64 amd64p32 arm arm64 mips64le mips64p32le mipsle ppc64le riscv64
++//go:build 386 || amd64 || amd64p32 || arm || arm64 || mips64le || mips64p32le || mipsle || ppc64le || riscv64 || loong64
++// +build 386 amd64 amd64p32 arm arm64 mips64le mips64p32le mipsle ppc64le riscv64 loong64
+ 
+ package tc
+ 

Brainos commented on 2023-09-26 05:45 (UTC)

clash-meta-1.16.0.tar.gz校验失败

diff --git a/.SRCINFO b/.SRCINFO
index 1c23a31..f0054f0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -17,7 +17,7 @@ pkgbase = clash-meta
        source = clash-meta.sysusers
        source = clash-meta.tmpfiles
        source = config.yaml
-       sha256sums = 9d1edc314b62e1e2c911433d9b00ce578b73497f679adc587176a188ec6092cd
+       sha256sums = 037f926369ac9a0922801f1b0a8e2d79d454e67f6bc2a1e4ca7a52a0a8c641ea
        sha256sums = b6b7ce11489a6f6322a41ce840b3f999b1ec88914f8bd6864c220269231bf759
        sha256sums = ec4de877464e595124a5f2752c3f4be157adc85ec5f7f8392c0331cb70fc906a
        sha256sums = 655e8e2edcd82a6bdf2fd12430b7ab6f8e32db8dffce70e7342685a7cc65ebfb
diff --git a/PKGBUILD b/PKGBUILD
index 88698b6..66f585d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,7 @@ source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz
         "${pkgname}.sysusers"
         "${pkgname}.tmpfiles"
         "config.yaml")
-sha256sums=('9d1edc314b62e1e2c911433d9b00ce578b73497f679adc587176a188ec6092cd'
+sha256sums=('037f926369ac9a0922801f1b0a8e2d79d454e67f6bc2a1e4ca7a52a0a8c641ea'
             'b6b7ce11489a6f6322a41ce840b3f999b1ec88914f8bd6864c220269231bf759'
             'ec4de877464e595124a5f2752c3f4be157adc85ec5f7f8392c0331cb70fc906a'
             '655e8e2edcd82a6bdf2fd12430b7ab6f8e32db8dffce70e7342685a7cc65ebfb'

sukanka commented on 2023-06-21 08:01 (UTC)

@black_desk,无对应计划。推荐使用clash-meta@.service,以普通用户,而不是root执行clash-meta.

black_desk commented on 2023-06-21 07:45 (UTC) (edited on 2023-06-21 07:55 (UTC) by black_desk)

有两个建议:

考虑让clash-meta把需要写的文件和理应只读的配置文件分开,并且开启一些保护功能:

[Service]
ProtectHome=true
ProtectSystem=full
PrivateTmp=true
ProtectKernelTunables=true
ProtectControlGroups=true

NoNewPrivileges=true
MemoryDenyWriteExecute=true

StateDirectory=clash-meta

ConfigurationDirectory=clash-meta
ConfigurationDirectoryMode=0555

ExecStartPre=
ExecStartPre=-ln -s /etc/clash/Country.mmdb $STATE_DIRECTORY
ExecStart=
ExecStart=clash-meta -d $STATE_DIRECTORY -f ${CONFIGURATION_DIRECTORY}/config.yaml

按道理来说 /usr 和 /etc 对于绝大多数服务而言都应该是只读的。

另外,默认配置应该做成无条件直连的

oogeek commented on 2023-05-01 16:30 (UTC)

It seems that the shasum of the latest 1.14.4.tar.gz is wrong.

sukanka commented on 2023-02-15 01:06 (UTC)

@MiketsuSmasher 原始配置是我瞎编的,也不知道能不能用,所以其实并没有意义

sukanka commented on 2023-02-15 01:05 (UTC)

If you want use tun mode, add the following pacman hook.

➜  ~ cat /etc/pacman.d/hooks/clash-meta.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = usr/bin/clash-meta

[Action]
When = PostTransaction
Exec = /usr/bin/setcap 'cap_net_admin,cap_net_bind_service=+ep' /usr/bin/clash-meta

MiketsuSmasher commented on 2023-02-14 16:44 (UTC)

可以考虑将 config.yaml 复制一份为 config.yaml.example,方便用户恢复原始配置