{"id":13418573,"url":"https://github.com/vinipsmaker/tufao","last_synced_at":"2026-03-15T05:41:00.230Z","repository":{"id":6026855,"uuid":"7250825","full_name":"vinipsmaker/tufao","owner":"vinipsmaker","description":"An asynchronous web framework for C++ built on top of Qt","archived":false,"fork":false,"pushed_at":"2022-02-10T09:51:02.000Z","size":3268,"stargazers_count":586,"open_issues_count":35,"forks_count":179,"subscribers_count":64,"default_branch":"1.x","last_synced_at":"2024-07-31T22:43:29.868Z","etag":null,"topics":["c-plus-plus","http","http-server","qt","qt-network"],"latest_commit_sha":null,"homepage":"http://vinipsmaker.github.io/tufao/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinipsmaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-20T02:14:18.000Z","updated_at":"2024-07-23T08:32:15.000Z","dependencies_parsed_at":"2022-07-14T21:46:52.914Z","dependency_job_id":null,"html_url":"https://github.com/vinipsmaker/tufao","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinipsmaker%2Ftufao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinipsmaker%2Ftufao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinipsmaker%2Ftufao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinipsmaker%2Ftufao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinipsmaker","download_url":"https://codeload.github.com/vinipsmaker/tufao/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681024,"owners_count":20330152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","http","http-server","qt","qt-network"],"created_at":"2024-07-30T22:01:03.926Z","updated_at":"2025-12-18T06:36:29.551Z","avatar_url":"https://github.com/vinipsmaker.png","language":"C++","readme":"!!! I can no longer maintain this project. If you're interessed, please contact me and I can move the projetct to you !!!\n\n# Tufão - an asynchronous web framework for C++ built on top of Qt\n\n[![Join the chat at https://gitter.im/vinipsmaker/tufao](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vinipsmaker/tufao?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nTufão is a web framework for C++ that makes use of Qt's object communication\nsystem (signals \u0026 slots). It features:\n\n  * High performance standalone server\n  * Cross-plataform support\n  * Good [documentation](http://vinipsmaker.github.com/tufao/ref/)\n  * Support modern HTTP features\n    * Persistent streams\n    * Chunked entities\n    * 100-continue status\n    * WebSocket\n  * HTTPS support\n  * Flexible request router\n  * Static file server with support for conditional requests, partial download\n    and automatic mime detection\n  * Plugin-based server to allow change the running code without restart the\n    application\n  * Flexible and secure session support\n  * [QtCreator's plugin](https://github.com/vinipsmaker/tufao-qtcreatorplugin)\n    to allow create new applications rapidly\n  * Lots of tests\n  * Timeout support\n  * C++11\n\nYou can generate documentation from the source code using Doxygen. The\ndocumentation will be put on the doc folder in the html and tex formats. There\nis also experimental support for Qt compressed help files.\n\n## LICENSE\n\nThe library is under the LGPLv2 and public header files, documentation and\nexamples are under MIT license.\n\nThe Tufão logo is licensed under [Creative Commons Attribution 3.0 Unported]\n(http://creativecommons.org/licenses/by/3.0/).\n\nThe library is dynamic linked against Qt and include code from Boost.Http\nparser. Qt library is licensed under LGPL and Boost.Http is licensed under the\nBoost Software License.\n\nSo, you can create commercial applications (the *only* restriction is that *if*\nyou do any modifications to *Tufão*, these modifications must be redistributed).\n\n## Getting dependencies\n    $ git submodule update --init\n\n## BUILD\n\nMake sure you have Qt and CMake installed and with the PATH to its executables\nset, then create a folder for the build and, from there, run:\n\n    $ cmake OPTIONS path_to_source_dir\n    $ make MAKEOPTIONS\n\nOPTIONS can be null or have a combination of the following values:\n\n  * `-DCMAKE_INSTALL_PREFIX=${INSTALLDIR}` sets the directory where to install\n    Tufão.\n  * `-DCMAKE_BUILD_TYPE=Debug`\n  * `-DCMAKE_BUILD_TYPE=Release`\n  * `-DCMAKE_BUILD_TYPE=RelWithDebInfo`\n  * `-DCMAKE_BUILD_TYPE=MinSizeRel`\n  * `-DLIB_SUFFIX=${LIB_SUFFIX}` set the suffix for the install destination. If\n    you are compiling Tufão under a 64 bit system using a 32 bit \"environment\",\n    maybe you want to set this variable to 32, then Tufão libs will be installed\n    under `\"${INSTALLDIR}/lib32\"`. This setting is highly dependent on your\n    operating system conventions and I do not try to put any auto magic\n    detection.\n  * `-DGENERATE_DOC=YES` generate documentation using Doxygen\n  * `-DENABLE_TESTS=YES` generate and run tests\n\nOPTIONS available on Windows:\n\n  * `-G\"MinGW Makefiles\"` to generate Makefiles for use with MinGW environment\n  * `-G\"Visual Studio 10\"` to generate project files for Visual Studio 10\n\nMAKEOPTIONS can be null or have a combination of the following values:\n\n  * `install` installs Tufão\n  * `DESTDIR=${PKGDIR}` sets the directory where to install Tufão. This options\n    should be used if you intend to package Tufão to set the package directory.\n    To choose another installation directory, see options in OPTIONS, above.\n\nExample:\n\n    $ cmake -DCMAKE_INSTALL_PREFIX=/usr\n    $ make DESTDIR=pkg install\n\nNOTE:\nQt 5.0 or later is required for 1.x series. Qt 4.7 or later is required to 0.x\nseries.\n\nNOTE:\nIf you intend to create a CPack-based installer, just run:\n\n    # To create a binary distribution:\n    cpack -C CPackConfig.cmake\n\n    # To create a source distribution:\n    cpack -C CPackSourceConfig.cmake\n\n    # To create a Windows NSIS-based installer:\n    cpack -GNSIS\n\n### Documentation\n\nTo generate the documentation, just run doxygen using Doxyfile as configuration\nfile and the documentation will be generated in the folder doc. The\ndocumentation is available in the following formats:\n\n  * HTML: Always generated. It should be in the doc/html folder.\n  * latex: You can use this format to generate a pdf. Just run make inside the\n    doc/latex folder.\n  * Qt Compressed Help file: If you have qhelpgenerator binary tool in the\n    system PATH, then the file is generated when you run doxygen and should be\n    in doc/qch/tufao.qch. If you have qhelpgenerator tool installed, but not\n    configured in the system PATH, but still want to generate the documentation\n    in this format, just run the tool using doc/html/index.qhp as input file.\n\n### Tests\n\nTufão also have a lot of code to test its correctness. These codes are based on\nQTestLib and generate self-contained executables. There is also some CTest rules\nand integration with the CMake build. To run the tests, just execute:\n\n    make tests\n\nOr, if you don't want to use Makefiles:\n\n    ctest\n\nIn Visual Studio, the target _RUN_TESTS_ is created.\n\nCTest integrates with\n[CDash](http://cmake.org/Wiki/CMake/Testing_With_CTest#Dashboards)\nto allow developers to centralize the tests result. You can send the results to\nCDash running the _Experimental_ target:\n\n    make Experimental\n\nYou can see the Tufão testing log at\n[Tufao CDash project's page](http://my.cdash.org/index.php?project=Tufao).\n\n## INSTALL\n\nThe default install prefix is /usr/local, if you don't intend to change it, just\nrun, after build:\n\n    # make install\n\nTo install to a different prefix, run:\n\n    $ cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}\n    $ make install\n\nNOTE: You may need to run `ldconfig` after installation depending on your\nsystem.\n\n## USAGE\n\nTo use Tufão in your Qt projects, just edit your .pro file and add the line:\n\n    CONFIG += C++11 TUFAO1\n\nYou can find some examples in the examples folder.\n\nIf you're planning to use OS X, then the following line is [also](\nhttp://qt-project.org/forums/viewthread/24551) [required](\nhttp://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#qmake-macosx-deployment-target),\nas reported by some users:\n\n    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7\n\nTufão has PKG-CONFIG support also. Its module name is 'tufao1'.\n\nIf you want use Tufão in other build system, just add the compiler option\n-ltufao1.\n\nYou can also see Tufão documentation integrated in QtAssistant.\n\n## NEWS\n\nVersion 1.4\n\n- Replaces Ryan Dahl's HTTP parser. Now Boost.Http parser is used.\n- Fixes HTTP pipelining support.\n\nVersion 1.3\n\n- Added `canHandleRequest` to HttpFileServer\n\nVersion 1.2\n\n  * New class to handle REST api introduced (thanks to Timothy Reaves)\n    * The class has its own plugin system, partly incompatible with Tufão's\n      default\n  * Tufão's plugin system improved to better track files deletion.\n    * It requires no code changes, but you still need to do a one-line change\n      to the config file, because I was worried about backwards compatibility.\n    * See HttpPluginServer::setConfig for details\n\nVersion 1.1\n\n  * Add ability to ignore a set of SSL errors in WebSocket\n  * Documentation updates\n  * Bugfix in AbstractHttpServerRequestHandler (thanks to Benjamin Zeller)\n  * Updated Ryan Dahl's HTTP parser to version 2.2.1\n\nVersion 1.0\n\n  * The project finally have a logo (made by me in Inkscape)\n  * Deprecated API was removed\n  * Url and QueryString removed in favor of QUrl\n  * Headers refactored to inherit from QMultiHash instead of QMultiMap\n  * HttpServerResponse\n    * Constructor's options argument is optional now\n    * setOptions method added\n    * Constructor takes a reference to a QIODevice instead a pointer\n  * HttpServerRequest\n    * Constructor takes a reference to a QAbstractSocket instead a pointer\n    * socket method returns a reference instead a pointer\n    * url returns a QUrl\n    * data signal was changed and you must use readBody method to access body's content.\n    * the upgrade's _head_ data is accessed from the request body from now on\n    * now the object auto-disconnects slots from data and end signals right before emit ready\n    * setCustomData and customData methods added\n      * Now HttpServerRequestRouter use these methods to pass the list of captured\n        texts\n  * HttpServer uses reference instead of pointers in several places\n  * AbstractHttpServerRequestRouter refactored to explore lambdas features.\n  * Tufão's plugin system fully refactored\n    * It's using JSON files as configuration\n  * AbstractHttpServerRequestHandler::handleRequest\n    * It uses references instead pointers\n    * It receives 2 arguments instead of 3\n  * One more abstraction to sessions created to explore lambdas\n  * WebSocket\n    * startServerHandshake is taking references instead pointers\n  * LESS POINTERS and MORE REFERENCES\n    * This change exposes a model more predictive and natural\n    * I'm caring less about Qt style and more about C++ style\n      * But don't worry, I'll maintain a balance\n  * Using scoped enums\n  * HttpFileServer uses/sends mime info\n  * Interfaces don't inherit from QObject anymore, so you can use multiple\n    inheritance to make the same class implement many interfaces\n  * HttpUpgradeRouter introduced\n    * HttpServer::setUpgradeHandler also\n  * Updated QtCreator plugin to work with QtCreator 2.7.0 and Qt 5\n\nVersion 0.6:\n\n  * HttpServerRequest\n    * setUrl added\n  * UrlRewriterHandler added\n  * HttpUpgradeRouter added\n  * headers can be \"streamed\" to QDebug objects\n\nVersion 0.5:\n\n  * WebSocket\n    * peerAddress() method added\n    * peerSocket() method added\n\nVersion 0.4:\n\n  * Using CMake build system\n    * Changes to allow parallel Tufão installations (if major versions differs)\n    * Added PKGCONFIG support\n  * Session support\n  * Better documentation\n\nVersion 0.3\n\n  * More application templates in QtCreator Tufão's plugin\n  * Class to serve static files with support for conditional requests and\n    byte-range requests\n  * Robust request router added\n  * HTTP plugin server added\n  * Using newer version of Ryan Dahl's HTTP parser\n  * Changed license from public headers to MIT\n  * MSVC support\n  * Some minor improvements\n\nVersion 0.2:\n\n  * Code is more stable\n  * Documentation improved\n  * HttpServerResponse is easier to use\n  * WebSocket support\n  * TUFAO_VERSION_MAJOR and TUFAO_VERSION_MINOR macros added\n  * QtCreator plugin\n  * New examples\n\n## ROADMAP\n\nHere is a small roadmap for Tufão:\n\n1.4:\n\n  * RPC support\n  * Service discovery and description support\n\n1.5:\n\n  * Forms and file uploads\n","funding_links":[],"categories":["TODO scan for Android support in followings","Networking","内存分配","网络","Web框架","Libraries."],"sub_categories":["网络"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinipsmaker%2Ftufao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinipsmaker%2Ftufao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinipsmaker%2Ftufao/lists"}