{"id":22464049,"url":"https://github.com/halosghost/ich","last_synced_at":"2025-03-27T14:29:24.971Z","repository":{"id":149471055,"uuid":"192434142","full_name":"HalosGhost/ich","owner":"HalosGhost","description":"a very quick reimplementaiton if icanhazip.com using C/lwan","archived":false,"fork":false,"pushed_at":"2020-09-23T00:10:09.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T18:43:14.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/HalosGhost.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-18T00:00:43.000Z","updated_at":"2020-09-23T00:10:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bffb3ae-2827-412e-87c2-2b2b1872e586","html_url":"https://github.com/HalosGhost/ich","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/HalosGhost%2Fich","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fich/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fich/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fich/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HalosGhost","download_url":"https://codeload.github.com/HalosGhost/ich/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245862562,"owners_count":20684706,"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-12-06T09:15:16.951Z","updated_at":"2025-03-27T14:29:24.962Z","avatar_url":"https://github.com/HalosGhost.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"ich\n===\n\nThis is an incredibly quick reimplementation of `icanhazip \u003chttps://github.com/major/icanhaz\u003e`_ in C.\nFor the moment, it only supports the ``ip`` functionality, none of the rest (though adding many of the services, if not all of them, would not be terribly difficult).\n\nThis is, honestly, quite a lot to have just to support such a simple service.\nAll the supporting files are present only to make smooth deployment of this service with reasonable security configuration as easy as possible.\n\nThe Stack\n---------\n\n* `lwan \u003chttps://lwan.ws/\u003e`_ - used as a library to build the webserver and page logic\n* `hitch \u003chttps://hitch-tls.org/\u003e`_ - TLS-terminating proxy server\n* `uacme \u003chttps://github.com/ndilieto/uacme/\u003e`_ - an ACME-protocol client for TLS Cert renewal\n\nAll running on Arch Linux using `nftables \u003chttps://netfilter.org/projects/nftables/\u003e`_ for traffic redirection and forwarding\n``hitch`` and ``nftables`` are optional; but if you want the simplest configuration, example configurations are provided in ``./cfg``.\n\nTraffic Redirection and Forwarding\n----------------------------------\n\nlwan does not officially support running on an externally-visible port, and it remains the author's express suggestion to not do so.\nTo bypass this limitation, we leverage hitch to redirect traffic from ``443`` to ``8443`` (where the contentful instance of lwan is running) and back.\n\nFurthermore, to forcibly redirect HTTP to HTTPS, we use nftables to redirect traffic from ``80`` to ``8080``.\nThen, a very small instance of lwan is running on port ``8080`` that does nothing but respond to ACME challenge requests and redirect all other traffic to whatever URL is specified in the environment variable ``HOMEPAGE_REDIRECT_TARGET``.\n\nConfiguration\n-------------\n\nTo ensure that the redirector appropriately redirects to the intended URL, add the following line (with the appropriate modifications) using ``systemctl edit``:\n\n.. code::\n\n    Environment=HOMEPAGE_REDIRECT_TARGET='https://domain.tld'\n\nIf using ``hitch`` to terminate the TLS-endpoint, the example configuration in ``./cfg`` should have ``domain.tld`` replaced with the appropriate URL for the certificate.\nSimilarly, ``domain.tld`` (and/or ``server.domain.tld``) sould be replaced with the appropriate domain for the certificate issuance.\n\nDesign Characteristics\n----------------------\n\n* Secure Header Configuration\n* Secure TLS Configuration\n* High Performance\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalosghost%2Fich","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalosghost%2Fich","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalosghost%2Fich/lists"}