nya-proxy 0.3.2__tar.gz → 0.3.3__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.
- {nya_proxy-0.3.2/nya_proxy.egg-info → nya_proxy-0.3.3}/PKG-INFO +1 -1
- nya_proxy-0.3.3/nya/_version.py +1 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/proxy.py +1 -3
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/streaming.py +4 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/utils/header.py +1 -2
- {nya_proxy-0.3.2 → nya_proxy-0.3.3/nya_proxy.egg-info}/PKG-INFO +1 -1
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/pyproject.toml +1 -1
- nya_proxy-0.3.2/nya/_version.py +0 -1
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/LICENSE +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/README.md +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/common/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/common/constants.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/common/exceptions.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/common/models.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/config/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/config/manager.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/config.yaml +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/handler.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/queue.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/core/request.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/dashboard/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/dashboard/api.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/favicon.ico +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/index.html +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/login.html +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/static/css/styles.css +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/static/js/dashboard.js +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/html/static/logo.svg +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/schema.json +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/server/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/server/app.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/server/auth.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/services/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/services/control.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/services/lb.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/services/limit.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/services/metrics.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/utils/__init__.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya/utils/helper.py +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya_proxy.egg-info/SOURCES.txt +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya_proxy.egg-info/dependency_links.txt +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya_proxy.egg-info/entry_points.txt +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya_proxy.egg-info/requires.txt +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/nya_proxy.egg-info/top_level.txt +0 -0
- {nya_proxy-0.3.2 → nya_proxy-0.3.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nya-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities.
|
|
5
5
|
Author-email: "Nya Foundation Team (k3scat)" <k3scat@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.3"
|
|
@@ -78,9 +78,7 @@ class NyaProxyCore:
|
|
|
78
78
|
# Validate and prepare request
|
|
79
79
|
self.handler.prepare_request(request)
|
|
80
80
|
if not request.api_name:
|
|
81
|
-
return self._error_response(
|
|
82
|
-
request, "NyaProxy: Unknown API endpoint", 404
|
|
83
|
-
)
|
|
81
|
+
return self._error_response("NyaProxy: Unknown API endpoint", 404)
|
|
84
82
|
|
|
85
83
|
# If rate limit does not apply, get a random key and process immediately
|
|
86
84
|
if not request._rate_limited:
|
|
@@ -74,6 +74,10 @@ class StreamingHandler:
|
|
|
74
74
|
Processed headers for streaming
|
|
75
75
|
"""
|
|
76
76
|
|
|
77
|
+
for header in ["content-encoding", "content-length", "accept-encoding"]:
|
|
78
|
+
if header in headers:
|
|
79
|
+
del headers[header]
|
|
80
|
+
|
|
77
81
|
# Set SSE-specific headers according to standards
|
|
78
82
|
headers["cache-control"] = "no-cache, no-transform"
|
|
79
83
|
headers["connection"] = "keep-alive"
|
|
@@ -128,8 +128,7 @@ class HeaderUtils:
|
|
|
128
128
|
final_headers[header_name] = header_value
|
|
129
129
|
|
|
130
130
|
# patch accept-encoding header to avoid issues with httpx
|
|
131
|
-
|
|
132
|
-
final_headers[header_name] = "identity"
|
|
131
|
+
final_headers["accept-encoding"] = "identity"
|
|
133
132
|
|
|
134
133
|
return final_headers
|
|
135
134
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nya-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities.
|
|
5
5
|
Author-email: "Nya Foundation Team (k3scat)" <k3scat@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nya-proxy"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
description = "A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
nya_proxy-0.3.2/nya/_version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.2"
|
|
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
|
|
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
|
|
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
|