@@ -21,6 +21,7 @@ from .dns import ResolverOptions
2121from .http1 import Http1Options
2222from .http2 import Http2Options
2323from .redirect import History
24+ from .proxy import *
2425from .cookie import *
2526from .header import *
2627from .emulation import *
@@ -159,77 +160,6 @@ class Part:
159160 """
160161 ...
161162
162- class ProxyParams (TypedDict ):
163- username : NotRequired [str ]
164- r"""Username for proxy authentication."""
165-
166- password : NotRequired [str ]
167- r"""Password for proxy authentication."""
168-
169- custom_http_auth : NotRequired [str ]
170- r"""Custom HTTP proxy authentication header value."""
171-
172- custom_http_headers : NotRequired [Dict [str , str ] | HeaderMap ]
173- r"""Custom HTTP proxy headers."""
174-
175- exclusion : NotRequired [str ]
176- r"""List of domains to exclude from proxying."""
177-
178- @final
179- class Proxy :
180- r"""
181- A proxy server for a request.
182- Supports HTTP, HTTPS, SOCKS4, SOCKS4a, SOCKS5, and SOCKS5h protocols.
183- """
184-
185- @staticmethod
186- def http (url : str , ** kwargs : Unpack [ProxyParams ]) -> "Proxy" :
187- r"""
188- Creates a new HTTP proxy.
189-
190- This method sets up a proxy server for HTTP requests.
191-
192- # Examples
193-
194- ```python
195- import rnet
196-
197- proxy = rnet.Proxy.http("http://proxy.example.com")
198- ```
199- """
200-
201- @staticmethod
202- def https (url : str , ** kwargs : Unpack [ProxyParams ]) -> "Proxy" :
203- r"""
204- Creates a new HTTPS proxy.
205-
206- This method sets up a proxy server for HTTPS requests.
207-
208- # Examples
209-
210- ```python
211- import rnet
212-
213- proxy = rnet.Proxy.https("https://proxy.example.com")
214- ```
215- """
216-
217- @staticmethod
218- def all (url : str , ** kwargs : Unpack [ProxyParams ]) -> "Proxy" :
219- r"""
220- Creates a new proxy for all protocols.
221-
222- This method sets up a proxy server for all types of requests (HTTP, HTTPS, etc.).
223-
224- # Examples
225-
226- ```python
227- import rnet
228-
229- proxy = rnet.Proxy.all("https://proxy.example.com")
230- ```
231- """
232-
233163class Message :
234164 r"""
235165 A WebSocket message.
@@ -564,7 +494,7 @@ class WebSocket:
564494 def __aexit__ (self , _exc_type : Any , _exc_value : Any , _traceback : Any ) -> Any : ...
565495 def __str__ (self ) -> str : ...
566496
567- class ClientParams (TypedDict ):
497+ class ClientConfig (TypedDict ):
568498 emulation : NotRequired [Emulation | EmulationOption ]
569499 """Emulation config."""
570500
@@ -1078,7 +1008,7 @@ class Client:
10781008
10791009 def __init__ (
10801010 self ,
1081- ** kwargs : Unpack [ClientParams ],
1011+ ** kwargs : Unpack [ClientConfig ],
10821012 ) -> None :
10831013 r"""
10841014 Creates a new Client instance.
0 commit comments