Skip to content

Commit

Permalink
合并cf5s
Browse files Browse the repository at this point in the history
  • Loading branch information
dairoot committed Nov 28, 2024
1 parent df5a408 commit 00ed2e2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
4 changes: 3 additions & 1 deletion backend/app/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ def update_access_token():
if update_status is False:
line.refresh_token = None
line.save()
logger.info(f"refresh_token 已经过期: {line.chatgpt_username}, rtoken: {line.refresh_token}")

elif line.session_token:
update_status = _update_token(line.chatgpt_username, line.session_token)
if update_status is False:
line.session_token = None
line.save()
logger.info(f"session_token 已经过期: {line.chatgpt_username}, stoken: {line.session_token}")



Expand All @@ -61,7 +63,7 @@ def check_access_token():
line.auth_status = False
line.updated_time = int(time.time())
line.save()
logger.warning(f"access_token已经过期: {line.chatgpt_username}")
logger.warning(f"access_token 已经过期: {line.chatgpt_username}")
return
else:
logger.warning(f"access_token 有效: {line.chatgpt_username}")
Expand Down
9 changes: 0 additions & 9 deletions docker-compose-cf5s.yml

This file was deleted.

9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,14 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
command: --cleanup --interval 10800 web gateway

cf5s:
image: dairoot/cf5s:latest
restart: always

env_file:
- .env
environment:
- CHATGPT_GATEWAY_URL=http://gateway:8787

volumes:
chatgpt_mirror_db:
10 changes: 3 additions & 7 deletions docs/faq-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ chatgpt.com
正在验证您是否是真人。这可能需要几秒钟时间。
```

### 以下四个方案,多试试,总有一个方案适合你
### 以下三个方案,多试试,总有一个方案适合你

### 方案一. 更换服务器 IP 解决(简单方便)
[腾讯云](https://curl.qcloud.com/0JAXkoF1) 选择欧美区域
Expand Down Expand Up @@ -35,7 +35,8 @@ PROXY_URL_POOL=socks5://warp:1080
查看代理配置是否有效

```bash
curl http://127.0.0.1:50002/api/check-proxy?admin_password=环境变量中的ADMIN_PASSWORD
浏览器访问
http://你的域名/api/check-proxy?admin_password=环境变量中的ADMIN_PASSWORD

```

Expand All @@ -54,11 +55,6 @@ PROXY_URL_POOL=http://username@password@ip:port,socks5://username@password@ip:po
```
查看代理配置是否有效(同warp验证流程)

### 方案四. 脚本过盾
```bash
docker compose -f docker-compose-cf5s.yml up
```


---

Expand Down

0 comments on commit 00ed2e2

Please sign in to comment.