Giter VIP home page Giter VIP logo

ftp_server's Introduction

ftp_server

The binary of this project is deployed at ftp://ftp.yasio.org/

build and run

build

Goto the parent project's root directory, the parent project is: yasio

cmake -B build
cmake --build build --config Release --target ftp_server  

run

Continue run ftp server after build finished

cd build/examples/ftp_server  
./ftp_server <path-to-wwwroot> <wan_ip>[optional]  

references:

ftp://ftp.gnu.org/
https://tools.ietf.org/html/rfc959

pitfall:

Some client's ip may block by server firewall strategy, please switch to mobile cellular network and try access the ftp again.

ftp_server's People

Contributors

halx99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ftp_server's Issues

Chrome doesn't support parse LIST resposne data.

list_files(this->fullpath_, [&](tinydir_file& f) {
        obs.write_bytes(f.is_dir ? "type=dir;"sv : "type=file;"sv);
        obs.write_bytes("modify="sv);
        struct stat st;
        if (0 == ::stat(f.path, &st))
        {
          struct tm tinfo;
          localtime_r(&st.st_mtime, &tinfo);

          char buf[96];
          strftime(buf, 96, "%Y%m%d%H%M%S", &tinfo);
          obs.write_bytes(buf);
          if (st.st_mode & S_IFREG)
          {
            obs.write_bytes(";size="sv);
            obs.write_bytes(std::to_string(st.st_size));
          }
        }

        obs.write_bytes("; "sv);
        obs.write_bytes(f.name);
        obs.write_bytes("\r\n"sv);
      });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.