
Wetty(Web + tty)是一款通过HTTP/HTTPS在浏览器中提供终端访问的工具,作为Ajaxterm/Anyterm的替代方案,具有更优的性能和功能。它采用ChromeOS的hterm终端模拟器(纯JavaScript实现的完整终端模拟),并使用WebSockets替代传统Ajax技术,显著提升响应速度。
基本运行
bashdocker run --name term -p 3000:3000 -dt nathanleclaire/wetty
访问方式:在浏览器中访问 http://<服务器IP>:3000,默认用户名为 term,密码为 term。
安装
bashgit clone https://github.com/krishnasrinivas/wetty cd wetty npm install
HTTP模式运行
bashnode app.js -p 3000
/bin/login(可指定用户名)localhost--sshhost(指定主机)、--sshport(指定端口)、--sshuser(指定用户)参数http://yourserver:3000/wetty/ssh/<username>HTTPS模式运行
生成自签名证书(若无CA证书):
bashopenssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 30000 -nodes
启动HTTPS服务:
bashnode app.js --sslkey key.pem --sslcert cert.pem -p 3000
在Nginx配置文件中添加:
nginxlocation /wetty { proxy_pass http://127.0.0.1:3000/wetty; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 43200000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; }
http://yourserver.com/wettyhttp://yourserver.com/wetty/ssh/<username>全局安装:
bashsudo npm install wetty -g
配置服务:
bashsudo cp /usr/local/lib/node_modules/wetty/bin/wetty.conf /etc/init
启动服务:
bashsudo start wetty
默认在3000端口运行,如需修改端口或重定向日志,编辑 /etc/init/wetty.conf 文件,例如:
bashexec sudo -u root wetty -p 80 >> /var/log/wetty.log 2>&1
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务