{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745915585,
"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": "d90cd7be6dfccdb25ce7543f57be43a8268436c7", "alias": []},"tree": [
{ "name": "mount-origin","mode": "16384", "size":0},
{ "name": "CMakeLists.txt","mode": "33188", "size":776},
{ "name": "README.md","mode": "33188", "size":2774},
{ "name": "localhost-100y.cert","mode": "33188", "size":2106},
{ "name": "localhost-100y.key","mode": "33188", "size":3272},
{ "name": "minimal-http-server-tls-80.c","mode": "33188", "size":3899}],"s":{"c":1745727958,"u": 702}}
,{"schema":"libjg2-1",
"cid":"6039b9de038e82b1082e7784190c3e47",
"oid":{ "oid": "d90cd7be6dfccdb25ce7543f57be43a8268436c7", "alias": []},"blobname": "minimal-examples/http-server/minimal-http-server-tls-80/README.md", "blob": "# lws minimal http server with tls and port 80 redirect\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## usage\n\nBecause this listens on low ports (80 + 443), it must be run as root.\n\n```\n $ sudo ./lws-minimal-http-server-tls-80\n[2018/03/20 13:23:13:0131] USER: LWS minimal http server TLS | visit https://localhost:7681\n[2018/03/20 13:23:13:0142] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 off\n[2018/03/20 13:23:13:0142] NOTICE: Using SSL mode\n[2018/03/20 13:23:13:0146] NOTICE: SSL ECDH curve 'prime256v1'\n[2018/03/20 13:23:13:0146] NOTICE: HTTP2 / ALPN enabled\n[2018/03/20 13:23:13:0195] NOTICE: lws_tls_client_create_vhost_context: doing cert filepath localhost-100y.cert\n[2018/03/20 13:23:13:0195] NOTICE: Loaded client cert localhost-100y.cert\n[2018/03/20 13:23:13:0195] NOTICE: lws_tls_client_create_vhost_context: doing private key filepath\n[2018/03/20 13:23:13:0196] NOTICE: Loaded client cert private key localhost-100y.key\n[2018/03/20 13:23:13:0196] NOTICE: created client ssl context for default\n[2018/03/20 13:23:14:0207] NOTICE: vhost default: cert expiry: 730459d\n```\n\nVisit http://localhost\n\nThis will go first to port 80 using http, where it will be redirected to\nhttps and port 443\n\n```\n07:41:48.596918 IP localhost.http \u003e localhost.52662: Flags [P.], seq 1:100, ack 416, win 350, options [nop,nop,TS val 3906619933 ecr 3906619933], length 99: HTTP: HTTP/1.1 301 Redirect\n\t0x0000: 4500 0097 3f8f 4000 4006 fccf 7f00 0001 E...?.@.@.......\n\t0x0010: 7f00 0001 0050 cdb6 6601 dfa7 922a 4c06 .....P..f....*L.\n\t0x0020: 8018 015e fe8b 0000 0101 080a e8da 4a1d ...^..........J.\n\t0x0030: e8da 4a1d 4854 5450 2f31 2e31 2033 3031 ..J.HTTP/1.1.301\n\t0x0040: 2052 6564 6972 6563 740d 0a6c 6f63 6174 .Redirect..locat\n\t0x0050: 696f 6e3a 2068 7474 7073 3a2f 2f6c 6f63 ion:.https://loc\n\t0x0060: 616c 686f 7374 2f0d 0a63 6f6e 7465 6e74 alhost/..content\n\t0x0070: 2d74 7970 653a 2074 6578 742f 6874 6d6c -type:.text/html\n\t0x0080: 0d0a 636f 6e74 656e 742d 6c65 6e67 7468 ..content-length\n\t0x0090: 3a20 300d 0a0d 0a\n```\n\nBecause :443 uses a selfsigned certificate, you will have to make an exception for it in your browser.\n\n## Certificate creation\n\nThe selfsigned certs provided were created with\n\n```\necho -e \u0022GB\u005cnErewhon\u005cnAll around\u005cnlibwebsockets-test\u005cn\u005cnlocalhost\u005cnnone@invalid.org\u005cn\u0022 | openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 -keyout \u0022localhost-100y.key\u0022 -out \u0022localhost-100y.cert\u0022\n```\n\nthey cover \u0022localhost\u0022 and last 100 years from 2018-03-20.\n\nYou can replace them with commercial certificates matching your hostname.\n\n## HTTP/2\n\nIf you built lws with `-DLWS_WITH_HTTP2\u003d1` at cmake, this simple server is also http/2 capable\nout of the box. If the index.html was loaded over http/2, it will display an HTTP 2 png.\n","s":{"c":1745727958,"u": 365}}
],"g": 1621,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}