From c3fcd2021d51747c2dbe296ef1bc2d61375b0d8c Mon Sep 17 00:00:00 2001 From: Miwory Date: Tue, 30 Sep 2025 16:44:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B1=D1=80=D0=B0=D1=81?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B5=D1=81=D0=B8=D0=B0=20?= =?UTF-8?q?=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20=D0=BF=D1=80=D0=BE=D0=BA=D1=81?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/esia/sign.py | 2 -- src/clients/esia/api.py | 4 +++- src/core/config.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/esia/sign.py b/src/apps/esia/sign.py index 46daf1b..e50ee61 100644 --- a/src/apps/esia/sign.py +++ b/src/apps/esia/sign.py @@ -24,8 +24,6 @@ def csp_sign(data: str): with open(source_path, 'w', encoding='utf-8') as f: f.write(data) - print(data) - cmd = [ 'cryptcp', '-signf', diff --git a/src/clients/esia/api.py b/src/clients/esia/api.py index c413332..d729415 100644 --- a/src/clients/esia/api.py +++ b/src/clients/esia/api.py @@ -18,7 +18,9 @@ from . import schema as s class ESIA_API(AsyncClient): def __init__(self): self.logger = getLogger(__name__) - super().__init__(base_url=settings.ESIA_BASE_URL) + super().__init__( + base_url=settings.ESIA_BASE_URL, proxy=settings.ESIA_PROXY + ) async def sign_request(self, data: dict[str, Any]): timestamp = datetime.now(UTC).strftime('%Y.%m.%d %H:%M:%S %z').strip() diff --git a/src/core/config.py b/src/core/config.py index 47fe0d9..c7e9d44 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -50,6 +50,7 @@ class Settings(BaseSettings): ESIA_REDIRECT_URI: str = Field(default='') ESIA_CONTAINER_PASSWORD: str = Field(default='') ESIA_CONTAINER_THUMBPRINT: str = Field(default='') + ESIA_PROXY: str | None = Field(default=None) # Vitacore VITACORE_BASE_URL: str = Field(