diff --git a/.github/workflows/clippy-check.yml b/.github/workflows/clippy-check.yml index 1f8dbc17..4ae180ec 100644 --- a/.github/workflows/clippy-check.yml +++ b/.github/workflows/clippy-check.yml @@ -21,10 +21,6 @@ jobs: - uses: Swatinem/rust-cache@v2 - if: ${{ runner.os == 'Windows' }} uses: ilammy/setup-nasm@v1 - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust run: | rustup set profile minimal diff --git a/crates/shadowsocks/src/relay/socks5.rs b/crates/shadowsocks/src/relay/socks5.rs index 000cc797..8ccb2b7a 100644 --- a/crates/shadowsocks/src/relay/socks5.rs +++ b/crates/shadowsocks/src/relay/socks5.rs @@ -478,7 +478,7 @@ fn write_domain_name_address(dnaddr: &str, port: u16, buf: &mut B) { "domain name length must be smaller than 256" ); buf.put_u8(dnaddr.len() as u8); - buf.put_slice(dnaddr[..].as_bytes()); + buf.put_slice(dnaddr.as_bytes()); buf.put_u16(port); } @@ -837,7 +837,7 @@ impl UdpAssociateHeader { } } -/// Username/Password Authentication Inittial Negociation +/// Username/Password Authentication Initial Negotiation /// /// https://datatracker.ietf.org/doc/html/rfc1929 /// @@ -880,7 +880,7 @@ impl PasswdAuthRequest { let mut ver_buf = [0u8; 1]; let _ = r.read_exact(&mut ver_buf).await?; - // The only valid subnegociation version + // The only valid subnegotiation version if ver_buf[0] != 0x01 { return Err(Error::UnsupportedPasswdAuthVersion(ver_buf[0])); }