Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1752720721, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "b34862bf8ab88ca2177672db7988dc4dc1e984cc", "alias": []},"tree": [ { "name": "mount-origin","mode": "16384", "size":0}, { "name": "CMakeLists.txt","mode": "33188", "size":746}, { "name": "README.md","mode": "33188", "size":2012}, { "name": "localhost-100y.cert","mode": "33188", "size":2106}, { "name": "localhost-100y.key","mode": "33188", "size":3272}, { "name": "minimal-raw-fallback-http-server.c","mode": "33188", "size":3984}],"s":{"c":1752720721,"u": 724}} ,{"schema":"libjg2-1", "cid":"1526a5f2564a763fa97dbd805728fcbd", "oid":{ "oid": "b34862bf8ab88ca2177672db7988dc4dc1e984cc", "alias": []},"blobname": "minimal-examples/raw/minimal-raw-fallback-http-server/README.md", "blob": "# lws minimal raw fallback http server\n\nThis is the same as the minimal http server, with one difference...\nif you connect to localhost:7681 with something that doesn't send\nrecognizable http, then the connection will be switched to a\nraw-skt role and bind to a protocol that echoes anything sent back\nto the sender.\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## usage\n\nCommandline option|Meaning\n---|---\n-d \u003cloglevel\u003e|Debug verbosity in decimal, eg, -d15\n-s|Configure the server for tls / https and `LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT`\n-h|(needs -s) Configure the vhost also for `LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER`, allowing http service on tls port (caution... it's insecure then)\n-u|(needs -s) Configure the vhost also for `LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS`, so the server issues a redirect to https to clients that attempt to connect to a server configured for tls with http.\n\n```\n $ ./lws-minimal-raw-fallback-http-server\n[2018/11/29 14:27:34:3014] USER: LWS minimal raw fallback http server | visit http://localhost:7681\n[2018/11/29 14:27:34:3243] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 off\n```\n\nVisit http://127.0.0.1:7681\n\nThis allows testing of various combinations of special features for unexpected\ncontent on an http(s) listening socket.\n\n|cmdline args|http://127.0.0.1:7681|https://127.0.0.1:7681|ssh -p7681 127.0.0.1|flags|\n|---|---|---|---|---|\n|none|served|no tls|echos hello|LWS_SERVER_OPTION_FALLBACK_TO_APPLY_LISTEN_ACCEPT_CONFIG\n|-s|echos http GET|served|echos hello|LWS_SERVER_OPTION_FALLBACK_TO_APPLY_LISTEN_ACCEPT_CONFIG, LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT\n|-s -h|served|served|echos hello|LWS_SERVER_OPTION_FALLBACK_TO_APPLY_LISTEN_ACCEPT_CONFIG, LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT, LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER\n|-s -u|redirected to https|served|echos hello|LWS_SERVER_OPTION_FALLBACK_TO_APPLY_LISTEN_ACCEPT_CONFIG, LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT, LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS\n\n","s":{"c":1752720721,"u": 273}} ],"g": 3442,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}