GNServer 0.0.0.0.15__py3-none-any.whl → 0.0.0.0.17__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/_app.py +14 -6
- {gnserver-0.0.0.0.15.dist-info → gnserver-0.0.0.0.17.dist-info}/METADATA +1 -1
- gnserver-0.0.0.0.17.dist-info/RECORD +8 -0
- gnserver-0.0.0.0.15.dist-info/RECORD +0 -8
- {gnserver-0.0.0.0.15.dist-info → gnserver-0.0.0.0.17.dist-info}/WHEEL +0 -0
- {gnserver-0.0.0.0.15.dist-info → gnserver-0.0.0.0.17.dist-info}/licenses/LICENSE +0 -0
- {gnserver-0.0.0.0.15.dist-info → gnserver-0.0.0.0.17.dist-info}/top_level.txt +0 -0
GNServer/_app.py
CHANGED
@@ -519,11 +519,12 @@ class App:
|
|
519
519
|
|
520
520
|
|
521
521
|
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
522
|
+
def _init_sys_routes(self):
|
523
|
+
@self.get('/!gn-vm-host/ping')
|
524
|
+
async def r_ping(request: gn.GNRequest):
|
525
|
+
if request.client_ip != '127.0.0.1':
|
526
|
+
return gn.GNResponse('gn:backend:403', {'error': 'Forbidden'})
|
527
|
+
return gn.GNResponse('ok', {'time': datetime.datetime.now(datetime.UTC).isoformat()})
|
527
528
|
|
528
529
|
|
529
530
|
|
@@ -559,7 +560,8 @@ class App:
|
|
559
560
|
# request.stream_id = event.stream_id
|
560
561
|
# loop = asyncio.get_event_loop()
|
561
562
|
# request.fut = loop.create_future()
|
562
|
-
|
563
|
+
|
564
|
+
|
563
565
|
request.stream_id = event.stream_id
|
564
566
|
asyncio.create_task(self._handle_request(request, mode))
|
565
567
|
logger.debug(f'Отправлена задача разрешения пакета {request} route -> {request.route}')
|
@@ -620,6 +622,9 @@ class App:
|
|
620
622
|
asyncio.create_task(self._handle_request(request, mode))
|
621
623
|
|
622
624
|
async def _handle_request(self, request: gn.GNRequest, mode: int):
|
625
|
+
|
626
|
+
request._client_ip = self._quic._network_paths[0].addr[0]
|
627
|
+
|
623
628
|
try:
|
624
629
|
|
625
630
|
response = await self._api.dispatch(request)
|
@@ -670,6 +675,9 @@ class App:
|
|
670
675
|
idle_timeout: float = 20.0,
|
671
676
|
wait: bool = True
|
672
677
|
):
|
678
|
+
|
679
|
+
self._init_sys_routes()
|
680
|
+
|
673
681
|
cfg = QuicConfiguration(
|
674
682
|
alpn_protocols=["gn:backend"], is_client=False, idle_timeout=idle_timeout
|
675
683
|
)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
GNServer/__init__.py,sha256=J4bjDqXVSEgOhD-FmkhpCeU4NJkp2BKMUKgltiuSXVo,1437
|
2
|
+
GNServer/_app.py,sha256=tMNXDB10sUJHvVoTOc0KP3Mp3Dm6QyzZb3QfIgVIxR0,24736
|
3
|
+
GNServer/_client.py,sha256=tSpFkUuwHRPqmIjdTdcYWzPwDUTDaDRNhQOBTlL4jpg,24725
|
4
|
+
gnserver-0.0.0.0.17.dist-info/licenses/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
|
5
|
+
gnserver-0.0.0.0.17.dist-info/METADATA,sha256=bFWTS0TNuCQIb7-zc8VarnDdzc99BNwJE-CSQYLI13g,805
|
6
|
+
gnserver-0.0.0.0.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
gnserver-0.0.0.0.17.dist-info/top_level.txt,sha256=-UOUBuD4u7Qkb1o5PdcwyA3kx8xCH2lwy0tJHi26Wb4,9
|
8
|
+
gnserver-0.0.0.0.17.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
GNServer/__init__.py,sha256=J4bjDqXVSEgOhD-FmkhpCeU4NJkp2BKMUKgltiuSXVo,1437
|
2
|
-
GNServer/_app.py,sha256=KlsB4dzCwGEgGUX_I-vHE9w1xzjCxj1p_YN5gBeI9ms,24300
|
3
|
-
GNServer/_client.py,sha256=tSpFkUuwHRPqmIjdTdcYWzPwDUTDaDRNhQOBTlL4jpg,24725
|
4
|
-
gnserver-0.0.0.0.15.dist-info/licenses/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
|
5
|
-
gnserver-0.0.0.0.15.dist-info/METADATA,sha256=rtWU0XDD4nSi1K4m-JWs0525yBVGNCH2HEZb8tWugeQ,805
|
6
|
-
gnserver-0.0.0.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
gnserver-0.0.0.0.15.dist-info/top_level.txt,sha256=-UOUBuD4u7Qkb1o5PdcwyA3kx8xCH2lwy0tJHi26Wb4,9
|
8
|
-
gnserver-0.0.0.0.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|