https://github.com/nichitaa/web-protocols
REST API for your FTP server
https://github.com/nichitaa/web-protocols
api-rest ftp http-proxy https nodemailer-transport smtp tcp-server
Last synced: 2 months ago
JSON representation
REST API for your FTP server
- Host: GitHub
- URL: https://github.com/nichitaa/web-protocols
- Owner: nichitaa
- Created: 2021-11-13T16:04:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-06T08:19:03.000Z (over 3 years ago)
- Last Synced: 2023-03-10T02:23:03.752Z (about 2 years ago)
- Topics: api-rest, ftp, http-proxy, https, nodemailer-transport, smtp, tcp-server
- Language: TypeScript
- Homepage:
- Size: 1.76 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
> Pasecinic Nichita
>
> FAF 192### **REST API for your FTP server**
#### **Description**
`TCP` server that will redirect the incoming request on `HTTP` or `HTTPS` implementation.`HTTPS` app - API for `FTP` manipulations, see the [postman collection](https://github.com/nichitaa/web-protocols/blob/main/pr_webprotocols_dev.postman_collection.json) or [swagger API docs](https://app.swaggerhub.com/apis-docs/nichitaa/PR-web-protocols-API/1.1), `HTTP` app - will proxy the requests to the `HTTPS` API (motivation [NodeJS issues 121](https://github.com/nodejs/node/issues/121)), `HTTP` and `HTTPS` connections are easy to distinguish based on the first byte send by client trying to connect [a more detailed description](https://github.com/mscdex/httpolyglot/issues/3#issuecomment-173680155 ).
Each successful or failed request will notify the user by sending emails with a similar structure, example below:

`FTP` server will serve the directory `ftp/srv`.
`FtpController`, internally uses `FTPClient`, that handles "standard" commands (RFC 959)
#### Environment variables
The `API` requires several environment variables in order to run locally on your machine. Please modify the `.env` file in the root of the project with your specific configurations
```
FTP_PORT=21 // this is the default ftp port
FTP_DIR=../srv // the directory that// ftp credentials
FTP_USERNAME=api
FTP_PASSWORD=api// smtp credentials
SMTP_HOST = smtp.gmail.com // host
SMTP_PORT = 587 // port
SMTP_FROM_NAME = nichitaa // name for the sender (you)
SMTP_AUTH_USER = [email protected] // email
SMTP_AUTH_PASS = vvftmmufiofzpsdq // email app pass
SMTP_TO_ADDRESS = [email protected] // receiverAPI_PORT=8080 // api port
HOST_NAME=127.0.0.1 // api host (localhost)
```------
#### Used protocols
- [x] TCP
- [x] HTTP
- [x] HTTPS
- [x] FTP
- [x] SMTP