A proxy client/server for bypassing GFW censorship.
This is a hobby project and not for production.
Currently supports:
- HTTP in/outbound with basic username/password authentication
- SOCKS5 in/outbound with CONNECT command and username/password authentication (TCP only)
- Shadowsocks in/outbound (TCP only)
- VMess in/outbound
- Trojan outbound
- TLS/WS/WSS transport layer for in/outbounds
Create a configuration file in TOML v0.5 format.
Detailed explanation can be found in rusty_ladder/examples/example.toml.
For example, a simple SOCKS5 proxy server:
[log]
level = "info"
[[inbounds]]
addr = "0.0.0.0:40080"
protocol = "socks5"
[[outbounds]]
protocol = "freedom"
More configuration examples can be found in rusty_ladder/examples/.
Start proxy with
./rusty_ladder -c config.tomlIf built with feature use-tui enabled, run with --tui to enable the TUI.
./rusty_ladder -c config.toml --tuiBuild with cargo by running:
cargo build --releaseBinary will be in ./target/release/.
cross is used to build for different platforms.
cross build --release --no-default-features --features "$FEATURES" --target $targetCommandline:
-
parse-url(Enabled by default)Enable commandline option that parse URL:
--inbound,--outbound,--log,--block -
parse-config(Enabled by default)Enable commandline option that parse JSON or TOML:
--config
DNS:
-
local-dnsEnable local DNS proxy.
-
local-dns-over-opensslEnable local DNS proxy and remote DNS over TLS using OpenSSL.
-
local-dns-over-rustlsEnable local DNS proxy and remote DNS over TLS using rustls. You can only use either
-opensslor-rustls.
API:
-
use-tui(Enabled by default)Enable TUI.
-
use-webapiEnable web API
Router:
-
use-protobufEnable support for v2ray geosite/geoip data file.
-
use-router-regex(Enabled by default)Enable regex support for router.
Transport:
-
all-transports-rustls(Enabled by default)Enable all transports with rustls as TLS library.
-
all-transports-opensslEnable all transport with OpenSSL as TLS library. You can only use either
-opensslor-rustls/-ring.Requires OpenSSL.
-
ws-transport-rustls|ws-transport-opensslEnable websocket transport layer.
-
tls-transport-rustls|tls-transport-opensslEnable TLS transport layer.
-
h2-transport-rustls|h2-transport-opensslEnable h2 transport layer.
Proxy:
-
all-proxies-ring(Enabled by default)Enable all proxies with ring/RustCrypto as crypto library.
-
all-proxies-opensslEnable all proxies with OpenSSL as crypto library.
-
use-udp(Enabled by default)Enable UDP support for some proxies. Currently only Shadowsocks outbound, VMess in/outbound support UDP.
-
chain-outboundEnable chain proxy outbound.
-
trojan-outboundEnable Trojan proxy outbound.
-
socks5-inboundEnable SOCKS5 proxy inbound.
-
socks5-outboundEnable SOCKS5 proxy outbound.
-
socks5Enable both
socks5-inboundandsocks5-outbound. -
http-inboundEnable HTTP proxy inbound.
-
http-outboundEnable HTTP proxy outbound.
-
http-proxyEnable both
http-inboundandhttp-outbound. -
shadowsocks-inbound-ring|shadowsocks-inbound-opensslEnable Shadowsocks proxy inbound.
-
shadowsocks-outbound-ring|shadowsocks-outbound-opensslEnable Shadowsocks proxy outbound.
-
shadowsocks-ring|shadowsocks-opensslEnable both Shadowsocks inbound and outbound.
-
vmess-inbound-ring|vmess-inbound-opensslEnable VMess proxy inbound.
-
vmess-outbound-ring|vmess-outbound-opensslEnable VMess proxy outbound.
-
vmess-ring|vmess-opensslEnable both VMess inbound and outbound.
OpenSSL is needed if any feature with -openssl is enabled.
Run unit tests and integration tests with
export RUST_BACKTRACE=1
# Specify log level.
export RUST_LOG=trace
# V2RAY_PATH must be specified to run integration tests.
export V2RAY_PATH=../v2ray/v2ray
cargo test --workspaceCopyright (C) 2021 by reddal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.