hipp-https-agent 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl
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.
- hipp_agent/__init__.py +1 -1
- hipp_agent/certinfo.py +3 -1
- hipp_agent/render.py +1 -1
- hipp_agent/runner.py +4 -1
- {hipp_https_agent-0.2.0.dist-info → hipp_https_agent-0.2.1.dist-info}/METADATA +12 -4
- hipp_https_agent-0.2.1.dist-info/RECORD +15 -0
- hipp_https_agent-0.2.0.dist-info/RECORD +0 -15
- {hipp_https_agent-0.2.0.dist-info → hipp_https_agent-0.2.1.dist-info}/WHEEL +0 -0
- {hipp_https_agent-0.2.0.dist-info → hipp_https_agent-0.2.1.dist-info}/entry_points.txt +0 -0
- {hipp_https_agent-0.2.0.dist-info → hipp_https_agent-0.2.1.dist-info}/top_level.txt +0 -0
hipp_agent/__init__.py
CHANGED
hipp_agent/certinfo.py
CHANGED
|
@@ -34,7 +34,9 @@ def read_certificate(path: Path) -> tuple[str, str, str]:
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def _openssl_time(value: str) -> str:
|
|
37
|
-
text = value.strip()
|
|
37
|
+
text = value.strip()
|
|
38
|
+
if text.endswith(" GMT"):
|
|
39
|
+
text = text[: -len(" GMT")]
|
|
38
40
|
try:
|
|
39
41
|
parsed = datetime.strptime(text, "%b %d %H:%M:%S %Y")
|
|
40
42
|
except ValueError:
|
hipp_agent/render.py
CHANGED
|
@@ -31,7 +31,7 @@ def certbot_issue_args(config: AppConfig, spec: CertificateSpec, certbot_bin: st
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def format_command(command: list[str]) -> str:
|
|
34
|
-
return
|
|
34
|
+
return " ".join(shlex.quote(part) for part in command)
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
def render_acme_snippet(webroot: str) -> str:
|
hipp_agent/runner.py
CHANGED
|
@@ -238,7 +238,10 @@ def preflight(domain: str, webroot: Path, timeout: float = 10.0) -> None:
|
|
|
238
238
|
except OSError as exc:
|
|
239
239
|
raise PreflightError(f"{domain} 的校验地址无法连接:{exc}") from exc
|
|
240
240
|
finally:
|
|
241
|
-
|
|
241
|
+
try:
|
|
242
|
+
path.unlink()
|
|
243
|
+
except FileNotFoundError:
|
|
244
|
+
pass
|
|
242
245
|
if status == 200 and payload == body:
|
|
243
246
|
return
|
|
244
247
|
extra = f",Location: {location}" if location else ""
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hipp-https-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: 在本机申请和续期 HTTPS 证书,并用令牌向服务端上报
|
|
5
|
-
|
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Requires-Python: >=3.7
|
|
6
14
|
Description-Content-Type: text/markdown
|
|
7
15
|
|
|
8
16
|
# hipp-https-agent
|
|
@@ -16,10 +24,10 @@ Description-Content-Type: text/markdown
|
|
|
16
24
|
在证书机器上用 root 安装。申请证书、写 `/etc/nginx/certs` 和重新加载 Nginx 都需要 root,常驻进程也用这个用户。
|
|
17
25
|
|
|
18
26
|
```sh
|
|
19
|
-
sudo pip install hipp-https-agent
|
|
27
|
+
sudo pip install -i https://pypi.org/simple hipp-https-agent
|
|
20
28
|
```
|
|
21
29
|
|
|
22
|
-
安装后得到命令 `hipp-agent`。包在 PyPI 上的名字是 `hipp-https-agent`。
|
|
30
|
+
安装后得到命令 `hipp-agent`。包在 PyPI 上的名字是 `hipp-https-agent`。需要 Python 3.7 或更高。显式指定官方索引,是为了避免云主机默认国内镜像尚未同步新包时出现 `No matching distribution`。
|
|
23
31
|
|
|
24
32
|
先装好 certbot,并准备校验目录:
|
|
25
33
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
hipp_agent/__init__.py,sha256=bvALT8R0IXKpzBVdeJJAFhvzx9wcBp91iy4LI_m43zk,102
|
|
2
|
+
hipp_agent/__main__.py,sha256=TK4fT3W8XKhSDiHf4x4ls4asVeeFtLVYZwJnwaDa4c4,3863
|
|
3
|
+
hipp_agent/certinfo.py,sha256=UInWwV-fpqQIU89Hu56fZ20ee6OtsSxB5-0Bw2vkpoc,1464
|
|
4
|
+
hipp_agent/config.py,sha256=Rof8FQEsn1e0rc6UdLfsJFqORgbR_9JDIEJSt7QSEko,10699
|
|
5
|
+
hipp_agent/daemon.py,sha256=YK_WlxVOqky2szLwirzMiLJWyhmm8kTQHqxijHwuvu8,7751
|
|
6
|
+
hipp_agent/install.py,sha256=MJcrQ7V216SudzxuzLYAH-dK1jDoFrQqFXTQSYodxZ4,8320
|
|
7
|
+
hipp_agent/register.py,sha256=FoP4CVrdcBppN_1LbOjpw3yekK1PjYNGt9LkTxcW4zk,5230
|
|
8
|
+
hipp_agent/render.py,sha256=D6cIQvV52wSDPiitzVh64KILPJc5llij2uiGpYk5P3c,3663
|
|
9
|
+
hipp_agent/report.py,sha256=JOkgqiLL_8bqZRVuacRjbKi5gTbygfLc-O1RkNk5wCM,2307
|
|
10
|
+
hipp_agent/runner.py,sha256=ngRTJgAfyISpM_br44svKTMHvtlCoXTMppxgH3DuWeo,10649
|
|
11
|
+
hipp_https_agent-0.2.1.dist-info/METADATA,sha256=QqsP9TUBi9pYhBL9FG6lVv4D0XDB-1J0gjOA0g6lB88,3380
|
|
12
|
+
hipp_https_agent-0.2.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
13
|
+
hipp_https_agent-0.2.1.dist-info/entry_points.txt,sha256=nJj7QyFLH_FT9ciFyjjITiqrLZSsN4ylB7IILOLr3VE,56
|
|
14
|
+
hipp_https_agent-0.2.1.dist-info/top_level.txt,sha256=kkb29UBJy4dUEchZcjrdk3Eunk6yYtMMmPNtIBvudq4,11
|
|
15
|
+
hipp_https_agent-0.2.1.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
hipp_agent/__init__.py,sha256=FS-AC5MjbrgosCNu2py7orZB69iY69Ro4lUHnaFnGO4,102
|
|
2
|
-
hipp_agent/__main__.py,sha256=TK4fT3W8XKhSDiHf4x4ls4asVeeFtLVYZwJnwaDa4c4,3863
|
|
3
|
-
hipp_agent/certinfo.py,sha256=wtTqtDBvRuEF6nBkvn0p5xTjEq9v1j3UgSF-GukI4yQ,1419
|
|
4
|
-
hipp_agent/config.py,sha256=Rof8FQEsn1e0rc6UdLfsJFqORgbR_9JDIEJSt7QSEko,10699
|
|
5
|
-
hipp_agent/daemon.py,sha256=YK_WlxVOqky2szLwirzMiLJWyhmm8kTQHqxijHwuvu8,7751
|
|
6
|
-
hipp_agent/install.py,sha256=MJcrQ7V216SudzxuzLYAH-dK1jDoFrQqFXTQSYodxZ4,8320
|
|
7
|
-
hipp_agent/register.py,sha256=FoP4CVrdcBppN_1LbOjpw3yekK1PjYNGt9LkTxcW4zk,5230
|
|
8
|
-
hipp_agent/render.py,sha256=H-rRziW_1w4G2x_578nkgMId9IlPqqJn-dDsxsWWXvY,3635
|
|
9
|
-
hipp_agent/report.py,sha256=JOkgqiLL_8bqZRVuacRjbKi5gTbygfLc-O1RkNk5wCM,2307
|
|
10
|
-
hipp_agent/runner.py,sha256=qLcKWr8eak0yQUaZUeRE-qh-lYiyeHbVV7jsvfcjzy0,10596
|
|
11
|
-
hipp_https_agent-0.2.0.dist-info/METADATA,sha256=8LeM6Xt1CZTmO6ilstI6-xvYictc0MTArKwBU197ALQ,2796
|
|
12
|
-
hipp_https_agent-0.2.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
13
|
-
hipp_https_agent-0.2.0.dist-info/entry_points.txt,sha256=nJj7QyFLH_FT9ciFyjjITiqrLZSsN4ylB7IILOLr3VE,56
|
|
14
|
-
hipp_https_agent-0.2.0.dist-info/top_level.txt,sha256=kkb29UBJy4dUEchZcjrdk3Eunk6yYtMMmPNtIBvudq4,11
|
|
15
|
-
hipp_https_agent-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|