{"id":15130172,"url":"https://github.com/yisier/nps","last_synced_at":"2026-01-14T18:57:56.239Z","repository":{"id":62340311,"uuid":"536441618","full_name":"yisier/nps","owner":"yisier","description":"基于NPS 0.26.10 版本二开而来，NPS接力项目。","archived":false,"fork":true,"pushed_at":"2026-01-13T09:02:06.000Z","size":10143,"stargazers_count":3144,"open_issues_count":52,"forks_count":399,"subscribers_count":34,"default_branch":"master","last_synced_at":"2026-01-13T10:47:40.892Z","etag":null,"topics":["go","http","https","nps","tcp","udp"],"latest_commit_sha":null,"homepage":"https://natnps.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ehang-io/nps","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yisier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-14T06:24:00.000Z","updated_at":"2026-01-13T09:02:15.000Z","dependencies_parsed_at":"2023-02-09T02:00:46.071Z","dependency_job_id":null,"html_url":"https://github.com/yisier/nps","commit_stats":null,"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"purl":"pkg:github/yisier/nps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisier%2Fnps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisier%2Fnps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisier%2Fnps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisier%2Fnps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yisier","download_url":"https://codeload.github.com/yisier/nps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisier%2Fnps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28431073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","http","https","nps","tcp","udp"],"created_at":"2024-09-26T02:40:32.129Z","updated_at":"2026-01-14T18:57:56.233Z","avatar_url":"https://github.com/yisier.png","language":"Go","readme":"# NPS\n\n[新特性文档](https://dqg9t9eulqq.feishu.cn/wiki/FmVVwDcEGiTZxekYJl5ccuFanlg?from=from_copylink)\n\n# 说明\n由于nps已经停更多年，存留了不少bug和未完善的功能。\n\n此版本基于 nps 0.26.10的基础上二次开发而来。\n\n***DockerHub***： [NPS](https://hub.docker.com/r/yisier1/nps) [NPC](https://hub.docker.com/r/yisier1/npc)\n\n***宝塔面板***：[宝塔面板 Docker](docs/bt.md)\n\n# 交流群\n聊天灌水QQ群：619833483(2000人群),770569342\n\n# 广告\n[NPS云穿透](https://natnps.com/register?utm_from=MQ==)，免费4M带宽，2条隧道；6.8元12M带宽，10条隧道；13.8元24M带宽，20条隧道。  \n   \n雨云，500M带宽服务器；云服务器15元起，[专属连接，首月5折](https://www.rainyun.com/MjY0MzY1_)。\n\n# 提示\n强烈推荐使用无配置文件模式启动客户端（删除掉npc.exe 目录下的`conf`文件夹即可），所有数据应该在服务端保存和配置，而客户端只做连接转发。客户端配置文件对小白极不友好，配置繁琐，容易出错。   \n0.26.21 版本后的客户端，无需再通过命令行方式启动、安装、卸载客户端，直接双击运行，按照提示输入指令即可完成，非常方便。\n\n\n# 更新日志  \n- 2025-12-06 v0.26.28  \n  -【全局参数】页面新增`服务地址`配置项，用于客户端命令地址显示、隧道访问地址显示 [293](https://github.com/yisier/nps/issues/293)   \n  -【IP授权功能优化】，通过穿透的端口去提交 IP 认证，感谢 [Aqamoe](https://github.com/Aqamoe) 的建议 [291](https://github.com/yisier/nps/issues/291)  \n  -【重构限速器实现】提升性能和准确性\n\n\n- 2025-11-05 v0.26.27  \n  新增：  \n  - 1.客户端新增【IP白名单】，可通过两种方式添加IP:  \n    - 方式1️⃣：在【客户端】新建/修改页面，配置IP授权密码，不在IP白名单的外网访问将被跳转到 IP 授权页面，输入正确的授权密码，即可完成添加 IP。  \n    - 方式2️⃣：在【客户端】新建/修改页面，直接添加IP到白名单中。\n  ![img.png](image/new/ip.png)\n  - 2.客户端配置移除【压缩】和【加密】功能，此功能会显著提高内存和CPU占用率，\"利大于弊\"。\n  - 3.客户端默认不再提供配置文件，***强烈推荐使用无配置文件模式启动客户端***\n\n\n- 2025-08-15  v0.26.26  \n  修复：\n  - windows注册服务 使用tls无法连接 [269](https://github.com/yisier/nps/issues/269)\n  - 域名解析自动HTTPS逻辑bug [273](https://github.com/yisier/nps/issues/273)\n\n\n- 2025-05-28  v0.26.25  \n  新增：\n  - nps增加`nps(.exe) -server` 命令，用于管理NPS服务，安装和卸载服务在 Linux 下需要有 sudo 权限，Windows 下需要有管理员权限。  \n  ![img.png](image/new/server.png)\n  - 增加【TLS快捷启动命令】，可用于在tls模式下，快速启动客户端。 [257](https://github.com/yisier/nps/issues/257)\n\n\n- 2025-04-16  v0.26.24   \n  新增：\n  - 隧道支持复制功能，在隧道页面增加复制按钮，除了端口号为随机生成外，其他参数全部拷贝。[251](https://github.com/yisier/nps/issues/251)    \n    \n  修复：\n  - 私密代理连接时服务端会报错退出，[250](https://github.com/yisier/nps/issues/250)\n\n\n\n- 2025-04-11  v0.26.23  \n  新增：\n  - TCP 隧道支持 Proxy Protocol 协议来传递经过请求的真实 IP。![img.png](image/new/protocol.png)  \n  \n  修复：  \n  - 客户端较多时，协程增长过快，感谢 [@huanglei288766](https://github.com/yisier/nps/pull/244) 的PR  \n\n\n- 2025-01-23  v0.26.22  \n  优化：\n  - 客户端注册系统服务时，（新版客户端注册方式，非 install 命令） 将按照 `npc-[vkey].log` 格式保存日志，每个客户端VKEY单独一个日志文件，windows 日志位于 `npc.exe` 同级目录下，linux 位于 `/var/log/`目录。  \n  - 域名模式，HTTPS证书支持上传文件和文件路径，系统将自动识别路径还是证书内容。 [#175](https://github.com/yisier/nps/issues/175)  \n  \n  修复：\n  - ipv6地址显示不全 [#237](https://github.com/yisier/nps/issues/237)\n  \n\n- 2025-01-07  v0.26.21   \n  新增：\n  - 客户端列表页面新增【快捷启动命令】，此命令为连接地址+链接秘钥的base64编码，方便一键启动、一键安装客户端。  \n  - 域名解析和隧道列表增加访问地址，可以点击隧道链接，直接网页打开。 [#234](https://github.com/yisier/nps/issues/234)  \n  \n  优化：  \n  - 修改vkey生成方式，由16位缩短至10位，截取uuid前10位，避免重复。  \n  - 优化客户端启动方式，当npc文件目录下无配置文件时，可直接双击运行客户端，输入命令完成启动、安装、卸载客户端，直接启动和安装服务时需要输入【快捷启动命令】，卸载服务、启动服务、停止服务时，只需输入隧道秘钥【vkey】即可。安装服务以 nps-client-vkey 方式命名 ，实现注册多个服务。  \n  ![image](image/new/cmd.png)\n  \n\n   **注意**  \n   强烈推荐使用无配置文件模式启动客户端，所有数据应该在服务端保存和配置，而客户端只做连接转发。客户端配置文件对小白极不友好，配置繁琐，容易出错。\n\n- 2024-11-07  v0.26.20  \n  新增：\n  - 客户端增加创建时间\n  \n  修复：\n  - 客户端限速单位不统一 [#185](https://github.com/yisier/nps/issues/185)\n  - 增加从下拉选择客户端,隧道列表排序,新增编辑后不会刷新界面 [#183](https://github.com/yisier/nps/issues/183)\n  - 隧道数量限制无法统计域名映射 [#209](https://github.com/yisier/nps/issues/209) \n  \n\n- 2024-06-01  v0.26.19  \n  - golang 版本升级到 1.22.\n  - 增加自动https，自动将http 重定向（301）到 https.  \n  - 客户端命令行方式启动支持多个隧道ID，使用逗号拼接，示例：`npc -server=xxx:8024 -vkey=ytkpyr0er676m0r7,iwnbjfbvygvzyzzt` .\n  - 移除 nps.conf 参数 `https_just_proxy` , 调整 https 处理逻辑，如果上传了 https 证书，则由nps负责SSL (此方式可以获取真实IP)，\n      否则走端口转发模式（使用本地证书,nps 获取不到真实IP）， 如下图所示。    \n    ![image](image/new/https.png)\n\n\n\n- 2024-02-27  v0.26.18  \n  ***新增***：nps.conf 新增 `tls_bridge_port=8025` 参数，当 `tls_enable=true` 时，nps 会监听8025端口，作为 tls 的连接端口。  \n             客户端可以选择连接 tls 端口或者非 tls 端口： `npc.exe  -server=xxx:8024 -vkey=xxx` 或 `npc.exe  -server=xxx:8025 -vkey=xxx -tls_enable=true`\n  \n  \n- 2024-01-31  v0.26.17  \n  ***说明***：考虑到 npc 历史版本客户端众多，版本号不同旧版本客户端无法连接，为了兼容，仓库版本号将继续沿用 0.26.xx\n\n\n- 2024-01-02  v0.27.01  (已作废，功能移动到v0.26.17 版本)  \n  ***新增***：tls 流量加密，(客户端忽略证书校验，谨慎使用，客户端与服务端需要同时开启，或同时关闭)，使用方式：   \n             服务端：nps.conf `tls_enable=true`;    \n             客户端：npc.conf `tls_enable=true` 或者 `npc.exe  -server=xxx -vkey=xxx -tls_enable=true`  \n\n  \n- 2023-06-01  v0.26.16  \n  ***修复***：https 流量不统计 Bug 修复。  \n  ***新增***：新增全局黑名单IP，用于防止被肉鸡扫描端口或被恶意攻击。  \n  ***新增***：新增客户端上次在线时间。\n\n\n- 2023-02-24  v0.26.15  \n  ***修复***：更新程序 url 更改到当前仓库中   \n  ***修复***：nps 在外部路径启动时找不到配置文件  \n  ***新增***：增加 nps 启动参数，`-conf_path=D:\\test\\nps`,可用于加载指定nps配置文件和web文件目录。  \n  ***window 使用示例：***  \n  直接启动：`nps.exe -conf_path=D:\\test\\nps`  \n  安装：`nps.exe install -conf_path=D:\\test\\nps`    \n  安装启动：`nps.exe start`      \n\n  ***linux 使用示例：***    \n  直接启动：`./nps -conf_path=/app/nps`  \n  安装：`./nps install -conf_path=/app/nps`  \n  安装启动：`nps start -conf_path=/app/nps`  \n\n\n\n- 2022-12-30  v0.26.14  \n  ***修复***：API 鉴权漏洞修复\n\n\n- 2022-12-19  \n***修复***：某些场景下丢包导致服务端意外退出  \n***优化***：新增隧道时，不指定服务端口时，将自动生成端口号  \n***优化***：API返回ID, `/client/add/, /index/addhost/，/index/add/ `   \n***优化***：域名解析、隧道页面，增加[唯一验证密钥]，方便搜查  \n\n\n- 2022-10-30   \n***新增***：在管理面板中新增客户端时，可以配置多个黑名单IP，用于防止被肉鸡扫描端口或被恶意攻击。  \n***优化***：0.26.12 版本还原了注册系统功能，使用方式和以前一样。无论是否注册了系统服务，直接执行 nps 时只会读取当前目录下的配置文件。\n\n\n- 2022-10-27  \n***新增***：在管理面板登录时开启验证码校验，开启方式：nps.conf `open_captcha=true`，感谢 [@dongFangTuring](https://github.com/dongFangTuring) 提供的PR  \n\n  \n- 2022-10-24:     \n***修复***：HTTP协议支持WebSocket(稳定性待测试)\n  \n\n- 2022-10-21:   \n***修复***：HTTP协议下实时统计流量，能够精准的限制住流量（上下行对等）  \n***优化***：删除HTTP隧道时，客户端已用流量不再清空\n\n\n- 2022-10-19:  \n***BUG***：在TCP协议下，流量统计有问题，只有当连接断开时才会统计流量。例如，限制客户端流量20m,当传输100m的文件时，也能传输成功。  \n***修复***：TCP协议下实时统计流量，能够精准的限制住流量（上下行对等）  \n***优化***：删除TCP隧道时，客户端已用流量不再清空\n![image](image/new/tcp_limit.png)\n\n\n- 2022-09-14:  \n修改NPS工作目录为当前可执行文件目录（即配置文件和nps可执行文件放在同一目录下，直接执行nps文件即可），去除注册系统服务，启动、停止、升级等命令\n\n\n\n  \n# 捐赠\n![image](image/new/payCode.png)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisier%2Fnps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyisier%2Fnps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisier%2Fnps/lists"}