Copy link to clipboard
Copied
In order to access a secure FTP site, I need to specify a port (8080) for the proxy. There is no parameter for proxyport. I tried appending it with a colon (i.e., proxy.server.com:8080), but that didn't work. Via WinSCP, I can connect just fine since I can specify a proxy port in that app.
How do you specify a Proxyserver Port in CFFTP?
Copy link to clipboard
Copied
It's not documented, but try using the proxyPort parameter that is available in other tags.
Copy link to clipboard
Copied
I wish...
Attribute validation error for the ftp tag. | |
The tag does not have an attribute called proxyport. The valid attribute(s) are alloSize, bufferSize, actionParam, action, username, password, server, fingerPrint, passphrase, key, secure, timeout, port, connection, proxyserver, proxybypass, retrycount, stoponerror, passive, name, asciiextensionlist, transfermode, failifexists, directory, localfile, remotefile, item, existing, new, debug, result. |
Copy link to clipboard
Copied
That's unfortunate.
It might be worth filing a feature request.
Copy link to clipboard
Copied
I agree with Eddie. It is unfortunate that the tag cfftp includes the attribute, proxyServer, yet omits proxyPort, proxyUsername, proxyPassword, and so on.
Nevertheless, you could still implement FTP with proxy in ColdFusion. You already have WinSCP, so do something like
<cfexecute name="C:\Program Files (x86)\WinSCP\WinSCP.exe" arguments="/script=C:\ColdFusion10\cfusion\wwwroot\workspace\FTPTest\FTP_get_script.txt"></cfexecute>
FTP_get_script.txt
# Upon errors, automatically abort this script
option batch abort
# Disable overwrite confirmations (that conflict with previous)
# In other words, if file of same name already exists locally, replace it automatically, instead of reporting an error
option confirm off
# Connect using ftp://username:password@ftp_server_URL
# Use 'passive' flag, in case port not standard
open -passive ftp:user:password@hostname:port -rawsettings proxyHost=Proxy_host_name proxyPort=your_proxy_port_number proxyUsername=your_proxy_username proxyPassword=your_proxy_password
# Download all XML files to local directory C:\Users\BKBK\Desktop\ftp\
# Automatically resume transfer if possible
# Preserve file timestamp
# Delete files from remote (FTP) after download
get -resume -preservetime -delete *.xml C:\Users\BKBK\Desktop\ftp\
# Disconnect
close
# Exit WinSCP
exit