Find a file
2024-05-09 19:22:54 +08:00
.cargo default to use x86-64-v2 2023-08-04 17:36:13 +08:00
.github g3proxy: switch to use ip locate service in route_geoip escaper 2024-05-09 15:37:33 +08:00
ansible ansible: allow to set proxy when config repos 2023-09-26 11:04:00 +08:00
demo g3-resolver: use returned answers before try cname 2024-03-11 10:42:12 +08:00
doc g3proxy: support 103 Early Hints for http 1.x 2024-04-18 11:20:33 +08:00
g3bench build(deps): bump concurrent-queue from 2.4.0 to 2.5.0 (#214) 2024-04-29 13:58:39 +08:00
g3fcgen g3fcgen: fix rpm install files 2024-05-09 18:52:49 +08:00
g3iploc rename g3proxy-geoip to g3iploc-db 2024-05-09 19:18:56 +08:00
g3keymess add more keyless error code 2024-03-29 17:27:19 +08:00
g3mkcert g3mkcert: add cli options to mimic cert 2024-04-25 14:50:20 +08:00
g3proxy rename g3proxy-geoip to g3iploc-db 2024-05-09 19:18:56 +08:00
g3tiles switch back to use 4s for server offline wait 2024-05-09 16:12:55 +08:00
lib split g3-geoip to g3-geoip-types and g3-geoip-db 2024-05-09 19:13:00 +08:00
scripts fix iso country code generate script 2024-05-09 19:22:54 +08:00
.gitignore add sphinx doc for g3tiles (#202) 2024-04-08 16:48:12 +08:00
Cargo.lock rename g3proxy-geoip to g3iploc-db 2024-05-09 19:18:56 +08:00
Cargo.toml rename g3proxy-geoip to g3iploc-db 2024-05-09 19:18:56 +08:00
CHANGELOG.md update doc and packages 2023-06-02 22:15:28 +08:00
CODE_OF_CONDUCT.md initial commit 2023-03-09 17:55:45 +08:00
CONTRIBUTING.md update doc 2023-04-11 14:58:17 +08:00
G3-FEISHU-USER-GROUP.png rename user group image 2023-04-12 11:32:57 +08:00
LICENSE update license info 2023-04-07 11:28:57 +08:00
LICENSE-FOREIGN add doc about aws-lc 2024-01-03 18:58:28 +08:00
NOTICE update license info 2023-04-07 11:28:57 +08:00
README.md add new component g3iploc 2024-05-09 18:52:20 +08:00
README.zh_CN.md add new component g3iploc 2024-05-09 18:52:20 +08:00

minimum rustc: 1.77 License: Apache 2.0

G3 Project

中文版 README

About

This is the project we used to build enterprise-oriented generic proxy solutions, including but not limited to proxy / reverse proxy (WIP) / load balancer (TBD) / nat traversal (TBD).

Components

G3 Project is made up of many components.

The project-level documents resides in the doc subdirectory, and you should see the links below for the important ones. Each component will have its own documents in its doc subdirectory.

g3proxy

A generic forward proxy solution, but you can also use it as tcp streaming / transparent proxy / reverse proxy as we have basic support built in.

Feature highlights

  • Async Rust: fast and reliable
  • Http1 / Socks4 / Socks5 forward proxy protocol, SNI Proxy and TCP TPROXY
  • TLS over OpenSSL or BoringSSL or AWS-LC or Tongsuo, and even rustls
  • TLS MITM interception, decrypted traffic dump, HTTP1 and HTTP2 interception
  • ICAP audit protocol
  • Graceful reload
  • Customizable load balancing and failover strategies
  • Support for a variety of observability tools

See g3proxy for detailed introduction.

g3tiles

A work in progress reverse proxy solution.

g3bench

A benchmark tool that supports HTTP 1.x, HTTP 2, HTTP 3, TLS Handshake, DNS and Cloudflare Keyless.

See g3bench for detailed introduction.

g3mkcert

A tool to make root CA / intermediate CA / TLS server / TLS client certificates.

g3fcgen

Fake certificate generator for g3proxy.

g3iploc

IP location lookup service for g3proxy GeoIP support.

g3keymess

A simple implementation of Cloudflare keyless server.

Target Platform

Only Linux is fully supported yet. The code will compile on FreeBSD, NetBSD and macOS, but we haven't tested it there.

Feel free to open PRs to add support for other platforms.

Dev-env Setup Guide

Follow Dev-Setup.

Standards

Follow Standards.

Release and Packaging

We will set tags for each release of each component in the form <name>-v<version>. You can use these tags to generate source tarballs. And we have added deb and rpm package files for each component that is ready for distribution.

If you want to do a release build:

  1. generate a release tarball

    # if we have a tag <name>-v<version>
    ./scripts/release/build_tarball.sh <name>-v<version>
    # if no tags usable, you need to specify the git revision (e.g. HEAD)
    ./scripts/release/build_tarball.sh <name> <rev>
    

    All vendor sources will be added to the source tarball, so you can save the source tarball and build it offline at anywhere that has the compiler and dependencies installed.

  2. build the package

    For deb package:

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

    For rpm package:

    rpmbuild -ta ./<name>-<version>.tar.xz
    # if failed, you can run the following commands manually:
    tar xvf <name>-<version>.tar.xz ./<name>-<version>/<name>.spec
    cp <name>-<version>.tar.xz ~/rpmbuild/SOURCES/
    rpmbuild -ba ./<name>-<version>/<name>.spec
    

If you want to build a package directly from the git repo:

  • For deb package:

    ./build_deb_from_git.sh <name>
    
  • For rpm package:

    ./build_rpm_from_git.sh <name>
    

Pre-Built Packages

It is recommended to build packages yourself if you want to install them in a production environment.

For testing purpose, we have built and uploaded some packages to cloudsmith, you can find installation instructions there.

Static Linking

See Static Linking.

Build with different OpenSSL variants

See OpenSSL Variants.

LTS Version

See Long-Term Support.

Contribution

Please check Contributing for more details.

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.