mirror of
https://github.com/zhboner/realm.git
synced 2026-11-17 16:17:22 +00:00
0c4e4b7c251809fc4de4f09dc24ea45c4648941d
Introduction
realm is a simple, high performance relay server written in rust.
Features
- Zero configuration. Setup and run in one command.
- Concurrency. Bidirectional concurrent traffic leads to high performance.
- Low resources cost.
Custom Build
Available Options:
- udp (enabled)
- tfo (disabled)
- zero-copy (enabled on linux)
# simple tcp
cargo build --release --no-default-features
# enable other options
cargo build --release --no-default-features --features udp, tfo, zero-copy
Usage
Realm 1.x
A high efficiency proxy tool
USAGE:
realm [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-u, --udp enable udp
-V, --version Prints version information
OPTIONS:
-c, --config <path> use config file
-l, --listen <addr> listen address
-r, --remote <addr> remote address
-x, --through <addr> send through
Start from command line arguments:
# enable udp
realm -l 127.0.0.1:5000 -r 1.1.1.1:443 --udp
# specify outbound ip
realm -l 127.0.0.1:5000 -r 1.1.1.1:443 --through 127.0.0.1
Use a config file:
realm -c config.json
Example:
{
"dns_mode": "ipv4_only",
"endpoints": [
{
"local": "0.0.0.0:5000",
"remote": "1.1.1.1:443"
},
{
"local": "0.0.0.0:10000",
"remote": "www.google.com:443",
"udp": true
},
{
"local": "0.0.0.0:15000",
"remote": "www.microsoft.com:443",
"through": "127.0.0.1"
}
]
}
dns_mode:
- ipv4_only
- ipv6_only
- ipv4_then_ipv6 (default)
- ipv6_then_ipv4
- ipv4_and_ipv6
endpoint objects:
- local (listen address)
- remote (remote address)
- through (send through specified ip or address, this is optional)
- udp (true|false, default=false)
Languages
Rust
99.1%
C
0.3%
Dockerfile
0.3%
C++
0.2%
Makefile
0.1%
