我正在尝试使用 FTP-Sync 包在 Visual Studio Code 上模拟我正在工作的 WinSCP FTP 站点,但由于某种原因我无法完成此操作。
我们的服务器需要隐式 FTP,所以我的工作站点是 ftps://ftpwebsite.user:990
,它会提示输入我的用户并通过它。
此程序包尝试连接一分钟,然后没有成功地关闭。
配置文件:
{
"protocol": "ftps",
"host": "ftpweb.user",
"port": 990,
"user": "ftpweb.user|user123",
"pass": "**********",
"remote": "/",
"secure": false,
"uploadOnSave": true,
"passive": true,
"debug": true,
"privateKeyPath": null,
"passphrase": null,
"agent": null,
"watch":[],
"watchTimeout": 500,
"allow": [],
"ignore": [
"\\.vscode",
"\\.git",
"\\.DS_Store"
],
"generatedFiles": {
"extensionsToInclude": [
""
],
"path": ""
}
}
最佳答案
似乎 ftp-sync 使用了 Node.js node-ftp module .
似乎要使用隐式 TLS/SSL,您需要将 secure
设置为 implicit
:
secure - mixed - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
另见 How to connect to a implicit FTPS server with nodeJS?
虽然你确定你需要使用隐式模式?正如上述文档中提到的,隐式模式已过时。
关于visual-studio - 带有隐式 FTP TLS/SSL 的 Visual Studio Code 的 FTP 同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56550057/