mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-17 21:24:37 +03:00
fix: Add exit node bypass suffixes for optimized routing in DomainFronter
This commit is contained in:
@@ -110,6 +110,7 @@ class DomainFronter:
|
|||||||
"sec-fetch-site",
|
"sec-fetch-site",
|
||||||
)
|
)
|
||||||
_SAFE_RETRY_METHODS = {"GET", "HEAD", "OPTIONS"}
|
_SAFE_RETRY_METHODS = {"GET", "HEAD", "OPTIONS"}
|
||||||
|
_EXIT_NODE_BYPASS_SUFFIXES = ("googlevideo.com",)
|
||||||
_APPS_SCRIPT_DEFAULT_LANG = "en"
|
_APPS_SCRIPT_DEFAULT_LANG = "en"
|
||||||
|
|
||||||
def __init__(self, config: dict):
|
def __init__(self, config: dict):
|
||||||
@@ -1389,12 +1390,17 @@ class DomainFronter:
|
|||||||
"""Return True if this URL should be routed through the exit node."""
|
"""Return True if this URL should be routed through the exit node."""
|
||||||
if not self._exit_node_enabled or not self._exit_node_url:
|
if not self._exit_node_enabled or not self._exit_node_url:
|
||||||
return False
|
return False
|
||||||
if self._exit_node_mode == "full":
|
|
||||||
return True
|
|
||||||
# selective: check if destination hostname matches configured list
|
|
||||||
host = self._host_key(url)
|
host = self._host_key(url)
|
||||||
if not host:
|
if not host:
|
||||||
return False
|
return False
|
||||||
|
# googlevideo flows are large/CPU-heavy; keep them on direct Google relay
|
||||||
|
# and never chain through Cloudflare/Deno/VPS exit nodes.
|
||||||
|
if any(host == suffix or host.endswith("." + suffix)
|
||||||
|
for suffix in self._EXIT_NODE_BYPASS_SUFFIXES):
|
||||||
|
return False
|
||||||
|
if self._exit_node_mode == "full":
|
||||||
|
return True
|
||||||
|
# selective: check if destination hostname matches configured list
|
||||||
for pattern in self._exit_node_hosts:
|
for pattern in self._exit_node_hosts:
|
||||||
if host == pattern or host.endswith("." + pattern):
|
if host == pattern or host.endswith("." + pattern):
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -250,8 +250,7 @@ def _build_502_html(message: str) -> str:
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}}
|
}}
|
||||||
.resource-title {{
|
.resource-title {{
|
||||||
font-size: 0.72em;
|
font-size: 0.82em;
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
color: #93c5fd;
|
color: #93c5fd;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
|
|||||||
Reference in New Issue
Block a user