Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ftp-proxy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp-proxy

A http to ftp proxy server application

  • 0.0.18
  • Source
  • PyPI
  • Socket score

Maintainers
1

ftp-proxy travis

Http proxy to interact with FTP servers

Install

pip install ftp-proxy

Deployment

Use the provided docker image

Usage

Using the python client

See client repository

Using an http client

ftp-proxy can be used with any http client

Authentication headers

All api routes expect the same authentication headers

HeaderContentDefault 
X-ftpproxy-hostserver hostNo default, mandatory header
X-ftpproxy-portserver port21
X-ftpproxy-userloginanonymous
X-ftpproxy-passwordpassword
Available routes
Ping (/ftp/ping)

Test connection to the remote FTP server Returns HTTP 200 on success

LS (ftp/ls)

List the files on the ftp server Optional parameters:

  • path (string): path to list content. Defaults to "/"
  • recursive (true/false): recurse down subdirectories. Defaults to "false"
  • extension (string): list only files with matching extension if provided (example: ".py")

Response:

["/file1.txt", "/other.py", "/folder", "/folder/nested.txt", "/folder/subfolder"]
Download (/ftp/download)

Download a file from the ftp server Mandatory parameters:

  • path (string): path to file to download
SFTP support

SFTP support API is roughly the same as ftp, and can be achieved by switching the url prefixes from ftp to sftp The following features are not yet available for SFTP:

  • recursive listing
  • extension filtering
Errors

If an error occured on the proxy or the FTP server, the request will return a HTTP 400 json response with the following format

{
    "error": "<DESCRIPTION>"
}

Development

Setup

git clone git@github.com:uptilab2/ftp-proxy.git
cd ftp-proxy

# Project uses pipenv for dependency management
# so it should be installed first
pipenv install --dev

# Run the tests:
pipenv run py.test

# Run the development server:
pipenv run python -m aiohttp.web -H 0.0.0.0 -P 5000 ftp_proxy:init_func

Deployment

 pipenv run python setup.py test
 pipenv run python setup.py sdist
 pipenv run python setup.py bdist_wheel
 pipenv run python setup.py upload

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc