File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ Go_Proxy_BingAI_SOCKS_URL=192.168.0.88:1070
110
110
# Socks 账号、密码 可选
111
111
Go_Proxy_BingAI_SOCKS_USER=xxx
112
112
Go_Proxy_BingAI_SOCKS_PWD=xxx
113
+ # KievRPSSecAuth Cookie的值
114
+ USER_KievRPSSecAuth=xxx
113
115
# 默认用户 Cookie 设置,可选,不推荐使用,固定前缀 Go_Proxy_BingAI_USER_TOKEN 可设置多个,未登录用户将随机使用,多人共用将很快触发图形验证,并很快达到该账号的24小时限制
114
116
Go_Proxy_BingAI_USER_TOKEN_1=xxx
115
117
Go_Proxy_BingAI_USER_TOKEN_2=xxx
Original file line number Diff line number Diff line change 15
15
// user token
16
16
USER_TOKEN_ENV_NAME_PREFIX = "Go_Proxy_BingAI_USER_TOKEN"
17
17
USER_TOKEN_LIST []string
18
+ // KievRPSSecAuth Cookie
19
+ USER_KievRPSSecAuth string
18
20
// 访问权限密钥,可选
19
21
AUTH_KEY string
20
22
AUTH_KEY_COOKIE_NAME = "BingAI_Auth_Key"
@@ -34,6 +36,8 @@ func initEnv() {
34
36
SOCKS_PWD = os .Getenv ("Go_Proxy_BingAI_SOCKS_PWD" )
35
37
// auth
36
38
AUTH_KEY = os .Getenv ("Go_Proxy_BingAI_AUTH_KEY" )
39
+ // KievRPSSecAuth Cookie
40
+ USER_KievRPSSecAuth = os .Getenv ("USER_KievRPSSecAuth" )
37
41
}
38
42
39
43
func initUserToken () {
Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy {
91
91
}
92
92
req .Header .Set ("X-Forwarded-For" , randIP )
93
93
94
+ if USER_KievRPSSecAuth != "" {
95
+ // 添加 KievRPSSecAuth Cookie
96
+ req .AddCookie (& http.Cookie {
97
+ Name : "KievRPSSecAuth" ,
98
+ Value : USER_KievRPSSecAuth ,
99
+ })
100
+ }
101
+
94
102
// 未登录用户
95
103
ckUserToken , _ := req .Cookie (USER_TOKEN_COOKIE_NAME )
96
104
if ckUserToken == nil || ckUserToken .Value == "" {
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ services:
13
13
- $PWD/go-proxy-bingai:/app/go-proxy-bingai
14
14
ports :
15
15
- 8080:8080
16
- # environment:
16
+ environment :
17
+ - USER_KievRPSSecAuth=xxx
17
18
# - Go_Proxy_BingAI_SOCKS_URL=192.168.0.88:1070
18
19
# - Go_Proxy_BingAI_SOCKS_USER=xxx
19
20
# - Go_Proxy_BingAI_SOCKS_PWD=xxx
You can’t perform that action at this time.
0 commit comments