Skip to content

Commit

Permalink
修改一些参数
Browse files Browse the repository at this point in the history
  • Loading branch information
badafans committed Dec 25, 2021
1 parent 52d6d58 commit 33c2ce3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions batch/CF优选IP-ANSI.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ goto :eof
set /a tasknum=25
set /a bandwidth=0
set /p bandwidth=请设置期望的带宽大小(默认%bandwidth%,单位 Mbps):
set /p tasknum=请设置RTT测试进程数(默认%tasknum%,最大100):
set /p tasknum=请设置RTT测试进程数(默认%tasknum%,最大50):
if %tasknum% EQU 0 (set /a tasknum=25&echo 进程数不能为0,自动设置为默认值)
if %tasknum% GTR 100 (set /a tasknum=100&echo 超过最大进程限制,自动设置为最大值)
if %tasknum% GTR 50 (set /a tasknum=50&echo 超过最大进程限制,自动设置为最大值)
set /a speed=bandwidth*128
set /a startH=%time:~0,2%
if %time:~3,1% EQU 0 (set /a startM=%time:~4,1%) else (set /a startM=%time:~3,2%)
Expand Down
4 changes: 2 additions & 2 deletions batch/CF优选IP-UTF-8.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ goto :eof
set /a tasknum=25
set /a bandwidth=0
set /p bandwidth=请设置期望的带宽大小(默认%bandwidth%,单位 Mbps):
set /p tasknum=请设置RTT测试进程数(默认%tasknum%,最大100):
set /p tasknum=请设置RTT测试进程数(默认%tasknum%,最大50):
if %tasknum% EQU 0 (set /a tasknum=25&echo 进程数不能为0,自动设置为默认值)
if %tasknum% GTR 100 (set /a tasknum=100&echo 超过最大进程限制,自动设置为最大值)
if %tasknum% GTR 50 (set /a tasknum=50&echo 超过最大进程限制,自动设置为最大值)
set /a speed=bandwidth*128
set /a startH=%time:~0,2%
if %time:~3,1% EQU 0 (set /a startM=%time:~4,1%) else (set /a startM=%time:~3,2%)
Expand Down
6 changes: 3 additions & 3 deletions shell/cf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function bettercloudflareip (){
declare -i bandwidth
declare -i speed
read -p "请设置期望的带宽大小(默认0,单位 Mbps):" bandwidth
read -p "请设置RTT测试进程数(默认25,最大100):" tasknum
read -p "请设置RTT测试进程数(默认25,最大50):" tasknum
if [ -z "$tasknum" ]
then
tasknum=25
Expand All @@ -16,10 +16,10 @@ then
echo 进程数不能为0,自动设置为默认值
tasknum=25
fi
if [ $tasknum -gt 100 ]
if [ $tasknum -gt 50 ]
then
echo 超过最大进程限制,自动设置为最大值
tasknum=100
tasknum=50
fi
speed=bandwidth*128*1024
starttime=$(date +'%Y-%m-%d %H:%M:%S')
Expand Down

0 comments on commit 33c2ce3

Please sign in to comment.