{"id":17310497,"url":"https://github.com/kpcyrd/narnia","last_synced_at":"2025-08-13T01:11:12.545Z","repository":{"id":30213531,"uuid":"354437412","full_name":"kpcyrd/narnia","owner":"kpcyrd","description":":construction: EXPERIMENTAL :construction: Secure hidden service webserver","archived":false,"fork":false,"pushed_at":"2022-06-17T01:36:50.000Z","size":188,"stargazers_count":53,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T23:41:36.377Z","etag":null,"topics":["anti-fingerprinting","darknet","deepweb","hidden-service","hidden-services","hosting","httpd","onion","onion-service","rust","tor","tor-hidden-services","webhosting"],"latest_commit_sha":null,"homepage":"http://3wisi2bfpxplne5wlwz4l5ucvsbaozbteaqnm62oxzmgwhb2qqxvsuyd.onion/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpcyrd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["kpcyrd"],"patreon":"kpcyrd"}},"created_at":"2021-04-04T02:19:23.000Z","updated_at":"2025-06-13T10:25:04.000Z","dependencies_parsed_at":"2022-07-21T04:48:30.483Z","dependency_job_id":null,"html_url":"https://github.com/kpcyrd/narnia","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/kpcyrd/narnia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpcyrd%2Fnarnia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpcyrd%2Fnarnia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpcyrd%2Fnarnia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpcyrd%2Fnarnia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpcyrd","download_url":"https://codeload.github.com/kpcyrd/narnia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpcyrd%2Fnarnia/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270161575,"owners_count":24537669,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["anti-fingerprinting","darknet","deepweb","hidden-service","hidden-services","hosting","httpd","onion","onion-service","rust","tor","tor-hidden-services","webhosting"],"created_at":"2024-10-15T12:37:23.340Z","updated_at":"2025-08-13T01:11:12.504Z","avatar_url":"https://github.com/kpcyrd.png","language":"Rust","funding_links":["https://github.com/sponsors/kpcyrd","https://patreon.com/kpcyrd"],"categories":[],"sub_categories":[],"readme":"# narnia\n\nnarnia is a fast static webserver specifically designed for Tor hidden services. It's also able to spawn a Tor thread and expose itself as a hidden service, simply by setting an additional commandline option.\n\nnarnia is hosting a mirror of its own source code on http://3wisi2bfpxplne5wlwz4l5ucvsbaozbteaqnm62oxzmgwhb2qqxvsuyd.onion/.\n\n```\n# Start the http server and serve files in www/\nnarnia -B '[::1]:1337' -w www/\n# Serve www/ and enable directory listing\nnarnia -B '[::1]:1337' -Lw www/\n# Serve www/ on a unix domain socket\n# The path needs to start with either . or /\nnarnia -B ./narnia.sock -w www/\n# Serve www/ on a hidden service\n# The hidden service address is in `data/hs/hostname`\nnarnia -D data/ -w www/\n# Serve www/ but chroot into it beforehand, verbose logs\nnarnia -vv -B '[::1]:1337' -w / -C www/\n```\n\n## Comparison of http response headers\n\n**narnia**\n```\n\u003c HTTP/1.1 200 OK\n\u003c content-length: 1337\n\u003c accept-ranges: bytes\n\u003c date: Thu, 01 Jan 1970 00:00:00 GMT\n\u003c content-type: text/html; charset=utf-8\n\u003c x-content-type-options: nosniff\n\u003c referrer-policy: no-referrer\n```\n\n**onionshare**\n```\n\u003c HTTP/1.0 200 OK\n\u003c Content-Type: text/html; charset=utf-8\n\u003c Content-Length: 1337\n\u003c X-Frame-Options: DENY\n\u003c X-Xss-Protection: 1; mode=block\n\u003c X-Content-Type-Options: nosniff\n\u003c Referrer-Policy: no-referrer\n\u003c Server: OnionShare\n\u003c Content-Security-Policy: default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self' data:;\n\u003c Date: Mon, 05 Apr 2021 19:08:54 GMT\n```\n\n**nginx**\n```\n\u003c HTTP/1.1 200 OK\n\u003c Server: nginx\n\u003c Date: Mon, 05 Apr 2021 19:04:42 GMT\n\u003c Content-Type: text/html\n\u003c Content-Length: 1337\n\u003c Last-Modified: Mon, 05 Apr 2021 19:04:33 GMT\n\u003c Connection: keep-alive\n\u003c ETag: \"606b5f41-539\"\n\u003c Accept-Ranges: bytes\n```\n\n## Static binary\n\n**Linux**\n```\nsudo pacman -S musl\nrustup target add x86_64-unknown-linux-musl\ncargo build --release --target x86_64-unknown-linux-musl --features=vendored\nstrip target/x86_64-unknown-linux-musl/release/narnia\nldd target/x86_64-unknown-linux-musl/release/narnia\n```\n\n**Windows**\n```\npacman -S mingw-w64\nrustup target add x86_64-pc-windows-gnu\ncargo build --release --target x86_64-pc-windows-gnu --features=vendored\nx86_64-w64-mingw32-strip target/x86_64-pc-windows-gnu/release/narnia.exe\nfile target/x86_64-pc-windows-gnu/release/narnia.exe\n```\n\n## Building\n\n### OpenBSD\n\nYou need to install rust, autoconf and automake. You're getting asked for a version, select the latest one and take note of the first two numbers of the version. You can look this up with `pkg_info` if you forget them. This example output is from OpenBSD 6.8.\n```\n$ doas pkg_add autoconf automake\nquirks-3.442 signed on 2021-04-08T13:45:25Z\nAmbiguous: choose package for autoconf\na\t0: \u003cNone\u003e\n\t1: autoconf-2.13p4\n\t2: autoconf-2.52p6\n\t3: autoconf-2.54p6\n\t4: autoconf-2.56p5\n\t5: autoconf-2.57p5\n\t6: autoconf-2.58p5\n\t7: autoconf-2.59p5\n\t8: autoconf-2.60p5\n\t9: autoconf-2.61p5\n\t10: autoconf-2.62p2\n\t11: autoconf-2.63p1\n\t12: autoconf-2.64p1\n\t13: autoconf-2.65p1\n\t14: autoconf-2.67p1\n\t15: autoconf-2.68p1\n\t16: autoconf-2.69p3\nYour choice: 16\nautoconf-2.69p3:metaauto-1.0p4: ok\nautoconf-2.69p3: ok\nAmbiguous: choose package for automake\na\t0: \u003cNone\u003e\n\t1: automake-1.4.6p5\n\t2: automake-1.8.5p9\n\t3: automake-1.9.6p12\n\t4: automake-1.10.3p9\n\t5: automake-1.11.6p3\n\t6: automake-1.12.6p2\n\t7: automake-1.13.4p2\n\t8: automake-1.14.1p1\n\t9: automake-1.15.1\n\t10: automake-1.16.2\nYour choice: 10\nautomake-1.16.2: ok\n```\n\nNext, pass the versions to cargo build:\n```bash\nAUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 cargo build\n```\n\n### Alpine\n\n```\ndoas apk add make autoconf automake openssl-dev\n```\n\n## License\n\nGPLv3+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpcyrd%2Fnarnia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpcyrd%2Fnarnia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpcyrd%2Fnarnia/lists"}