Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions srcpkgs/sing-box/files/sing-box/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
exec 2>&1
_user=_sing_box
! [ -d /run/sing-box ] && install -m 700 -g $_user -o $_user -d /run/sing-box
_caps='-all,+net_admin,+net_raw,+net_bind_service,+sys_ptrace,+dac_read_search'

exec setpriv --reuid $_user --regid $_user --clear-groups \
--ambient-caps $_caps \
--inh-caps $_caps \
--bounding-set $_caps \
--no-new-privs -- sing-box -D /var/lib/sing-box -C /etc/sing-box run
23 changes: 23 additions & 0 deletions srcpkgs/sing-box/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Template file for 'sing-box'
pkgname=sing-box
version=1.13.3
revision=1
build_style=go
go_import_path=github.com/sagernet/sing-box
go_package=github.com/sagernet/sing-box/cmd/sing-box
go_build_tags=with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale
go_ldflags="-X github.com/sagernet/sing-box/constant.Version=${version}"
short_desc="Universal proxy platform"
maintainer="Nizarjh <chel773@tutamail.com>"
license="GPL-3.0-or-later"
homepage="https://sing-box.sagernet.org/"
distfiles="https://github.com/SagerNet/sing-box/archive/refs/tags/v${version}.tar.gz"
checksum=bf8933cd43e2797afcffb47528282e1c1aee078bf5eeda888d80a151fef726e1
system_accounts="_sing_box"
conf_files="/etc/sing-box/config.json"
make_dirs="/var/lib/sing-box 700 _sing_box _sing_box"

post_install() {
vinstall release/config/config.json 644 etc/sing-box
vsv sing-box
}