Skip to content

Commit

Permalink
Merge pull request #36 from xxf098/develop
Browse files Browse the repository at this point in the history
v0.15.0
  • Loading branch information
xxf098 authored Apr 22, 2023
2 parents f67b21d + 6669d93 commit 12c69f3
Show file tree
Hide file tree
Showing 38 changed files with 473 additions and 291 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18 # The Go version to download (if necessary) and use.
go-version: 1.20.1 # The Go version to download (if necessary) and use.
cache: true

- uses: actions/setup-node@v3
Expand All @@ -51,7 +51,7 @@ jobs:
- name: test link
run: |
echo '{"group": "cronjob", "speedtestMode": "all", "pingMethod": "googleping", "sortMethod": "rspeed", "concurrency": 2, "testMode": 2, "subscription": "https://raw.githubusercontent.com/freefq/free/master/v2", "timeout": 16, "language": "en", "fontSize": 24, "theme": "rainbow", "generatePicMode": 3}' > config.json
echo '{"group": "cronjob", "speedtestMode": "all", "pingMethod": "googleping", "sortMethod": "rspeed", "concurrency": 2, "testMode": 2, "subscription": "https://raw.githubusercontent.com/freefq/free/master/v2", "timeout": 16, "language": "en", "fontSize": 24, "theme": "rainbow", "outputMode": 3}' > config.json
./lite --config config.json --test https://raw.githubusercontent.com/freefq/free/master/v2
ls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20.1
cache: true
- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20.1
cache: true

- uses: actions/setup-node@v3
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# LiteSpeedTest

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


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

Expand All @@ -16,6 +23,7 @@ Run as a speed test tool:
# test in command line only mode
./lite --test https://raw.githubusercontent.com/freefq/free/master/v2
# test in command line only mode with custom config.
./lite --config config.json --test https://raw.githubusercontent.com/freefq/free/master/v2
# details can find here https://github.com/xxf098/LiteSpeedTest/blob/master/config.json
# all config options:
# "group":"job", // group name
Expand All @@ -30,8 +38,7 @@ Run as a speed test tool:
# "fontSize":24,
# "unique": true, // remove duplicated value
# "theme":"rainbow",
# "generatePicMode": 1 // 0: base64 1: pic path 2: no pic 3: json
./lite --config config.json --test https://raw.githubusercontent.com/freefq/free/master/v2
# "outputMode": 1 // 0: base64 1: pic path 2: no pic 3: json 4: txt
Run as a grpc server:
Expand Down Expand Up @@ -97,7 +104,7 @@ func testPing() error {
Theme: "rainbow",
Unique: true,
Timeout: 10 * time.Second,
GeneratePicMode: 0,
OutputMode: 0,
}
nodes, err := web.TestContext(ctx, opts, &web.EmptyMessageWriter{})
if err != nil {
Expand Down
111 changes: 55 additions & 56 deletions api/rpc/lite/lite.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/rpc/lite/lite.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ message TestRequest {
uint32 FontSize = 9;
string Theme = 10;
int64 Timeout = 11;
uint32 GeneratePicMode = 12; // 0: base64 1:file path 2: no pic
uint32 OutputMode = 12; // 0: base64 1:file path 2: no pic 3: json 4: txt
}

// reply message
Expand Down
24 changes: 12 additions & 12 deletions api/rpc/liteclient/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
func TestStartClient(t *testing.T) {
go s.StartServer(10999)
req := pb.TestRequest{
GroupName: "Default",
SpeedTestMode: pb.SpeedTestMode_all,
PingMethod: pb.PingMethod_googleping,
SortMethod: pb.SortMethod_rspeed,
Concurrency: 2,
TestMode: 2,
Subscription: "https://raw.githubusercontent.com/freefq/free/master/v2",
Language: "en",
FontSize: 24,
Theme: "rainbow",
Timeout: 10,
GeneratePicMode: 0,
GroupName: "Default",
SpeedTestMode: pb.SpeedTestMode_all,
PingMethod: pb.PingMethod_googleping,
SortMethod: pb.SortMethod_rspeed,
Concurrency: 2,
TestMode: 2,
Subscription: "https://raw.githubusercontent.com/freefq/free/master/v2",
Language: "en",
FontSize: 24,
Theme: "rainbow",
Timeout: 10,
OutputMode: 0,
}
reply, err := StartClient("127.0.0.1:10999", &req)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/rpc/liteclientpy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
virtualenv -p python3 env
source env/bin/activate
pip install grpcio grpcio-tools
cp ../lite/lite.proto
cp ../lite/lite.proto ./
# generate lite_pb2.py lite_pb2_grpc.py
python3 -m grpc_tools.protoc --proto_path=. ./lite.proto --python_out=. --grpc_python_out=.
```
Expand Down
2 changes: 1 addition & 1 deletion api/rpc/liteclientpy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def start_test(self):
FontSize=24,
Theme="rainbow",
Timeout=10,
GeneratePicMode=0
OutputMode=0
)
print(f'{message}')
for response in self.stub.StartTest(message):
Expand Down
Loading

0 comments on commit 12c69f3

Please sign in to comment.