-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move functionality into submodules (#174)
* move functionality into submodules * fix stubtests * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
aa00aef
commit 4a45bfa
Showing
12 changed files
with
197 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
|
||
- Move functionality into submodules. | ||
|
||
## 0.7.2 | ||
|
||
- Make `active_executables` raise for invalid paths on Windows. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import sys | ||
import types | ||
|
||
from .mitmproxy_rs import * | ||
|
||
__doc__ = mitmproxy_rs.__doc__ | ||
if hasattr(mitmproxy_rs, "__all__"): | ||
__all__ = mitmproxy_rs.__all__ | ||
|
||
# Hacky workaround for https://github.com/PyO3/pyo3/issues/759 | ||
for k, v in vars(mitmproxy_rs).items(): | ||
if isinstance(v, types.ModuleType): | ||
sys.modules[f"mitmproxy_rs.{k}"] = v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from __future__ import annotations | ||
|
||
def add_cert(pem: str) -> None: ... | ||
def remove_cert() -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from __future__ import annotations | ||
from typing import final | ||
|
||
@final | ||
class DnsResolver: | ||
def __init__( | ||
self, *, name_servers: list[str] | None = None, use_hosts_file: bool = True | ||
) -> None: ... | ||
async def lookup_ip(self, host: str) -> list[str]: ... | ||
async def lookup_ipv4(self, host: str) -> list[str]: ... | ||
async def lookup_ipv6(self, host: str) -> list[str]: ... | ||
|
||
def get_system_dns_servers() -> list[str]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from collections.abc import Awaitable, Callable | ||
from typing import final | ||
from . import Stream | ||
|
||
async def start_local_redirector( | ||
handle_tcp_stream: Callable[[Stream], Awaitable[None]], | ||
handle_udp_stream: Callable[[Stream], Awaitable[None]], | ||
) -> LocalRedirector: ... | ||
@final | ||
class LocalRedirector: | ||
@staticmethod | ||
def describe_spec(spec: str) -> None: ... | ||
def set_intercept(self, spec: str) -> None: ... | ||
def close(self) -> None: ... | ||
async def wait_closed(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
from pathlib import Path | ||
from typing import final | ||
|
||
def active_executables() -> list[Process]: ... | ||
def executable_icon(path: Path | str) -> bytes: ... | ||
@final | ||
class Process: | ||
@property | ||
def executable(self) -> str: ... | ||
@property | ||
def display_name(self) -> str: ... | ||
@property | ||
def is_visible(self) -> bool: ... | ||
@property | ||
def is_system(self) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from __future__ import annotations | ||
|
||
from collections.abc import Awaitable, Callable | ||
from typing import final | ||
from . import Stream | ||
|
||
async def start_udp_server( | ||
host: str, | ||
port: int, | ||
handle_udp_stream: Callable[[Stream], Awaitable[None]], | ||
) -> UdpServer: ... | ||
@final | ||
class UdpServer: | ||
def getsockname(self) -> tuple[str, int]: ... | ||
def close(self) -> None: ... | ||
async def wait_closed(self) -> None: ... | ||
def __repr__(self) -> str: ... | ||
|
||
async def open_udp_connection( | ||
host: str, | ||
port: int, | ||
*, | ||
local_addr: tuple[str, int] | None = None, | ||
) -> Stream: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from __future__ import annotations | ||
|
||
from collections.abc import Awaitable, Callable | ||
from typing import final | ||
from . import Stream | ||
|
||
def genkey() -> str: ... | ||
def pubkey(private_key: str) -> str: ... | ||
async def start_wireguard_server( | ||
host: str, | ||
port: int, | ||
private_key: str, | ||
peer_public_keys: list[str], | ||
handle_tcp_stream: Callable[[Stream], Awaitable[None]], | ||
handle_udp_stream: Callable[[Stream], Awaitable[None]], | ||
) -> WireGuardServer: ... | ||
@final | ||
class WireGuardServer: | ||
def getsockname(self) -> tuple[str, int]: ... | ||
def close(self) -> None: ... | ||
async def wait_closed(self) -> None: ... | ||
def __repr__(self) -> str: ... |
Oops, something went wrong.