[split-upload 4/6] f2fd4fa backup via proxy

This commit is contained in:
Simon
2026-08-11 14:17:15 +08:00
parent 8ef4be0fa0
commit 90ff78563a
74 changed files with 247663 additions and 65 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""测试内部网络 Dify 服务"""
import httpx
import asyncio
async def test_internal():
async with httpx.AsyncClient(timeout=10) as client:
# 测试 RAGFlow (有 Dify API)
print("=== RAGFlow 8080 (Dify API) ===")
try:
r = await client.post(
"http://10.80.0.85:8080/v1/chat-messages",
json={"query": "hello", "user": "test"},
headers={"Content-Type": "application/json"}
)
print(f"Status: {r.status_code}")
print(f"Response: {r.text[:200]}")
except Exception as e:
print(f"Error: {e}")
print()
# 测试内部 Dify 服务 (尝试常见内网地址)
print("=== Try Internal Dify Services ===")
candidates = [
"http://10.80.0.85:8081",
"http://10.80.0.86:8080",
"http://dify:8080",
"http://dify:80",
]
for url in candidates:
try:
r = await client.get(url)
print(f"{url}: {r.status_code}")
except Exception as e:
print(f"{url}: FAIL - {type(e).__name__}")
if __name__ == "__main__":
asyncio.run(test_internal())