refactor: restructure codebase for v1 kasm docker release
This commit is contained in:
@@ -1,119 +1,119 @@
|
||||
@echo off
|
||||
|
||||
REM 安装依赖包
|
||||
call npm install
|
||||
|
||||
REM 设置代理的网站:you、perplexity、happyapi
|
||||
set ACTIVE_PROVIDER=you
|
||||
|
||||
REM 设置指定浏览器,可以是 'chrome', 'edge' 或 'auto'
|
||||
set BROWSER_TYPE=auto
|
||||
|
||||
REM 设置是否启用手动登录
|
||||
set USE_MANUAL_LOGIN=true
|
||||
|
||||
REM 设置是否隐藏浏览器 (设置浏览器实例较大时,建议设置为true) (只有在`USE_MANUAL_LOGIN=false`时才有效)
|
||||
set HEADLESS_BROWSER=true
|
||||
|
||||
REM 设置启动浏览器实例数量(非并发场景下,建议设置1)
|
||||
set BROWSER_INSTANCE_COUNT=1
|
||||
|
||||
REM 设置会话自动释放时间(单位:秒) (0=禁用自动释放)
|
||||
set SESSION_LOCK_TIMEOUT=180
|
||||
|
||||
REM 设置是否启用并发限制
|
||||
set ENABLE_DETECTION=true
|
||||
|
||||
REM 设置是否启用自动Cookie更新 (USE_MANUAL_LOGIN=false时有效)
|
||||
set ENABLE_AUTO_COOKIE_UPDATE=false
|
||||
|
||||
REM 是否跳过账户验证 (启用时,`ALLOW_NON_PRO`设置无效,可用于账号量多情况)
|
||||
set SKIP_ACCOUNT_VALIDATION=false
|
||||
|
||||
REM 开启请求次数上限(默认限制3次请求) (用于免费账户)
|
||||
set ENABLE_REQUEST_LIMIT=false
|
||||
|
||||
REM 是否允许非Pro账户
|
||||
set ALLOW_NON_PRO=false
|
||||
|
||||
REM 设置自定义终止符(用于处理输出停不下来情况,留空则不启用,使用双引号包裹)
|
||||
set CUSTOM_END_MARKER="<CHAR_turn>"
|
||||
|
||||
REM 设置是否启用延迟发送请求,如果设置false卡发送请求尝试打开它
|
||||
set ENABLE_DELAY_LOGIC=false
|
||||
|
||||
REM 设置是否启用隧道访问
|
||||
set ENABLE_TUNNEL=false
|
||||
|
||||
REM 设置隧道类型 (localtunnel 或 ngrok)
|
||||
set TUNNEL_TYPE=ngrok
|
||||
|
||||
REM 设置localtunnel子域名(留空则为随机域名)
|
||||
set SUBDOMAIN=
|
||||
|
||||
REM 设置 ngrok AUTH TOKEN
|
||||
REM 这是 ngrok 账户的身份验证令牌。可以在 ngrok 仪表板的 "Auth" 部分找到它。
|
||||
REM 免费账户和付费账户都需要设置此项。
|
||||
REM ngrok网站: https://dashboard.ngrok.com
|
||||
set NGROK_AUTH_TOKEN=
|
||||
|
||||
REM 设置 ngrok 自定义域名
|
||||
REM 这允许使用自己的域名而不是 ngrok 的随机子域名。
|
||||
REM 注意:此功能仅适用于 ngrok 付费账户。
|
||||
REM 使用此功能前,请确保已在 ngrok 仪表板中添加并验证了该域名。
|
||||
REM 格式示例:your-custom-domain.com
|
||||
REM 如果使用免费账户或不想使用自定义域名,请将此项留空。
|
||||
set NGROK_CUSTOM_DOMAIN=
|
||||
|
||||
REM 设置 https_proxy 代理,可以使用本地的socks5或http(s)代理
|
||||
REM 例如,使用 HTTP 代理:export https_proxy=http://127.0.0.1:7890
|
||||
REM 或者使用 SOCKS5 代理:export https_proxy=socks5://host:port:username:password
|
||||
set https_proxy=
|
||||
|
||||
REM 设置 PASSWORD API密码
|
||||
set PASSWORD=
|
||||
|
||||
REM 设置 PORT 端口
|
||||
set PORT=8080
|
||||
|
||||
REM 设置AI模型(Claude系列模型直接在酒馆中选择即可使用,修改`AI_MODEL`环境变量可以切换Claude以外的模型,支持的模型名字如下 (请参考官网获取最新模型))
|
||||
set AI_MODEL=
|
||||
|
||||
REM 自定义会话模式
|
||||
set USE_CUSTOM_MODE=false
|
||||
|
||||
REM 启用模式轮换
|
||||
REM 只有当 USE_CUSTOM_MODE 和 ENABLE_MODE_ROTATION 都设置为 true 时,才会启用模式轮换功能。
|
||||
REM 可以在自定义模式和默认模式之间动态切换
|
||||
set ENABLE_MODE_ROTATION=false
|
||||
|
||||
REM 是否启用隐身模式
|
||||
set INCOGNITO_MODE=false
|
||||
|
||||
REM 设置伪造真role (如果启用,必须使用txt格式上传)
|
||||
set USE_BACKSPACE_PREFIX=false
|
||||
|
||||
REM 设置上传文件格式 (docx 或 txt) gpt_4o 使用txt可能更好破限
|
||||
set UPLOAD_FILE_FORMAT=txt
|
||||
|
||||
REM 设置是否启用 CLEWD 后处理
|
||||
set CLEWD_ENABLED=false
|
||||
|
||||
REM ---------------------------------------------------
|
||||
REM 控制是否在开头插入乱码
|
||||
set ENABLE_GARBLED_START=false
|
||||
REM 设置开头插入乱码最小长度
|
||||
set GARBLED_START_MIN_LENGTH=1000
|
||||
REM 设置开头插入乱码最大长度
|
||||
set GARBLED_START_MAX_LENGTH=5000
|
||||
REM 设置结尾插入乱码固定长度
|
||||
set GARBLED_END_LENGTH=500
|
||||
REM 控制是否在结尾插入乱码
|
||||
set ENABLE_GARBLED_END=false
|
||||
REM ---------------------------------------------------
|
||||
|
||||
REM 运行 Node.js 应用程序
|
||||
node index.mjs
|
||||
|
||||
REM 暂停脚本执行,等待用户按任意键退出
|
||||
pause
|
||||
@echo off
|
||||
|
||||
REM Install dependencies
|
||||
call npm install
|
||||
|
||||
REM Set the website of the proxy: you, perplexity, happyapi
|
||||
set ACTIVE_PROVIDER=you
|
||||
|
||||
REM Set the browser type, can be 'chrome', 'edge', or 'auto'
|
||||
set BROWSER_TYPE=auto
|
||||
|
||||
REM Set whether to enable manual login
|
||||
set USE_MANUAL_LOGIN=true
|
||||
|
||||
REM Set whether to hide the browser (recommended to set to true when the browser instance is large) (only effective when `USE_MANUAL_LOGIN=false`)
|
||||
set HEADLESS_BROWSER=true
|
||||
|
||||
REM Set the number of browser instances to start (recommended to set to 1 in non-concurrent scenarios)
|
||||
set BROWSER_INSTANCE_COUNT=1
|
||||
|
||||
REM Set the session auto-release time (in seconds) (0 = disable auto-release)
|
||||
set SESSION_LOCK_TIMEOUT=180
|
||||
|
||||
REM Set whether to enable detection
|
||||
set ENABLE_DETECTION=true
|
||||
|
||||
REM Set whether to enable automatic cookie updates (effective only when `USE_MANUAL_LOGIN=false`)
|
||||
set ENABLE_AUTO_COOKIE_UPDATE=false
|
||||
|
||||
REM Set whether to skip account verification (when enabled, `ALLOW_NON_PRO` is ignored, can be used in scenarios with multiple accounts)
|
||||
set SKIP_ACCOUNT_VALIDATION=false
|
||||
|
||||
REM Set whether to enable request limits (default limit is 3 requests) (for free accounts)
|
||||
set ENABLE_REQUEST_LIMIT=false
|
||||
|
||||
REM Set whether to allow non-Pro accounts
|
||||
set ALLOW_NON_PRO=false
|
||||
|
||||
REM Set the custom end marker (used to handle situations where the output does not stop, leave blank to not use, use double quotes to enclose)
|
||||
set CUSTOM_END_MARKER="<CHAR_turn>"
|
||||
|
||||
REM Set whether to enable delayed sending of requests, if set to false, it will attempt to open the request
|
||||
set ENABLE_DELAY_LOGIC=false
|
||||
|
||||
REM Set whether to enable tunnel access
|
||||
set ENABLE_TUNNEL=false
|
||||
|
||||
REM Set the tunnel type (localtunnel or ngrok)
|
||||
set TUNNEL_TYPE=ngrok
|
||||
|
||||
REM Set the localtunnel subdomain (leave blank for a random domain)
|
||||
set SUBDOMAIN=
|
||||
|
||||
REM Set the ngrok authentication token
|
||||
REM This is the authentication token for the ngrok account, which can be found in the "Auth" section of the ngrok dashboard.
|
||||
REM Both free and paid accounts require this to be set.
|
||||
REM ngrok website: https://dashboard.ngrok.com
|
||||
set NGROK_AUTH_TOKEN=
|
||||
|
||||
REM Set the ngrok custom domain
|
||||
REM This allows you to use your own domain instead of ngrok's random subdomain.
|
||||
REM Note: This feature is only available for ngrok paid accounts.
|
||||
REM Before using this feature, make sure you have added and verified the domain in the ngrok dashboard.
|
||||
REM Example format: your-custom-domain.com
|
||||
REM If using a free account or not using a custom domain, leave this blank.
|
||||
set NGROK_CUSTOM_DOMAIN=
|
||||
|
||||
REM Set the https_proxy proxy, can use local socks5 or http(s) proxy
|
||||
REM For example, using an HTTP proxy: export https_proxy=http://127.0.0.1:7890
|
||||
REM Or using a SOCKS5 proxy: export https_proxy=socks5://host:port:username:password
|
||||
set https_proxy=
|
||||
|
||||
REM Set the PASSWORD API password
|
||||
set PASSWORD=
|
||||
|
||||
REM Set the PORT port
|
||||
set PORT=8080
|
||||
|
||||
REM Set the AI model (Claude series models can be used directly in the tavern, modifying the `AI_MODEL` environment variable can switch to other models, supported model names are as follows (please refer to the official website for the latest models))
|
||||
set AI_MODEL=
|
||||
|
||||
REM Set custom session mode
|
||||
set USE_CUSTOM_MODE=false
|
||||
|
||||
REM Enable mode rotation
|
||||
REM Mode rotation is only enabled when both `USE_CUSTOM_MODE` and `ENABLE_MODE_ROTATION` are set to true.
|
||||
REM Can dynamically switch between custom mode and default mode
|
||||
set ENABLE_MODE_ROTATION=false
|
||||
|
||||
REM Set whether to enable incognito mode
|
||||
set INCOGNITO_MODE=false
|
||||
|
||||
REM Set whether to fake the true role (if enabled, must use txt format for upload)
|
||||
set USE_BACKSPACE_PREFIX=false
|
||||
|
||||
REM Set the upload file format (docx or txt) gpt_4o may be better with txt
|
||||
set UPLOAD_FILE_FORMAT=txt
|
||||
|
||||
REM Set whether to enable CLEWD post-processing
|
||||
set CLEWD_ENABLED=false
|
||||
|
||||
REM ---------------------------------------------------
|
||||
REM Set whether to insert garbled characters at the beginning
|
||||
set ENABLE_GARBLED_START=false
|
||||
REM Set the minimum length of garbled characters to insert at the beginning
|
||||
set GARBLED_START_MIN_LENGTH=1000
|
||||
REM Set the maximum length of garbled characters to insert at the beginning
|
||||
set GARBLED_START_MAX_LENGTH=5000
|
||||
REM Set the fixed length of garbled characters to insert at the end
|
||||
set GARBLED_END_LENGTH=500
|
||||
REM Set whether to insert garbled characters at the end
|
||||
set ENABLE_GARBLED_END=false
|
||||
REM ---------------------------------------------------
|
||||
|
||||
REM Run the Node.js application
|
||||
node src/index.mjs
|
||||
|
||||
REM Pause script execution, waiting for the user to press any key to exit
|
||||
pause
|
||||
|
||||
Reference in New Issue
Block a user