Total Pageviews

Tuesday, 30 December 2025

chatgpt-web

 用 Express 和 Vue3 搭建的 ChatGPT 演示网页.


Disclaimer: This project is only published on GitHub, based on the MIT license, free and for open source learning usage. And there will be no any form of account selling, paid service, discussion group, discussion group and other behaviors. Beware of being deceived.

中文

cover cover2

Introduction

Supports dual models and provides two unofficial ChatGPT API methods

Method Free? Reliability Quality
ChatGPTAPI(gpt-3.5-turbo-0301) No Reliable Relatively stupid
ChatGPTUnofficialProxyAPI(web accessToken) Yes Relatively unreliable Smart

Comparison:

  1. ChatGPTAPI uses gpt-3.5-turbo through OpenAI official API to call ChatGPT
  2. ChatGPTUnofficialProxyAPI uses unofficial proxy server to access ChatGPT's backend API, bypass Cloudflare (dependent on third-party servers, and has rate limits)

Warnings:

  1. You should first use the API method
  2. When using the API, if the network is not working, it is blocked in China, you need to build your own proxy, never use someone else's public proxy, which is dangerous.
  3. When using the accessToken method, the reverse proxy will expose your access token to third parties. This should not have any adverse effects, but please consider the risks before using this method.
  4. When using accessToken, whether you are a domestic or foreign machine, proxies will be used. The default proxy is pengzhile's https://ai.fakeopen.com/api/conversation. This is not a backdoor or monitoring unless you have the ability to flip over CF verification yourself. Use beforehand acknowledge. Community Proxy (Note: Only these two are recommended, other third-party sources, please identify for yourself)
  5. When publishing the project to public network, you should set the AUTH_SECRET_KEY variable to add your password access, you should also modify the title in index. html to prevent it from being searched by keywords.

Switching methods:

  1. Enter the service/.env.example file, copy the contents to the service/.env file
  2. To use OpenAI API Key, fill in the OPENAI_API_KEY field (get apiKey)
  3. To use Web API, fill in the OPENAI_ACCESS_TOKEN field (get accessToken)
  4. OpenAI API Key takes precedence when both exist

Environment variables:

See all parameter variables here

Roadmap

[✓] Dual models

[✓] Multi-session storage and context logic

[✓] Formatting and beautification of code and other message types

[✓] Access control

[✓] Data import/export

[✓] Save messages as local images

[✓] Multilingual interface

[✓] Interface themes

[✗] More...

Prerequisites

Node

node requires version ^16 || ^18 || ^19 (node >= 14 needs fetch polyfill installation), use nvm to manage multiple local node versions

node -v

PNPM

If you haven't installed pnpm

npm install pnpm -g

Filling in the Key

Get Openai Api Key or accessToken and fill in the local environment variables Go to Introduction

# service/.env file

# OpenAI API Key - https://platform.openai.com/overview
OPENAI_API_KEY=

# change this to an `accessToken` extracted from the ChatGPT site's `https://chat.openai.com/api/auth/session` response
OPENAI_ACCESS_TOKEN=

Install Dependencies

For the convenience of "backend developers" to understand the burden, the front-end "workspace" mode is not adopted, but separate folders are used to store them. If you only need to do secondary development of the front-end page, delete the service folder.

Backend

Enter the folder /service and run the following commands

pnpm install

Frontend

Run the following commands at the root directory

pnpm bootstrap

Run in Test Environment

Backend Service

Enter the folder /service and run the following commands

pnpm start

Frontend Webpage

Run the following commands at the root directory

pnpm dev

Environment Variables

API available:

  • OPENAI_API_KEY and OPENAI_ACCESS_TOKEN choose one
  • OPENAI_API_MODEL Set model, optional, default: gpt-3.5-turbo
  • OPENAI_API_BASE_URL Set interface address, optional, default: https://api.openai.com
  • OPENAI_API_DISABLE_DEBUG Set interface to close debug logs, optional, default: empty does not close

ACCESS_TOKEN available:

  • OPENAI_ACCESS_TOKEN and OPENAI_API_KEY choose one, OPENAI_API_KEY takes precedence when both exist
  • API_REVERSE_PROXY Set reverse proxy, optional, default: https://ai.fakeopen.com/api/conversation, Community (Note: Only these two are recommended, other third party sources, please identify for yourself)

