From eef7e080f68047b9149fef31c61e07c1df9f9804 Mon Sep 17 00:00:00 2001 From: EricLin0509 Date: Sun, 27 Oct 2024 23:38:08 +0800 Subject: [PATCH] Initial support for Xray and V2ray --- apparmor.d/profiles-s-z/v2ray | 32 ++++++++++++++++++++++++++++++++ apparmor.d/profiles-s-z/xray | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 apparmor.d/profiles-s-z/v2ray create mode 100644 apparmor.d/profiles-s-z/xray diff --git a/apparmor.d/profiles-s-z/v2ray b/apparmor.d/profiles-s-z/v2ray new file mode 100644 index 00000000..fd36a9d7 --- /dev/null +++ b/apparmor.d/profiles-s-z/v2ray @@ -0,0 +1,32 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 EricLin +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/v2ray +profile v2ray @{exec_path} flags=(attach_disconnected) { + include + include + + network inet dgram, + network inet stream, + network inet raw, + network inet6 dgram, + network inet6 raw, + network netlink raw, + + @{exec_path} mr, + + /etc/v2ray/ r, + /etc/v2ray/**.json r, + /usr/share/v2ray/**.dat r, + + @{PROC}/sys/net/core/somaxconn r, + + include if exists +} + +# vim:syntax=apparmor \ No newline at end of file diff --git a/apparmor.d/profiles-s-z/xray b/apparmor.d/profiles-s-z/xray new file mode 100644 index 00000000..c6f8135a --- /dev/null +++ b/apparmor.d/profiles-s-z/xray @@ -0,0 +1,32 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 EricLin +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/xray +profile xray @{exec_path} flags=(attach_disconnected) { + include + include + + network inet dgram, + network inet stream, + network inet raw, + network inet6 dgram, + network inet6 raw, + network netlink raw, + + @{exec_path} mr, + + /etc/xray/ r, + /etc/xray/**.json r, + /usr/share/xray/**.dat r, + + @{PROC}/sys/net/core/somaxconn r, + + include if exists +} + +# vim:syntax=apparmor \ No newline at end of file