# websockTool **Repository Path**: phpzu/websock-tool ## Basic Information - **Project Name**: websockTool - **Description**: websock实用工具插件,自带心跳机制 - **Primary Language**: JavaScript - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-08 - **Last Updated**: 2023-02-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: websock ## README # websockTool #### 介绍 websock工具类,自带心跳机制 #### 软件架构 软件架构说明 #### 安装教程 1. 将php目录下的ws_server.php拷到服务器 php ws_server.php 2. 配置网站并设置如下代理 ``` location /wss { proxy_pass http://服务器ip:9901; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Real-IP $remote_addr; } ``` 如果配置了证书 wss://域名地址/wss 否则 ws://域名地址/wss 3. 将工具中的服务器地址替换成上面地址即可 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request