Skip to content

Commit

Permalink
build: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ReaJason committed Oct 27, 2024
1 parent 294e866 commit 6e2b907
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 58 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
with:
components: rustfmt,clippy
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly x lint
- run: cargo +nightly clippy
- run: cargo +nightly fmt
build:
runs-on: ubuntu-22.04
steps:
Expand Down
125 changes: 71 additions & 54 deletions proxrs/src/protocol/vless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,62 +245,79 @@ mod test {
// BC%9A2024-10-16 vless://[email protected]:60001?
// mode=multi&security=reality&encryption=none&type=tcp&flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&sni=python.org&
// servername=python.org&spx=%2F&fp=edge#United+States+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// us2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=qq#United+States+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// us3.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#United+States+03 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// us4.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=firefox#United+States+04 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// jp1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=ios#Japan+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// servername=python.org&spx=%2F&fp=edge#United+States+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ us2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=qq#United+States+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ us3.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=safari#United+States+03
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ us4.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=firefox#United+States+04
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ jp1.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=ios#Japan+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// jp2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=edge#Japan+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// jp3.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Japan+03 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// jp4.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=qq#Japan+04 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// sni=python.org&servername=python.org&spx=%2F&fp=edge#Japan+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ jp3.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=safari#Japan+03
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ jp4.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=qq#Japan+04 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// kr1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Korea+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// kr2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=firefox#Korea+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// hk1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=ios#Hong+Kong+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// hk2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=qq#Hong+Kong+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// id1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=ios#Indonesia+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// id2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Indonesia+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// sg1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Singapore+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// sg2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Singapore+02 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// sg3.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=qq#Singapore+03 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// sg4.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=qq#Singapore+04 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// uk1.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=firefox#United+Kindom+01 vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@
// uk2.helloco.xyz:60001?mode=multi&security=reality&encryption=none&type=tcp&
// flow=xtls-rprx-vision&pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d&
// sni=python.org&servername=python.org&spx=%2F&fp=ios#United+Kindom+02
// sni=python.org&servername=python.org&spx=%2F&fp=safari#Korea+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ kr2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=firefox#Korea+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ hk1.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=ios#Hong+Kong+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ hk2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=qq#Hong+Kong+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ id1.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=ios#Indonesia+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ id2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=safari#Indonesia+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ sg1.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=safari#Singapore+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ sg2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=safari#Singapore+02
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ sg3.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=qq#Singapore+03
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ sg4.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=qq#Singapore+04
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ uk1.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=firefox#United+Kindom+01
// vless://b3524347-d27b-4d4a-8371-6cf837dea4d2@ uk2.helloco.xyz:60001?mode=multi&
// security=reality&encryption=none&type=tcp& flow=xtls-rprx-vision&
// pbk=Kyrdn7OhtL66JwSRScElBxoFSZLr5beafP4njt_Y_G0&sid=a3ffb25d& sni=python.org&
// servername=python.org&spx=%2F&fp=ios#United+Kindom+02
}
4 changes: 1 addition & 3 deletions proxrs/src/sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ impl SubManager {
file_path: P,
) -> Result<Vec<Proxy>, Box<dyn std::error::Error>> {
match fs::read_to_string(file_path) {
Ok(contents) => {
Ok(Self::parse_content(contents)?)
}
Ok(contents) => Ok(Self::parse_content(contents)?),
Err(e) => Err(format!("Error reading file: {}", e).into()),
}
}
Expand Down

0 comments on commit 6e2b907

Please sign in to comment.