Create profile for sing-box (#273)

* Create profile for sing-box

* Update sing-box
This commit is contained in:
npwc 2024-01-24 20:53:14 +00:00 committed by GitHub
parent d3751d3a63
commit e7dc2fbf06
Failed to generate hash of commit

View file

@ -0,0 +1,33 @@
# apparmor.d - Full set of apparmor profiles
# SPDX-License-Identifier: GPL-2.0-only
# https://github.com/SagerNet/sing-box
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/sing-box
profile sing-box @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/user-tmp>
capability net_bind_service,
network inet stream,
network inet6 stream,
network inet dgram,
network inet6 dgram,
/proc/meminfo r,
/sys/kernel/mm/transparent_hugepage/hpage_pmd_size r,
@{bin}/tor mrix,
@{bin}/sing-box mr,
/usr/{,local/}share/sing-box/geoip.db r,
/usr/{,local/}share/sing-box/geosite.db r,
owner /{,usr/local/}etc/sing-box/config.json r,
owner @{user_share_dirs}/certmagic/** rw,
}