-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ⚡ 优化随机IP、未登录回复次数显示、小屏历史记录显示、授权弹窗、pwa等
- Loading branch information
1 parent
681b0ca
commit b6266de
Showing
43 changed files
with
1,784 additions
and
7,650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta content="text/html; charset=utf-8" http-equiv="content-type" /> | ||
<link rel="icon" type="image/svg+xml" href="https://bing.vcanbb.top/web/img/logo.svg" /> | ||
<meta content="yes" name="apple-mobile-web-app-capable" /> | ||
<link rel="apple-touch-icon" href="https://bing.vcanbb.top/web/favicon.ico"> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" /> | ||
<meta name="referrer" content="origin-when-cross-origin" /> | ||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> | ||
<title>BingAI - 聊天</title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MM5J5X8QQC"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag () { dataLayer.push(arguments); } | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'G-MM5J5X8QQC'); | ||
</script> | ||
<!-- 百度统计 --> | ||
<script> | ||
var _hmt = _hmt || []; | ||
(function () { | ||
var hm = document.createElement("script"); | ||
hm.src = "https://hm.baidu.com/hm.js?299c614daa53fbcede70f2d22df0a31b"; | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(hm, s); | ||
})(); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div class="relative flex min-h-screen flex-col justify-center overflow-hidden bg-gray-50 py-6 px-4 sm:py-12"> | ||
<div class="absolute inset-0 bg-slate-100 bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"> | ||
</div> | ||
<div | ||
class="relative bg-white px-6 pb-8 pt-10 shadow-xl ring-1 ring-gray-900/5 sm:mx-auto sm:max-w-lg sm:rounded-lg sm:px-10 lg:max-w-3xl"> | ||
<div class="mx-auto max-w-3xl"> | ||
<div class="flex justify-center"> | ||
<img src="https://bing.vcanbb.top/web/img/logo.svg" class="h-24" alt="BingAI" /> | ||
</div> | ||
<div class="mt-6 text-center text-3xl text-gray-600">聊天服务器已部署完成</div> | ||
<div class="divide-y divide-gray-300/50"> | ||
<div class="space-y-6 py-8 text-base leading-7 text-gray-600"> | ||
<ul class="space-y-4"> | ||
<li class="flex items-center"> | ||
<svg class="h-6 w-6 flex-none fill-sky-100 stroke-sky-500 stroke-2" stroke-linecap="round" | ||
stroke-linejoin="round"> | ||
<circle cx="12" cy="12" r="11" /> | ||
<path d="m8 13 2.165 2.165a1 1 0 0 0 1.521-.126L16 9" fill="none" /> | ||
</svg> | ||
<p class="ml-4"> | ||
在基于 go-proxy-bingai 搭建的站点中 | ||
<code class="text-sm font-bold text-sky-500">设置 => 服务选择</code> | ||
添加此站点即可 | ||
</p> | ||
</li> | ||
<li class="flex items-center"> | ||
<svg class="h-6 w-6 flex-none fill-sky-100 stroke-sky-500 stroke-2" stroke-linecap="round" | ||
stroke-linejoin="round"> | ||
<circle cx="12" cy="12" r="11" /> | ||
<path d="m8 13 2.165 2.165a1 1 0 0 0 1.521-.126L16 9" fill="none" /> | ||
</svg> | ||
<p class="ml-4"> | ||
如有疑问,请参考 | ||
<a href="https://github.com/adams549659584/go-proxy-bingai/issues/81" target="_blank" | ||
class="text-sky-500 hover:text-sky-600">issues #81</a> | ||
</p> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="pt-8 text-base font-semibold leading-7"> | ||
<p class="text-gray-600 overflow-hidden">开源地址:<a href="https://github.com/adams549659584/go-proxy-bingai" | ||
target="_blank" | ||
class="text-sky-500 hover:text-sky-600">https://github.com/adams549659584/go-proxy-bingai</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package common | ||
|
||
import ( | ||
"os" | ||
"strings" | ||
) | ||
|
||
var ( | ||
// is debug | ||
IS_DEBUG_MODE bool | ||
// socks | ||
SOCKS_URL string | ||
SOCKS_USER string | ||
SOCKS_PWD string | ||
// user token | ||
USER_TOKEN_ENV_NAME_PREFIX = "Go_Proxy_BingAI_USER_TOKEN" | ||
USER_TOKEN_LIST []string | ||
// 访问权限密钥,可选 | ||
AUTH_KEY string | ||
AUTH_KEY_COOKIE_NAME = "BingAI_Auth_Key" | ||
) | ||
|
||
func init() { | ||
initEnv() | ||
initUserToken() | ||
} | ||
|
||
func initEnv() { | ||
// is debug | ||
IS_DEBUG_MODE = os.Getenv("Go_Proxy_BingAI_Debug") != "" | ||
// socks | ||
SOCKS_URL = os.Getenv("Go_Proxy_BingAI_SOCKS_URL") | ||
SOCKS_USER = os.Getenv("Go_Proxy_BingAI_SOCKS_USER") | ||
SOCKS_PWD = os.Getenv("Go_Proxy_BingAI_SOCKS_PWD") | ||
// auth | ||
AUTH_KEY = os.Getenv("Go_Proxy_BingAI_AUTH_KEY") | ||
} | ||
|
||
func initUserToken() { | ||
for _, env := range os.Environ() { | ||
if strings.HasPrefix(env, USER_TOKEN_ENV_NAME_PREFIX) { | ||
parts := strings.SplitN(env, "=", 2) | ||
USER_TOKEN_LIST = append(USER_TOKEN_LIST, parts[1]) | ||
} | ||
} | ||
} |
Oops, something went wrong.
b6266de
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
go-proxy-bingai – ./
go-proxy-bingai-adams549659584.vercel.app
go-proxy-bingai-three-rho.vercel.app
bing-vercel.vcanbb.top
go-proxy-bingai-git-master-adams549659584.vercel.app