{"id":16473125,"url":"https://github.com/binki/anarchyirc-link-block-service","last_synced_at":"2025-11-22T23:05:19.941Z","repository":{"id":143134190,"uuid":"88834414","full_name":"binki/anarchyirc-link-block-service","owner":"binki","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-13T04:56:45.000Z","size":24,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T02:19:15.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://anarchyirc.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-04-20T07:29:43.000Z","updated_at":"2017-04-23T16:42:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"47e23171-db05-41c8-8089-cd2f062d987d","html_url":"https://github.com/binki/anarchyirc-link-block-service","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/binki%2Fanarchyirc-link-block-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fanarchyirc-link-block-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fanarchyirc-link-block-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fanarchyirc-link-block-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binki","download_url":"https://codeload.github.com/binki/anarchyirc-link-block-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241110900,"owners_count":19911410,"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-10-11T12:25:25.506Z","updated_at":"2025-11-22T23:05:19.912Z","avatar_url":"https://github.com/binki.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Meant to server `unrealircd.conf`-compatible `links.conf` for Remote\nIncludes and enable servers to update their SSL certificates through a\n[simple\nclient](https://github.com/binki/anarchyirc-link-block-client).\n\n# Configuration\n\nThe `servers` directory contains all of the human-managed per-server\nconfiguration. The `data` directory contains all state which is\nautomatically updated by servers.\n\n## `servers`\n\nEach server shall have two file entries here. `«name».json` (optional)\nand `«name».crt`.\n\n`«name»` is a friendly name for the server. This is used as the name\nof the link block in the generated configs.\n\n`«name».crt` is the PEM-encoded certificate authorizing updates\ngenerated by running `client-gen-cert.sh` on the client. This is used\nto authenticate any requests made by the client to this service and\ndetermine which client is making the request. The idea is that these\ncertificates will only ever be created once per server. They are\nself-signed and are just like an “API key” or “cookie” used by the\nclient to identify itself to this service.\n\n`«name».json` is a JSON encoded configuration for the\nserver. Currently, the following keys are allowed:\n\n* `hostname`: The hostname of the server (defaults to `«name»`).\n\n## `data`\n\nTo populate this initially, run the client update script on each\nclient.\n\n`updated` may be touched in the `data` directory to cause the process\nto exit (in case you cannot run `kill(1)` yourself). In the future it\nmay do this in a more graceful way.\n\n# Apache Configuration\n\nFor the directory where this is deployed, the following configuration\nis required:\n\n```apache\n# Allow things to read client certs but do not rely on CAs for stuff.\nSSLVerifyClient optional_no_ca\n# Export the client certificate to the environment so that it can be verified by the CGI scripts.\nSSLOptions +ExportCertData\n\n# You must have FastCGI set up, e.g., mod_fcgid, to serve\n# exeutables ending in .cgi. It is recommended to use either\n# mod_suexec or an appliance VM (not shown):\n\u003cDirectory /home/*/public_html\u003e\n  # Do not use AddHandler because it matches files like\n  # blah.cgi.en (or blah.cgi.i_do_not_want_this_to_execute).\n  \u003cFilesMatch \"\\.cgi$\"\u003e\n    SetHandler fcgid-script\n    Options +ExecCGI\n  \u003c/FilesMatch\u003e\n\u003c/Directory\u003e\n```\n\n# API\n\nWith how things are now, you must access and include `index.cgi` in\nyour URI. I.e., this uses (and only knows how to use) `PATH_INFO`.\nFor example, getting the links config can be `«URI to directory where\nindex.cgi is»/index.cgi/links.conf`. `index.cgi` is considered part of\nthe `«endpoint»` as documented [in the\nclient](https://github.com/binki/anarchyirc-link-block-client). E.g.,\nan `«endpoint»` might be `https://example.org/ri/index.cgi`.\n\n`«endpoint»/update`: POST, HTTP client must present an SSL certificate\nmatching the certificate in `servers/«server me::name».crt`. The link\nblock service looks up `me::name` based on the presented\ncertificate’s fingerprint (no need to set the Common Name or Subject\nAlternative Name or anything). The POSTed body should include an\nentity named `cert` which is the PEM formatted public certificate that\nthe IRCd uses. The POSTed cert will be deposited to\n`data/«me::name».crt` and the link service will start returning the\nnew fingerprint in its generated link blocks after success.\n\n`«endpoint»/links.conf`: GET, gets a configuration file meant to be\nincluded into your IRCd’sconfiguration e.g. using [UnrealIRCd’s\nRemote Includes\nfeature](https://www.unrealircd.org/docs/Remote_includes). The\ngenerated configuration is safe to share with the public as no private\ndata is stored in it (unless you consider your listing of servers\nprivate data which you may if e.g. you disable `/MAP` or `/LINKS` in\nan attempt to make DoS attacks more difficult). However, even so, you\nshould access this URI over HTTPS to guard against a MiTM attempting\nto intercept and modify the generated configuration.\n\nThis endpoint has the following GET parameters:\n\n* `syntax` (default: `unrealircd4`). You may specify syntaxes of\n  either `unrealircd3`, `unrealircd4`, or `json`. E.g.,\n  `«endpoint»/links.conf?syntax=unrealircd` will return the\n  configuration in `unrealircd3` style (but [you should not be using\n  UnrealIRCd-3.x\n  anymore](https://forums.unrealircd.org/viewtopic.php?f=1\u0026t=8629)). The\n  `json` format may be useful for consuming and transforming. Other\n  syntaxes may be added by modifying\n  [`conf-generation.js`](conf-generation.js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fanarchyirc-link-block-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinki%2Fanarchyirc-link-block-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fanarchyirc-link-block-service/lists"}