feat: add configs and manual for bench1
This commit is contained in:
parent
b743d47f09
commit
d67ef98046
3 changed files with 54 additions and 0 deletions
17
README.md
17
README.md
|
@ -23,6 +23,23 @@ that is important, I guess (?), in China and Iran.
|
|||
- Get [sing-box](https://github.com/SagerNet/sing-box/releases/latest)
|
||||
and [xray](github.com/XTLS/Xray-core/releases/latest) binaries
|
||||
by downloading from "Releases" or compiling by yourself
|
||||
|
||||
Benchmark 1:
|
||||
- Install [hyperfine](https://github.com/sharkdp/hyperfine)
|
||||
- Run `./sing-box run --config direct.json` and `./xray run -c direct_xray.json` on client
|
||||
(use different terminal tabs/windows, or put one proxy to background with `&`)
|
||||
- Find some binary file with size about 1.5M and upload it to your server
|
||||
(because I can not guarantee that I won't delete `Marisa.m4a` used in tests;
|
||||
it's an audio stream of some video downloaded from YT)
|
||||
- Run
|
||||
`hyperfine -m 50 'curl https://...link to the file...' 'curl --proxy socks5://127.0.0.1:2080 https://link' 'curl --proxy socks5://127.0.0.1:2081 https://link'`
|
||||
- Choose some web site with a small load and no ratelimits that gives an https-redirect
|
||||
with a small HTML response when accessing it by plain http, like `http://dc09.ru`,
|
||||
repeat the test replacing the link
|
||||
- Choose some web site with a heavy load and relatively small HTML landing, like `https://github.com`,
|
||||
repeat the test replacing the link
|
||||
|
||||
Benchmark 2:
|
||||
- Compile [iperf3 fork with socks5 support](https://github.com/davidBar-On/iperf/tree/issue-1095-socks5-support)
|
||||
by cloning git repo (don't forget that you need branch `issue-1095-socks5-support`, not master!)
|
||||
and running `./configure && make` -- you'll get a built iperf in `./src/iperf3`
|
||||
|
|
17
direct.json
Normal file
17
direct.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"log": {
|
||||
"disabled": true
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"listen_port": 2080
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct"
|
||||
}
|
||||
]
|
||||
}
|
20
direct_xray.json
Normal file
20
direct_xray.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"log": {
|
||||
"loglevel": "none"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"port": 2081,
|
||||
"settings": {
|
||||
"udp": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue