Create profile for sing-box

This commit is contained in:
npwc 2024-01-16 03:07:01 +00:00 committed by GitHub
parent 7581eacdc6
commit 62f2f24546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,37 @@
# 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} = /{,usr/}{,local/}bin/sing-box
profile sing-box @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/nis>
include <abstractions/ssl_certs>
include <abstractions/ssl_keys>
include <abstractions/tor>
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,
/usr/bin/tor mrix,
/usr/{,local/}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 @{home_dirs}/.local/share/certmagic/** rw,
}