evo-cli 0.37.1__tar.gz → 0.37.3__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.
- {evo_cli-0.37.1 → evo_cli-0.37.3}/PKG-INFO +1 -1
- evo_cli-0.37.3/evo_cli/VERSION +1 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_spoofdpi.py +36 -4
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/PKG-INFO +1 -1
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_route.py +51 -0
- evo_cli-0.37.1/evo_cli/VERSION +0 -1
- {evo_cli-0.37.1 → evo_cli-0.37.3}/Containerfile +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/HISTORY.md +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/LICENSE +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/MANIFEST.in +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/README.md +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/__main__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/base.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/cli.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/agent_toy.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/claude_code.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/cloudflare.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/cred.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/download.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/fix_claude.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/gdrive.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/gh.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_dag.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_git.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_hub.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_mirror.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_model.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_mutate.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_paths.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_render.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/_server.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/check.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/clone.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/edit.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/pull.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/serve.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/show.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/views.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/index-Cs7hXRPJ.css +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/index-CuNOlaH7.js +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/harness/web/index.html +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/hwid.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/hwid_reset.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/image.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/localproxy.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/mcp.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/miniconda.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/netcheck.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/ngrok.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/opencode.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/openvpn.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/plantuml.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_dns.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_dnswatch.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_dpi.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_hosts.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_page.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/_probe.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/check.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/fix.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/probe.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/route/status.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/serp.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/site2s.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/ssh.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/storage.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/sysmon.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/tts.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/update.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/commands/wifi.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/console.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/doctor.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/google_oauth.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/migrate.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/oauth_flow.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/registry.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/store.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/credentials/sync.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/align.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/core.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/creds.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/errors.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/gemini.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/imaging/ncnn.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/mcp_registry.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/openvpn.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/client.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/creds.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/errors.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/install.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/serp/render.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/chunking.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/core.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/creds.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/errors.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/gemini.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/http.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/openai.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/player.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli/tts/vbee.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/SOURCES.txt +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/dependency_links.txt +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/entry_points.txt +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/requires.txt +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/evo_cli.egg-info/top_level.txt +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/pyproject.toml +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/setup.cfg +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/__init__.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/fake_evo_agents.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/fixtures/hub/contract-0.2.0.json +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/fixtures/hub/mirror-demo.yaml +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_agent_toy.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_claude_code.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_cli.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_console.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_cred.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_download.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_fix_claude.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_gdrive.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_gh.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_harness.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_harness_clone.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_harness_dag.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_harness_hub.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_harness_show.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_image.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_mcp.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_ngrok.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_opencode.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_openvpn.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_plantuml.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_serp.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_storage.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_sysmon.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_tts.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_update.py +0 -0
- {evo_cli-0.37.1 → evo_cli-0.37.3}/tests/test_wifi.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.37.3
|
|
@@ -57,6 +57,8 @@ RESOLVERS = {"https": f"DoH ({DOH_URL})", "system": "the system resolver"}
|
|
|
57
57
|
DNS_SETTINGS = "/var/run/resolv.conf"
|
|
58
58
|
# Catches a network that was not answering yet when its settings arrived.
|
|
59
59
|
DNS_RECHECK_SECONDS = 120
|
|
60
|
+
# How long launchd gets to drop a booted-out job before evo stops retrying its bootstrap.
|
|
61
|
+
BOOTSTRAP_SECONDS = 10
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
def config(dns_mode):
|
|
@@ -214,8 +216,22 @@ def _wait(condition, seconds):
|
|
|
214
216
|
return condition()
|
|
215
217
|
|
|
216
218
|
|
|
217
|
-
def
|
|
218
|
-
"""
|
|
219
|
+
def _bootstrap(label=LABEL):
|
|
220
|
+
"""Load an agent.
|
|
221
|
+
|
|
222
|
+
launchctl bootout returns before launchd has let go of the job, and a bootstrap in that window fails
|
|
223
|
+
with "5: Input/output error". So wait for the old job to go, then retry until the new one loads.
|
|
224
|
+
"""
|
|
225
|
+
_wait(lambda: not _loaded(label), BOOTSTRAP_SECONDS)
|
|
226
|
+
deadline = time.monotonic() + BOOTSTRAP_SECONDS
|
|
227
|
+
while True:
|
|
228
|
+
result = _launchctl("bootstrap", _domain(), str(agent_path(label)))
|
|
229
|
+
if result.returncode == 0 or time.monotonic() >= deadline:
|
|
230
|
+
return result
|
|
231
|
+
time.sleep(0.5)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def _launch(reload):
|
|
219
235
|
if _loaded() and not reload:
|
|
220
236
|
_launchctl("kickstart", "-k", f"{_domain()}/{LABEL}")
|
|
221
237
|
else:
|
|
@@ -224,12 +240,28 @@ def _start(reload):
|
|
|
224
240
|
_wait(lambda: not _listening(), 5)
|
|
225
241
|
if _listening():
|
|
226
242
|
raise RuntimeError(f"Something else already listens on {listen()}.")
|
|
227
|
-
result =
|
|
243
|
+
result = _bootstrap()
|
|
228
244
|
if result.returncode != 0:
|
|
229
245
|
raise RuntimeError(f"launchctl bootstrap failed: {(result.stderr or result.stdout).strip()}")
|
|
230
246
|
return _wait(_listening, 10)
|
|
231
247
|
|
|
232
248
|
|
|
249
|
+
def _start(reload):
|
|
250
|
+
"""Start or restart the agent and wait for the proxy port. SpoofDPI reads hosts.txt only when it starts.
|
|
251
|
+
|
|
252
|
+
A restart stops the proxy the system already points at. If the port does not come back, the system
|
|
253
|
+
proxy is cleared: left pointing at nothing, it takes every site down, not only the opened ones.
|
|
254
|
+
"""
|
|
255
|
+
try:
|
|
256
|
+
up = _launch(reload)
|
|
257
|
+
except RuntimeError:
|
|
258
|
+
clear_system_proxy()
|
|
259
|
+
raise
|
|
260
|
+
if not up:
|
|
261
|
+
clear_system_proxy()
|
|
262
|
+
return up
|
|
263
|
+
|
|
264
|
+
|
|
233
265
|
def _networksetup(*args):
|
|
234
266
|
return subprocess.run(
|
|
235
267
|
["networksetup", *args], capture_output=True, text=True, stdin=subprocess.DEVNULL, check=False
|
|
@@ -417,7 +449,7 @@ def _watch_network():
|
|
|
417
449
|
"""(Re)load the DNS agent; launchd runs it once on load, then on every change of network."""
|
|
418
450
|
if _write_dns_agent() or not _loaded(DNS_LABEL):
|
|
419
451
|
_launchctl("bootout", f"{_domain()}/{DNS_LABEL}")
|
|
420
|
-
|
|
452
|
+
_bootstrap(DNS_LABEL)
|
|
421
453
|
|
|
422
454
|
|
|
423
455
|
def service_state():
|
|
@@ -455,6 +455,57 @@ def test_forgetting_the_last_host_removes_the_bypass(tmp_path, monkeypatch):
|
|
|
455
455
|
assert removed == [True]
|
|
456
456
|
|
|
457
457
|
|
|
458
|
+
def _fake_launchctl(calls, bootstrap_codes):
|
|
459
|
+
"""launchctl whose bootstraps answer with ``bootstrap_codes`` in turn; every other verb succeeds."""
|
|
460
|
+
codes = iter(bootstrap_codes)
|
|
461
|
+
|
|
462
|
+
def run(*args):
|
|
463
|
+
calls.append(args[0])
|
|
464
|
+
code = next(codes) if args[0] == "bootstrap" else 0
|
|
465
|
+
stderr = "Bootstrap failed: 5: Input/output error" if code else ""
|
|
466
|
+
return subprocess.CompletedProcess(["launchctl", *args], code, "", stderr)
|
|
467
|
+
|
|
468
|
+
return run
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
def test_bootstrap_retries_while_launchd_still_holds_the_booted_out_job(tmp_path, monkeypatch):
|
|
472
|
+
monkeypatch.setattr(_spoofdpi.Path, "home", lambda: tmp_path)
|
|
473
|
+
monkeypatch.setattr(_spoofdpi.time, "sleep", lambda seconds: None)
|
|
474
|
+
loaded = iter([True, False])
|
|
475
|
+
monkeypatch.setattr(_spoofdpi, "_loaded", lambda label=_spoofdpi.LABEL: next(loaded))
|
|
476
|
+
calls = []
|
|
477
|
+
monkeypatch.setattr(_spoofdpi, "_launchctl", _fake_launchctl(calls, [5, 5, 0]))
|
|
478
|
+
assert _spoofdpi._bootstrap().returncode == 0
|
|
479
|
+
assert calls == ["bootstrap"] * 3
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
def test_a_failed_restart_clears_the_system_proxy(tmp_path, monkeypatch):
|
|
483
|
+
monkeypatch.setattr(_spoofdpi.Path, "home", lambda: tmp_path)
|
|
484
|
+
monkeypatch.setattr(_spoofdpi, "BOOTSTRAP_SECONDS", 0)
|
|
485
|
+
monkeypatch.setattr(_spoofdpi, "_loaded", lambda label=_spoofdpi.LABEL: False)
|
|
486
|
+
monkeypatch.setattr(_spoofdpi, "_listening", lambda timeout=0.5: False)
|
|
487
|
+
monkeypatch.setattr(_spoofdpi, "_launchctl", _fake_launchctl([], [5]))
|
|
488
|
+
cleared = []
|
|
489
|
+
monkeypatch.setattr(_spoofdpi, "clear_system_proxy", lambda: cleared.append(True))
|
|
490
|
+
with pytest.raises(RuntimeError, match="Input/output error"):
|
|
491
|
+
_spoofdpi._start(reload=True)
|
|
492
|
+
assert cleared == [True]
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
def test_a_proxy_port_that_never_comes_back_clears_the_system_proxy(monkeypatch):
|
|
496
|
+
monkeypatch.setattr(_spoofdpi, "_launch", lambda reload: False)
|
|
497
|
+
cleared = []
|
|
498
|
+
monkeypatch.setattr(_spoofdpi, "clear_system_proxy", lambda: cleared.append(True))
|
|
499
|
+
assert _spoofdpi._start(reload=False) is False
|
|
500
|
+
assert cleared == [True]
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
def test_a_working_restart_keeps_the_system_proxy(monkeypatch):
|
|
504
|
+
monkeypatch.setattr(_spoofdpi, "_launch", lambda reload: True)
|
|
505
|
+
monkeypatch.setattr(_spoofdpi, "clear_system_proxy", lambda: pytest.fail("cleared a working proxy"))
|
|
506
|
+
assert _spoofdpi._start(reload=False) is True
|
|
507
|
+
|
|
508
|
+
|
|
458
509
|
def test_forgetting_one_host_restarts_with_the_rest(tmp_path, monkeypatch):
|
|
459
510
|
monkeypatch.setenv("EVO_ROUTE_HOME", str(tmp_path))
|
|
460
511
|
_spoofdpi._write_hosts(["medium.com", "x.com"])
|
evo_cli-0.37.1/evo_cli/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.37.1
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|