Proxy4a skips first item on GetListing()
See original GitHub issueI wrote PowerShell module which uses your FTP library. It’s been working great for months https://github.com/EvotecIT/Transferetto Today I’ve decided to add proxy support and after initial testing it seems to work, but the results differ. I am testing using some public proxy, public FTP servers so it may be just related to those - but maybe not.
# Login via UserName/Password via proxy Socks 5
$Client = Connect-FTP -Server 'test.rebex.net' -Verbose -Username 'demo' -Password 'password' -ProxyHost '192.252.216.81' -ProxyPort 4145 -ProxyType FtpClientSocks5Proxy
$List = Get-FTPList -Client $Client
$List | Format-Table
Disconnect-FTP -Client $Client
# Login via UserName/Password with Proxy Socks 4
$Client = Connect-FTP -Server 'test.rebex.net' -Verbose -Username 'demo' -Password 'password' -ProxyHost '104.37.135.145' -ProxyPort 4145 -ProxyType FtpClientSocks4aProxy
$List = Get-FTPList -Client $Client
$List | Format-Table
Disconnect-FTP -Client $Client
For some reason Socks 4 doesn’t show folders:
Warning: Failed to parse file listing: 10-19-20 03:19PM <DIR> pub
I am not sure whether this is related to how Socks4 works, or bug in library, but opening an issue anyways.
FTP OS: Not sure
FTP Server: Not sure
Computer OS: ? Windows 11
FluentFTP Version: ? 42.0.0
Framework: .NET 2 / 3.5 / 4 / 5 / 6 / 7 / 8 / UWP / Xamarin / Mono Net Standard 2.0 on PowerShell 5.1 and PowerShell 7
Logs :
Socks5 proxy:
# Connect()
Status: FluentFTP 42.0.0.0
Status: Connecting to 192.252.216.81:4145
Status: Waiting for a response
Response: 220 Microsoft FTP Service
Status: Detected FTP server: WindowsServerIIS
Command: USER demo
Status: Waiting for response to: USER demo
Response: 331 Password required for demo.
Command: PASS password
Status: Waiting for response to: PASS password
Response: 230 User logged in.
Command: FEAT
Status: Waiting for response to: FEAT
Response: 211-Extended features supported:
Response: LANG EN*
Response: UTF8
Response: AUTH TLS;TLS-C;SSL;TLS-P;
Response: PBSZ
Response: PROT C;P;
Response: CCC
Response: HOST
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: 211 END
Status: Text encoding: System.Text.UTF8Encoding
Command: OPTS UTF8 ON
Status: Waiting for response to: OPTS UTF8 ON
Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
Command: SYST
Status: Waiting for response to: SYST
Response: 215 Windows_NT
Status: Listing parser set to: Windows
# GetListing(null, Auto)
Command: PWD
Status: Waiting for response to: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Status: Waiting for response to: TYPE I
Response: 200 Type set to I.
# OpenPassiveDataStream(AutoPassive, "LIST /", 0)
Command: EPSV
Status: Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||1032|)
Status: Connecting to 192.252.216.81:4145
Command: LIST /
Status: Waiting for response to: LIST /
Response: 125 Data connection already open; Transfer starting.
+---------------------------------------+
Listing: 10-19-20 03:19PM <DIR> pub
Listing: 12-17-21 11:58AM 405 readme.txt
-----------------------------------------
Status: Disposing FtpSocketStream...
# CloseDataStream()
Status: Waiting for a response
Response: 226 Transfer complete.
Status: Disposing FtpSocketStream...
Status: Confirmed format Windows
Type SubType FullName Name LinkTarget LinkCount LinkObject Modified Created RawModified
---- ------- -------- ---- ---------- --------- ---------- -------- ------- -----------
Directory Unknown /pub pub 0 2020-10-19 15:19:00 0001-01-01 00:00:00 2020-10-19 15:19:00
File Unknown /readme.txt readme.txt 0 2021-12-17 11:58:00 0001-01-01 00:00:00 2021-12-17 11:58:00
Command: QUIT
Status: Waiting for response to: QUIT
Response: 221 Goodbye.
Status: Disposing FtpSocketStream...
And here’s via Socks4a:
# Connect()
Status: FluentFTP 42.0.0.0
Status: Connecting to 104.37.135.145:4145
Status: Waiting for a response
Response: 220 Microsoft FTP Service
Status: Detected FTP server: WindowsServerIIS
Command: USER demo
Status: Waiting for response to: USER demo
Response: 331 Password required for demo.
Command: PASS password
Status: Waiting for response to: PASS password
Response: 230 User logged in.
Command: FEAT
Status: Waiting for response to: FEAT
Response: 211-Extended features supported:
Response: LANG EN*
Response: UTF8
Response: AUTH TLS;TLS-C;SSL;TLS-P;
Response: PBSZ
Response: PROT C;P;
Response: CCC
Response: HOST
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: 211 END
Status: Text encoding: System.Text.UTF8Encoding
Command: OPTS UTF8 ON
Status: Waiting for response to: OPTS UTF8 ON
Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
Command: SYST
Status: Waiting for response to: SYST
Response: 215 Windows_NT
Status: Listing parser set to: Windows
# GetListing(null, Auto)
Command: PWD
Status: Waiting for response to: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Status: Waiting for response to: TYPE I
Response: 200 Type set to I.
# OpenPassiveDataStream(AutoPassive, "LIST /", 0)
Command: EPSV
Status: Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||1034|)
Status: Connecting to 104.37.135.145:4145
Command: LIST /
Status: Waiting for response to: LIST /
Response: 125 Data connection already open; Transfer starting.
+---------------------------------------+
Listing: 10-19-20 03:19PM <DIR> pub
Listing: 12-17-21 11:58AM 405 readme.txt
-----------------------------------------
Status: Disposing FtpSocketStream...
# CloseDataStream()
Status: Waiting for a response
Response: 226 Transfer complete.
Status: Disposing FtpSocketStream...
Status: Not in Windows format
Status: Not in UNIX format
Status: Not in Windows format
Status: Not in VMS format
Status: Not in OS/400 format
Status: Could not detect format. Using default Unix
Warning: Failed to parse file listing: 10-19-20 03:19PM <DIR> pub
Status: Not in UNIX format
Status: Not in UNIX format
Status: Detected format Windows
Type SubType FullName Name LinkTarget LinkCount LinkObject Modified Created RawModified
---- ------- -------- ---- ---------- --------- ---------- -------- ------- -----------
File Unknown /readme.txt readme.txt 0 2021-12-17 11:58:00 0001-01-01 00:00:00 2021-12-17 11:58:00
Command: QUIT
Status: Waiting for response to: QUIT
Response: 221 Goodbye.
Status: Disposing FtpSocketStream...
PS C:\Support\GitHub\Transferetto>
# Dispose()
Status: Disposing FtpClient object...
Status: Disposing FtpSocketStream...
Issue Analytics
- State:
- Created a year ago
- Comments:18 (2 by maintainers)
Top Results From Across the Web
Can't connect to server via proxy when using EPSV mode ...
GetListing, Upload or Download from the server using EPSV over HTTP Proxy. Logs : HTTP/1.0 200 Connection established Status: Waiting for a ...
Read more >Python how to skip the first (i.e. zero) iteration using ...
I have a table object. I want to check to see if the first row has the value of Test , in which...
Read more >Introducing the Angular Service Proxy Generation - ABP.Blog
ABP Framework has introduced the new Angular Service Proxy Generation ... into any Angular component and use the getList() method to get the...
Read more >C# FluentFTP - how to work with FTP in C# using ...
The GetListing method returns a file listing from the server. Each FtpListItem object returned contains information about the item. foreach (FtpListItem item in ......
Read more >Maximo 7.6 API - Mbo
Returns the MaxType (initial value) object given the column name. java.util. ... Remote proxy) ... String value, boolean exact). Similar to getList().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve tested (properly) and it works. Thank you.
Released
https://www.nuget.org/packages/FluentFTP/42.0.1