Skip to content

Commit 6993039

Browse files
committed
Improve naming
1 parent 0b8f756 commit 6993039

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ client.ftp.verbose = true
6969

7070
Create a client instance. Configure it with a timeout in milliseconds that will be used for any connection made. Use 0 to disable timeouts, default is 30 seconds. Options are:
7171

72-
- `allowSeparateTransferHostIP (boolean)`, the FTP spec makes it possible for a server to tell the client to use a different IP address for file transfers than for the initial control connection. Today, this feature is very rarely used. Still, the default for this is set to `true` for backwards-compatibility reasons. If you experience any issues with NAT traversal in local networks or want to provide more security and prevent FTP bounce attacks, set this to `false`.
72+
- `allowSeparateTransferHost (boolean)`, the FTP spec makes it possible for a server to tell the client to use a different IP address for file transfers than for the initial control connection. Today, this feature is very rarely used. Still, the default for this is set to `true` for backwards-compatibility reasons. If you experience any issues with NAT traversal in local networks or want to provide more security and prevent FTP bounce attacks, set this to `false`.
7373

7474
`close()`
7575

src/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ export interface UploadOptions {
5050
}
5151

5252
export interface ClientOptions {
53-
allowSeparateTransferHostIP: boolean
53+
allowSeparateTransferHost: boolean
5454
}
5555

5656
const defaultClientOptions: ClientOptions = {
57-
allowSeparateTransferHostIP: true
57+
allowSeparateTransferHost: true
5858
}
5959
const LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"]
6060
const LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"]
@@ -80,7 +80,7 @@ export class Client {
8080
this.ftp = new FTPContext(timeout)
8181
this.prepareTransfer = this._enterFirstCompatibleMode([
8282
enterPassiveModeIPv6,
83-
options.allowSeparateTransferHostIP ? enterPassiveModeIPv4 : enterPassiveModeIPv4_forceControlHostIP
83+
options.allowSeparateTransferHost ? enterPassiveModeIPv4 : enterPassiveModeIPv4_forceControlHostIP
8484
])
8585
this.parseList = parseListAutoDetect
8686
this._progressTracker = new ProgressTracker()

0 commit comments

Comments
 (0)