g3/README.zh_CN.md
2023-12-29 11:00:03 +08:00

3.9 KiB
Raw Blame History

minimum rustc: 1.75 License: Apache 2.0

G3 Project

English README

关于

本项目用于构建面向企业的通用代理解决方案包括但不限于代理、反向代理开发中、负载均衡待定、NAT穿透待定等。

组件

G3 Project 由若干组件构成。

项目级的文档放在 doc 子目录下,下文会列出一下比较重要的文档。 每个组件都有各自的文档,放在各自目录的 doc 子目录下。

g3proxy

通用正向代理解决方案同时带有TCP映射、TLS卸载/封装、透明代理、简单反向代理等功能。

更多详情参考 g3proxy

g3tiles

通用反向代理解决方案,开发中。

g3bench

压测工具,支持 HTTP/1.x、HTTP/2、HTTP/3、TLS握手、DNS、Cloudflare Keyless 。

更多详情参考 g3bench

g3mkcert

用来生成 根CA / 中间CA / TLS服务端证书 / TLS客户端证书 的工具。

g3fcgen

适用于g3proxy TLS劫持功能的的伪造证书生成服务组件。

g3keymess

Cloudflare Keyless Server的简单实现。

支持平台

目前仅提供对Linux系统的完整支持其他系统如FreeBSD、NetBSD、macOS可以编译但是未测试过功能。

如果需要支持其他系统欢迎提交PR。

开发环境搭建

参考 Dev-Setup

标准及约定

参考 Standards

发布及打包

每个组件的每个发布版本都会有对应的tag格式为 <name>-v<version> 。 使用对应的tag生成源码tar包该tar包可以用于生成deb、rpm等发行版原生包文件。

如果需要对正式发布的版本打包:

  1. 生成版本发布包

    ./scripts/release/build_tarball.sh <name>-v<version>
    

    所有引用第三方源码都会放在tar包的vendor目录下打包时只需要在目标机器上安装好编译器及系统依赖库即可无需额外的网络连接。

  2. 打包指令

    deb包:

    tar xf <name>-<version>.tar.xz
    cd <name>-<version>
    ./build_deb_from_tar.sh
    

    rpm包:

    rpmbuild -ta ./<name>-<version>.tar.xz
    # 如果失败,可以手动执行以下指令:
    tar xvf <name>-<version>.tar.xz ./<name>-<version>/<name>.spec
    cp <name>-<version>.tar.xz ~/rpmbuild/SOURCES/
    rpmbuild -ba ./<name>-<version>/<name>.spec
    

如果需要直接从git打包:

  • deb包:

    ./build_deb_from_git.sh <name>
    
  • rpm包:

    ./build_rpm_from_git.sh <name>
    

预构建安装包

如需在生产环境使用,建议自行打包。

测试环境的话,部分包已经编译上传到 cloudsmith, 可参考该链接页面的说明进行安装。

静态链接

参考 Static Linking

贡献指南

参考 Contributing

交流合作

请使用飞书加群, G3代理用户交流群加入链接 或使用如下二维码:

Code of Conduct

Please check Code of Conduct for more details.

Security

If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our security center or vulnerability reporting email.

Please do not create a public GitHub issue.

License

This project is licensed under the Apache-2.0 License.