Zn37d6TqWJ1ntPJKv1RF+i5K3kTlMi1Tu2sZ j27eQO4FNnKoPN5YmHDIGEBZ6470F4R05vIXAS0wrakkeRz1Jw/PjVH4DJjS/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777919091; a=rsa-sha256; cv=none; b=RDVKTPcT2d5eEZX/uEk3bHKCXWHDwUcyXYCki0bLFOoKKK+Jw2HHC8iv4N7VDl9FcbXsRB JQGMhu3YCDDxcPM2DgshSp5yl89dW4zy57S2EHdnwOLVFEfSu+PsNYcgFr43lJwOyDYSb4 6+dk4xZZnAzWyDqsvkGiuThabu09cQXoVciRL8PA0w8otfpNDF9kDd7zvKGurxON8f81v6 iSmgLWQ8xUJBzxr+rhCLJJ9emt3XB2cfZMMsCwvqJiTMuQtufzM3QsDp0Zdm7ot4+wcSen B4dbekwmejTYIepRqIdY5GMKVIY8Ieyik4Jd0mWdKyz9F1P0Pf2Ys3zBdYO9vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777919091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psoc6MnD4VpbJSSEqgm1cCQJ08W1Tdn2fWCfpuv+rcI=; b=I6cRzqjjh05RiR4vhZTPCF5Rwb8UFOVvqqChic8PzSa+lYV3OFW+l1gByqIp3KhuysP7g8 3mSdyLKVlvyC6RC6cV6VWlX5SKjF+N3VPXB6QMZ836eHDDJRNimE3OyeZpS45OIc0GBUyU IWSDqcHEa91G6V01LiCBJFUWTWFaiInlrKVbW4/PJZbSFbNjMVx/WXjg4EXiHfrPuaUzSy mpSEGzBEVDE6I0yGVhMFAb52nzB+WcoRRS8jf4l4GcCNVGV2Pzws1VGw0TchQKtpXTzyfO pDUwWcQxBsnOkcmOKKnS/0tefJy/osxsUJkMtQEVgQ4k829Ikfs4hWrM24XOUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g8VRl54w3zXRr for ; Mon, 04 May 2026 18:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36f75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 04 May 2026 18:24:51 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: df3dbeed7237 - main - net/sing-box: Add default config file List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df3dbeed7237bd209f81849b9807a83bf311fe33 Auto-Submitted: auto-generated Date: Mon, 04 May 2026 18:24:51 +0000 Message-Id: <69f8e473.36f75.3fa3b5f0@gitrepo.freebsd.org> The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=df3dbeed7237bd209f81849b9807a83bf311fe33 commit df3dbeed7237bd209f81849b9807a83bf311fe33 Author: Yuri Victorovich AuthorDate: 2026-05-04 15:42:37 +0000 Commit: Yuri Victorovich CommitDate: 2026-05-04 18:24:49 +0000 net/sing-box: Add default config file ... running a SOCKS5 server to allow the sing-box service to be runnable out of the box. --- net/sing-box/Makefile | 8 +++++++- net/sing-box/files/sing-box.json | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/net/sing-box/Makefile b/net/sing-box/Makefile index 6206a08e4ff8..aa64650053b2 100644 --- a/net/sing-box/Makefile +++ b/net/sing-box/Makefile @@ -1,6 +1,7 @@ PORTNAME= sing-box DISTVERSIONPREFIX= v DISTVERSION= 1.13.11 +PORTREVISION= 1 CATEGORIES= net MAINTAINER= yuri@FreeBSD.org @@ -16,7 +17,8 @@ USES= go:1.24+,modules GO_MODULE= github.com/sagernet/sing-box GO_TARGET= ./cmd/sing-box -PLIST_FILES= bin/${PORTNAME} +PLIST_FILES= bin/${PORTNAME} \ + "@sample etc/sing-box.json.sample" USE_RC_SUBR= ${PORTNAME} @@ -54,4 +56,8 @@ OCM_VARS= GO_TAGS+=with_ocm GO_BUILDFLAGS+= -tags "${GO_TAGS}" .endif +post-install: + # install default config file + ${INSTALL_DATA} ${FILESDIR}/sing-box.json ${STAGEDIR}${PREFIX}/etc/sing-box.json.sample + .include diff --git a/net/sing-box/files/sing-box.json b/net/sing-box/files/sing-box.json new file mode 100644 index 000000000000..7a1bd101f0e3 --- /dev/null +++ b/net/sing-box/files/sing-box.json @@ -0,0 +1,16 @@ +{ + "inbounds": [ + { + "type": "socks", + "tag": "socks-in", + "listen": "::", + "listen_port": 1080 + } + ], + "outbounds": [ + { + "type": "direct", + "tag": "direct" + } + ] +}