1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-08-10 22:41:43 +02:00
This commit is contained in:
Anton Titovets
2025-07-30 22:26:40 +03:00
parent 5fa71e392a
commit 97880521f4
7 changed files with 23 additions and 8 deletions

View File

@@ -1,9 +1,9 @@
"MAIN ---" "MAIN ---"
linux-vdso.so.1 (0x00007ffe2dff2000) linux-vdso.so.1 (0x00007ffe82d8e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007dec8fc00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000725577200000)
libc.so.6 => /lib64/libc.so.6 (0x00007dec8f800000) libc.so.6 => /lib64/libc.so.6 (0x0000725576e00000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007dec8f400000) libdl.so.2 => /lib64/libdl.so.2 (0x0000725576a00000)
/lib64/ld-linux-x86-64.so.2 (0x00007dec90200000) /lib64/ld-linux-x86-64.so.2 (0x0000725577800000)
GLIBC_2.2.5 GLIBC_2.2.5
GLIBC_2.3 GLIBC_2.3
GLIBC_2.3.4 GLIBC_2.3.4

View File

@@ -205,7 +205,7 @@ impl FtpClient {
.map_err(|e| format!("Upload error: {}", e))?; .map_err(|e| format!("Upload error: {}", e))?;
let _ = std::io::Write::flush(&mut data_stream); let _ = std::io::Write::flush(&mut data_stream);
std::thread::sleep(std::time::Duration::from_millis(150)); std::thread::sleep(std::time::Duration::from_millis(300));
stream.finalize_put_stream(data_stream) stream.finalize_put_stream(data_stream)
.map(|_| bytes) .map(|_| bytes)

View File

@@ -1,5 +1,6 @@
use std::io::{BufRead, BufReader, Write}; use std::io::{BufRead, BufReader, Write};
use std::net::{SocketAddr, TcpStream}; use std::net::{SocketAddr, TcpStream};
use std::time::Duration;
use socks::{Socks4Stream, Socks5Stream}; use socks::{Socks4Stream, Socks5Stream};
use base64::{Engine as _, engine::general_purpose}; use base64::{Engine as _, engine::general_purpose};
use suppaftp::FtpError; use suppaftp::FtpError;
@@ -30,9 +31,23 @@ pub fn make_passive_proxy_stream(
addr addr
}; };
create_tcp_connection_for_passive(&proxy_settings, corrected_addr) match create_tcp_connection_for_passive(&proxy_settings, corrected_addr)
.map_err(|e| FtpError::ConnectionError( .map_err(|e| FtpError::ConnectionError(
std::io::Error::new(std::io::ErrorKind::Other, e))) std::io::Error::new(std::io::ErrorKind::Other, e))){
Ok(tcp_connection) => {
let w_timeout = Some(Duration::from_secs(ftp_settings.write_timeout));
let r_timeout = Some(Duration::from_secs(ftp_settings.read_timeout));
let _ = tcp_connection.set_write_timeout(w_timeout);
let _ = tcp_connection.set_read_timeout(r_timeout);
Ok(tcp_connection)
},
Err(e) => Err(e)
}
} }
pub fn create_tcp_connection( pub fn create_tcp_connection(

Binary file not shown.

Binary file not shown.