Skip to content

Commit 754c4cd

Browse files
authored
Merge pull request #36 from sxgunchenko/master
2 parents f2fb873 + 298ef8f commit 754c4cd

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ jobs:
4040
with:
4141
command: build
4242
args: --tests
43-
- run: sudo add-apt-repository ppa:artyom.h31/3proxy
44-
- run: sudo apt update
45-
- run: sudo apt install 3proxy
43+
- name: Download 3proxy
44+
run: |
45+
curl https://api.github.com/repos/3proxy/3proxy/releases/latest |
46+
grep -wo "https.*x86_64\.deb" |
47+
xargs curl -L -o 3proxy.deb
48+
- run: sudo dpkg -i 3proxy.deb
49+
- run: sudo apt install -f
4650
- run: nohup cat .github/workflows/proxy.cfg | 3proxy &
4751
- run: nohup cat .github/workflows/proxy_auth.cfg | 3proxy &
4852
- run: RUST_BACKTRACE=1 timeout 10 cargo test --all --all-features -- --test-threads=1

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ trait ReadExt: AsyncReadExt + Unpin {
200200

201201
async fn read_string(&mut self) -> Result<String> {
202202
let len = self.read_u8().await?;
203-
let mut str = Vec::with_capacity(len as usize);
203+
let mut str = vec![0; len as usize];
204204
self.read_exact(&mut str).await?;
205205
let str = String::from_utf8(str)?;
206206
Ok(str)

0 commit comments

Comments
 (0)