satiromarra / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
23 stars 3 forks source link

Rejected data connection for transfer, IP addresses of control and data connection do not match #62

Closed jdanign closed 1 year ago

jdanign commented 1 year ago

Do you read the FAQ?

Describe the bug It seems that the connection is established when Visual Studio Code starts and the extension is loaded. When switching to VPN, the connection still alive and files are rejected because the connection IP is no longer the same than files sent.

Expected behavior It would be interesting to add a button or command to easily restart the FTP connection.

Desktop (please complete the following information):

Extension Logs from Startup - required [error] Error: Directoryname not valid at F (c:\Users\Dani.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:70809) at p. (c:\Users\Dani.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:71533) at p.emit (node:events:390:28) at p._write (c:\Users\Dani.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:84370) at writeOrBuffer (node:internal/streams/writable:389:12) at _write (node:internal/streams/writable:330:10) at p.Writable.write (node:internal/streams/writable:334:10) at Socket.h (c:\Users\Dani.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:73905) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10)

satiromarra commented 1 year ago

@jdanign The ftp connection is established when it is used, never when opening vscode. I use vpn and have had no problems with the connections. Enable verbose and debug mode and check the output tab.

jdanign commented 1 year ago

So, each time when I save a file new ftp connexion is created and closed?

The FileZilla server log Sais that the IP connection and IP transferred are different.

satiromarra commented 1 year ago

When you first use the ftp connection, it opens it and keeps it open, but it never opens the connection just by opening vscode.

In case the error connection will be displayed a message, then if you save the file again it will be reconnected.

So, let's see if I understood you correctly, you are using the ftp and during that use you activate the vpn the ftp stops working?

If you hover the mouse over the name of the connection, some options will appear:image

jdanign commented 1 year ago

When you first use the ftp connection, it opens it and keeps it open, but it never opens the connection just by opening vscode.

In case the error connection will be displayed a message, then if you save the file again it will be reconnected.

So, let's see if I understood you correctly, you are using the ftp and during that use you activate the vpn the ftp stops working?

If you hover the mouse over the name of the connection, some options will appear:image

Sorry, but this does not work. VSC says: "Rejected data connection for transfer of "***", IP addresses of control and data connection do not match".

If I open the sftp.json config file and I save this file, the connection ends and start new one, the only way it looks like work.

satiromarra commented 1 year ago

@jdanign Can you try this beta? v1.18.2-beta I have added the "Reconnect" icon image

jdanign commented 1 year ago

@jdanign Can you try this beta? v1.18.2-beta I have added the "Reconnect" icon image

Yeah, it works!! Thank you