Skip to content

Commit b5a64fb

Browse files
committed
Initial release
0 parents  commit b5a64fb

File tree

7 files changed

+297
-0
lines changed

7 files changed

+297
-0
lines changed

.github/workflows/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
target: [x86_64-unknown-linux-gnu, x86_64-apple-darwin, x86_64-pc-windows-msvc]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install Rust
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: stable
23+
target: ${{ matrix.target }}
24+
25+
- name: Build
26+
run: cargo build --release --target ${{ matrix.target }}
27+
28+
- name: Prepare binary name
29+
id: binary_name
30+
run: |
31+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
32+
echo "name=mfloods-windows-x86_64.exe" >> $GITHUB_OUTPUT
33+
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
34+
echo "name=mfloods-macos-x86_64" >> $GITHUB_OUTPUT
35+
else
36+
echo "name=mfloods-linux-x86_64" >> $GITHUB_OUTPUT
37+
fi
38+
39+
- name: Upload binary
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: ${{ steps.binary_name.outputs.name }}
43+
path: target/${{ matrix.target }}/release/mfloods*
44+
45+
release:
46+
needs: build
47+
runs-on: ubuntu-latest
48+
if: startsWith(github.ref, 'refs/tags/')
49+
50+
steps:
51+
- name: Download all artifacts
52+
uses: actions/download-artifact@v3
53+
54+
- name: Create Release
55+
uses: softprops/action-gh-release@v1
56+
with:
57+
files: |
58+
mfloods-*
59+
body: |
60+
## HTTP Request Flooder (mfloods) Release
61+
62+
### What's New
63+
- High-performance HTTP request flooding tool
64+
- Multi-threading support for concurrent requests
65+
- Proxy support (HTTP, HTTPS, SOCKS5)
66+
- SSL certificate verification options
67+
- Real-time progress tracking
68+
- Connection pooling for resource efficiency
69+
70+
### Quick Start
71+
1. Download the binary for your platform
72+
2. Make it executable: `chmod +x mfloods`
73+
3. Create a request file
74+
4. Run: `./mfloods -num 100 -th 4 request.txt`
75+
76+
### Usage Examples
77+
```bash
78+
# Basic usage
79+
./mfloods request.txt
80+
81+
# Load testing
82+
./mfloods -num 1000 -th 8 -log info request.txt
83+
84+
# With proxy
85+
./mfloods -num 100 -th 4 -proxy http://127.0.0.1:8080 request.txt
86+
87+
# With SSL bypass
88+
./mfloods -insecure -proxy http://127.0.0.1:8080 request.txt
89+
```
90+
91+
### Security Notice
92+
This tool is for testing purposes only. Use responsibly and only on systems you own or have permission to test.
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Source code
2+
src/
3+
Cargo.toml
4+
Cargo.lock
5+
6+
# Build artifacts
7+
target/
8+
*.rs
9+
10+
# IDE files
11+
.vscode/
12+
.idea/
13+
*.swp
14+
*.swo
15+
16+
# OS files
17+
.DS_Store
18+
Thumbs.db
19+
20+
# Logs
21+
*.log
22+
23+
# Temporary files
24+
*.tmp
25+
*.temp

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 HTTP Request Flooder
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# HTTP Request Flooder (mfloods)
2+
3+
A high-performance HTTP request flooding tool written in Rust, designed for load testing and stress testing web applications.
4+
5+
## Features
6+
7+
- 🚀 **High Performance**: Built with Rust for maximum speed and efficiency
8+
- 🔄 **Parallel Processing**: Configurable multi-threading for concurrent requests
9+
- 🌐 **Proxy Support**: HTTP, HTTPS, and SOCKS5 proxy support
10+
- 🔒 **SSL Options**: Configurable SSL certificate verification
11+
- 📊 **Progress Tracking**: Real-time progress bar for large request batches
12+
- 📝 **Flexible Input**: Raw HTTP request files for complete control
13+
- 🎯 **Connection Pooling**: Efficient connection management to prevent resource exhaustion
14+
- 📈 **Detailed Logging**: Multiple log levels for debugging and monitoring
15+
16+
## Quick Start
17+
18+
### Download
19+
20+
Download the latest release for your platform from the [Releases](https://github.com/yourusername/mfloods/releases) page.
21+
22+
### Basic Usage
23+
24+
```bash
25+
# Single request
26+
./mfloods request.txt
27+
28+
# Multiple requests with threading
29+
./mfloods -num 100 -th 4 request.txt
30+
31+
# With proxy
32+
./mfloods -num 50 -th 2 -proxy http://proxy:8080 request.txt
33+
34+
# With SSL bypass for proxy
35+
./mfloods -insecure -proxy http://127.0.0.1:8080 request.txt
36+
```
37+
38+
## Command Line Options
39+
40+
| Option | Description | Default |
41+
|--------|-------------|---------|
42+
| `-h, --help` | Show help message | - |
43+
| `-log <level>` | Set log level (error, warn, info, debug, trace) | info |
44+
| `-num <count>` | Number of requests to make | 1 |
45+
| `-th <threads>` | Number of threads for parallel processing | 1 |
46+
| `-proxy <url>` | Proxy URL (http://, https://, socks5://) | none |
47+
| `-insecure` | Disable SSL certificate verification | false |
48+
49+
## Log Levels
50+
51+
- **error**: Only error messages
52+
- **warn**: Warnings and errors
53+
- **info**: Important information with progress bar (default)
54+
- **debug**: Detailed information including headers
55+
- **trace**: Most detailed information
56+
57+
## HTTP Request File Format
58+
59+
Create a text file containing a raw HTTP request:
60+
61+
```
62+
POST /api/endpoint HTTP/2
63+
Host: example.com
64+
User-Agent: mfloods/1.0
65+
Content-Type: application/json
66+
Accept: */*
67+
Connection: keep-alive
68+
69+
{"key": "value"}
70+
```
71+
72+
### Example Request File
73+
74+
```http
75+
POST /bbs/api/global/apply/bl-auth HTTP/2
76+
Host: sgp-api.buy.mi.com
77+
User-Agent: okhttp/4.12.0
78+
Accept-Encoding: gzip, deflate, br
79+
Accept: */*
80+
Connection: keep-alive
81+
Cookie: new_bbs_serviceToken=XZCh;
82+
Content-Type: application/json; charset=utf-8
83+
84+
{"is_retry":true}
85+
```
86+
87+
## Use Cases
88+
89+
### Load Testing
90+
```bash
91+
# Test with 1000 requests using 8 threads
92+
./mfloods -num 1000 -th 8 -log info request.txt
93+
```
94+
95+
### Proxy Testing
96+
```bash
97+
# Test through HTTP proxy
98+
./mfloods -num 100 -th 4 -proxy http://127.0.0.1:8080 request.txt
99+
100+
# Test through SOCKS5 proxy
101+
./mfloods -num 100 -th 4 -proxy socks5://127.0.0.1:9050 request.txt
102+
```
103+
104+
### SSL/Proxy Scenarios
105+
```bash
106+
# Bypass SSL verification for proxy testing
107+
./mfloods -insecure -proxy http://127.0.0.1:8080 request.txt
108+
```
109+
110+
## Performance Features
111+
112+
- **Connection Pooling**: Reuses connections to reduce overhead
113+
- **Resource Management**: Automatic cleanup of idle connections
114+
- **Concurrency Control**: Limits concurrent connections to prevent resource exhaustion
115+
- **Timeout Protection**: Prevents hanging requests from consuming resources
116+
117+
## Security Notice
118+
119+
⚠️ **Warning**: This tool is designed for testing and debugging purposes only. Use responsibly and only on systems you own or have explicit permission to test.
120+
121+
- The `-insecure` flag disables SSL security - use only in trusted environments
122+
- Always respect rate limits and terms of service
123+
- Do not use for malicious purposes
124+
125+
## Building from Source
126+
127+
If you want to build from source (not included in this repository):
128+
129+
```bash
130+
git clone <source-repo>
131+
cd mfloods
132+
cargo build --release
133+
```
134+
135+
## License
136+
137+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
138+
139+
## Contributing
140+
141+
This repository contains only the compiled binaries and documentation. For source code contributions, please refer to the main development repository.
142+
143+
## Support
144+
145+
For issues, questions, or feature requests, please open an issue on GitHub.
146+
147+
---
148+
149+
**Note**: This repository contains only the compiled binaries and documentation. The source code is not included for distribution purposes.

release/example-request.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
POST /api/test HTTP/2
2+
Host: example.com
3+
User-Agent: mfloods/1.0
4+
Content-Type: application/json
5+
Accept: */*
6+
Connection: keep-alive
7+
8+
{"test": "data"}

release/mfloods-darwin-x86_64

4.1 MB
Binary file not shown.

release/mfloods-macos-x86_64

4.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)