wormhole-proxy 3.3.3__tar.gz → 3.3.4__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.
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/PKG-INFO +1 -1
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/pyproject.toml +1 -1
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/proxy.py +10 -2
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/safeguards.py +2 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/LICENSE +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/README.md +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/__init__.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/__main__.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/ad_blocker.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/auth_manager.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/authentication.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/handler.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/logger.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/resolver.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/server.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/tools.py +0 -0
- {wormhole_proxy-3.3.3 → wormhole_proxy-3.3.4}/wormhole/version.py +0 -0
|
@@ -86,11 +86,18 @@ async def main_async(args) -> None:
|
|
|
86
86
|
|
|
87
87
|
shutdown_event = asyncio.Event()
|
|
88
88
|
|
|
89
|
+
def _shutdown_handler():
|
|
90
|
+
"""Handles shutdown signals to gracefully stop the server."""
|
|
91
|
+
shutdown_event.set()
|
|
92
|
+
|
|
89
93
|
# Set up signal handlers for graceful shutdown.
|
|
90
94
|
loop = asyncio.get_running_loop()
|
|
91
|
-
|
|
92
|
-
loop.add_signal_handler(sig,
|
|
95
|
+
[
|
|
96
|
+
loop.add_signal_handler(sig, _shutdown_handler)
|
|
97
|
+
for sig in (signal.SIGINT, signal.SIGTERM)
|
|
98
|
+
]
|
|
93
99
|
|
|
100
|
+
# Start the Wormhole server with the provided arguments.
|
|
94
101
|
server = await start_wormhole_server(
|
|
95
102
|
args.host,
|
|
96
103
|
args.port,
|
|
@@ -99,6 +106,7 @@ async def main_async(args) -> None:
|
|
|
99
106
|
args.allow_private,
|
|
100
107
|
)
|
|
101
108
|
|
|
109
|
+
# Log the server startup completion, 000000 means internal server ID.
|
|
102
110
|
logger.info(
|
|
103
111
|
flm(
|
|
104
112
|
"Server startup complete. Waiting for connections...",
|
|
@@ -7,6 +7,8 @@ import sys
|
|
|
7
7
|
|
|
8
8
|
# A hardcoded default allowlist for most known safe domains.
|
|
9
9
|
DEFAULT_ALLOWLIST: set[str] = {
|
|
10
|
+
"bit.ly", # Bitly for URL shortening
|
|
11
|
+
"azurewebsites.net", # Azure Web App
|
|
10
12
|
"s3.amazonaws.com", # Amazon S3 for static assets"
|
|
11
13
|
"fonts.googleapis.com", # Google Fonts
|
|
12
14
|
"safebrowsing.googleapis.com", # Google Safe Browsing for security
|
|
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
|