Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #70 from hajekj/master
Browse files Browse the repository at this point in the history
Add support for FTPS
  • Loading branch information
mkloubert committed Jun 7, 2018
2 parents 9449c37 + b445334 commit daa4fae
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The extension supports the following destinations:
| [Compiler](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_compiler) |
| [DropBox](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_dropbox) |
| [External Node.js based scripts](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_script) |
| [FTP](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_ftp) |
| [FTP(S)](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_ftp) |
| [Local or shared network folders inside a LAN](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_local) |
| [Mail (SMTP)](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_mail) |
| [SFTP](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_sftp) |
Expand Down
7 changes: 6 additions & 1 deletion src/clients/ftp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ export interface FTPConnectionOptions {
/**
* A function that provides values for the connection.
*/
readonly valueProvider?: deploy_values.ValuesProvider;
readonly valueProvider?: deploy_values.ValuesProvider;
/**
* 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, applies only when engine is set to 'ftp'
*/
readonly secure?: boolean | "implicit";
}

/**
Expand Down Expand Up @@ -748,6 +752,7 @@ class FtpClient extends FTPClientBase {
conn.connect({
host: host, port: port,
user: user, password: pwd,
secure: this.options.secure
});
}
catch (e) {
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/ftp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export interface FTPTarget extends deploy_targets.Target {
* The username.
*/
readonly user?: string;
/**
* 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, applies only when engine is set to 'ftp'
*/
readonly secure?: boolean | "implicit";
}

/**
Expand Down Expand Up @@ -467,6 +471,7 @@ class FTPPlugin extends deploy_plugins.AsyncFileClientPluginBase<FTPTarget,
supportsDeepDirectoryCreation: target.supportsDeepDirectoryCreation,
uploadCompleted: uploadCompleted,
user: user,
secure: target.secure,
valueProvider: () => WORKSPACE.getValues(),
}),
getDir: (subDir) => {
Expand Down

0 comments on commit daa4fae

Please sign in to comment.