Common:

  • AUTH_SECRET_KEY Access permission key, optional
  • MAX_REQUEST_PER_HOUR Maximum number of requests per hour, optional, unlimited by default
  • TIMEOUT_MS Timeout, unit milliseconds, optional
  • SOCKS_PROXY_HOST and SOCKS_PROXY_PORT take effect together, optional
  • SOCKS_PROXY_PORT and SOCKS_PROXY_HOST take effect together, optional
  • HTTPS_PROXY Support http, https, socks5, optional
  • ALL_PROXY Support http, https, socks5, optional

Packaging

Use Docker

Docker Parameter Examples

docker

Docker build & Run

docker build -t chatgpt-web .

# Foreground running
docker run --name chatgpt-web --rm -it -p 127.0.0.1:3002:3002 --env OPENAI_API_KEY=your_api_key chatgpt-web

# Background running
docker run --name chatgpt-web -d -p 127.0.0.1:3002:3002 --env OPENAI_API_KEY=your_api_key chatgpt-web

# Run address
http://localhost:3002/

Docker compose

Hub address

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web # always use latest, pull the tag image again to update
    ports:
      - 127.0.0.1:3002:3002
    environment:
      # choose one
      OPENAI_API_KEY: sk-xxx
      # choose one
      OPENAI_ACCESS_TOKEN: xxx
      # API interface address, optional, available when OPENAI_API_KEY is set
      OPENAI_API_BASE_URL: xxx
      # API model, optional, available when OPENAI_API_KEY is set, https://platform.openai.com/docs/models
      # gpt-4, gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4-turbo-preview, gpt-4-0125-preview, gpt-4-1106-preview, gpt-4-0314, gpt-4-0613, gpt-4-32k, gpt-4-32k-0314, gpt-4-32k-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo, gpt-3.5-turbo-0301, gpt-3.5-turbo-0613, text-davinci-003, text-davinci-002, code-davinci-002
      OPENAI_API_MODEL: xxx
      # reverse proxy, optional
      API_REVERSE_PROXY: xxx
      # access permission key, optional
      AUTH_SECRET_KEY: xxx
      # maximum number of requests per hour, optional, unlimited by default
      MAX_REQUEST_PER_HOUR: 0
      # timeout, unit milliseconds, optional
      TIMEOUT_MS: 60000
      # Socks proxy, optional, take effect with SOCKS_PROXY_PORT
      SOCKS_PROXY_HOST: xxx
      # Socks proxy port, optional, take effect with SOCKS_PROXY_HOST
      SOCKS_PROXY_PORT: xxx
      # HTTPS proxy, optional, support http,https,socks5
      HTTPS_PROXY: http://xxx:7890
  • OPENAI_API_BASE_URL Optional, available when OPENAI_API_KEY is set
  • OPENAI_API_MODEL Optional, available when OPENAI_API_KEY is set

Prevent Crawlers

nginx

Fill in the following configuration in the nginx configuration file to prevent crawlers. You can refer to the docker-compose/nginx/nginx.conf file to add anti-crawler methods

    # Prevent crawlers
    if ($http_user_agent ~* "360Spider|JikeSpider|Spider|spider|bot|Bot|2345Explorer|curl|wget|webZIP|qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot|NSPlayer|bingbot")
    {
      return 403;
    }

Deploy with Railway

Deploy on Railway

Railway Environment Variables

Environment variable name Required Remarks
PORT Required Default 3002
AUTH_SECRET_KEY Optional Access permission key
MAX_REQUEST_PER_HOUR Optional Maximum number of requests per hour, optional, unlimited by default
TIMEOUT_MS Optional Timeout, unit milliseconds
OPENAI_API_KEY OpenAI API choose one apiKey required for OpenAI API (get apiKey)
OPENAI_ACCESS_TOKEN Web API choose one accessToken required for Web API (get accessToken)
OPENAI_API_BASE_URL Optional, available when OpenAI API API interface address
OPENAI_API_MODEL Optional, available when OpenAI API API model
API_REVERSE_PROXY Optional, available when Web API Web API reverse proxy address Details
SOCKS_PROXY_HOST Optional, take effect with SOCKS_PROXY_PORT Socks proxy
SOCKS_PROXY_PORT Optional, take effect with SOCKS_PROXY_HOST Socks proxy port
SOCKS_PROXY_USERNAME Optional, take effect with SOCKS_PROXY_HOST Socks proxy username
SOCKS_PROXY_PASSWORD Optional, take effect with SOCKS_PROXY_HOST Socks proxy password
HTTPS_PROXY Optional HTTPS proxy, support http,https, socks5
ALL_PROXY Optional All proxies, support http,https, socks5

Note: Modifying environment variables on Railway will re-Deploy

Deploy with Sealos

Environment variables are consistent with Docker environment variables

Package Manually

