sing-box-cli 0.0.8__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.8 → sing_box_cli-0.0.10}/CHANGELOG.md +8 -1
  2. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/PKG-INFO +1 -1
  3. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/pyproject.toml +1 -1
  4. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/src/sing_box_service/__init__.py +1 -1
  5. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/src/sing_box_service/service.py +19 -8
  6. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/uv.lock +1 -1
  7. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.github/dependabot.yml +0 -0
  8. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.github/workflows/main.yml +0 -0
  9. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.gitignore +0 -0
  10. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.pre-commit-config.yaml +0 -0
  11. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.vscode/PythonImportHelper-v2-Completion.json +0 -0
  12. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/.vscode/settings.json +0 -0
  13. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/LICENSE +0 -0
  14. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/README.md +0 -0
  15. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/assets/image.png +0 -0
  16. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/scripts/bump.sh +0 -0
  17. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/scripts/format.sh +0 -0
  18. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/scripts/lint.sh +0 -0
  19. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/src/sing_box_service/config.py +0 -0
  20. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/src/sing_box_service/main.py +0 -0
  21. {sing_box_cli-0.0.8 → sing_box_cli-0.0.10}/src/sing_box_service/py.typed +0 -0
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## 0.0.8 - 2025-01-14
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
+
11
+ ## 0.0.9 - 2025-01-14
6
12
 
7
13
  ### 🚀 Features
8
14
 
@@ -12,6 +18,7 @@ All notable changes to this project will be documented in this file.
12
18
 
13
19
  - Service start before network connection
14
20
  - Linux service After start condition
21
+ - Remove tool synctime -w in windows ,because newest sing-box has fixed ntp
15
22
 
16
23
  ### 📚 Documentation
17
24
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sing-box-cli
3
- Version: 0.0.8
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.8"
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.8"
5
+ __version__ = "0.0.10"
@@ -62,7 +62,6 @@ if (Test-Path "{self.log_file}") {{
62
62
  }}
63
63
 
64
64
  try {{
65
- & "{self.config.bin_path}" tools synctime -w -C "{self.config.install_dir}" *>&1 | Tee-Object -FilePath "{self.log_file}" -Append
66
65
  & "{self.config.bin_path}" run -C "{self.config.install_dir}" *>&1 | Tee-Object -FilePath "{self.log_file}" -Append
67
66
  }} catch {{
68
67
  $_ | Out-File -FilePath "{self.log_file}" -Append
@@ -159,24 +158,36 @@ class LinuxServiceManager(ServiceManager):
159
158
  self.service_file = Path("/etc/systemd/system/sing-box.service")
160
159
 
161
160
  def create_service(self) -> None:
162
- """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
+ """
163
166
  service_content = f"""
164
167
  [Unit]
165
168
  Description=sing-box service
166
169
  Documentation=https://sing-box.sagernet.org
167
- After=network-online.target NetworkManager-wait-online.service nss-lookup.target
168
- Wants=network-online.target nss-lookup.target
169
- BindsTo=NetworkManager.service
170
+ After=network-online.target nss-lookup.target
170
171
 
171
172
  [Service]
172
- Type=simple
173
- LimitNPROC=500
174
- LimitNOFILE=1000000
173
+ Type=exec
174
+ LimitNOFILE=infinity
175
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
176
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
177
179
  Restart=always
180
+ RestartSec=2
181
+ # start commands
178
182
  ExecStart={self.config.bin_path} run -C {self.config.install_dir}
179
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
180
191
 
181
192
  [Install]
182
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.8"
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