GNServer 0.0.0.0.39__py3-none-any.whl → 0.0.0.0.40__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.
- GNServer/_client.py +4 -2
- {gnserver-0.0.0.0.39.dist-info → gnserver-0.0.0.0.40.dist-info}/METADATA +1 -1
- {gnserver-0.0.0.0.39.dist-info → gnserver-0.0.0.0.40.dist-info}/RECORD +6 -6
- {gnserver-0.0.0.0.39.dist-info → gnserver-0.0.0.0.40.dist-info}/WHEEL +0 -0
- {gnserver-0.0.0.0.39.dist-info → gnserver-0.0.0.0.40.dist-info}/licenses/LICENSE +0 -0
- {gnserver-0.0.0.0.39.dist-info → gnserver-0.0.0.0.40.dist-info}/top_level.txt +0 -0
GNServer/_client.py
CHANGED
@@ -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,7 +181,7 @@ 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
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
GNServer/__init__.py,sha256=6CMCZlkBO74PW8i8DAri5xz2fYM9EyPH8vdsLYBMmOo,1560
|
2
2
|
GNServer/_app.py,sha256=nvK_9w1YtZfE-Xh0K-ebkvVINAx4Fir3NSw7Lbwyaz4,18874
|
3
|
-
GNServer/_client.py,sha256=
|
3
|
+
GNServer/_client.py,sha256=L2bDbxSTfmLpxiwUF5APkNXNpksfqYybOH2a_czCJqU,33000
|
4
4
|
GNServer/_cors_resolver.py,sha256=U9IFGN7vpVsEM2smhuf5QGj8vYgs7HeFQwDdzWVVy9c,4832
|
5
5
|
GNServer/_crt.py,sha256=SOmyX7zBiCY9EhVSekksQtBHgTIZVvdqNZ8Ni-E5Zow,1390
|
6
6
|
GNServer/_func_params_validation.py,sha256=2Pkv4g8Ln5Csj_2LOjKmJO-Y7EdiyfXmM6iv7_Vlt9A,11359
|
7
7
|
GNServer/_routes.py,sha256=bJnmQ8uEhPVQgy2tTqE5TEIM8aFXV-lVI7c2nG0rQwk,3384
|
8
8
|
GNServer/_template_resolver.py,sha256=vdJYb_7PjIeTWq-Clr7jyj7QIvPBxplU7EqeOuMJ64c,1409
|
9
|
-
gnserver-0.0.0.0.
|
10
|
-
gnserver-0.0.0.0.
|
11
|
-
gnserver-0.0.0.0.
|
12
|
-
gnserver-0.0.0.0.
|
13
|
-
gnserver-0.0.0.0.
|
9
|
+
gnserver-0.0.0.0.40.dist-info/licenses/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
|
10
|
+
gnserver-0.0.0.0.40.dist-info/METADATA,sha256=W5eiUOCRjNCJhnS28PRE32HdaJeYJKOdfNzXF6h3DhY,830
|
11
|
+
gnserver-0.0.0.0.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
12
|
+
gnserver-0.0.0.0.40.dist-info/top_level.txt,sha256=-UOUBuD4u7Qkb1o5PdcwyA3kx8xCH2lwy0tJHi26Wb4,9
|
13
|
+
gnserver-0.0.0.0.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|