apparmor.d/apparmor.d/profiles-s-z/sing-box
2024-01-24 20:58:23 +00:00

37 lines
774 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# 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,
@{exec_path} mr,
@{bin}/tor mrix,
/usr/share/sing-box/* r,
@{etc_ro}/sing-box/config.json r,
owner @{user_share_dirs}/certmagic/** rw,
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
include if exists <local/sing-box>
}