curl -sSL https://raw.githubusercontent.com/ismoilovdevml/RustStrom/main/installer.sh | bash
chmod +x install.sh
./install.sh
sudo addgroup rust-strom
sudo adduser --system --no-create-home --ingroup rust-strom rust-strom
sudo mv /path/to/your/executable /usr/local/bin/rust-strom
sudo mkdir -p /etc/rust-strom
sudo mv /path/to/your/config.toml /etc/rust-strom/config.toml
sudo chown rust-strom:rust-strom /usr/local/bin/rust-strom
sudo chown -R rust-strom:rust-strom /etc/rust-strom/
sudo chmod 755 /usr/local/bin/rust-strom
sudo nano /etc/systemd/system/rust-strom.service
[Unit]
Description=Rust Strom Service
After=network.target
[Service]
Type=simple
User=rust-strom
Group=rust-strom
ExecStart=/usr/local/bin/rust-strom --config /etc/rust-strom/config.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl enable rust-strom
sudo systemctl start rust-strom
sudo systemctl daemon-reload
sudo systemctl restart rust-strom
sudo systemctl status rust-strom
Rust-Strom uses a TOML-based configuration file, typically located at /etc/rust-strom/config.toml. This file allows you to specify:
HTTP and HTTPS binding addresses. Backend pools, along with matching criteria and addresses. Load balancing strategies. Middlewares for additional request processing. Please refer to the example config.toml provided with the program for a detailed breakdown of available options.
Request
|
v
+------------------+ +------------------+ +--------------------+
| | | | | |
| Client/User +-------> Hyper +--------> MainService |
| | | | | |
+------------------+ +------------------+ +---------+----------+
|
v
+-------------+--------------+
| |
| BackendPoolMatcher |
| |
+-------------+--------------+
|
v
+-------------+--------------+
| |
| Health Check |
| |
+-------------+--------------+
|
v
+-------------+--------------+
| |
| LoadBalancingStrategy |
| RoundRobin |
| Random |
| IP-Hash |
| LeastConnection |
| Sticky Cookie🍪 |
| |
+-------------+--------------+
|
v
+-------------+--------------+
| |
| Middlewares +-----> [Compression, etc.]
| |
+-------------+--------------+
|
v
+-------------+--------------+
| |
| Backend Servers |
| |
+----------------------------+
|
|
Response
|
v
+------------------+ +------------------+ +--------------------+
| | | | | |
| Client/User <-------+ Hyper <--------+ MainService |
| | | | | |
+------------------+ +------------------+ +--------------------+