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.
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/CHANGELOG.md +6 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/PKG-INFO +1 -1
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/pyproject.toml +1 -1
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/__init__.py +1 -1
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/service.py +19 -7
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/uv.lock +1 -1
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.github/dependabot.yml +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.github/workflows/main.yml +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.gitignore +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.pre-commit-config.yaml +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.vscode/PythonImportHelper-v2-Completion.json +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/.vscode/settings.json +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/LICENSE +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/README.md +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/assets/image.png +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/bump.sh +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/format.sh +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/scripts/lint.sh +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/config.py +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/main.py +0 -0
- {sing_box_cli-0.0.9 → sing_box_cli-0.0.10}/src/sing_box_service/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sing-box-cli
|
|
3
|
-
Version: 0.0.
|
|
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.
|
|
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}"
|
|
@@ -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
|
|
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=
|
|
172
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|