No description
- Go 80%
- Nix 15.6%
- Python 3.5%
- HTML 0.8%
- Shell 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| cmd/o4scale | ||
| docs | ||
| internal | ||
| nix | ||
| .gitignore | ||
| AGENTS.md | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
o4scale
自有机器之间的覆盖网络: 每台机器有固定的覆盖网络 IP; 每对节点同时维护直连 IPv4、直连 IPv6、经各个 hub 的 UDP 中转与 TCP/TLS 中转等候选路径, 按延迟与 丢包的综合开销选路, 换路时内层连接不断开。数据面使用 wireguard-go。
开发进度见 docs/plan.md。
- 需求与技术栈: docs/requirements.md
- 设计: docs/design.md
- 部署与运维: docs/ops/
- 开发约定: AGENTS.md
作为 flake input 使用
{
inputs.o4scale.url = "git+ssh://git@git.o404.site/Origami404/o4scale.git";
outputs = { nixpkgs, o4scale, ... }: {
nixosConfigurations.alpha = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
o4scale.nixosModules.default
{
services.o4scale = {
enable = true;
name = "alpha";
role = "node";
privateKeyFile = "/run/secrets/o4scale.key";
memberList = import ./members.nix;
openFirewall = true;
};
}
];
};
};
}
对外输出: packages.<system>.{o4scale,default,o4scale-config-check}、nixosModules.{o4scale,default}、
overlays.default (pkgs.o4scale)、lib.mkUserHubBundle (无 root 机器上的 hub)。说明与完整示例见
docs/ops/flake.md, 模块选项见 docs/ops/options.md,
部署步骤见 docs/ops/deploy.md。
开发环境
nix develop # Go 工具链与常用工具
go test -race ./...
nix build .#checks.x86_64-linux.<测试名> -L