sing-box-cli 0.1.3__tar.gz → 0.1.4__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.1.3 → sing_box_cli-0.1.4}/PKG-INFO +1 -1
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/docs/config-serve.md +6 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/pyproject.toml +1 -1
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/__init__.py +1 -1
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/serve_backend.py +8 -1
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/.gitignore +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/LICENSE +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/README.md +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/docs/traefik-config-serve.yml +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/hatch_build.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/__init__.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/client.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/connections.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/logs.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/monitor.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/policy.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/api/widget.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/common.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/__init__.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/_serve_worker.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/config.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/serve.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/config/utils.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/installation.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/main.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/py.typed +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/service/__init__.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/src/sing_box_cli/service/manager.py +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/common.go +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/common_test.go +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/go.mod +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/go.sum +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/integration_windows_test.go +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/main_other.go +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/main_windows.go +0 -0
- {sing_box_cli-0.1.3 → sing_box_cli-0.1.4}/windows-service/testdata/core.go +0 -0
|
@@ -34,6 +34,12 @@ limited to 5 MiB and must be compatible with the bundled core. Referenced siblin
|
|
|
34
34
|
files are not downloaded. Existing client `--token` subscriptions and saved
|
|
35
35
|
settings remain supported; server URLs need no client token.
|
|
36
36
|
|
|
37
|
+
Android's `route.override_android_vpn: true` is disabled only in the temporary
|
|
38
|
+
core-check copy, so a Linux or Windows server can distribute Android configurations.
|
|
39
|
+
Responses retain the original bytes, including the Android setting. Invalid
|
|
40
|
+
option types, unknown fields and other core errors are still rejected; this does
|
|
41
|
+
not verify the target device's runtime environment.
|
|
42
|
+
|
|
37
43
|
## Traefik
|
|
38
44
|
|
|
39
45
|
Merge [the example router and service](traefik-config-serve.yml) into the existing
|
|
@@ -215,7 +215,7 @@ topo_order = false
|
|
|
215
215
|
sort_commits = "oldest"
|
|
216
216
|
|
|
217
217
|
[tool.bumpversion]
|
|
218
|
-
current_version = "0.1.
|
|
218
|
+
current_version = "0.1.4"
|
|
219
219
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
220
220
|
serialize = ["{major}.{minor}.{patch}"]
|
|
221
221
|
search = "{current_version}"
|
|
@@ -269,11 +269,18 @@ def validate_config(content: bytes) -> None:
|
|
|
269
269
|
raise ServeError("Configuration is not valid JSON.", 422)
|
|
270
270
|
if not isinstance(data, dict) or not data:
|
|
271
271
|
raise ServeError("Configuration must be a non-empty JSON object.", 422)
|
|
272
|
+
validation_content = content
|
|
273
|
+
route = data.get("route")
|
|
274
|
+
if isinstance(route, dict) and route.get("override_android_vpn") is True:
|
|
275
|
+
# The server's core cannot initialize this Android-only option. Disable
|
|
276
|
+
# it only in the check copy; HTTP responses retain the original bytes.
|
|
277
|
+
route["override_android_vpn"] = False
|
|
278
|
+
validation_content = json.dumps(data).encode()
|
|
272
279
|
binary = str(get_bin_path())
|
|
273
280
|
try:
|
|
274
281
|
with tempfile.TemporaryDirectory(prefix="sbc-check-") as directory:
|
|
275
282
|
path = Path(directory) / "config.json"
|
|
276
|
-
path.write_bytes(
|
|
283
|
+
path.write_bytes(validation_content)
|
|
277
284
|
result = subprocess.run(
|
|
278
285
|
[binary, "check", "-c", str(path), "-D", directory],
|
|
279
286
|
cwd=directory,
|
|
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
|
|
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
|
|
File without changes
|