多平台账号批量注册系统,支持 OpenAI / Grok / Kiro / Gemini 平台的全自动注册。 Features: - 用户名/密码注册登录(首个用户自动管理员) - JWT 认证 + bcrypt 密码加密 - 积分系统与多用户管理 - HuggingFace Space 弹性 Worker 节点管理 - Cloudflare Worker 负载均衡 - 实时日志推送(SSE/WebSocket) - 管理后台(用户管理、系统设置、代理池、卡池) Tech Stack: Go 1.25 / Gin / GORM / PostgreSQL / Vue 3 / Vite / TailwindCSS
23 lines
511 B
Python
23 lines
511 B
Python
#!/usr/bin/env python3
|
|
import json, os
|
|
|
|
path = os.path.expanduser('~/.docker/config.json')
|
|
cfg = {}
|
|
if os.path.exists(path):
|
|
with open(path) as f:
|
|
cfg = json.load(f)
|
|
|
|
cfg['proxies'] = {
|
|
'default': {
|
|
'httpProxy': 'http://host.docker.internal:7890',
|
|
'httpsProxy': 'http://host.docker.internal:7890',
|
|
'noProxy': 'localhost,127.0.0.1'
|
|
}
|
|
}
|
|
|
|
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
with open(path, 'w') as f:
|
|
json.dump(cfg, f, indent=2)
|
|
|
|
print('done:', path)
|