# cpolar_script **Repository Path**: jun-wan/cpolar_script ## Basic Information - **Project Name**: cpolar_script - **Description**: cpolar相关脚本及支持 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-19 - **Last Updated**: 2026-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: cpolar, Linux, JavaScript, Windows ## README # cpolar_script cpolar 相关脚本和支持 ## 目录说明 - `termux_cpolar_install/` - `install.sh`:Termux 一键安装脚本。会自动添加 `cpolar` 软件源、安装 `cpolar` 和 `termux-services`、启动服务并设置开机自启。 - `kwrt/` - `cpolar_kwrt_install.sh`:在 KWRT/OpenWrt 上下载、解压并启动 `cpolar`。 - `cpolar_kwrt_uninstall.sh`:卸载 KWRT/OpenWrt 上的 `cpolar` 和相关目录。 - `switch_wan.sh`:交互式切换 `WAN/WAN6` 绑定的网口。 - `auto_switch_wan_eth0_to_eth2.sh`:在 `eth0` 与 `eth2` 之间自动切换 `WAN/WAN6`。 - `cpolar_email_and_authtoken_clear/` - `cpolar_clear_email_and_authtoken.ps1`:清理 Windows 当前用户 `.cpolar/cpolar.yml` 中的 `email` 和 `authtoken` 字段,并自动打开服务管理器。 - `cpolar_auto_clear_email_and_authtoken.ps1`:同类 PowerShell 清理脚本。 - `f50/` - `f50_cpolar_install.js`:给 F50 页面注入 `cpolar` 安装、启动、状态检测和开机自启按钮。 - `f50_openlist_by_minikano_and_junwan.js`:OpenList 相关页面脚本。 - `bg_video_theme_plugin.js`:背景视频主题插件脚本。 ## Termux 一键安装 Termux 安装脚本文件: `termux_cpolar_install/install.sh` 使用方法: ```bash cd termux_cpolar_install bash install.sh ``` 或者直接一键执行: ```bash curl -fsSL https://gitee.com/jun-wan/cpolar_script/raw/master/termux_cpolar_install/install.sh | bash ``` 脚本完成后会自动: - 写入 `https://termux.cpolar.com` 软件源 - 安装 `cpolar` - 安装 `termux-services` - 启用并启动 `cpolar` 服务 安装完成后常用地址和命令: - Web UI:`http://127.0.0.1:9200` - 配置文件:`$PREFIX/etc/cpolar/cpolar.yml` - 查看状态:`sv status cpolar` - 重启服务:`sv restart cpolar` - 停止服务:`sv down cpolar` - 配置 Token:`cpolar authtoken <你的Token>` ## 其他平台脚本 ### KWRT / OpenWrt 安装: ```sh sh kwrt/cpolar_kwrt_install.sh ``` 卸载: ```sh sh kwrt/cpolar_kwrt_uninstall.sh ``` ### Windows PowerShell 运行清理脚本示例: ```powershell powershell -ExecutionPolicy Bypass -File .\cpolar_email_and_authtoken_clear\cpolar_clear_email_and_authtoken.ps1 ``` ## 说明 - `termux_cpolar_install/install.sh` 的实现参考了 cpolar 官方博客中 Android + Termux 的安装流程。 - 仓库中部分旧脚本的中文注释可能存在编码差异,如果终端编码不一致,显示上可能会出现乱码,但通常不影响脚本主体逻辑。 ## 参考链接 - cpolar 官方博客: - cpolar 官方博客(Termux 系列教程): - termux-services: