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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wormhole-proxy
3
- Version: 3.3.3
3
+ Version: 3.3.4
4
4
  Summary: Asynchronous I/O HTTP and HTTPS Proxy on Python >= 3.11
5
5
  License: MIT
6
6
  Keywords: wormhole,asynchronous,web,proxy
@@ -1,7 +1,7 @@
1
1
  # Main project metadata (PEP 621 standard)
2
2
  [project]
3
3
  name = "wormhole-proxy"
4
- version = "3.3.3"
4
+ version = "3.3.4"
5
5
  description = "Asynchronous I/O HTTP and HTTPS Proxy on Python >= 3.11"
6
6
  readme = "README.md"
7
7
  authors = [
@@ -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
- for sig in (signal.SIGINT, signal.SIGTERM):
92
- loop.add_signal_handler(sig, lambda: shutdown_event.set())
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