Files
gpt4free/venv/lib/python3.9/site-packages/pypasser/structs.py

27 lines
559 B
Python

from dataclasses import dataclass
from pypasser.utils import proxy_dict
import enum
class Type(enum.Enum):
HTTPs = 'https'
SOCKS4 = 'socks4'
SOCKS5 = 'socks5'
@dataclass
class Proxy:
"""
Proxy Structure
---------------
Object that holds all data about proxy.
"""
type: Type = Type
host: str = ""
port: str = ""
username: str = ""
password: str = ""
def dict(self):
return proxy_dict(self.type, self.host, self.port, self.username, self.password)