Package Details: sing-box 1.1.5-1

Git Clone URL: https://aur.archlinux.org/sing-box.git (read-only, click to copy)
Package Base: sing-box
Description: The universal proxy platform.
Upstream URL: https://sing-box.sagernet.org/
Licenses: GPL3
Conflicts: sing-box-beta, sing-box-git
Submitter: everyx
Maintainer: everyx
Last Packager: everyx
Votes: 2
Popularity: 0.73
First Submitted: 2022-09-15 09:44 (UTC)
Last Updated: 2023-02-02 12:37 (UTC)

Dependencies (3)

Required by (5)

Sources (1)

Latest Comments

1 2 Next › Last »

AvianaCruz commented on 2022-12-18 07:52 (UTC) (edited on 2022-12-18 07:53 (UTC) by AvianaCruz)

@everyx "XDG Base Directory Specification" is for user units. When it works as a system unit, it should follow Filesystem Hierarchy Standard. And $XDG_CONFIG_HOME is default to $HOME/.config. WorkingDirectory and ConfigurationDirectory are indeed not the same concept, but their values can be the same.

everyx commented on 2022-12-17 03:12 (UTC)

@AvianaCruz ConfigurationDirectory is the base directory for all apps, something like $HOME/.config or /etc, if sing-box follow the XDG Base Directory Specification, it should create or lookup it's specific config directory (not the global ConfigurationDirectory), something like ${XDG_CONFIG_HOME}/sing-box, and use config.json or other user specific config files.

WorkingDirectory and ConfigurationDirectory are not the same.

AvianaCruz commented on 2022-12-16 06:21 (UTC) (edited on 2022-12-16 06:21 (UTC) by AvianaCruz)

@everyx I don't think that it could be used as user unit without modification, so ConfigurationDirectory is the correct way to create directory automatically.

Or should it be added in the upstream?

AvianaCruz commented on 2022-12-16 03:21 (UTC)

@everyx When the unit is an system unit which is the default, the below path is /etc/.

everyx commented on 2022-12-16 03:19 (UTC)

@AvianaCruz ConfigurationDirectory is the base directory relative to which user-specific configuration files should be stored, use this to create directory automatically is not the correct usage, although it does create the directory.

AvianaCruz commented on 2022-12-16 03:14 (UTC)

@everyx Please look the document, the option is to make systemd create the directory automatically.

everyx commented on 2022-12-16 03:11 (UTC)

@AvianaCruz sing-box only lookup config.json in current work directory as config file, it's not follow the XDG Base Directory Specification, so setting this should be useless, although we can hack through a startup scripts, but IMHO it is better to submit a feature request to the upstream, thank you.

AvianaCruz commented on 2022-12-16 03:04 (UTC)

@everyx The correct way to create configuration directory is using ConfigurationDirectory=, see https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=

everyx commented on 2022-12-06 04:14 (UTC)

@AvianaCruz I need some features like with_clash_api, if this doesn't meet your needs, you can modify it locally.

AvianaCruz commented on 2022-12-06 01:51 (UTC) (edited on 2022-12-06 02:05 (UTC) by AvianaCruz)

@everyx I think it would be better to follow the upstream, i.e. just creating /usr/lib/sing-box or not creating these directories at all. Also the build flags should be like the upstream, i.e. set -ldflags to -s -w -buildid= -linkmode=external and _tags to with_quic,with_wireguard,with_acme. (https://github.com/SagerNet/sing-box/blob/8953ddc6e0fb8dc3a041a1ce3cc7d6ff51cf2913/release/local/install.sh#L13)