{"id":13554876,"url":"https://github.com/wstrm/hotspot","last_synced_at":"2026-01-12T15:57:55.310Z","repository":{"id":23567228,"uuid":"26934967","full_name":"wstrm/hotspot","owner":"wstrm","description":"Captive portal for cjdns","archived":false,"fork":false,"pushed_at":"2015-03-18T13:42:48.000Z","size":5355,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T08:49:53.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/wstrm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-20T22:28:32.000Z","updated_at":"2022-11-28T16:20:25.000Z","dependencies_parsed_at":"2022-08-22T01:50:48.599Z","dependency_job_id":null,"html_url":"https://github.com/wstrm/hotspot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wstrm%2Fhotspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wstrm%2Fhotspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wstrm%2Fhotspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wstrm%2Fhotspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wstrm","download_url":"https://codeload.github.com/wstrm/hotspot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246957037,"owners_count":20860554,"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":[],"created_at":"2024-08-01T12:02:56.901Z","updated_at":"2026-01-12T15:57:55.276Z","avatar_url":"https://github.com/wstrm.png","language":"JavaScript","readme":"Hotspot (Work in Progress) [![Build Status](https://travis-ci.org/willeponken/hotspot.svg)](https://travis-ci.org/willeponken/hotspot)\n=======\n\nCaptive portal for CJDNS\n\n## TODO\n- [x] Don't use a upload form for the cjdroute.conf (security problems)\n- [x] Get IP Tunnels to work (automate everything)\n- [x] Work out how this should be done?\n- [ ] Replace node-cjdnsadmin with cjdns-admin module (on npm)\n\n## Vision\nThe idea is to have a CJDNS-only network, but before that, people want to be able to access the Internet.\nThis ~~is a~~ will be a general purpose captive portal, but as I'm in quite a hurry for my school project (inter alia this) there is some hardcoded stuff.\n\n## Contribute\nI appreciate contributions, but also scolding for mistakes, etc.\n\n## Deploy \u0026 setup\n### Setup\n#### Easy way\n* `npm install`.\n* Edit `config/cjdns.json` and add the correct path to `cjdroute.conf` or `.cjdnsadmin`.\n* Edit `config/hotspot.json` and change port and address to the appropriate, and change the information under `hotspot`. Also update `download` and poin to where the file is, or remove if you don't want to serve any files.\n\n####Custom way\n* Do all the steps under `Easy way`.\n* Now you can edit the view and stylesheets for a custom appearance.\n\t* Views `views/`\n\t* Stylesheets `public/src/stylesheets/`\n* You'll then need to rebuild the stylesheets with `npm install` or `bin/make`.\n\n###Deploy\nTo start the hotspot, run `npm start` or `bin/hotspot`\n\n## Test\nRun tests with\n`npm test`\n\n## Brainstorm\nHere I'll brainstorm how this should be done.\n\n### Links\n* https://github.com/berlinmeshnet/splashpage\n\n### Basic CJDNS -\u003e Hypeboria connection\n| CLIENT                                                      | SERVER                                |\n|-------------------------------------------------------------|---------------------------------------|\n| Connect via WiFi through AP whose gateway is the server.    |                                       |\n| Tries to connect to a webpage.                              |                                       |\n|                                                             | Redirecting to captive portal.        |\n| Registering at the captive portal.*                         |                                       |\n| Downloads CJDNS from captive portal, and then runs it.      |                                       |\n\n`* Could be removed and only show the user a download link for CJDNS and instructions.`\n\n### IP Tunnel connection to Internet\n| CLIENT                                                      | SERVER                                                                     |\n|-------------------------------------------------------------|----------------------------------------------------------------------------|\n| Tries to access non-local IPv4 and IPv6.                    |                                                                            |\n|                                                             | Redirecting to captive portal.                                             |\n| Clicks on IP Tunnel registration.                           |                                                                            |\n|                                                             | Creates credentials for user and add him/her to CJDNS.                     |\n|                                                             | Present credentials to user that he/she should add to their cjdroute.conf. |\n| Adds credentials.                                           |                                                                            |\n| Restarts CJDNS.                                             |                                                                            |\n| Tada! Able to access Internet.                              |                                                                            |\n\n## How-to\n\n###Access point\n####Topology\n* Gateway 10.3.14.1\n* Address 10.3.14.10-49\n* Netmask 255.255.255.0\n* DNS 10.3.14.1\n* SSID TESTNET\n\n###Router\n####Topology\n* eth0\n  * Gateway 192.168.1.1\n  * Address 192.168.1.3\n  * Netmask 255.255.255.0\n  * DNS 10.3.14.1\n* eth1\n  * Address 10.3.14.1\n  * Netmask 255.255.255.0\n* dhcp\n  * Range 10.3.14.50 - 10.3.14.200\n  * Broadcast 10.3.14.255\n  * Routers 10.3.14.1\n  * Lease time 600 - 7200\n  * Domain name TESTNET\n  * DNS 10.3.14.1\n* dns\n  * Interface eth0 \u0026 eth1\n* router\n  * Route traffic from port 80 and 443 (on eth1) to 10.3.14.1 \n\n####Configuration\nThis was done on a machine with Ubuntu installed.\n\n#####/etc/network/interfaces\nConfiguration for the TESTNET network:\n```\n# TESTNET network interface\nauto eth1\niface eth1 inet static\n  address 10.3.14.1\n  netmask 255.255.255.0\n  # Restore iptables\n  post-up iptables-restore \u003c /etc/iptables/rules\n```\n\n#####isc-dhcp-server\n`dhcpd.conf` configuration:\n```\nddns-update-style none;\nauthoritative;\nlog-facility local7;\n\nsubnet 10.3.14.0 netmask 255.255.255.0 {\n\trange 10.3.14.50 10.3.14.200;\n\toption broadcast-address 10.3.14.255;\n\toption routers 10.3.14.1;\n\tdefault-lease-time 600;\n\tmax-lease-time 7200;\n\toption domain-name \"TESTNET\";\n\toption domain-name-servers 10.3.14.1;\n}\n```\n#####dnsmasq\n`dnsmasq.conf` configuration:\n```\ninterface=eth1\n```\nOptionally, you could add `address=/#/10.3.14.1` to catch every DNS request and point to the server.\n\n#####iptables\nThese are the rules that are used:\n```\niptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.3.14.1:80\niptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.3.14.1:443\n```\nYou'd probably use `iptables-save` and `iptables-restore` for persistent rules, see below and `/etc/network/interfaces` configuration.\nSaving the rules:\n```\niptables-save \u003e /etc/iptables.rules\n```\n","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwstrm%2Fhotspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwstrm%2Fhotspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwstrm%2Fhotspot/lists"}