GNServer 0.0.0.0.39__tar.gz → 0.0.0.0.41__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.
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_client.py +6 -4
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_func_params_validation.py +2 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer.egg-info/PKG-INFO +1 -1
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/PKG-INFO +1 -1
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/setup.py +1 -1
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/__init__.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_app.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_cors_resolver.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_crt.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_routes.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer/_template_resolver.py +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer.egg-info/SOURCES.txt +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer.egg-info/dependency_links.txt +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer.egg-info/requires.txt +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/GNServer.egg-info/top_level.txt +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/LICENSE +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/GNServer/mmbConfig.json +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/LICENSE +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/MANIFEST.in +0 -0
- {gnserver-0.0.0.0.39 → gnserver-0.0.0.0.41}/setup.cfg +0 -0
@@ -136,7 +136,7 @@ async def chain_async(first_item, rest: AsyncIterable) -> AsyncGenerator:
|
|
136
136
|
|
137
137
|
|
138
138
|
class AsyncClient:
|
139
|
-
def __init__(self, server_key: Optional[Union[bytes, str]] = None):
|
139
|
+
def __init__(self, domain: Optional[str] = None, server_key: Optional[Union[bytes, str]] = None):
|
140
140
|
self.__dns_core__ipv4 = '51.250.85.38:52943'
|
141
141
|
self.__dns_gn__ipv4: Optional[str] = None
|
142
142
|
|
@@ -149,6 +149,8 @@ class AsyncClient:
|
|
149
149
|
self.__dns_client: Optional[AsyncClient] = None
|
150
150
|
self._dns_cache: TTLDict = TTLDict()
|
151
151
|
|
152
|
+
self.__domain = domain
|
153
|
+
|
152
154
|
if server_key:
|
153
155
|
if isinstance(server_key, bytes):
|
154
156
|
self.__server_key = server_key
|
@@ -179,14 +181,14 @@ class AsyncClient:
|
|
179
181
|
if self.__server_key is not None:
|
180
182
|
s = s2.sign(self.__server_key)
|
181
183
|
data = m1.encrypt(s, domain.encode(), serialize({'domain': domain}), hash(self.__server_key))
|
182
|
-
payload = {'sign': {'alg': 'KeyisB-c-s-m1', 'data': s}, 'data': data}
|
184
|
+
payload = {'sign': {'alg': 'KeyisB-c-s-m1', 'data': s, 'domain': self.__domain}, 'data': data}
|
183
185
|
else:
|
184
186
|
payload = None
|
185
187
|
|
186
188
|
r1 = await self.__dns_client.request(GNRequest('GET', Url(f'gn://{self.__dns_core__ipv4}/getIp?d={domain}'), payload=payload), keep_alive=keep_alive)
|
187
189
|
|
188
|
-
if r1.command
|
189
|
-
raise
|
190
|
+
if not r1.command:
|
191
|
+
raise r1
|
190
192
|
|
191
193
|
if r1.payload is None:
|
192
194
|
raise GNExceptions.ConnectionError.dns.data
|
@@ -185,6 +185,8 @@ def _build_schema_from_params(func_params) -> Schema:
|
|
185
185
|
names = set()
|
186
186
|
has_kwargs = False
|
187
187
|
for name, p in pmap.items():
|
188
|
+
if name == "request":
|
189
|
+
continue
|
188
190
|
if p.kind == Parameter.VAR_KEYWORD:
|
189
191
|
has_kwargs = True; continue
|
190
192
|
if p.kind == Parameter.VAR_POSITIONAL:
|
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
|