From e835a1c54823dc503d32514578e22e08bfff6f59 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:23:37 +0800 Subject: [PATCH] Bump version 0.5.13 --- .github/workflows/rust.yml | 5 +---- Cargo.toml | 20 ++++++++++---------- examples/dns-query.rs | 2 +- examples/util/dns.rs | 4 ++-- src/client/mod.rs | 2 -- src/server/mod.rs | 2 -- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 50a88f8..c14019c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,10 +1,7 @@ name: Push or PR on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + [push, pull_request] env: CARGO_TERM_COLOR: always diff --git a/Cargo.toml b/Cargo.toml index f33b877..5ee17c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "socks5-impl" -version = "0.5.12" +version = "0.5.13" authors = ["ssrlive "] description = "Fundamental abstractions and async read / write functions for SOCKS5 protocol and Relatively low-level asynchronized SOCKS5 server implementation based on tokio" categories = ["network-programming", "asynchronous"] @@ -17,23 +17,23 @@ tokio = ["dep:tokio"] [dependencies] as-any = "0.3" async-trait = "0.1" -byteorder = "1.5" -bytes = "1.5" +byteorder = "1" +bytes = "1" percent-encoding = "2" -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0" -tokio = { version = "1.36", features = ["full"], optional = true } +serde = { version = "1", features = ["derive"] } +thiserror = "1" +tokio = { version = "1", features = ["full"], optional = true } [dev-dependencies] -clap = { version = "4.5", features = ["derive"] } -ctrlc2 = { version = "3.5", features = ["tokio", "termination"] } +clap = { version = "4", features = ["derive"] } +ctrlc2 = { version = "3", features = ["tokio", "termination"] } dotenvy = "0.15" env_logger = "0.11" log = "0.4" moka = { version = "0.12", features = ["future"] } rand = "0.8" -tokio = { version = "1.36", features = ["macros", "rt-multi-thread"] } -trust-dns-proto = "0.23" +tokio = { version = "1", features = ["macros", "rt-multi-thread"] } +hickory-proto = "0.24" [[example]] name = "demo-client" diff --git a/examples/dns-query.rs b/examples/dns-query.rs index 6f726a3..67084db 100644 --- a/examples/dns-query.rs +++ b/examples/dns-query.rs @@ -1,12 +1,12 @@ mod util; +use hickory_proto::rr::record_type::RecordType; use socks5_impl::{client, protocol::UserKey, Result}; use std::{net::SocketAddr, time::Duration}; use tokio::{ io::{AsyncReadExt, AsyncWriteExt}, net::TcpStream, }; -use trust_dns_proto::rr::record_type::RecordType; use util::dns; /// DNS query through socks5 proxy. diff --git a/examples/util/dns.rs b/examples/util/dns.rs index dd5b37a..d03c033 100644 --- a/examples/util/dns.rs +++ b/examples/util/dns.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use std::{net::IpAddr, str::FromStr}; -use trust_dns_proto::{ +use hickory_proto::{ op::{header::MessageType, op_code::OpCode, query::Query, Message, ResponseCode}, rr::{record_type::RecordType, Name, RData}, }; +use std::{net::IpAddr, str::FromStr}; pub fn build_dns_query(domain: &str, query_type: RecordType, used_by_tcp: bool) -> Result, String> { use rand::{rngs::StdRng, Rng, SeedableRng}; diff --git a/src/client/mod.rs b/src/client/mod.rs index 80ddcbc..f8d2081 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -1,5 +1,3 @@ -#![cfg(feature = "tokio")] - use crate::{ error::{Error, Result}, protocol::{Address, AddressType, AuthMethod, Command, Reply, StreamOperation, UserKey, Version}, diff --git a/src/server/mod.rs b/src/server/mod.rs index 249a08a..0a42db6 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -1,5 +1,3 @@ -#![cfg(feature = "tokio")] - use std::{ net::SocketAddr, task::{Context, Poll},