Skip to content

Commit 22e46d3

Browse files
author
maebahesioru
committed
fix: change Camoufox default port to 40222 to avoid Windows reserved range
1 parent 839897b commit 22e46d3

8 files changed

Lines changed: 10 additions & 10 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PORT=2048
1010

1111
# GUI 启动器默认端口配置
1212
DEFAULT_FASTAPI_PORT=2048
13-
DEFAULT_CAMOUFOX_PORT=19222
13+
DEFAULT_CAMOUFOX_PORT=40222
1414

1515
# 流式代理服务配置
1616
STREAM_PORT=3120
@@ -64,7 +64,7 @@ AUTO_CONFIRM_LOGIN=true
6464
# =============================================================================
6565

6666
# Camoufox WebSocket 端点
67-
# CAMOUFOX_WS_ENDPOINT=ws://127.0.0.1:19222
67+
# CAMOUFOX_WS_ENDPOINT=ws://127.0.0.1:40222
6868

6969
# 启动模式 (normal, headless, virtual_display, direct_debug_no_browser)
7070
LAUNCH_MODE=normal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ cp .env.example .env
350350
### 端口配置
351351

352352
- **FastAPI 服务**: 默认端口 `2048`
353-
- **Camoufox 调试**: 默认端口 `19222`
353+
- **Camoufox 调试**: 默认端口 `40222`
354354
- **流式代理**: 默认端口 `3120`
355355

356356
## 🔧 高级功能

README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ cp .env.example .env
344344
### Port Configuration
345345

346346
- **FastAPI Service**: Default port `2048`
347-
- **Camoufox Debug**: Default port `19222`
347+
- **Camoufox Debug**: Default port `40222`
348348
- **Streaming Proxy**: Default port `3120`
349349

350350
## 🔧 Advanced Features

docs/multi-worker-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Worker 配置保存在 `data/workers.json`:
6969
```json
7070
{
7171
"workers": [
72-
{"id": "w1", "profile": "account1.json", "port": 3001, "camoufox_port": 19223},
72+
{"id": "w1", "profile": "account1.json", "port": 3001, "camoufox_port": 40223},
7373
{"id": "w2", "profile": "account2.json", "port": 3002, "camoufox_port": 9224}
7474
],
7575
"settings": {"recovery_hours": 6}

src/launch_camoufox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
PYTHON_EXECUTABLE = sys.executable
3535
ENDPOINT_CAPTURE_TIMEOUT = int(os.environ.get('ENDPOINT_CAPTURE_TIMEOUT', '90'))
3636
DEFAULT_SERVER_PORT = int(os.environ.get('DEFAULT_FASTAPI_PORT', '2048'))
37-
DEFAULT_CAMOUFOX_PORT = int(os.environ.get('DEFAULT_CAMOUFOX_PORT', '19222'))
37+
DEFAULT_CAMOUFOX_PORT = int(os.environ.get('DEFAULT_CAMOUFOX_PORT', '40222'))
3838
DEFAULT_STREAM_PORT = int(os.environ.get('STREAM_PORT', '3120'))
3939
DEFAULT_HELPER_ENDPOINT = os.environ.get('GUI_DEFAULT_HELPER_ENDPOINT', '')
4040
DEFAULT_AUTH_SAVE_TIMEOUT = int(os.environ.get('AUTH_SAVE_TIMEOUT', '30'))

src/manager/routes/system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async def check_all_ports():
1616
config = manager.load_config()
1717
ports_to_check = [
1818
{"label": "FastAPI 服务", "port": config.get("fastapi_port", 2048)},
19-
{"label": "Camoufox 调试", "port": config.get("camoufox_debug_port", 19222)},
19+
{"label": "Camoufox 调试", "port": config.get("camoufox_debug_port", 40222)},
2020
]
2121

2222
if config.get("stream_port_enabled"):

src/manager/routes/workers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def add_worker(profile: str = Body(..., embed=True)):
3434
existing_ports = [worker.port for worker in pool.workers.values()]
3535
existing_camoufox_ports = [worker.camoufox_port for worker in pool.workers.values()]
3636
port = max(existing_ports, default=3000) + 1
37-
camoufox_port = max(existing_camoufox_ports, default=19221) + 1
37+
camoufox_port = max(existing_camoufox_ports, default=40221) + 1
3838

3939
profile_path = os.path.join(SAVED_AUTH_DIR, profile)
4040
if not os.path.exists(profile_path):

src/manager/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def load_config(self) -> Dict[str, Any]:
6666
pass
6767
return {
6868
"fastapi_port": 2048,
69-
"camoufox_debug_port": 19222,
69+
"camoufox_debug_port": 40222,
7070
"stream_port": 3120,
7171
"stream_port_enabled": True,
7272
"proxy_enabled": False,
@@ -362,7 +362,7 @@ def _start_single_mode(
362362
"--server-port",
363363
str(config.get("fastapi_port", 2048)),
364364
"--camoufox-debug-port",
365-
str(config.get("camoufox_debug_port", 19222)),
365+
str(config.get("camoufox_debug_port", 40222)),
366366
]
367367

368368
if config.get("proxy_enabled"):

0 commit comments

Comments
 (0)