{"id":22279431,"url":"https://github.com/shortarrow/localssldev","last_synced_at":"2025-03-25T18:34:44.633Z","repository":{"id":204339463,"uuid":"711095605","full_name":"ShortArrow/localssldev","owner":"ShortArrow","description":"devtools","archived":false,"fork":false,"pushed_at":"2023-10-29T18:32:31.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:08:38.013Z","etag":null,"topics":["http","ssl","ssl-proxy"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/ShortArrow.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}},"created_at":"2023-10-28T07:45:21.000Z","updated_at":"2024-03-29T11:45:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc193641-9ac9-4eb2-a73d-cb9a4331c7f6","html_url":"https://github.com/ShortArrow/localssldev","commit_stats":null,"previous_names":["shortarrow/localssldev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Flocalssldev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Flocalssldev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Flocalssldev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Flocalssldev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShortArrow","download_url":"https://codeload.github.com/ShortArrow/localssldev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245521079,"owners_count":20629005,"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":["http","ssl","ssl-proxy"],"created_at":"2024-12-03T15:19:22.006Z","updated_at":"2025-03-25T18:34:44.608Z","avatar_url":"https://github.com/ShortArrow.png","language":"Shell","readme":"# LOCAL SSL DEVELOPMENT TOOL\n\n## Description\n\nThere is an HTTP service running within the LAN, assigned to an arbitrary IP. I want to launch a Docker container that sets up an HTTPS proxy to this HTTP service using letsencrypt, certbot, cloudflare and nginx. I want to be able to access this from within the host machine where the proxy container is running, using \u003chttps://local.hoge.jp\u003e.\n\n- Utilize `docker compose`.\n- The A record of `local.hoge.jp` is managed by Cloudflare DNS.\n- The A record of `local.hoge.jp` should be fixed at `127.0.0.1`.\n- Ensure the `certbot renew` command is executed periodically as configured.\n- Allow the setting of `local.hoge.jp` and the LAN internal IP in the `.env` file.\n- I want to obtain a \"real HTTPS certificate\"  using DNS authentication.\n- \"real HTTPS certificate\" means that a certificate that can be verified with a certificate already in the certificate store\n- Write the `DOMAIN` and `LAN_IP` in the `.env` file just once.\n\n## Architecture\n\n```mermaid\nsequenceDiagram\n    box darkred your local machine\n        participant A as User\n        participant J as ThisTool\n    end\n    box darkblue Coudflare\n        participant F as DNS\n    end\n    box darkgreen dev server in your LAN\n        participant B as ContainerA\n        participant C as ContainerB\n    end\n\n    A-\u003e\u003eF: where is `local.hoge.jp`\n    F-\u003e\u003eA: that is `127.0.0.1`\n    A-\u003e\u003eJ: `https://127.0.0.1:443`\n    J-\u003e\u003eB: please content of `http://192.168.0.123:3000`\n    B-\u003e\u003eJ: This is contents\n    J-\u003e\u003eA: This is your wants\n    A-\u003e\u003eF: where is `api.hoge.jp`\n    F-\u003e\u003eA: that is `https://127.0.0.1`\n    A-\u003e\u003eJ: `https://127.0.0.1:4443`\n    J-\u003e\u003eC: please content of `http://192.168.0.123:3333`\n    C-\u003e\u003eJ: This is contents\n    J-\u003e\u003eA: This is your wants\n```\n\n## Usage\n\nRun `./start_docker.sh` to start the docker container.\n\n## Config\n\n### cloudflare config\n\nMake your own `cloudflare.ini` file.\n\n```text\ndns_cloudflare_api_token = YOUR_API_TOKEN\n```\n\n### .env\n\nMake your own `.env` file.\n\n```text\nDOMAIN=local.hoge.jp\nLAN_IP=192.168.0.123:3000\nDOMAIN2=api.hoge.jp\nLAN_IP2=192.168.0.123:3333\nEMAIL=your_cloudflare_account_email_address@email.jp\n```\n\n## Disclaimer\n\nThis tool is for local development only.\nDo not use it in a production environment.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshortarrow%2Flocalssldev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshortarrow%2Flocalssldev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshortarrow%2Flocalssldev/lists"}