sing-box-cli 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/CHANGELOG.md +6 -0
  2. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/PKG-INFO +1 -1
  3. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/pyproject.toml +1 -1
  4. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/__init__.py +1 -1
  5. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/service.py +19 -7
  6. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/uv.lock +1 -1
  7. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.github/dependabot.yml +0 -0
  8. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.github/workflows/main.yml +0 -0
  9. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.gitignore +0 -0
  10. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.pre-commit-config.yaml +0 -0
  11. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.vscode/PythonImportHelper-v2-Completion.json +0 -0
  12. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.vscode/settings.json +0 -0
  13. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/LICENSE +0 -0
  14. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/README.md +0 -0
  15. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/assets/image.png +0 -0
  16. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/bump.sh +0 -0
  17. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/format.sh +0 -0
  18. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/lint.sh +0 -0
  19. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/config.py +0 -0
  20. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/main.py +0 -0
  21. {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/py.typed +0 -0
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.0.10 - 2025-01-15
6
+
7
+ ### 🐛 Bug Fixes
8
+
9
+ - Systemd unit start condition in linux server and optimize the service priority
10
+
5
11
  ## 0.0.9 - 2025-01-14
6
12
 
7
13
  ### 🚀 Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sing-box-cli
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: cross-platform sing-box-service manager.
5
5
  Project-URL: Homepage, https://github.com/aittcuszz/sing-box-service
6
6
  Project-URL: Issues, https://github.com/atticuszz/sing-box-service/issues
@@ -209,7 +209,7 @@ sort_commits = "oldest"
209
209
 
210
210
 
211
211
  [tool.bumpversion]
212
- current_version = "0.0.9"
212
+ current_version = "0.0.10"
213
213
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
214
214
  serialize = ["{major}.{minor}.{patch}"]
215
215
  search = "{current_version}"
@@ -2,4 +2,4 @@ from .main import main
2
2
 
3
3
  __all__ = ["main"]
4
4
 
5
- __version__ = "0.0.9"
5
+ __version__ = "0.0.10"
@@ -158,24 +158,36 @@ class LinuxServiceManager(ServiceManager):
158
158
  self.service_file = Path("/etc/systemd/system/sing-box.service")
159
159
 
160
160
  def create_service(self) -> None:
161
- """systemctl list-units | grep -i network"""
161
+ """systemctl list-units | grep -i network
162
+ Refs:
163
+ 1. https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type
164
+ 2. https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Scheduling
165
+ """
162
166
  service_content = f"""
163
167
  [Unit]
164
168
  Description=sing-box service
165
169
  Documentation=https://sing-box.sagernet.org
166
- After=network-online.target NetworkManager-wait-online.service nss-lookup.target
167
- Wants=network-online.target nss-lookup.target
168
- BindsTo=NetworkManager.service
170
+ After=network-online.target nss-lookup.target
169
171
 
170
172
  [Service]
171
- Type=simple
172
- LimitNPROC=500
173
- LimitNOFILE=1000000
173
+ Type=exec
174
+ LimitNOFILE=infinity
174
175
  CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
175
176
  AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
177
+
178
+ # restart
176
179
  Restart=always
180
+ RestartSec=2
181
+ # start commands
177
182
  ExecStart={self.config.bin_path} run -C {self.config.install_dir}
178
183
  ExecReload=/bin/kill -HUP $MAINPID
184
+ # IO
185
+ IOSchedulingPriority=0
186
+ IOSchedulingClass=realtime
187
+ # CPU
188
+ CPUSchedulingPolicy=rr
189
+ CPUSchedulingPriority=99
190
+ Nice=-20
179
191
 
180
192
  [Install]
181
193
  WantedBy=multi-user.target
@@ -547,7 +547,7 @@ wheels = [
547
547
 
548
548
  [[package]]
549
549
  name = "sing-box-cli"
550
- version = "0.0.9"
550
+ version = "0.0.10"
551
551
  source = { editable = "." }
552
552
  dependencies = [
553
553
  { name = "psutil", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
File without changes
File without changes
File without changes