Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace buffered with proxy streams in FTPSocket
  • Loading branch information
ViRb3 committed Oct 5, 2025
commit ad035ed11771c541f40477bf37c6ee4ae8c4eada
12 changes: 4 additions & 8 deletions 12 ftp/src/main/java/ch/cyberduck/core/ftp/FTPSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
* Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch
*/

import ch.cyberduck.core.preferences.PreferencesFactory;

import org.apache.commons.io.input.ProxyInputStream;
import org.apache.commons.io.output.ProxyOutputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
Expand Down Expand Up @@ -137,8 +135,7 @@ public SocketChannel getChannel() {
@Override
public synchronized OutputStream getOutputStream() throws IOException {
if(outputStreamWrapper == null) {
outputStreamWrapper = new BufferedOutputStream(delegate.getOutputStream(),
PreferencesFactory.get().getInteger("connection.buffer")) {
outputStreamWrapper = new ProxyOutputStream(delegate.getOutputStream()) {
@Override
public void close() throws IOException {
try {
Expand All @@ -162,8 +159,7 @@ public void close() throws IOException {
@Override
public synchronized InputStream getInputStream() throws IOException {
if(inputStreamWrapper == null) {
inputStreamWrapper = new BufferedInputStream(delegate.getInputStream(),
PreferencesFactory.get().getInteger("connection.buffer")) {
inputStreamWrapper = new ProxyInputStream(delegate.getInputStream()) {
@Override
public void close() throws IOException {
// Stream close will call Socket.close(), so override it with ours
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.