-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create profile for sing-box #273
Conversation
Thanks for your PR. Please have a look at the profile guideline: https://apparmor.pujol.io/development/guidelines to ensure your profile respect the guideline of this project. Looking at the documentation of sing-box. I have the feeling, this profile only works for your use case of the proxy (with tor), what about other feature? |
apparmor.d/profiles-s-z/sing-box
Outdated
@{exec_path} = /{,usr/}{,local/}bin/sing-box | ||
profile sing-box @{exec_path} { | ||
include <abstractions/base> | ||
include <abstractions/nameservice> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use nameservice-strict
apparmor.d/profiles-s-z/sing-box
Outdated
|
||
include <tunables/global> | ||
|
||
@{exec_path} = /{,usr/}{,local/}bin/sing-box |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @{bin}/sing-box
(local program are purposely not confined by default profiles)
apparmor.d/profiles-s-z/sing-box
Outdated
include <abstractions/nis> | ||
include <abstractions/ssl_certs> | ||
include <abstractions/ssl_keys> | ||
include <abstractions/tor> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such abstraction.
apparmor.d/profiles-s-z/sing-box
Outdated
/usr/{,local/}share/sing-box/geosite.db r, | ||
|
||
owner /{,usr/local/}etc/sing-box/config.json r, | ||
owner @{home_dirs}/.local/share/certmagic/** rw, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@{home_dirs) does not exist. Use: owner @{user_share_dirs}/certmagic/** rw,
apparmor.d/profiles-s-z/sing-box
Outdated
/proc/meminfo r, | ||
/sys/kernel/mm/transparent_hugepage/hpage_pmd_size r, | ||
|
||
/usr/bin/tor mrix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the @{bin} variable.
include <abstractions/ssl_certs> | ||
include <abstractions/ssl_keys> | ||
include <abstractions/tor> | ||
include <abstractions/user-tmp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This abstraction is quite board, can you restrict this a bit.
Yes, part of profile only work for me. Now my specific profile has been removed, only a generic scenario remains. |
7e0f337
to
d3751d3
Compare
Thanks. Merged. For future contribution, please try to follow the profile guideline as I have done with 8f82547 |
https://github.com/SagerNet/sing-box
cc @nekohasekai