-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from trs/explicit-tls-support
feat: add explicit TLS support with AUTH
- Loading branch information
Showing
46 changed files
with
507 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" | ||
rel="stylesheet"> | ||
<style> | ||
body { | ||
padding: 0px; | ||
} | ||
h1 { | ||
display: flex; | ||
margin: 0; | ||
padding: 0; | ||
font-size: 73px; | ||
font-family: 'Source Code Pro', monospace; | ||
font-weight: bold; | ||
line-height: 0.9em; | ||
letter-spacing: -3px; | ||
color: #444; | ||
text-shadow: | ||
1px 0px 1px #ccc, 0px 1px 1px #eee, | ||
2px 1px 1px #ccc, 1px 2px 1px #eee, | ||
3px 2px 1px #ccc, 2px 3px 1px #eee, | ||
4px 3px 1px #ccc, 3px 4px 1px #eee, | ||
5px 4px 1px #ccc, 4px 5px 1px #eee, | ||
6px 5px 1px #ccc, 5px 6px 1px #eee, | ||
7px 6px 1px #ccc; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
h1 > i { | ||
font-size: 42px !important; | ||
color: #03A9F4; | ||
align-self: center; | ||
padding-top: 15px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1><i class="material-icons">markunread_mailbox</i>ftp-srv</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const _ = require('lodash'); | ||
const ActiveConnector = require('../../connector/active'); | ||
|
||
const FAMILY = { | ||
1: 4, | ||
2: 6 | ||
}; | ||
|
||
module.exports = { | ||
directive: 'EPRT', | ||
handler: function ({command} = {}) { | ||
this.connector = new ActiveConnector(this); | ||
const [protocol, ip, port] = _.compact(command.arg.split('|')); | ||
const family = FAMILY[protocol]; | ||
if (!family) return this.reply(502, 'Unknown network protocol'); | ||
|
||
return this.connector.setupConnection(ip, port, family) | ||
.then(() => this.reply(200)); | ||
}, | ||
syntax: '{{cmd}} |<protocol>|<address>|<port>|', | ||
description: 'Specifies an address and port to which the server should connect' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const PassiveConnector = require('../../connector/passive'); | ||
|
||
module.exports = { | ||
directive: 'EPSV', | ||
handler: function () { | ||
this.connector = new PassiveConnector(this); | ||
return this.connector.setupServer() | ||
.then(server => { | ||
const {port} = server.address(); | ||
|
||
return this.reply(229, `EPSV OK (|||${port}|)`); | ||
}); | ||
}, | ||
syntax: '{{cmd}} [<protocol>]', | ||
description: 'Initiate passive mode' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.