Revert proxy auth change — URL-embedded credentials are correct
Header-based auth made no difference; the real issue is the hotel network firewall blocking HTTPS CONNECT tunnels on port 823. Reverted to URL-embedded credentials (original approach). Fix requires DataImpulse to enable port 443. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
940ffbbe39
commit
28c4dd9f54
2 changed files with 18 additions and 22 deletions
|
|
@ -277,13 +277,14 @@ async def test_proxy_config(
|
|||
'password': (raw.get('booking_proxy_password') or '').strip(),
|
||||
'country': (raw.get('booking_proxy_country') or 'gb').strip(),
|
||||
}
|
||||
if not proxy_util.is_enabled(cfg):
|
||||
raise HTTPException(status_code=400, detail="Proxy host and username must be saved first.")
|
||||
if not (proxy_util.is_enabled(cfg) and cfg['password']):
|
||||
raise HTTPException(status_code=400, detail="Proxy host, username and password must be saved first.")
|
||||
|
||||
proxy_url = proxy_util.httpx_proxy_url(cfg, proxy_util.new_session_id())
|
||||
|
||||
import httpx
|
||||
proxy = proxy_util.httpx_proxy(cfg, proxy_util.new_session_id())
|
||||
try:
|
||||
async with httpx.AsyncClient(proxy=proxy, timeout=40.0) as client:
|
||||
async with httpx.AsyncClient(proxy=proxy_url, timeout=40.0) as client:
|
||||
resp = await client.get("https://ipinfo.io/json")
|
||||
resp.raise_for_status()
|
||||
data = resp.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue