summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsukanka2022-09-05 10:16:25 +0800
committersukanka2022-09-05 10:16:25 +0800
commit8609dd24216be946fb013699b4326b68f68dbc80 (patch)
tree038a228c781d125b017631ac65e1aad1687edc55
parent579f40e4beade735b093f851a57f5d0c5e31f7ee (diff)
downloadaur-8609dd24216be946fb013699b4326b68f68dbc80.tar.gz
use clash-premium-bin
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD8
-rw-r--r--cfw-start-pre.sh2
-rw-r--r--clash-core-service@.service3
-rw-r--r--clash-for-windows-bin.install2
5 files changed, 13 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9117d49ef3c2..661445903ecc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = clash-for-windows-electron-bin
pkgdesc = A Windows/macOS/Linux GUI based on Clash and Electron. Using system clash and electron
pkgver = 0.19.29
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Fndroid/clash_for_windows_pkg
install = clash-for-windows-bin.install
arch = x86_64
@@ -14,7 +14,7 @@ pkgbase = clash-for-windows-electron-bin
depends = clash-geoip
optdepends = nftables: TUN mode required.
optdepends = iproute2: TUN mode required.
- optdepends = clash-premium-tun: TUN mode required
+ optdepends = clash-premium-bin: TUN mode required
provides = clash-for-windows
provides = clash-for-windows-electron
conflicts = clash-for-windows
@@ -25,8 +25,8 @@ pkgbase = clash-for-windows-electron-bin
source = clash-core-service@.service
sha256sums = 9a84b05b718913d3d1fbe462a2da671abff2cb94bb2ded75a3af12204cebe32f
sha256sums = db2e160e5d5cf82ed69d0926ac51c0eccb9efc541f89be3bb467d85be509f735
- sha256sums = 2d1cb05f33eef51d01bca397ac52796a557b812b243f0d5e5377f7640e4d4433
- sha256sums = 54d4d262356044fb75ce7bdee662aa44046842f9c70765cd6dd0185415388409
+ sha256sums = 823a44d0440750411a3f33dd052d11571cbe9afb4067e985839637e92f8af6a4
+ sha256sums = d55c2f4088505116a5bad6d09f5ebe232e7c6a269ea6bf46daada02bc3a9f961
source_x86_64 = clash-for-windows-electron-bin-0.19.29-x86_64-linux.tar.gz::https://github.com/Fndroid/clash_for_windows_pkg/releases/download/0.19.29/Clash.for.Windows-0.19.29-x64-linux.tar.gz
sha256sums_x86_64 = 202c3d6411b38c5fe53cea9361f4dac1c4dc88d1826cd9d647ed637a3651e9b4
source_aarch64 = clash-for-windows-electron-bin-0.19.29-aarch64-linux.tar.gz::https://github.com/Fndroid/clash_for_windows_pkg/releases/download/0.19.29/Clash.for.Windows-0.19.29-arm64-linux.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index bd1705e5eaf7..8e9cdd3f9459 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=clash-for-windows-electron-bin
_pkgname=${pkgname%-bin}
pkgver=0.19.29
-pkgrel=1
+pkgrel=2
pkgdesc="A Windows/macOS/Linux GUI based on Clash and Electron. Using system clash and electron"
arch=("x86_64" "aarch64")
license=('unknown')
@@ -17,7 +17,7 @@ depends=('electron'
optdepends=(
'nftables: TUN mode required.'
'iproute2: TUN mode required.'
- 'clash-premium-tun: TUN mode required'
+ 'clash-premium-bin: TUN mode required'
)
makedepends=('asar' 'npm')
source_x86_64=("${pkgname}-${pkgver}-x86_64-linux.tar.gz::${url}/releases/download/${pkgver}/Clash.for.Windows-${pkgver}-x64-linux.tar.gz")
@@ -29,8 +29,8 @@ source=(
"clash-core-service@.service")
sha256sums=('9a84b05b718913d3d1fbe462a2da671abff2cb94bb2ded75a3af12204cebe32f'
'db2e160e5d5cf82ed69d0926ac51c0eccb9efc541f89be3bb467d85be509f735'
- '2d1cb05f33eef51d01bca397ac52796a557b812b243f0d5e5377f7640e4d4433'
- '54d4d262356044fb75ce7bdee662aa44046842f9c70765cd6dd0185415388409')
+ '823a44d0440750411a3f33dd052d11571cbe9afb4067e985839637e92f8af6a4'
+ 'd55c2f4088505116a5bad6d09f5ebe232e7c6a269ea6bf46daada02bc3a9f961')
sha256sums_x86_64=('202c3d6411b38c5fe53cea9361f4dac1c4dc88d1826cd9d647ed637a3651e9b4')
sha256sums_aarch64=('747e07d30a2794319f7a8528c97608e7d8e69566aacc4a5f343c3222ec130c8d')
diff --git a/cfw-start-pre.sh b/cfw-start-pre.sh
index 7c0a4f372598..36eaf9b24541 100644
--- a/cfw-start-pre.sh
+++ b/cfw-start-pre.sh
@@ -4,3 +4,5 @@ install -Dm644 -o $1 -g $1 /etc/clash/Country.mmdb -t "/home/$1/.config/clash"
install -Dm755 -o $1 -g $1 \
"/opt/clash-for-windows/static/files/linux/${_parch}/service/clash-core-service" \
-t "/home/$1/.config/clash/service"
+
+setcap cap_net_admin,cap_net_bind_service=ep /usr/bin/clash
diff --git a/clash-core-service@.service b/clash-core-service@.service
index d226a9e25e3b..e5d929811bd8 100644
--- a/clash-core-service@.service
+++ b/clash-core-service@.service
@@ -5,8 +5,7 @@ After=network-online.target nftables.service iptabels.service
[Service]
Type=simple
ExecStartPre=/opt/clash-for-windows/cfw-start-pre.sh %i
-ExecStartPre=+/usr/share/clash/setup-cgroup.sh
-ExecStart=/usr/share/clash/bypass-proxy /home/%i/.config/clash/service/clash-core-service
+ExecStart=/home/%i/.config/clash/service/clash-core-service
Restart=always
RestartSec=5
diff --git a/clash-for-windows-bin.install b/clash-for-windows-bin.install
index e513e1f25ad8..9eb6900eee79 100644
--- a/clash-for-windows-bin.install
+++ b/clash-for-windows-bin.install
@@ -4,6 +4,8 @@ post_install() {
echo -e "\033[32m To use the TUN mode, you need to run \033[0m"
echo -e "\033[32m sudo systemctl start clash-core-service@\$USER \033[0m"
echo -e "\033[32m sudo systemctl enable clash-core-service@\$USER \033[0m"
+
+ setcap cap_net_admin,cap_net_bind_service=ep /usr/bin/clash
}
post_upgrade(){
post_install