{"id":36613798,"url":"https://github.com/scanoss/wayuu","last_synced_at":"2026-01-12T09:04:10.168Z","repository":{"id":45571098,"uuid":"234640795","full_name":"scanoss/wayuu","owner":"scanoss","description":"This is the Wayuu Webserver repository","archived":false,"fork":false,"pushed_at":"2025-02-18T14:37:47.000Z","size":109,"stargazers_count":3,"open_issues_count":1,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-18T15:38:53.626Z","etag":null,"topics":["http","rest","restful","server","web"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scanoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/GPL-2.0-only.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-17T21:36:20.000Z","updated_at":"2025-02-18T14:37:51.000Z","dependencies_parsed_at":"2025-02-18T15:39:58.771Z","dependency_job_id":null,"html_url":"https://github.com/scanoss/wayuu","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/scanoss/wayuu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fwayuu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fwayuu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fwayuu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fwayuu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scanoss","download_url":"https://codeload.github.com/scanoss/wayuu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fwayuu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["http","rest","restful","server","web"],"created_at":"2026-01-12T09:04:08.746Z","updated_at":"2026-01-12T09:04:10.147Z","avatar_url":"https://github.com/scanoss.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WAYUU\n[![Build Status](https://travis-ci.com/scanoss/wayuu.svg?branch=master)](https://travis-ci.com/scanoss/wayuu)\n\nWAYUU is a blazing fast, lightweight web server and a microframework for building web applications and services.\n\n# Usage\nThere are two ways of using WAYUU: standalone and embedded configuration. \n\nStandalone usage allows WAYUU to serve static content. If you are interested in building applications that use the REST API support that is native in WAYUU, you should embed WAYUU in your application.\n\n## Standalone usage\n\nSimply compile the binary and execute it. As standard, you can get a list of CLI options using the `-h` flag.\n\n```\n$ ./wayuu -h\nUSAGE: wayuu [-d] [-b ip_addr] [-p port] [-r root] [-f]\nOptions:\n-d         : Enabled DEBUG mode\n-b ip_addr : Bind to IP address. Default: \"0.0.0.0\"\n-p port    : Bind to TCP port. Default: 4443\n-r root    : Use root as the root folder for WAYUU. Default: /etc/wayuu\n-f         : HTTP mode\n```\n\n## Embedded usage\n\nInclude the header file `wayuu.h` in your project. \n\nThe WAYUU `Makefile` includes a `lib` target that compiles WAYUU as a static library. \n\n## Routing\n\nWAYUU implements a very simple routing framework that supports most use cases in a RESTful API implementation. For more details you can refer to the implementation in `router.h` and `router.c`.\n\nA Route is defined by 3 elements:\n1. **The URL specification of the route**, in the form `METHOD:PATH`, where `METHOD` is an HTTP Method. Currently the API supports: `GET`, `POST`, `DELETE`. `PATH` is the fragment of the URL that will be matched. WAYUU serves all Router requests from the `/api` endpoint. For instance, the URL specification `GET:/users` will match the HTTP request `GET /api/users`.\n\n2. **The Request Handler**, which is an implementation of the pointer to function `void (*request_handler)(api_request *req)`. This is where the request is properly handled and the response generated and returned. The structure `api_request` is specified in `http_utils.h`. It contains the context of the HTTP request. Implementations can use the utility functions in `http_utils.h` to return standard answers.\n\n3. **The Request Filter**, an optional mechanism that can be used to implement features such as enpoint authentication, security and logging functionality. The request filter is an implementation of the function pointer `bool (*request_filter)(api_request *req)` as specified in `router.h`. If provided, the Router will execute the filter function *before* the request handler. If the filter function returns `true`, the request handler is executed. Otherwise, the request handler is not executed. The filter function must implement appropriate return in case of exception. \n\nThe Route can be added to the Router using the function `void router_add_route(char *matcher, request_handler handler, request_filter filter)`;\n\n## Serve static content\n\nWAYUU will serve static content from `WAYUU_ROOT/www`, where `WAYUU_ROOT` is the root folder for WAYUU. Default folder for static files: `/etc/wayuu/www`.\n\n## IP Filtering\n\nWAYUU can be configured to serve only requests from certain IP addresses. The folder `WAYUU_ROOT/etc` can contain an `allow` file and a `deny` file. The `allow` file contains a list of IP addresses that will be whitelisted. The `deny` file contains a list of IP addressed that will be blacklisted. The format of these files is a very simple list of IP addresses, one per line.   \n\n# SSL Configuration\n\nThe SSL certificates must be placed under the `ssl` folder. By default: `/etc/wayuu/ssl`. WAYUU looks for a `cert.pem` and a `key.pem` file.\n\n# Resource Limits\n\nWAYUU can manage the resource limits applied to URLs. This is done in the `WAYUU_ROOT/etc/limits` file. \n\nThe limits configuration file contains a list of comma delimited tuples: path, maximum connections, max connections per IP, max execution seconds\n\nExample:\n\n  ```\n  /api, 20, 2, 10\n  ```\n\nIn this example, access to every path beginning with /api will be limited to a maximum of 20 simultaneous connections and no more than 2 from the same IP. Connections will be dropped if alive\nfor more than 10 seconds\n\n# Building\n\nWAYUU uses standard Linux GNU extensions as well as OpenSSL and libcrypto. You can use build WAYUU easily with GCC and Make. \n\n- `make`: Builds the `wayuu` binary.\n- `sudo make install`: Install wayuu shared libraries and headers.\n- `make test`: Executes the unit tests. \n\n\n# Supported platforms\n\nTested on Ubuntu 18.04+, as well as Debian, and Fedora. \n\nIt should be relatively easy to port WAYUU it to other distribution or Operating Systems, given that WAYUU only uses a minimal set of standard dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fwayuu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscanoss%2Fwayuu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fwayuu/lists"}