Backend Service

If you don't need the node interface of this project, you can omit the following operations

Copy the service folder to the server where you have the node service environment.

# Install
pnpm install

# Pack
pnpm build

# Run
pnpm prod

PS: It is also okay to run pnpm start directly on the server without packing

Frontend Webpage

  1. Modify the VITE_GLOB_API_URL field in the .env file at the root directory to your actual backend interface address

  2. Run the following commands at the root directory, then copy the files in the dist folder to the root directory of your website service

[Reference](https://cn.vitejs.dev/guide/static -deploy.html#building-the-app)

pnpm build

FAQ

Q: Why does Git commit always report errors?

A: Because there is a commit message verification, please follow the Commit Guide

Q: Where to change the request interface if only the front-end page is used?

A: The VITE_GLOB_API_URL field in the .env file at the root directory.

Q: All files explode red when saving?

A: vscode please install the recommended plug-ins for the project, or manually install the Eslint plug-in.

Q: No typewriter effect on the front end?

A: One possible reason is that after Nginx reverse proxy, buffer is turned on, then Nginx will try to buffer some data from the backend before sending it to the browser. Please try adding proxy_buffering off; after the reverse proxy parameter, then reload Nginx. Other web server configurations are similar.

from  https://github.com/Chanzhaoyu/chatgpt-web

X-BUILD

 A front-end scaffolding built on Vite + Vue3 + TypeScript. 


一款协助你快速从"零"搭建大型应用的前端脚手架。

简介

X-BUILD 基于 vue3 + typescript,使用 vite 构建项目,支持众多的开箱即用的功能和针对项目进行了不同程度的优化,初始模板打包后体积仅为 150kb / 50kb(gzip)。它的宗旨是快速创建一套纯净却具备强大基础功能的模板,协助开发者自由发挥快速搭建任何类型的项目。

文档

文档地址

如何使用?

CLI

你可以通过全局安装 X-BUILD,它本质上是一款 CLI (command-line interface,中文:命令行界面) ,提供了一系列的选项,为你生成一套适合于你的前端开发模板,这套模板已经提供了许多通用的基础功能,为你的项目打下坚实的基础。

基于 X-BUILD 打造自己的脚手架

通常情况下,每个团队的习惯不同,尽管 X-BUILD 提供了可选项辅助生成个性化模板,但不能满足所有人的需求,所以基于 X-BUILD 打造一套自己的脚手架是一个更好的选择,你可以通过 Fork 本仓库,修改成你的团队的开发习惯。

核心功能

脚手架可以快速帮你创建一份空白模板,提供了许多通用的功能:

应用

  • 基于文件的路由
  • 提供环境变量:开发环境、预生产环境、生产环境
  • 基于 Pinia 实现的全局状态管理,更好的支持 TS
  • 提供一个基于 mitt 的组件联动交互的解决方案
  • 提供实用 Hooks,更多情况下推荐使用 vueuse
  • 基于 axios 异步请求封装
  • 基于环境变量的静态资源组件
  • 自动加载 SVG 的图标组件,雪碧图打包
  • 页面登录访问权限、指令权限
  • 页面缓存(基于 keep-alive 实现)
  • 支持 gzip
  • 支持 PWA

UI

  • 布局系统
  • 可选 LessSass/Scss 预处理器
  • 根据路由与环境变量自动变化标签栏 Title
  • 静态资源加载页面
  • 页面载入进度条

规范

  • ESLint Airbnb 规范
  • Stylelint
  • husky & Commitlint

浏览器支持

本地开发:推荐使用 最新版浏览器,不支持 Chrome 80 以下版本。

生产环境:支持现代浏览器, 不支持

IE Edge Firefox Chrome Safari
not support last 2 versions last 2 versions last 2 versions last 2 versions

from  https://github.com/codexu/x-build

learn-collect

 收集在学习和提高技术过程中遇到的比较有价值的网站、文档、Blog等,方便自己查阅.

Tags

前端技术  图像  文字相关  有趣的网站  工具站  素材站


⬆️ : 点击回到Tags

前端技术

  • 电子书
  • 博客

⬆️ : 点击回到Tags

图像处理

此人不存在(无肖像权人脸)
消除背景图(比PS简单好用,抠头发神器)

⬆️ : 点击回到Tags

文字相关


⬆️ : 点击回到Tags

有意思的网站

假装升级(假装系统升级)
用户体验最糟糕的UI网站(心情不好的时候千万不要打开)

⬆️ : 点击回到Tags

工具站

Smallpdf(免费PDF转换网站,可转Word、PPT等,支持合并分割pdf)
地图生成器(可导入PPT)
Flourish(在线制作可视化数据)
白描网页版(可以提取照片文字)

⬆️ : 点击回到Tags

素材站

PPT 超级市场(完全免费的 PPT 模板下载)
from  https://github.com/mk965/learn-collect

基于nodejs的博客程序VanBlog

 

一款简洁实用优雅的个人博客系统

vanblog.mereith.com

 

VanBlog是一款简洁、实用、优雅的个人博客系统,支持全自动按需申请HTTPS证书、黑暗模式、移动端自适应和评论功能。它内置了流量统计和图床,并集成了评论系统。此外,VanBlog还具有无限的可扩展性,提供完备的后台管理面板,支持黑暗模式、移动端、一键上传剪贴板图片到图床,并带有强大的编辑器。

项目主页: vanblog.mereith.com

Demo(后台账号密码均为 demo): blog-demo.mereith.com

预览图

前台-白色

特性

  • 快到极致的响应速度,Lighthouse 接近满分。
  • 独一份的按需全自动 HTTPS,甚至不用填域名。
  • 包括完整的前后台和服务端。
  • 前台和后台都为响应式设计,完美适配移动端和多尺寸设备。
  • 前台和后台都支持黑暗模式,并可自动切换。
  • 前台为静态网页(SSG),并支持秒级的增量渲染,每次改动无需重新构建全部页面。
  • SEO 和无障碍友好,支持自定义文章路径。
  • 静态网页,CDN 友好。
  • 版本号展示和更新提醒。
  • 基于 React,项目工程化,二次开发友好。
  • 内置强大的分析功能,可统计访客等数据。并配有精美看板。
  • 内嵌评论系统。
  • 强大的 Markdown 编辑器,支持图表和数学公式,一键插入 more 标记,一键剪切板及本地图片上传,支持自定义高亮块语法,支持 Emoji 表情选取。
  • TOC、草稿、代码复制、访客数、评论数、分类、标签、搜索、加密、友链、打赏、自定义导航栏。
  • 多个布局设置,可自定义页面细节。
  • 高度定制化,可添加自定义 CSS、HTML 和 JS 代码。
  • 支持自定义页面。
  • 可添加具有指定权限的协作者。
  • 内置图床,并支持各种 OSS 图床、github 图床(外部图床基于 picgo)等
  • 支持上传图片自动添加水印,无论何种图床
  • 支持上传图片自动压缩,无论何种图床
  • 极致轻量化,没有花里胡哨。页面秒切换、图片懒加载。
  • 脚本一键部署,多种部署方式,支持 ARM 平台。
  • 支持 GA、百度分析
  • 简单易用的后台,支持数据的导出与导入。
  • 支持 RSS 订阅
  • 完善的 API,完全利用本项目后台和服务端,自己写前端或适配其他页面生成器
  • 有较完善的日志记录,后台可直接查看登录日志和 Caddy 日志。

快速上手/部署教程

一键脚本部署

curl -L https://vanblog.mereith.com/vanblog.sh -o vanblog.sh && chmod +x vanblog.sh && ./vanblog.sh

将来如果需要再次运行脚本,可以运行:

./vanblog.sh

其他部署方式

具体请移步项目文档:快速上手

反代

请参考: 反代

常见问题

备份与迁移

作者 logo 无法加载

http error

docker 镜像拉取慢

如何外部访问数据库

如何回滚

如何升级

更新后后台报错||一直加载中

开启了 https 重定向后关不掉

更多常见问题

关于更新

此项目会持续更新的,如果没有恶性 bug(有的话看到了会紧急修复),一般每周发一次新版本。

如果遇到了问题,可以先更新试试看。

交流群

说明与文档

请移步项目主页: https://vanblog.mereith.com

CHANGELOG

CHANGELOG

开发指南

谁在使用

现在可能用的人有一些了吧 - -

如果您想把自己加进来,请提一个 issue,我会尽快添加的。

TODO

  • 精简前台 js 体积,优化性能
  • 精简打包体积
  • 集成 HTTPS 和自动证书申请续期
  • 后台增加登录日志
  • 内嵌评论系统
  • 支持 ARM64
  • 支持 mermaid 语法
  • 替换编辑器为 bytemd(掘金同款)(老的编辑器有些臃肿,复制偶尔会有格式会错乱的问题)
  • 导入 md 创建文章/草稿功能
  • 标签管理
  • 黑暗模式图标样式优化
  • 内嵌评论的邮件通知和 webhook
  • 自定义 css
  • 添加自定义 script 标签
  • 添加自定义 html 代码
  • 可添加具有自定义权限的协作者
  • 自定义页面
  • RSS 订阅
  • 自定义高亮块语法支持
  • Emoji 表情选择器
  • 自定义导航栏
  • 后端性能优化一期(减少不必要的查询, ISR 防抖等)
  • Token 管理
  • picgo 插件安装
  • 忘记密码
  • 分类加密
  • 自定义文字路径
  • 系统日志查看
  • 快捷分享按钮
  • 完善可自定义上传文件的自定义页面功能(现在的自定义页面有潜在的 css 污染问题)
  • 图片上传自动添加水印
  • 迁移到 pnpm,使用 workspace
  • 增加在特定事件后触发执行自定义代码或 webhook 的扩展能力
  • 上传图片自动压缩功能
  • 批量操作文章草稿
  • 插件系统
  • 自定义主题(前端渲染器)系统
  • 浏览器消息通知
  • 文章/草稿的历史版本管理
  • 精简配置项,尽可能移动到运行时配置
  • 增加 ORM 层,适配更多数据库
  • 增加一些 e2e 测试,集成到 CI
  • 国际化

问题反馈

请提 issue ,如无特殊情况会在一天内解决。

from  https://github.com/Mereithhh/vanblog

Monday, 29 December 2025

ClashX

 ClashX 是一个以Clash为内核的MAC系统翻墙工具.

A rule based proxy For Mac base on Clash. 原作者删库。

ClashX 旨在提供一个简单轻量化的代理客户端。使用教程

注意

  • ClashX / ClashX Pro 只是一个代理工具,不提供任何代理服务器。如果服务器不可用或与服务器续费有关的问题,请与您的提供商联系。
  • ClashX / ClashX Pro 目前并没有创建官网。凡是声称是 ClashX / ClashX Pro 官网的一定是骗子。

Features

  • HTTP/HTTPS and SOCKS protocol
  • Surge like configuration
  • GeoIP rule support
  • Support Vmess/Shadowsocks/Socks5/Trojan
  • Support for Netfilter TCP redirect

Install

ClashX Pro With enhanced mode and other clash premium feature

ClashX Pro版本,支持增强模式以及更多Clash Premium Core特性。

You can download from Release page

Build

Download deps

bash install_dependency.sh
  • Build and run.

Config

The default configuration directory is $HOME/.config/clash

The default name of the configuration file is config.yaml. You can use your custom config name and switch config in menu Config section.

Checkout SS-Rule-Snippet for Clash for more detail.

Advance Config

修改代理端口号

  1. 在菜单栏->配置->更多设置中修改对应端口号

Change your status menu icon

Place your icon file in the ~/.config/clash/menuImage.png then restart ClashX

Change default system ignore list.

  • Change by menu -> Config -> Setting -> Bypass proxy settings for these Hosts & Domains

URL Schemes.

Using url scheme to reload current config.

clash://update-config

Get process name

You can add the follow config in your config file, and set your proxy mode to rule. Then open the log via help menu in ClashX.

script:
  code: |
    def main(ctx, metadata):
      # Log ProcessName
      ctx.log('Process Name: ' + ctx.resolve_process_name(metadata))
      return 'DIRECT'

FAQ

  • Q: How to get shell command with external IP?
    A: Click the clashX menu icon and then press Option-Command-C

关闭ClashX的通知

  1. 在系统设置中关闭 clashx 的推送权限
  2. 在菜单栏->配置->更多设置中选中减少通知

Note:强烈不推荐这么做,这可能导致clashx的很多重要错误提醒无法显示。

全局快捷键

  • 在菜单栏配置->更多配置中,自定义对应功能的快捷键。(需要1.116.1之后的版本)
  • 使用AppleScript设置, 详情点击 全局快捷键

from  https://github.com/bannedbook/ClashX

  • Make sure have python3 and golang installed in your computer.

  • Install Golang

    brew install golang
    
    or download from https://golang.org
    
  • Using url scheme to import remote config.

    clash://install-config?url=http%3A%2F%2Fexample.com&name=example
    
  • Encryptionbox


    EncryptionBox is online tool which gives you 64 different type of encryption. How to make it it useful? First clone the git http://encryptionbox.wingcompiler.me/ and after that upload the code in your web server and open the file which the config.php which is in the includes folder of the code. In config.php file you can add the discription of the website.

    from  https://github.com/gunjeetbawa10/Encryptionbox

    空難唯一倖存者,8天7夜絕境求生,一場震撼世人的極限生存-Annette

    -专注当下,靠喝雨水为生。