Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Norain

基于 sing-box 的 Hysteria2 / Trojan 代理:客户端 norain 和服务端 norain-server,Python 做控制层, sing-box 做数据面,兼容 Windows 和 Linux。

当前状态:0.2.0.dev0 预发布。两端模块代码齐备;测试套件在 Windows 上 95 项通过(3 项仅 POSIX 跳过)。 已在真实环境验证过的部分:生成配置通过真实 sing-box 1.14.4 check、本地端到端隧道、TUN 路由接管与还原、 Windows 防火墙阻断与解除、nftables 阻断、系统代理写入与还原、服务端 install/reload/fix/update/uninstall、 systemd 开机自启(真实重启)、真实 ACME 签发。仍未验证:客户端与 Linux 的安装流程、TUN 的实际流量、 监控错误码、自维持互拉、分流学习闭环。逐项见 docs/pending.md。

优先级:以最初目标 docs/reference/original-goals.md 为准,除非有硬性 bug。

客户端(九个模块)

代理、分流、监控、自维持、阻断、修复、启动、内控制、外控制。

norain install --server example.com     # 部署:sing-box、配置、norain 命令、环境变量、开机自启动
norain start | stop | restart | status
norain config protocol auto             # 自适应 / hysteria2 / trojan
norain config mode safe                 # 安全模式:不开机自启动
norain list white add example.com       # 白名单 / black 黑名单 / blue 蓝名单 / monitor 监控名单
norain module monitor restart           # 启动 / 结束 / 重启单个模块
norain repair file|builtin|full|reload  # 四种修复
norain block status|off                 # 阻断模式;off = 手动解除
norain once monitor                     # 一次性执行某个模块的某个功能
norain status -t                        # -t:显示每个模块的运行情况和返回结果
norain uninstall

服务端

干净机器上可以直接用引导脚本(系统依赖 → 虚拟环境 → 安装包 → norain-server install):

sudo ./scripts/bootstrap-server.sh

已经装好 Python 与 venv 时,照常手动安装:

NORAIN_DOMAIN=example.com NORAIN_PASSWORD=… norain-server install
norain-server start | stop | restart | reload | status
norain-server config validate|show|edit
norain-server cert check | cert self-signed --domain <域名>
norain-server firewall open|close|status
norain-server fix
norain-server update | uninstall [--purge]

文档

开发

需要 Python ≥ 3.11,以及 pydantic、cryptography、psutil。

pip install -e ".[dev]"
python3 -m pytest -q

Metadata

Release files for norain 0.2.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for norain 0.2.0.dev0
File Size Uploaded Provenance Actions
norain-0.2.0.dev0.tar.gz 157.9 kB Without provenance Details for norain-0.2.0.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for norain 0.2.0.dev0
File Interpreter ABI Platform Actions
norain-0.2.0.dev0-py3-none-any.whl Python 3 none any Details for norain-0.2.0.dev0-py3-none-any.whl

Total release size: 319.0 kB

Release files / norain-0.2.0.dev0.tar.gz

Download URL norain-0.2.0.dev0.tar.gz
Size 157.9 kB
Tags Source
SHA-256 checksum
How to use checksums
97e717d6d1ac6ba0c8c4199a85234e0e6d390968007ab911866f058283397a4a
BLAKE2b-256 checksum
How to use checksums
ba4cd690e420b4abbd6e807ca6679bd45f7b00da5f0641856282fb724cfd351e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / norain-0.2.0.dev0-py3-none-any.whl

Download URL norain-0.2.0.dev0-py3-none-any.whl
Size 161.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c422b815a8532e5ac4cebe3d01f215d69fc93528bd1342926912447216c64190
BLAKE2b-256 checksum
How to use checksums
8a25d7444cdc1a1aa98dfeb7cf8fccf9253c89fc8d156959b08b4d0c47cc3690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for norain 0.2.0.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page